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

CubeGeometry is deprecated, renamed to BoxGeometry #193

Merged
merged 2 commits into from
Jul 31, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix example deprecations
  • Loading branch information
nolman committed Jul 28, 2014
commit c414227140f865407dc8969d17dc92272dfd5fcd
4 changes: 2 additions & 2 deletions examples/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

// Ground
ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -108,7 +108,7 @@

for ( var i = 0; i < 10; i++ ) {
box = new Physijs.BoxMesh(
new THREE.CubeGeometry( 4, 4, 4 ),
new THREE.BoxGeometry( 4, 4, 4 ),
box_material
);
box.position.set(
Expand Down
4 changes: 2 additions & 2 deletions examples/collisions.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
ground_material.map.repeat.set( 3, 3 );

ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -100,7 +100,7 @@
};

spawnBox = (function() {
var box_geometry = new THREE.CubeGeometry( 4, 4, 4 ),
var box_geometry = new THREE.BoxGeometry( 4, 4, 4 ),
handleCollision = function( collided_with, linearVelocity, angularVelocity ) {
switch ( ++this.collisions ) {

Expand Down
20 changes: 10 additions & 10 deletions examples/compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

// Ground
ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);;
Expand All @@ -115,7 +115,7 @@
var back, _object;

back = new Physijs.BoxMesh(
new THREE.CubeGeometry( 5, 1, .5 ),
new THREE.BoxGeometry( 5, 1, .5 ),
chair_material
);
back.position.y = 5;
Expand All @@ -125,7 +125,7 @@

// rungs - relative to back
_object = new Physijs.BoxMesh(
new THREE.CubeGeometry( 1, 5, .5 ),
new THREE.BoxGeometry( 1, 5, .5 ),
chair_material
);
_object.position.y = -3;
Expand All @@ -135,7 +135,7 @@
back.add( _object );

_object = new Physijs.BoxMesh(
new THREE.CubeGeometry( 1, 5, .5 ),
new THREE.BoxGeometry( 1, 5, .5 ),
chair_material
);
_object.position.y = -3;
Expand All @@ -144,7 +144,7 @@
back.add( _object );

_object = new Physijs.BoxMesh(
new THREE.CubeGeometry( 1, 5, .5 ),
new THREE.BoxGeometry( 1, 5, .5 ),
chair_material
);
_object.position.y = -3;
Expand All @@ -161,7 +161,7 @@

// back left
leg = new Physijs.BoxMesh(
new THREE.CubeGeometry( .5, 4, .5 ),
new THREE.BoxGeometry( .5, 4, .5 ),
chair_material
);
leg.position.x = 2.25;
Expand All @@ -172,7 +172,7 @@

// back right - relative to back left leg
_leg = new Physijs.BoxMesh(
new THREE.CubeGeometry( .5, 4, .5 ),
new THREE.BoxGeometry( .5, 4, .5 ),
chair_material
);
_leg.position.x = -4.5;
Expand All @@ -182,7 +182,7 @@

// front left - relative to back left leg
_leg = new Physijs.BoxMesh(
new THREE.CubeGeometry( .5, 4, .5 ),
new THREE.BoxGeometry( .5, 4, .5 ),
chair_material
);
_leg.position.z = 4.5;
Expand All @@ -192,7 +192,7 @@

// front right - relative to back left leg
_leg = new Physijs.BoxMesh(
new THREE.CubeGeometry( .5, 4, .5 ),
new THREE.BoxGeometry( .5, 4, .5 ),
chair_material
);
_leg.position.x = -4.5;
Expand All @@ -209,7 +209,7 @@

// seat of the chair
chair = new Physijs.BoxMesh(
new THREE.CubeGeometry( 5, 1, 5 ),
new THREE.BoxGeometry( 5, 1, 5 ),
chair_material
);
chair.castShadow = true;
Expand Down
4 changes: 2 additions & 2 deletions examples/constraints_car.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

// Ground
ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -114,7 +114,7 @@
wheel_geometry = new THREE.CylinderGeometry( 2, 2, 1, 8 );

car.body = new Physijs.BoxMesh(
new THREE.CubeGeometry( 10, 5, 7 ),
new THREE.BoxGeometry( 10, 5, 7 ),
car_material,
1000
);
Expand Down
2 changes: 1 addition & 1 deletion examples/heightfield.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
createShape = (function() {
var addshapes = true,
shapes = 0,
box_geometry = new THREE.CubeGeometry( 3, 3, 3 ),
box_geometry = new THREE.BoxGeometry( 3, 3, 3 ),
sphere_geometry = new THREE.SphereGeometry( 1.5, 32, 32 ),
cylinder_geometry = new THREE.CylinderGeometry( 2, 2, 1, 32 ),
cone_geometry = new THREE.CylinderGeometry( 0, 2, 4, 32 ),
Expand Down
4 changes: 2 additions & 2 deletions examples/jenga.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

// Table
table = new Physijs.BoxMesh(
new THREE.CubeGeometry(50, 1, 50),
new THREE.BoxGeometry(50, 1, 50),
table_material,
0, // mass
{ restitution: .2, friction: .8 }
Expand Down Expand Up @@ -147,7 +147,7 @@

createTower = (function() {
var block_length = 6, block_height = 1, block_width = 1.5, block_offset = 2,
block_geometry = new THREE.CubeGeometry( block_length, block_height, block_width );
block_geometry = new THREE.BoxGeometry( block_length, block_height, block_width );

return function() {
var i, j, rows = 16,
Expand Down
4 changes: 2 additions & 2 deletions examples/memorytest-compound.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
ground_material.map.repeat.set( 3, 3 );

ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -121,7 +121,7 @@
};

spawnBox = (function() {
var box_geometry = new THREE.CubeGeometry( 4, 4, 4 ),
var box_geometry = new THREE.BoxGeometry( 4, 4, 4 ),
createBox = function() {
var box, material, childBox;
total_cubes++;
Expand Down
4 changes: 2 additions & 2 deletions examples/memorytest-convex.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
ground_material.map.repeat.set( 3, 3 );

ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -121,7 +121,7 @@
};

spawnBox = (function() {
var box_geometry = new THREE.CubeGeometry( 4, 4, 4 ),
var box_geometry = new THREE.BoxGeometry( 4, 4, 4 ),
createBox = function() {
var box, material;
total_cubes++;
Expand Down
4 changes: 2 additions & 2 deletions examples/memorytest.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
ground_material.map.repeat.set( 3, 3 );

ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(100, 1, 100),
new THREE.BoxGeometry(100, 1, 100),
ground_material,
0 // mass
);
Expand All @@ -121,7 +121,7 @@
};

spawnBox = (function() {
var box_geometry = new THREE.CubeGeometry( 4, 4, 4 ),
var box_geometry = new THREE.BoxGeometry( 4, 4, 4 ),
createBox = function() {
var box, material;
total_cubes++;
Expand Down
6 changes: 3 additions & 3 deletions examples/shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

// Ground
ground = new Physijs.BoxMesh(
new THREE.CubeGeometry(50, 1, 50),
new THREE.BoxGeometry(50, 1, 50),
//new THREE.PlaneGeometry(50, 50),
ground_material,
0 // mass
Expand All @@ -100,7 +100,7 @@

// Bumpers
var bumper,
bumper_geom = new THREE.CubeGeometry(2, 1, 50);
bumper_geom = new THREE.BoxGeometry(2, 1, 50);

bumper = new Physijs.BoxMesh( bumper_geom, ground_material, 0, { restitution: .2 } );
bumper.position.y = 1;
Expand Down Expand Up @@ -147,7 +147,7 @@
createShape = (function() {
var addshapes = true,
shapes = 0,
box_geometry = new THREE.CubeGeometry( 3, 3, 3 ),
box_geometry = new THREE.BoxGeometry( 3, 3, 3 ),
sphere_geometry = new THREE.SphereGeometry( 1.5, 32, 32 ),
cylinder_geometry = new THREE.CylinderGeometry( 2, 2, 1, 32 ),
cone_geometry = new THREE.CylinderGeometry( 0, 2, 4, 32 ),
Expand Down
2 changes: 1 addition & 1 deletion examples/vehicle.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
for ( i = 0; i < 50; i++ ) {
var size = Math.random() * 2 + .5;
var box = new Physijs.BoxMesh(
new THREE.CubeGeometry( size, size, size ),
new THREE.BoxGeometry( size, size, size ),
box_material
);
box.castShadow = box.receiveShadow = true;
Expand Down