@@ -38,7 +38,7 @@ let RAPIER = null;
3838/**
3939 * @initial_author mrdoob | [email protected] 4040 *
41- * @description Physic helper based on `Rapier`
41+ * @description Physics helper based on `Rapier`
4242 *
4343 * @docs https://rapier.rs/docs/api/javascript/JavaScript3D/
4444 */
@@ -104,8 +104,8 @@ export class Physics {
104104
105105 const physicsProperties =
106106 object instanceof InstancedMesh
107- ? this . createInstancedPhysicProperties ( object , colliderDesc , mass )
108- : this . createPhysicProperties (
107+ ? this . createInstancedPhysicsProperties ( object , colliderDesc , mass )
108+ : this . createPhysicsProperties (
109109 colliderDesc ,
110110 object . position ,
111111 object . quaternion ,
@@ -257,14 +257,14 @@ export class Physics {
257257 * @param {Rapier.ColliderDesc } colliderDesc {@link Rapier.ColliderDesc }
258258 * @param {number | undefined } mass
259259 */
260- createInstancedPhysicProperties ( mesh , colliderDesc , mass ) {
260+ createInstancedPhysicsProperties ( mesh , colliderDesc , mass ) {
261261 const array = mesh . instanceMatrix . array ;
262262 const bodies = [ ] ;
263263
264264 for ( let i = 0 ; i < mesh . count ; i ++ ) {
265265 const position = this . _vector . fromArray ( array , i * 16 + 12 ) ;
266266 bodies . push (
267- this . createPhysicProperties ( colliderDesc , position , null , mass )
267+ this . createPhysicsProperties ( colliderDesc , position , null , mass )
268268 ) ;
269269 }
270270
@@ -279,7 +279,7 @@ export class Physics {
279279 * @param {Rapier.Rotation } rotation {@link Rapier.Rotation }
280280 * @param {number | null | undefined } mass
281281 */
282- createPhysicProperties ( colliderDesc , position , rotation , mass = 0 ) {
282+ createPhysicsProperties ( colliderDesc , position , rotation , mass = 0 ) {
283283 const rigidBodyDesc =
284284 mass > 0
285285 ? this . rapier . RigidBodyDesc . dynamic ( )
@@ -297,7 +297,7 @@ export class Physics {
297297 * @param {Object3DWithGeometry } object
298298 * @param {number | number } index
299299 */
300- getPhysicPropertiesFromObject ( object , index = 0 ) {
300+ getPhysicsPropertiesFromObject ( object , index = 0 ) {
301301 const _physicsProperties = this . dynamicObjectMap . get ( object ) ;
302302 /** @type {PhysicsProperties } */
303303 let body ;
@@ -322,7 +322,7 @@ export class Physics {
322322 */
323323 setObjectPosition ( object , position , index = 0 ) {
324324 /** @description Object physics properties (rigid body, collider, ...). */
325- const physicsProperties = this . getPhysicPropertiesFromObject ( object , index ) ;
325+ const physicsProperties = this . getPhysicsPropertiesFromObject ( object , index ) ;
326326 if ( ! physicsProperties ) return ;
327327
328328 const _vectorZero = new this . rapier . Vector3 ( 0 , 0 , 0 ) ;
@@ -340,7 +340,7 @@ export class Physics {
340340 * @param {number | undefined } index
341341 */
342342 setObjectVelocity ( object , velocity , index = 0 ) {
343- const physicsProperties = this . getPhysicPropertiesFromObject ( object , index ) ;
343+ const physicsProperties = this . getPhysicsPropertiesFromObject ( object , index ) ;
344344 if ( ! physicsProperties ) return ;
345345
346346 physicsProperties . rigidBody . setLinvel ( velocity , true ) ;
@@ -366,7 +366,7 @@ export class Physics {
366366 const bodies = this . dynamicObjectMap . get ( object ) ;
367367
368368 for ( let j = 0 ; j < bodies . length ; j ++ ) {
369- const physicProperties = bodies [ j ] ;
369+ const physicsProperties = bodies [ j ] ;
370370
371371 /** @type {Vector3 } */
372372 let position = this . _position ;
@@ -379,10 +379,10 @@ export class Physics {
379379 this . _matrix . decompose ( position , quaternion , scale ) ;
380380
381381 position = this . _position . copy (
382- physicProperties . rigidBody . translation ( )
382+ physicsProperties . rigidBody . translation ( )
383383 ) ;
384384 quaternion = this . _quaternion . copy (
385- physicProperties . rigidBody . rotation ( )
385+ physicsProperties . rigidBody . rotation ( )
386386 ) ;
387387 scale = this . _scale . copy ( scale ) ;
388388
@@ -404,7 +404,7 @@ export class Physics {
404404 }
405405
406406 /**
407- * @description Remove the specified object to the physic `world`.
407+ * @description Remove the specified object to the physics `world`.
408408 *
409409 * @param {Object3D } object Object3D based.
410410 */
0 commit comments