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

    Class TextureSequencer

    Target points read from an image: one point per pixel whose alpha passes a threshold, so particles gather into the picture.

    Implements

    Index
    • Parameters

      • OptionalscaleX: number

        World units per pixel along x.

      • OptionalscaleY: number

        World units per pixel along y.

      • Optionalposition: Vector3Like

        Where the image's origin lands.

      Returns TextureSequencer

    locations: Vector2[]

    The pixel coordinates read from the image, y up.

    scaleX: number
    scaleY: number
    • get position(): Vector3

      Where the image's origin lands. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Returns Vector3

    • set position(value: Vector3Like): void

      Where the image's origin lands. Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.

      Parameters

      Returns void

    • A copy with its own points.

      Returns Sequencer

    • Replaces TextureSequencer.locations with the pixels of img whose alpha is above threshold (0–255). Needs a DOM, for its canvas.

      Parameters

      • img: CanvasImageSource
      • threshold: number

      Returns void

    • Writes into position the point for particle index, wrapping around the points; leaves it as it is when there are none.

      Parameters

      • position: Vector3
      • index: number

      Returns void