Skip to content

Geometry beta ​

Interface of @v12-engine/render

ts
export interface Geometry

A mesh's points on the card, shared by every batch that draws it

Members ​

bounds ​

ts
bounds(centre: readonly [number, number, number], radius: number, box?: ArrayLike<number>): void;

The sphere its copies are culled by, where its points moved, and the box of its points (min, max) where it is known: what reads the shadows is looked for by it (stats.nearestRead), the sphere's box where none is given

centre ​

ts
readonly centre: readonly [number, number, number];

The sphere around its points: its own at first, or what bounds last said

dispose ​

ts
dispose(): void;

Frees its buffers on the card, once no batch draws it

indexCount ​

ts
readonly indexCount: number;

How many indices it was made with: the count drawn

radius ​

ts
readonly radius: number;

The radius of the sphere around its points

triangles ​

ts
readonly triangles: number;

How many triangles: its indices over three

vertices ​

ts
readonly vertices: number;

How many vertices: its positions over three

writeIndices ​

ts
writeIndices(data: Uint32Array, first?: number): void;

Writes indices again from index first on; the count drawn stays what the geometry was made with

writePositions ​

ts
writePositions(data: Float32Array, first?: number): void;

Writes positions again from vertex first on (three floats each); the sphere is not moved: bounds does

writeStream ​

ts
writeStream(name: string, data: StreamData, first?: number): void;

Writes a stream again from vertex first on