We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property 'dispose' does not exist on type 'string | number | boolean | Record<string, any> | Color | ((material: Material) => Material)
No response
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() } }
no error
The text was updated successfully, but these errors were encountered:
I can fix it, but I don't think it's right
export function disposeMaterial(material: THREE.Material) { if (material instanceof THREE.Material) { for (const key in material) { const k = key as keyof THREE.Material const e = material[k] if (e instanceof THREE.Texture) { // ιζ―ηΊΉη e.dispose() } } // ιζ―ζ质 material.dispose() } }
Sorry, something went wrong.
The upcoming 5.5 release fixes this: #57847
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
π 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
π Actual behavior
no error
π Expected behavior
no error
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: