Class enchant.gl.physics.PhyBox
- Defined in: physics.gl.enchant.js
- Extends enchant.gl.physics.PhySprite3D
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.gl.physics.PhyBox(scaleX, scaleY, scaleZ, mass)
Rectangular PhySprite3D.
|
- Fields borrowed from class enchant.gl.physics.PhySprite3D:
- friction, restitution
Method Summary
- Methods borrowed from class enchant.gl.physics.PhySprite3D:
- applyCentralImpulse
- applyImpulse
- clearForces
- contactTest
- kinematize
- rotationApply
- rotationSet
- scale
- translate
Class Detail
enchant.gl.physics.PhyBox(scaleX, scaleY, scaleZ, mass)
Rectangular PhySprite3D.
If PhySprite3D is added, physical calculation will be applied each time stepSimulation is called up.
- Parameters:
- {Number} scaleX
- Distance between center of rectangular body and perpendicular x-axis surface.
- {Number} scaleY
- Distance between center of rectangular body and perpendicular y-axis surface.
- {Number} scaleZ
- Distance between center of rectangular body and perpendicular z-axis surface.
- {Number} mass
- Mass of rigid body.