SashimiObject constructor

SashimiObject({
  1. required Vector3 position,
  2. required Vector3 size,
  3. Vector3? scale,
  4. double angle = 0,
})

Abstract class for defining objects in the Sashimi engine.

An object can exist out of one or more SashimiSlices. These visualize the object.

An object can be moved, scaled and sized in three dimensions visually while it only moves, scales, sizes and rotates in two dimensions logically. This is done by using a SashimiController which is a PositionComponent that handles the position, size, scale and angle of the object in the logical world.

The logical world is the world where the object exists. The visual world is the world where the object is rendered.

Implementation

SashimiObject({
  required Vector3 position,
  required Vector3 size,
  Vector3? scale,
  double angle = 0,
})  : position = NotifyingVector3.copy(position),
      size = NotifyingVector3.copy(size),
      scale = NotifyingVector3.copy(scale ?? Vector3.all(1)),
      _angle = angle;