Skip to content

GlyphField.solidColor

Summary

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

Syntax

GlyphField.solidColor: Color4
const value = glyphField.solidColor;

Parameters

This API does not take parameters.

Returns

Color4 - Current accessor value exposed by the runtime object.

Type Details

Color4

type Color4 = [number, number, number, number];

Example

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

const glyphField = wgpu.createGlyphField({ instanceCount: 1, positions: new Float32Array([0, 0, 0, 0]), rotations: new Float32Array([0, 0, 0, 1]), scales: new Float32Array([1, 1, 1, 0]), attributes: new Float32Array([0.5, 0, 0, 0]), scaleTransform: { mode: "linear", domainMin: 0, domainMax: 1 } });
const value = glyphField.solidColor;
console.log(value);

See Also