martinlaxenaire/curtainsjs

Cant remove/destroy Ping-Pong-Plane (v7.3.1)

andrewleek-droplab opened this issue · 2 comments

In a local project I am creating several planes, a ping-pong-plane and a shaderpass, then destroying and recreating them at a later time. When I recreated them I noticed that there appears to be remnants of the some of the old planes still hanging around, although they should have been removed using .remove(). After some digging I found that everything is being removed/destroyed except for the ping-pong-plane. No matter what I try it it seems to linger.

The setup is very similar to this (although this fiddle doesnt have the destroy code): https://jsfiddle.net/qacbvgue/

The code im using for cleanup/removal is like this:

_each(shaderPasses, (v,i) =>
{
	v.remove();
        v = null;
})

shaderPasses = {};

_each(planes, (v,i) =>
{
	v.remove();
        v = null;
})

refs.current.planes = {};

pingpongplane.remove();
pingpongplane = null

Please let me know if I am missing something.

Thanks,
Andrew

Hey @andrewleek-droplab,

there was indeed a bug in the remove() method of the PingPongPlane. I'm sorry about that, it should be fixed with version 7.3.2 - 580ce60

Your code should work now.

Cheers,

This is confirmed working.

Thanks for the fix!

Regards,