diff --git a/types/three/src/objects/BatchedMesh.d.ts b/types/three/src/objects/BatchedMesh.d.ts index 5fc45f8f6..d011e1ab5 100644 --- a/types/three/src/objects/BatchedMesh.d.ts +++ b/types/three/src/objects/BatchedMesh.d.ts @@ -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"; @@ -108,6 +109,13 @@ declare class BatchedMesh extends Mesh { 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]. @@ -121,6 +129,13 @@ declare class BatchedMesh extends Mesh { */ 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. diff --git a/types/three/src/renderers/webgl/WebGLPrograms.d.ts b/types/three/src/renderers/webgl/WebGLPrograms.d.ts index a1f3194f8..ef07345f6 100644 --- a/types/three/src/renderers/webgl/WebGLPrograms.d.ts +++ b/types/three/src/renderers/webgl/WebGLPrograms.d.ts @@ -39,6 +39,7 @@ export interface WebGLProgramParameters { precision: "lowp" | "mediump" | "highp"; batching: boolean; + batchingColor: boolean; instancing: boolean; instancingColor: boolean; instancingMorph: boolean;