Open jeromeetienne opened 11 years ago
good use case, no need for this._callback. use the js closure all the way
var callback = world.loop().hook(function(){ cubeCamera.updateCubeMap( world.tRenderer(), world.tScene() ); }); sphere.on('destroy', function(){ world.loop().unhook(callback) })
and encourage people to call destroy
same for .add/remove ?
Some localise experimentation, in various object where i dispatch 'destroy on destructor
Not inheritance infolved
Works well
good use case, no need for this._callback. use the js closure all the way