API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classUniformArray

@codexo/exojs / rendering / stable

A fixed-length array of `length` elements of one type. Element types are restricted to those whose stride is already a multiple of 16 bytes - `vec4<f32>`, the matrices, and structs. A smaller element would need a 16-byte stride the two languages cannot spell the same way: std140 applies it silently, while WGSL rejects the array outright in the uniform address space. Declare `Vec4` and use its components instead of an array of four floats.

3
props
0
methods
0
events
Import
import { UniformArray } from '@codexo/exojs'

A fixed-length array of `length` elements of one type.

Element types are restricted to those whose stride is already a multiple of 16 bytes - `vec4<f32>`, the matrices, and structs. A smaller element would need a 16-byte stride the two languages cannot spell the same way: std140 applies it silently, while WGSL rejects the array outright in the uniform address space. Declare `Vec4` and use its components instead of an array of four floats.

Constructors1
new(element: E, length: number): UniformArray<E>
Properties3
element: E
kind: "array"
length: number
Source