Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples to 1.4.0 #26

Merged
10 changes: 5 additions & 5 deletions dist/aframe-physics-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,13 @@ THREE.AmmoDebugDrawer = function(scene, world, options) {
var vertices = new Float32Array(maxBufferSize * 3);
var colors = new Float32Array(maxBufferSize * 3);

this.geometry.addAttribute("position", new THREE.BufferAttribute(vertices, 3).setDynamic(true));
this.geometry.addAttribute("color", new THREE.BufferAttribute(colors, 3).setDynamic(true));
this.geometry.setAttribute("position", new THREE.BufferAttribute(vertices, 3).setUsage(THREE.DynamicDrawUsage));
this.geometry.setAttribute("color", new THREE.BufferAttribute(colors, 3).setUsage(THREE.DynamicDrawUsage));

this.index = 0;

var material = new THREE.LineBasicMaterial({
vertexColors: THREE.VertexColors,
vertexColors: true,
depthTest: !drawOnTop
});

Expand Down Expand Up @@ -14523,7 +14523,7 @@ const _iterateGeometries = (function() {
const inverse = new THREE.Matrix4();
const bufferGeometry = new THREE.BufferGeometry();
return function(root, options, cb) {
inverse.copy(root.matrixWorld).invert();
inverse.copy(root.matrixWorld).invert();
root.traverse(mesh => {
if (
mesh.isMesh &&
Expand Down Expand Up @@ -17490,7 +17490,7 @@ var Shape = {

//rotate by 90 degrees similar to mesh2shape:createCylinderShape
var quat = new CANNON.Quaternion();
quat.setFromEuler(90 * THREE.Math.DEG2RAD, 0, 0, 'XYZ').normalize();
quat.setFromEuler(90 * THREE.MathUtils.DEG2RAD, 0, 0, 'XYZ').normalize();
orientation.mult(quat, orientation);
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion dist/aframe-physics-system.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/ammo/compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Compound AMMO</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
Expand Down
13 changes: 7 additions & 6 deletions examples/ammo/constraints.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Constraints • AMMO</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/fernandojsg/aframe-teleport-controls@master/dist/aframe-teleport-controls.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.2/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls@0.4.3/dist/aframe-blink-controls.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand All @@ -32,14 +32,15 @@
raycaster="objects:[force-pushable]"
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat"></a-entity>
material="color: #FF4444; shader: flat">
</a-entity>
</a-entity>
<a-entity teleport-controls="cameraRig: #cameraRig; button: trigger; type: line"
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
ammo-body="type: kinematic"
ammo-shape="type: box; halfExtents: 0.05 0.1 0.1; fit: manual;"
hand-controls="hand: left">
</a-entity>
<a-entity teleport-controls="cameraRig: #cameraRig; button: trigger"
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
ammo-body="type: kinematic"
ammo-shape="type: box; halfExtents: 0.05 0.1 0.1; fit: manual;"
hand-controls="hand: right">
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Materials AMMO</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Physics Benchmark Test - Ammo</title>
<meta name="description" content="Physics Benchamrk Test - Ammo">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/pinboard.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Examples • AMMO</title>
<meta name="description" content="Hello, WebVR! - A-Frame" />
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/spring.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Spring AMMO</title>
<script type="text/javascript" src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script type="text/javascript" src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/stress.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Stress Test AMMO</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/sweeper.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Sweeper AMMO</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/ammo/ttl.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Examples • TTL AMMO</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Compound CANNON Worker</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
Expand Down
28 changes: 16 additions & 12 deletions examples/cannon-worker/constraints.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Constraints CANNON Worker</title>
<script type="text/javascript" src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/fernandojsg/aframe-teleport-controls@master/dist/aframe-teleport-controls.min.js"></script>
<script type="text/javascript" src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.2/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls@0.4.3/dist/aframe-blink-controls.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/grab.js"></script>
<script src="../components/force-pushable.js"></script>
Expand All @@ -26,15 +26,19 @@
view code
</a>
<a-scene physics="driver: worker" environment>
<a-entity teleport-controls hand-controls="hand: left" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
<a-entity teleport-controls hand-controls="hand: right" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>

<a-entity camera look-controls wasd-controls position="0 1.6 0">
<a-entity cursor
raycaster="objects:[force-pushable]"
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat"></a-entity>
<a-entity id="cameraRig">
<a-entity camera look-controls wasd-controls position="0 1.6 0">
<a-entity cursor
raycaster="objects:[force-pushable]"
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat">
</a-entity>
</a-entity>
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
hand-controls="hand: left" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
hand-controls="hand: right" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
</a-entity>

<!-- CONE TWIST -->
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Materials CANNON Worker</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Physics Benchmark Test - Cannon</title>
<meta name="description" content="Physics Benchamrk Test - Cannon Worker">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/pinboard.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Examples • Sandbox CANNON Worker</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
<script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/spring.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Spring CANNON Worker</title>
<script type="text/javascript" src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script type="text/javascript" src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/stress.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Stress Test CANNON Worker</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/sweeper.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Sweeper CANNON Worker</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/grab.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon-worker/ttl.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Examples • TTL CANNON Worker</title>
<meta name="description" content="Hello, WebVR! - A-Frame">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<link rel="stylesheet" href="../styles.css">
<script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon/compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Compound CANNON</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
Expand Down
28 changes: 16 additions & 12 deletions examples/cannon/constraints.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Constraints CANON</title>
<script type="text/javascript" src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/fernandojsg/aframe-teleport-controls@master/dist/aframe-teleport-controls.min.js"></script>
<script type="text/javascript" src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.2/dist/aframe-environment-component.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aframe-blink-controls@0.4.3/dist/aframe-blink-controls.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/grab.js"></script>
<script src="../components/force-pushable.js"></script>
Expand All @@ -25,15 +25,19 @@
view code
</a>
<a-scene environment>
<a-entity teleport-controls hand-controls="hand: left" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
<a-entity teleport-controls hand-controls="hand: right" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>

<a-entity camera look-controls wasd-controls position="0 1.6 0">
<a-entity cursor
raycaster="objects:[force-pushable]"
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat"></a-entity>
<a-entity id="cameraRig">
<a-entity camera look-controls wasd-controls position="0 1.6 0">
<a-entity cursor
raycaster="objects:[force-pushable]"
position="0 0 -0.5"
geometry="primitive: circle; radius: 0.01; segments: 4;"
material="color: #FF4444; shader: flat">
</a-entity>
</a-entity>
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
hand-controls="hand: left" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
<a-entity blink-controls="cameraRig: #cameraRig; button: trigger"
hand-controls="hand: right" static-body="shape: sphere; sphereRadius: 0.02;" grab></a-entity>
</a-entity>

<!-- CONE TWIST -->
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon/materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Materials CANNON</title>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-environment-component@1.3.1/dist/aframe-environment-component.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/force-pushable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion examples/cannon/perf.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Physics Benchmark Test - Cannon</title>
<meta name="description" content="Physics Benchamrk Test - Cannon">
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="../../dist/aframe-physics-system.js"></script>
<script src="../components/pinboard.js"></script>
<link rel="stylesheet" href="../styles.css">
Expand Down
Loading