Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions types/three/src/objects/BatchedMesh.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Camera } from "../cameras/Camera.js";
import { BufferGeometry } from "../core/BufferGeometry.js";
import { Material } from "../materials/Material.js";
import { Box3 } from "../math/Box3.js";
import { Color } from "../math/Color.js";
import { Matrix4 } from "../math/Matrix4.js";
import { Sphere } from "../math/Sphere.js";
import { Mesh } from "./Mesh.js";
Expand Down Expand Up @@ -108,6 +109,13 @@ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
func: ((this: this, list: Array<{ start: number; count: number; z: number }>, camera: Camera) => void) | null,
): this;

/**
* Get the color of the defined geometry.
* @param index The index of a geometry. Values have to be in the range [0, count].
* @param color This color object will be set to the color of the defined geometry.
*/
getColorAt(index: number, color: Color): void;

/**
* Get the local transformation matrix of the defined instance.
* @param index The index of an instance. Values have to be in the range [0, count].
Expand All @@ -121,6 +129,13 @@ declare class BatchedMesh extends Mesh<BufferGeometry, Material> {
*/
getVisibleAt(index: number): boolean;

/**
* Sets the given color to the defined geometry.
* @param index The index of a geometry. Values have to be in the range [0, count].
* @param color The color of a single geometry.
*/
setColorAt(index: number, color: Color): void;

/**
* Sets the given local transformation matrix to the defined instance. Make sure you set {@link .instanceMatrix}
* {@link BufferAttribute.needsUpdate} to true after updating all the matrices.
Expand Down
1 change: 1 addition & 0 deletions types/three/src/renderers/webgl/WebGLPrograms.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface WebGLProgramParameters {
precision: "lowp" | "mediump" | "highp";

batching: boolean;
batchingColor: boolean;
instancing: boolean;
instancingColor: boolean;
instancingMorph: boolean;
Expand Down