Create a destroyOutOfBounds component.
Optional
Extra padding beyond bounds before destruction
Component object suitable for spreading into spawn()
ecs.spawn({ ...createTransform(100, 200), ...createDestroyOutOfBounds(20),}); Copy
ecs.spawn({ ...createTransform(100, 200), ...createDestroyOutOfBounds(20),});
Create a destroyOutOfBounds component.