Skip to content

Commit

Permalink
change examples to render using a fixed resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Jul 8, 2017
1 parent 6108a31 commit 0895d81
Show file tree
Hide file tree
Showing 44 changed files with 89 additions and 87 deletions.
2 changes: 2 additions & 0 deletions demo/js/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
inline: false,
preventZoom: true,
resetOnOrientation: true,
routing: true,
startExample: 'mixed',
examples: [
{
name: 'Air Friction',
Expand Down
4 changes: 2 additions & 2 deletions examples/airFriction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/avalanche.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/ballPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/broadphase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions examples/car.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions examples/catapult.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/chains.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/circleStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/cloth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});

Expand Down
4 changes: 2 additions & 2 deletions examples/collisionFiltering.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions examples/compositeManipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/compound.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions examples/compoundStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/concave.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});

Expand Down
4 changes: 2 additions & 2 deletions examples/constraints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/doublePendulum.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions examples/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/friction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/gravity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions examples/gyro.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/mixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
});

Expand Down
4 changes: 2 additions & 2 deletions examples/newtonsCradle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/pyramid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/ragdoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions examples/raycasting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/restitution.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/rounded.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/sensors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions examples/sleeping.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/slingshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/softBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
4 changes: 2 additions & 2 deletions examples/sprites.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});
Expand Down
Loading

0 comments on commit 0895d81

Please sign in to comment.