From 0895d81fa1a8ab06b35d5fefe9f2160c2f3a4c4b Mon Sep 17 00:00:00 2001 From: liabru Date: Sat, 8 Jul 2017 13:28:19 +0100 Subject: [PATCH] change examples to render using a fixed resolution --- demo/js/Demo.js | 2 ++ examples/airFriction.js | 4 ++-- examples/avalanche.js | 4 ++-- examples/ballPool.js | 4 ++-- examples/bridge.js | 4 ++-- examples/broadphase.js | 4 ++-- examples/car.js | 4 ++-- examples/catapult.js | 4 ++-- examples/chains.js | 4 ++-- examples/circleStack.js | 4 ++-- examples/cloth.js | 4 ++-- examples/collisionFiltering.js | 4 ++-- examples/compositeManipulation.js | 4 ++-- examples/compound.js | 4 ++-- examples/compoundStack.js | 4 ++-- examples/concave.js | 4 ++-- examples/constraints.js | 4 ++-- examples/doublePendulum.js | 4 ++-- examples/events.js | 4 ++-- examples/friction.js | 4 ++-- examples/gravity.js | 4 ++-- examples/gyro.js | 4 ++-- examples/manipulation.js | 4 ++-- examples/mixed.js | 6 +++--- examples/newtonsCradle.js | 4 ++-- examples/pyramid.js | 4 ++-- examples/ragdoll.js | 4 ++-- examples/raycasting.js | 4 ++-- examples/restitution.js | 4 ++-- examples/rounded.js | 4 ++-- examples/sensors.js | 4 ++-- examples/sleeping.js | 4 ++-- examples/slingshot.js | 4 ++-- examples/softBody.js | 4 ++-- examples/sprites.js | 4 ++-- examples/stack.js | 4 ++-- examples/staticFriction.js | 4 ++-- examples/stress.js | 4 ++-- examples/stress2.js | 4 ++-- examples/svg.js | 4 ++-- examples/terrain.js | 4 ++-- examples/timescale.js | 4 ++-- examples/views.js | 4 ++-- examples/wreckingBall.js | 4 ++-- 44 files changed, 89 insertions(+), 87 deletions(-) diff --git a/demo/js/Demo.js b/demo/js/Demo.js index 4ff0a57..4da8107 100644 --- a/demo/js/Demo.js +++ b/demo/js/Demo.js @@ -27,6 +27,8 @@ inline: false, preventZoom: true, resetOnOrientation: true, + routing: true, + startExample: 'mixed', examples: [ { name: 'Air Friction', diff --git a/examples/airFriction.js b/examples/airFriction.js index 33e824e..b1bc08a 100644 --- a/examples/airFriction.js +++ b/examples/airFriction.js @@ -18,8 +18,8 @@ Example.airFriction = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showVelocity: true } }); diff --git a/examples/avalanche.js b/examples/avalanche.js index 174748c..eb04452 100644 --- a/examples/avalanche.js +++ b/examples/avalanche.js @@ -25,8 +25,8 @@ Example.avalanche = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/ballPool.js b/examples/ballPool.js index 7d60b55..11ad322 100644 --- a/examples/ballPool.js +++ b/examples/ballPool.js @@ -25,8 +25,8 @@ Example.ballPool = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/bridge.js b/examples/bridge.js index a8ff806..78b24ad 100644 --- a/examples/bridge.js +++ b/examples/bridge.js @@ -22,8 +22,8 @@ Example.bridge = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/broadphase.js b/examples/broadphase.js index 9a3725e..cc6decf 100644 --- a/examples/broadphase.js +++ b/examples/broadphase.js @@ -20,8 +20,8 @@ Example.broadphase = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, showBroadphase: true } diff --git a/examples/car.js b/examples/car.js index 897b5e9..215f47d 100644 --- a/examples/car.js +++ b/examples/car.js @@ -19,8 +19,8 @@ Example.car = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, showCollisions: true } diff --git a/examples/catapult.js b/examples/catapult.js index 7fa0809..6c08996 100644 --- a/examples/catapult.js +++ b/examples/catapult.js @@ -22,8 +22,8 @@ Example.catapult = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, showCollisions: true, showVelocity: true diff --git a/examples/chains.js b/examples/chains.js index 91b08b2..fbaf358 100644 --- a/examples/chains.js +++ b/examples/chains.js @@ -22,8 +22,8 @@ Example.chains = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, showCollisions: true, showVelocity: true diff --git a/examples/circleStack.js b/examples/circleStack.js index b93bd14..e318756 100644 --- a/examples/circleStack.js +++ b/examples/circleStack.js @@ -19,8 +19,8 @@ Example.circleStack = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/cloth.js b/examples/cloth.js index 001fca7..5cbc6f0 100644 --- a/examples/cloth.js +++ b/examples/cloth.js @@ -20,8 +20,8 @@ Example.cloth = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/collisionFiltering.js b/examples/collisionFiltering.js index b4e4476..f9185ed 100644 --- a/examples/collisionFiltering.js +++ b/examples/collisionFiltering.js @@ -21,8 +21,8 @@ Example.collisionFiltering = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, wireframes: false, background: '#111' } diff --git a/examples/compositeManipulation.js b/examples/compositeManipulation.js index a1abdbd..77737c5 100644 --- a/examples/compositeManipulation.js +++ b/examples/compositeManipulation.js @@ -21,8 +21,8 @@ Example.compositeManipulation = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/compound.js b/examples/compound.js index 6d2488a..7b6205b 100644 --- a/examples/compound.js +++ b/examples/compound.js @@ -20,8 +20,8 @@ Example.compound = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAxes: true, showConvexHulls: true } diff --git a/examples/compoundStack.js b/examples/compoundStack.js index a62917e..8462ee0 100644 --- a/examples/compoundStack.js +++ b/examples/compoundStack.js @@ -20,8 +20,8 @@ Example.compoundStack = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/concave.js b/examples/concave.js index 08fcfde..f661d7f 100644 --- a/examples/concave.js +++ b/examples/concave.js @@ -21,8 +21,8 @@ Example.concave = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/constraints.js b/examples/constraints.js index 5db0161..23eca4a 100644 --- a/examples/constraints.js +++ b/examples/constraints.js @@ -21,8 +21,8 @@ Example.constraints = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/doublePendulum.js b/examples/doublePendulum.js index 24240ea..468193e 100644 --- a/examples/doublePendulum.js +++ b/examples/doublePendulum.js @@ -24,8 +24,8 @@ Example.doublePendulum = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, wireframes: false, background: '#0f0f13' } diff --git a/examples/events.js b/examples/events.js index a4e8099..961cafe 100644 --- a/examples/events.js +++ b/examples/events.js @@ -23,8 +23,8 @@ Example.events = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, wireframes: false } }); diff --git a/examples/friction.js b/examples/friction.js index 2f88706..f3b92a8 100644 --- a/examples/friction.js +++ b/examples/friction.js @@ -18,8 +18,8 @@ Example.friction = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showVelocity: true } }); diff --git a/examples/gravity.js b/examples/gravity.js index efd21dc..9751e3c 100644 --- a/examples/gravity.js +++ b/examples/gravity.js @@ -20,8 +20,8 @@ Example.gravity = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showVelocity: true, showAngleIndicator: true } diff --git a/examples/gyro.js b/examples/gyro.js index 7d6b152..d8c1711 100644 --- a/examples/gyro.js +++ b/examples/gyro.js @@ -20,8 +20,8 @@ Example.gyro = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/manipulation.js b/examples/manipulation.js index 67e9a27..0285887 100644 --- a/examples/manipulation.js +++ b/examples/manipulation.js @@ -20,8 +20,8 @@ Example.manipulation = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAxes: true, showCollisions: true, showConvexHulls: true diff --git a/examples/mixed.js b/examples/mixed.js index a40a14c..e6b4f3e 100644 --- a/examples/mixed.js +++ b/examples/mixed.js @@ -20,9 +20,9 @@ Example.mixed = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), - showAngleIndicator: true + width: 800, + height: 600, + showAngleIndicator: true, } }); diff --git a/examples/newtonsCradle.js b/examples/newtonsCradle.js index 802e318..1eaf398 100644 --- a/examples/newtonsCradle.js +++ b/examples/newtonsCradle.js @@ -19,8 +19,8 @@ Example.newtonsCradle = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showVelocity: true } }); diff --git a/examples/pyramid.js b/examples/pyramid.js index 6152920..f5209a6 100644 --- a/examples/pyramid.js +++ b/examples/pyramid.js @@ -19,8 +19,8 @@ Example.pyramid = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/ragdoll.js b/examples/ragdoll.js index 8b66c34..5dfbfae 100644 --- a/examples/ragdoll.js +++ b/examples/ragdoll.js @@ -25,8 +25,8 @@ Example.ragdoll = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, background: '#0f0f13' } diff --git a/examples/raycasting.js b/examples/raycasting.js index a6d52c3..3ecb806 100644 --- a/examples/raycasting.js +++ b/examples/raycasting.js @@ -24,8 +24,8 @@ Example.raycasting = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/restitution.js b/examples/restitution.js index 1f12f55..d8a7ee9 100644 --- a/examples/restitution.js +++ b/examples/restitution.js @@ -18,8 +18,8 @@ Example.restitution = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true, showCollisions: true, showVelocity: true diff --git a/examples/rounded.js b/examples/rounded.js index d6e9c7a..9c4b1b8 100644 --- a/examples/rounded.js +++ b/examples/rounded.js @@ -18,8 +18,8 @@ Example.rounded = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAxes: true } }); diff --git a/examples/sensors.js b/examples/sensors.js index d9a0fc2..00a87e4 100644 --- a/examples/sensors.js +++ b/examples/sensors.js @@ -19,8 +19,8 @@ Example.sensors = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, wireframes: false, background: '#111' } diff --git a/examples/sleeping.js b/examples/sleeping.js index 528a982..eb450c9 100644 --- a/examples/sleeping.js +++ b/examples/sleeping.js @@ -23,8 +23,8 @@ Example.sleeping = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/slingshot.js b/examples/slingshot.js index 649bb27..db21200 100644 --- a/examples/slingshot.js +++ b/examples/slingshot.js @@ -21,8 +21,8 @@ Example.slingshot = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/softBody.js b/examples/softBody.js index f1ade68..bc9682b 100644 --- a/examples/softBody.js +++ b/examples/softBody.js @@ -19,8 +19,8 @@ Example.softBody = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: false } }); diff --git a/examples/sprites.js b/examples/sprites.js index b4349bb..ed26fb4 100644 --- a/examples/sprites.js +++ b/examples/sprites.js @@ -20,8 +20,8 @@ Example.sprites = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, background: '#0f0f13', showAngleIndicator: false, wireframes: false diff --git a/examples/stack.js b/examples/stack.js index 21d46d7..8e5b09d 100644 --- a/examples/stack.js +++ b/examples/stack.js @@ -19,8 +19,8 @@ Example.stack = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/staticFriction.js b/examples/staticFriction.js index eafbba0..3040b64 100644 --- a/examples/staticFriction.js +++ b/examples/staticFriction.js @@ -21,8 +21,8 @@ Example.staticFriction = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showVelocity: true } }); diff --git a/examples/stress.js b/examples/stress.js index f84584a..1ac5f8b 100644 --- a/examples/stress.js +++ b/examples/stress.js @@ -19,8 +19,8 @@ Example.stress = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/stress2.js b/examples/stress2.js index b8fff91..886df32 100644 --- a/examples/stress2.js +++ b/examples/stress2.js @@ -19,8 +19,8 @@ Example.stress2 = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/svg.js b/examples/svg.js index 42e8c2e..cae0bcd 100644 --- a/examples/svg.js +++ b/examples/svg.js @@ -21,8 +21,8 @@ Example.svg = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/terrain.js b/examples/terrain.js index b23cbb1..4152258 100644 --- a/examples/terrain.js +++ b/examples/terrain.js @@ -22,8 +22,8 @@ Example.terrain = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600) + width: 800, + height: 600 } }); diff --git a/examples/timescale.js b/examples/timescale.js index e18e6a4..466ec02 100644 --- a/examples/timescale.js +++ b/examples/timescale.js @@ -23,8 +23,8 @@ Example.timescale = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } }); diff --git a/examples/views.js b/examples/views.js index d87c7a3..aa0f456 100644 --- a/examples/views.js +++ b/examples/views.js @@ -23,8 +23,8 @@ Example.views = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, hasBounds: true, showAngleIndicator: true } diff --git a/examples/wreckingBall.js b/examples/wreckingBall.js index f1c6b0d..107eab3 100644 --- a/examples/wreckingBall.js +++ b/examples/wreckingBall.js @@ -20,8 +20,8 @@ Example.wreckingBall = function() { element: document.body, engine: engine, options: { - width: Math.min(document.documentElement.clientWidth, 800), - height: Math.min(document.documentElement.clientHeight, 600), + width: 800, + height: 600, showAngleIndicator: true } });