Closed as not planned
Description
openedon Jun 7, 2024
π Search Terms
Property 'dispose' does not exist on type 'string | number | boolean | Record<string, any> | Color | ((material: Material) => Material)
π Version & Regression Information
β― Playground Link
No response
π» Code
export function disposeMaterial(material: THREE.Material) {
if (material instanceof THREE.Material) {
for (const key in material) {
const k = key as keyof THREE.Material
if (material[k] instanceof THREE.Texture) {
//@ts-ignore
material[k].dispose()
}
}
material.dispose()
}
}
π Actual behavior
no error
π Expected behavior
no error
Additional information about the issue
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment