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

    Class EmitterFrame

    The emitter's world transform, decomposed once per frame, with the conversions a behavior needs to move a vector or a point between the space it was authored in and the space the particles simulate in.

    Call refresh from frameUpdate. Before the first refresh the frame is the identity, so a conversion is a no-op. The transform read is the emitter's matrix as the host set it for the frame; a host that runs several simulation steps per frame interpolates the emitter's motion for emission, but the behaviors see the frame's end position.

    Index
    position: Vector3

    The emitter's world position.

    quaternion: Quaternion

    The emitter's world rotation.

    quaternionInverse: Quaternion

    Inverse of quaternion.

    scale: Vector3

    The scale per axis of the emitter's matrixWorld, which its scaling mode sets.

    scaleInverse: Vector3

    Reciprocal of scale per axis, 0 where the scale is 0.

    • Converts the force vector, authored in space, into the simulation space, as Unity converts forces. A force that scales with the emitter (scaled, the default of the force behaviors) is converted as toSimulation converts a direction, except a world force in a local-space system: that one is only turned into the emitter's axes, and the local frame then scales it with everything else, as Unity does. (In a world-space system the force behaviors multiply a world force by the system's motionScale for the same reason.) A force that does not scale with the emitter keeps its strength in world units however the emitter is scaled, as Unity's gravity does: a local one is turned but not scaled, and in a local-space system the frame's scale is divided out.

      Parameters

      • vector: Vector3
      • space: BehaviorSpace
      • worldSpace: boolean
      • scaled: boolean

      Returns Vector3

    • The inverse of toSimulation: converts the direction vector, in the simulation space, into space. A vector already in space is left as it is.

      Parameters

      Returns Vector3

    • Converts the point point, authored in space, into the simulation space, as toSimulation does for a direction but with the emitter's position taken into account.

      Parameters

      Returns Vector3

    • Decomposes the emitter's current world matrix.

      Parameters

      Returns void

    • Converts the direction vector, authored in space, into the simulation space of a system that simulates in world space when worldSpace is true. A vector already in the simulation space is left as it is.

      Parameters

      Returns Vector3

    • Whether forceToSimulation reads the frame for these settings, so a behavior refreshes it only then.

      Parameters

      Returns boolean