When calling setMaterialForRendering() on an effect, if changing e.g. from a StandardMaterial to a NodeMaterial (or vice versa) then a runtime error crashes the page…
And from checking the source and debugging I eventually found that a workaround is to first call resetDrawCache() on the mesh like below (comment this reset out on line 23 to see the error in the console).
So I wonder if setMaterialForRendering() should call resetDrawCache() on the mesh that we pass in for us to prevent this error? Or some other solution?
PS the node material in the playground is just the default saved from NME, so just sets the color to white.