Matrix Engine Api Documentation - v2.0.0
    Preparing search index...

    Class SplatPositionAnimator

    Index

    Constructors

    Properties

    _basePos: Float32Array<ArrayBuffer>
    _dustActive: boolean
    _dustDur: number
    _dustProgress: number
    _dustY0: Float32Array<ArrayBuffer>
    _frameCount: number
    _frameSkip: number
    _morphDur: number
    _morphFrom: Float32Array<ArrayBuffer>
    _morphT: number
    _morphTarget: Float32Array<ArrayBufferLike>
    _phase: Float32Array<ArrayBuffer>
    _posCPU: Float32Array<ArrayBuffer>
    _seedX: Float32Array<ArrayBuffer>
    _seedZ: Float32Array<ArrayBuffer>
    _upAxis: number
    device: GPUDevice
    mode: string
    posBuffer: any
    scale: number
    speed: number
    vertexCount: number

    Methods

    • changeShape: sinusoidal warp that drifts over time, morphing the mesh into abstract bulging/twisted configurations.

      Parameters

      • t: any

      Returns void

    • Dust: splats collapse toward Y=0 with lateral drift and individual fall delays (earlier splats start falling sooner based on _phase).

      Parameters

      • dt: any

      Returns void

    • Liquid: per-splat sinusoidal displacement with normal-direction bias and slow global sloshing, giving a fluid surface feel.

      Parameters

      • t: any

      Returns void

    • Pulse: radial breathing — splats oscillate outward from centroid. Different frequencies per concentric shell give a ripple feel.

      Parameters

      • t: any

      Returns void

    • Tornado: splats orbit the Y-axis with radius and angular speed proportional to height; tip contracts, base fans out.

      Parameters

      • t: any

      Returns void

    • Smoothly interpolate from current positions to a new Float32Array of xyz.

      Parameters

      • targetPositions: Float32Array<ArrayBufferLike>

        length = vertexCount * 3

      • duration: number = 1.5

        seconds

      Returns void

    • Reset to original meshA positions

      Parameters

      • duration: number = 1.5

      Returns void

    • Trigger the "dust" effect: splats fall and scatter horizontally toward Y=0.

      Parameters

      • duration: number = 2.0

        seconds for full collapse

      Returns void