Back to Forum
Dispose Method - THREE.js
harp34 posted 5 years ago
What does the dispose method do?
gui.add(world.plane, 'width', 1, 20).onChange(()=>
{
// remove all planeGeo width values
planeGeo.geometry.dispose();
console.log(planeGeo.geometry)
})When I print this out via console, nothing is disposed(removed), I see that width is still as it was created:
parameters: {width: 5, height: 5, widthSegments: 10, heightSegments: 10}type: "PlaneGeometry"Want to participate?
Create a free Chris Courses account to begin