diff --git a/examples/jsm/physics/RapierPhysics.js b/examples/jsm/physics/RapierPhysics.js index 234ac51c6ab29..872e082eec96e 100644 --- a/examples/jsm/physics/RapierPhysics.js +++ b/examples/jsm/physics/RapierPhysics.js @@ -1,6 +1,6 @@ import { Clock, Vector3, Quaternion, Matrix4 } from 'three'; -const RAPIER_PATH = 'https://cdn.skypack.dev/@dimforge/rapier3d-compat@0.11.2'; +const RAPIER_PATH = 'https://cdn.skypack.dev/@dimforge/rapier3d-compat@0.12.0'; const frameRate = 60; @@ -9,7 +9,7 @@ const ZERO = new Vector3(); let RAPIER = null; -function getCollider( geometry ) { +function getShape( geometry ) { const parameters = geometry.parameters; @@ -43,7 +43,7 @@ async function RapierPhysics() { } - // Docs: https://rapier.rs/docs/api/javascript/JavaScript3D/ + // Docs: https://rapier.rs/docs/api/javascript/JavaScript3D/ const gravity = new Vector3( 0.0, - 9.81, 0.0 ); const world = new RAPIER.World( gravity ); @@ -77,7 +77,7 @@ async function RapierPhysics() { function addMesh( mesh, mass = 0, restitution = 0 ) { - const shape = getCollider( mesh.geometry ); + const shape = getShape( mesh.geometry ); if ( shape === null ) return; diff --git a/examples/physics_rapier_instancing.html b/examples/physics_rapier_instancing.html index f47b72e56e5f3..9807141d4ba7c 100644 --- a/examples/physics_rapier_instancing.html +++ b/examples/physics_rapier_instancing.html @@ -9,7 +9,7 @@
- three.js physics - rapier3d instancing + three.js physics - rapier instancing