wasm-spatial-core
    Preparing search index...

    Function applyColorRamp

    • Apply a discrete color array to a point cloud.

      Arguments

      • positions — Float32Array [x0, y0, z0, ...]
      • colors — Float32Array [r0, g0, b0, a0, ...] (0.0-1.0), one color per point

      Returns

      Float32Array RGBA matching colors length, padded with gray for missing entries.

      Parameters

      • positions: Float32Array
      • colors: Float32Array

      Returns Float32Array