-
Notifications
You must be signed in to change notification settings - Fork 456
Scene Configuration
chandlerprall edited this page Apr 28, 2012
·
4 revisions
When creating the scene there are a few choices you can make. Most of these are passed to the scene when you create it:
var scene = new Physijs.Scene({ reportsize: 50, fixedTimeStep: 1 / 60 });-
fixedTimeStep
default 1 / 60This number determines how much time one simulation step is to simulate. The small the number the more accurate (and slow) the simulation. -
broadphase
default dynamicSpecifies which broadphase will be used, choices aredynamicandsweepprune. -
reportsize
default 50As an optimization, world reports which contain object positions are pre-initialized based on this number. It's best to set this to the number of objects your scene will have.
-
setGravity
default ( 0, -10, 0 )Method which sets the amount and direction of gravitational forces. Usage:scene.setGravity(new THREE.Vector3( x_force, y_force, z_force ))