0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-23 13:19:01 -05:00

change examples to render using a fixed resolution

This commit is contained in:
liabru 2017-07-08 13:28:19 +01:00
parent 6108a31f27
commit 0895d81fa1
44 changed files with 89 additions and 87 deletions

View file

@ -27,6 +27,8 @@
inline: false,
preventZoom: true,
resetOnOrientation: true,
routing: true,
startExample: 'mixed',
examples: [
{
name: 'Air Friction',

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}

View file

@ -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
}

View file

@ -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

View file

@ -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

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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'
}

View file

@ -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
}
});

View file

@ -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
}

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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'
}

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}

View file

@ -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
}
});

View file

@ -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

View file

@ -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,
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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'
}

View file

@ -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
}
});

View file

@ -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

View file

@ -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
}
});

View file

@ -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'
}

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}
});

View file

@ -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
}

View file

@ -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
}
});