Collision
Client only. Invisible solid boxes in this game only, as an editor's author uses to keep players off a cliff edge, close a gap with a floor or lay a ramp up to a door. A box blocks players, horses and anything else the game's physics moves, and nothing draws it. The server does not know about it, and no other player has it. A resource's boxes are taken away when it stops or the world goes. World Architect's Collision mode is built on it.
collision.addBox()
Collision.addBox(box)Adds a solid invisible box and returns it. The box has `id`, `valid`, `center`, `size` and `rotation`, and two methods: `set({ center, size, rotation })` moves, sizes or turns it in one go, leaving out what is undefined; `remove()` takes it away and is safe to repeat. Throws a TypeError for a missing center or size, a RangeError for a side outside 0.02 to 200 metres, a centre out of the world, or more than 1024 boxes in this game.
collision.all()
Collision.all()Your resource's boxes that still stand.