Closed samreid closed 1 month ago
MaterialView disposes a material when the MaterialView is disposed. That seems odd. Are they indeed disposed?
Oh, it is a THREE.Material
, not a Material
.
The ternary operator helped clean things up a little bit. I tried inlining the material views, but that was worse. Classes are good enough, no good reason to switch to methods. Closing.
During https://github.com/phetsims/density-buoyancy-common/issues/123 I observed:
class
instead of a variable?For this code, is it important to create a new instance for each Material?