arena-py API v1.0.1
arena .attributes .impulse
Impulse attribute class to manage its properties in the ARENA: Apply an impulse to an object to set it in motion. This happens in conjunction with an event. Requires click-listener and physics.
Usage: impulse=Impulse(...)
Parameters
- dict force: Impulse vector. Defaults to '{'x': 1, 'y': 1, 'z': 1}' (optional)
- str on: Event to listen 'on'. Allows [mousedown, mouseup] Defaults to 'mousedown' (optional)
- dict position: World position. Defaults to '{'x': 1, 'y': 1, 'z': 1}' (optional)
Impulse( on='mousedown', force={'x': 0, 'y': 0, 'z': 0}, position={'x': 0, 'y': 0, 'z': 0}, **kwargs)