babylon.quarks - v1.0.0
    Preparing search index...

    Class ShapeTransform

    Local transform of an emitter shape inside its particle system, like the Position / Rotation / Scale of Unity's Shape module.

    A spawn point p lands at position + rotation * (scale * p). The start direction goes through the same scale and rotation and is then brought back to its old length, so a squashed shape bends directions without changing the start speed — which is what Unity does.

    Index
    • get position(): Vector3

      Offset of the shape in the system. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Returns Vector3

    • set position(value: Vector3Like): void

      Offset of the shape in the system. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Parameters

      Returns void

    • get rotation(): Quaternion

      Rotation of the shape in the system. Set it from any QuaternionLike, such as a Babylon Quaternion; the value is copied.

      Returns Quaternion

    • set rotation(value: QuaternionLike): void

      Rotation of the shape in the system. Set it from any QuaternionLike, such as a Babylon Quaternion; the value is copied.

      Parameters

      Returns void

    • get scale(): Vector3

      Scale of the shape, applied before the rotation. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Returns Vector3

    • set scale(value: Vector3Like): void

      Scale of the shape, applied before the rotation. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Parameters

      Returns void

    • Moves a freshly initialized particle from shape space into system space.

      Parameters

      Returns void

    • A copy with its own vectors and quaternion.

      Returns ShapeTransform

    • Whether the transform moves nothing: zero offset, identity rotation, unit scale.

      Returns boolean

    • The JSON form, with only the parts that are not identity.

      Returns ShapeTransformJSON

    • The transform entry of a shape's JSON: empty when the shape has no transform or an identity one, so shapes without one serialize as before.

      Parameters

      Returns Pick<ShapeJSON, "transform">