From 4aada78bd6ed864bb5b7eb3bd5d6e105a09cbc00 Mon Sep 17 00:00:00 2001 From: sasha240100 Date: Thu, 22 Dec 2016 07:39:28 +0200 Subject: [PATCH] WIP Former-commit-id: b608bc09fad5bdd9172e69e94d21b9344b4b5dcd --- examples/basic/debugging/script.js | 6 ++---- examples/basic/embeded/script.js | 6 ++---- examples/basic/extending/script.js | 6 ++---- examples/basic/helloworld/script.js | 6 ++---- examples/basic/mouse/script.js | 6 ++---- examples/basic/threejs/script.js | 6 ++---- examples/constraints/dof/script.js | 6 ++---- examples/constraints/hinge/script.js | 6 ++---- examples/constraints/point/script.js | 6 ++---- examples/constraints/slider/script.js | 6 ++---- examples/fps/shooter/script.js | 6 ++---- examples/performance/softbodies/script.js | 6 ++---- examples/performance/sticks/script.js | 6 ++---- examples/physics/compound/script.js | 6 ++---- examples/physics/domino/script.js | 6 ++---- examples/physics/filtering/script.js | 6 ++---- examples/post-processing/basic-glitch/script.js | 6 ++---- examples/softbody/cloth/script.js | 6 ++---- examples/softbody/cloth2/script.js | 6 ++---- examples/softbody/cloth3/script.js | 6 ++---- examples/softbody/ropes/script.js | 6 ++---- examples/softbody/sphere/script.js | 6 ++---- 22 files changed, 44 insertions(+), 88 deletions(-) diff --git a/examples/basic/debugging/script.js b/examples/basic/debugging/script.js index a914a6ad..a385ec53 100644 --- a/examples/basic/debugging/script.js +++ b/examples/basic/debugging/script.js @@ -163,9 +163,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -191,7 +189,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/basic/embeded/script.js b/examples/basic/embeded/script.js index 80ea38ae..8f1fe1f7 100644 --- a/examples/basic/embeded/script.js +++ b/examples/basic/embeded/script.js @@ -138,9 +138,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -166,7 +164,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/basic/extending/script.js b/examples/basic/extending/script.js index 2812a1d8..35429188 100644 --- a/examples/basic/extending/script.js +++ b/examples/basic/extending/script.js @@ -173,9 +173,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -201,7 +199,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/basic/helloworld/script.js b/examples/basic/helloworld/script.js index b55678c9..eedf4d70 100644 --- a/examples/basic/helloworld/script.js +++ b/examples/basic/helloworld/script.js @@ -112,9 +112,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -140,7 +138,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/basic/mouse/script.js b/examples/basic/mouse/script.js index 76636ff7..9a33a350 100644 --- a/examples/basic/mouse/script.js +++ b/examples/basic/mouse/script.js @@ -131,9 +131,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -159,7 +157,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/basic/threejs/script.js b/examples/basic/threejs/script.js index 20ff3c1f..bac71967 100644 --- a/examples/basic/threejs/script.js +++ b/examples/basic/threejs/script.js @@ -144,9 +144,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -172,7 +170,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/constraints/dof/script.js b/examples/constraints/dof/script.js index ac0ff148..dad1626e 100644 --- a/examples/constraints/dof/script.js +++ b/examples/constraints/dof/script.js @@ -156,9 +156,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -184,7 +182,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/constraints/hinge/script.js b/examples/constraints/hinge/script.js index d63c0390..ab15e235 100644 --- a/examples/constraints/hinge/script.js +++ b/examples/constraints/hinge/script.js @@ -156,9 +156,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -184,7 +182,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/constraints/point/script.js b/examples/constraints/point/script.js index 62a6275e..dee94293 100644 --- a/examples/constraints/point/script.js +++ b/examples/constraints/point/script.js @@ -155,9 +155,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -183,7 +181,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/constraints/slider/script.js b/examples/constraints/slider/script.js index 2345db1f..93eba63c 100644 --- a/examples/constraints/slider/script.js +++ b/examples/constraints/slider/script.js @@ -151,9 +151,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -179,7 +177,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/fps/shooter/script.js b/examples/fps/shooter/script.js index d422c761..7e6ca6f3 100644 --- a/examples/fps/shooter/script.js +++ b/examples/fps/shooter/script.js @@ -130,9 +130,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -158,7 +156,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/performance/softbodies/script.js b/examples/performance/softbodies/script.js index 0222d992..b9780523 100644 --- a/examples/performance/softbodies/script.js +++ b/examples/performance/softbodies/script.js @@ -175,9 +175,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -203,7 +201,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/performance/sticks/script.js b/examples/performance/sticks/script.js index 34b98560..cf992ba7 100644 --- a/examples/performance/sticks/script.js +++ b/examples/performance/sticks/script.js @@ -211,9 +211,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -239,7 +237,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/physics/compound/script.js b/examples/physics/compound/script.js index c5d9ff35..560c677d 100644 --- a/examples/physics/compound/script.js +++ b/examples/physics/compound/script.js @@ -127,9 +127,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -155,7 +153,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/physics/domino/script.js b/examples/physics/domino/script.js index 336db3e0..554580ca 100644 --- a/examples/physics/domino/script.js +++ b/examples/physics/domino/script.js @@ -182,9 +182,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -210,7 +208,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/physics/filtering/script.js b/examples/physics/filtering/script.js index 986881ef..fa93d303 100644 --- a/examples/physics/filtering/script.js +++ b/examples/physics/filtering/script.js @@ -155,9 +155,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -183,7 +181,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/post-processing/basic-glitch/script.js b/examples/post-processing/basic-glitch/script.js index 4377d442..d2391266 100644 --- a/examples/post-processing/basic-glitch/script.js +++ b/examples/post-processing/basic-glitch/script.js @@ -325,9 +325,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -353,7 +351,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/softbody/cloth/script.js b/examples/softbody/cloth/script.js index 06eeec6c..00d14087 100644 --- a/examples/softbody/cloth/script.js +++ b/examples/softbody/cloth/script.js @@ -155,9 +155,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -183,7 +181,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/softbody/cloth2/script.js b/examples/softbody/cloth2/script.js index 914ec331..3816f985 100644 --- a/examples/softbody/cloth2/script.js +++ b/examples/softbody/cloth2/script.js @@ -180,9 +180,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -208,7 +206,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/softbody/cloth3/script.js b/examples/softbody/cloth3/script.js index 01bc72d2..143ffe38 100644 --- a/examples/softbody/cloth3/script.js +++ b/examples/softbody/cloth3/script.js @@ -179,9 +179,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -207,7 +205,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/softbody/ropes/script.js b/examples/softbody/ropes/script.js index f1dce5b0..29ed7b04 100644 --- a/examples/softbody/ropes/script.js +++ b/examples/softbody/ropes/script.js @@ -317,9 +317,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -345,7 +343,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1, diff --git a/examples/softbody/sphere/script.js b/examples/softbody/sphere/script.js index af44908d..332cec0d 100644 --- a/examples/softbody/sphere/script.js +++ b/examples/softbody/sphere/script.js @@ -151,9 +151,7 @@ function addBasicLights(world) { function addPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - WHS.PlanePhysics = PHYSICS.RigidbodyComponent(WHS.Plane); - - return new WHS.PlanePhysics({ + return new (PHYSICS.$rigidBody(WHS.Plane, PHYSICS.PLANE))({ geometry: { width: size, height: size @@ -179,7 +177,7 @@ function addPlane(world) { function addBoxPlane(world) { var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; - return new WHS.Box({ + return new (PHYSICS.$rigidBody(WHS.Box, PHYSICS.BOX))({ geometry: { width: size, height: 1,