Skip to content

Mesh.worldMatrix

Summary

Mesh.worldMatrix reads the current worldMatrix value from this Mesh instance. Use it to inspect runtime state without mutating resources.

Syntax

Mesh.worldMatrix: number[]
const value = mesh.worldMatrix;

Parameters

This API does not take parameters.

Returns

number[] - Current accessor value exposed by the runtime object.

Type Details

// No additional descriptor expansion is required for this signature.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const geometry = wgpu.geometry.box(1, 1, 1);
const material = wgpu.material.unlit({ color: [0.9, 0.6, 0.2], opacity: 1.0 });
const mesh = wgpu.createMesh(geometry, material);
const value = mesh.worldMatrix;
console.log(value);

See Also