import gamnit
import gamnit::cameras_cache
+intrude import gamnit::cameras
import gamnit::dynamic_resolution
import gamnit::limit_fps
import gamnit::camera_control
do
texture.load
- ui_camera.reset_height 1080.0
-
var splash = new Sprite(texture, ui_camera.center)
ui_sprites.add splash
end
redef class Point3d[N]
- # Get a new `Point3d[Float]` with an offset of each axis of `x, y, z`
- fun offset(x, y, z: Numeric): Point3d[Float]
- do
- return new Point3d[Float](self.x.to_f+x.to_f, self.y.to_f+y.to_f, self.z.to_f+z.to_f)
- end
-
# ---
# Associate each point to its sprites
end
end
+redef class OffsetPoint3d
+ redef fun x=(v)
+ do
+ if isset _x and v != x then needs_update
+ super
+ end
+
+ redef fun y=(v)
+ do
+ if isset _y and v != y then needs_update
+ super
+ end
+
+ redef fun z=(v)
+ do
+ if isset _z and v != z then needs_update
+ super
+ end
+end
+
# Set of sprites sorting them into different `SpriteContext`
private class SpriteSet
super HashSet[Sprite]