splat-transform API Reference - v1.0.0
    Preparing search index...

    Function transform

    • Applies a spatial transformation to splat data in-place.

      Transforms position, rotation, scale, and spherical harmonics data. The transformation is applied as: scale first, then rotation, then translation.

      Parameters

      • dataTable: DataTable

        The DataTable to transform (modified in-place).

      • t: Vec3

        Translation vector.

      • r: Quat

        Rotation quaternion.

      • s: number

        Uniform scale factor.

      Returns void

      import { Vec3, Quat } from 'playcanvas';

      // Scale by 2x, rotate 90° around Y, translate up
      transform(dataTable, new Vec3(0, 5, 0), new Quat().setFromEulerAngles(0, 90, 0), 2.0);