Class Index | File Index

Classes


Class VENISON.PROPERTIES.PhysicsProperty


Extends VENISON.PROPERTY.Property.
A property to enable physics simulation of an entity.
Used to create and modify the physics settings of an entity.

It handles the following messages:

'setPosition': Received by GraphicsProperty and PhysicsProperty. Used to set the position of the entity.
content = {x: , y: } The new position

'setRotation': Received by GraphicsProperty and PhysicsProperty. Used to set the rotation of the entity.
content = rotation in radians

'setScale': Received by GraphicsProperty and PhysicsProperty. Used to scale the entity.
content = {x: , y: } The horizontal and vertical scale

'applyImpulseAt': Received by PhysicsProperty. Apply an impulse to the entity at a specific point.
content.position = {x: , y: } The point in world space on which to apply the impulse
content.impulse = {x: , y: } The impulse in world space

'setPhysicsType': Received by PhysicsProperty. Set the physicsType of the physics entity
content = 'dynamic', 'static' or 'kinematic'

'addPhysicsShapes': Received by PhysicsProperty. Used to add new physics shapes to the entity.
content = Array of shapes

'setLinearVelocity': Received by PhysicsProperty. Used to set the linear velocity of the entity.
content = {x: , y: } The linear velocity in pixels per second

'setAngularVelocity': Received by PhysicsProperty. Used to set the angular velocity of the entity.
content = The angular velocity in radians per second

'setCollidesWithForAllShapes': Received by PhysicsProperty. Set the collidesWith attribute for all physics shapes.
content = Array of collision categories

'setFixedRotation': Received by PhysicsProperty. Used to lock or unlock the rotation of the entity.
content = true/false

'setActive': Received by PhysicsProperty. Used to set wheter the physics entity should take part in the physics simulations or not.
content = true/false

Defined in: venison_engine.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Fields borrowed from class VENISON.PROPERTY.Property:
attributes, entity
Methods borrowed from class VENISON.PROPERTY.Property:
fnGetName, fnHandleMessage, fnOnAttached, fnOnFrame, fnOnLevelLoaded, fnOnRemoved, fnRegisterToMessages
Class Detail
VENISON.PROPERTIES.PhysicsProperty()

Documentation generated by JsDoc Toolkit 2.4.0 on Thu May 05 2011 18:47:29 GMT+0200 (CEST)