- added a modified version of cannon.js
- convex|trimesh collisions work - modified shape.js (added type_plane)beta.r3js.org
parent
66c8e76983
commit
c159a4e1aa
|
@ -99,6 +99,7 @@ GameLib.D3.Shape.SHAPE_TYPE_TRIMESH = 3;
|
||||||
GameLib.D3.Shape.SHAPE_TYPE_CYLINDER = 4;
|
GameLib.D3.Shape.SHAPE_TYPE_CYLINDER = 4;
|
||||||
GameLib.D3.Shape.SHAPE_TYPE_HEIGHT_MAP = 5;
|
GameLib.D3.Shape.SHAPE_TYPE_HEIGHT_MAP = 5;
|
||||||
GameLib.D3.Shape.SHAPE_TYPE_CONVEX_HULL = 6;
|
GameLib.D3.Shape.SHAPE_TYPE_CONVEX_HULL = 6;
|
||||||
|
GameLib.D3.Shape.SHAPE_TYPE_PLANE = 7;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -144,6 +145,8 @@ GameLib.D3.Shape.prototype.createInstance = function() {
|
||||||
this.vertices, this.indices
|
this.vertices, this.indices
|
||||||
);
|
);
|
||||||
|
|
||||||
|
} else if(this.shapeType == GameLib.D3.Shape.SHAPE_TYPE_PLANE) {
|
||||||
|
instance = new this.engine.instance.Plane();
|
||||||
} else {
|
} else {
|
||||||
console.warn('Shape type not implemented: ' + this.shapeType);
|
console.warn('Shape type not implemented: ' + this.shapeType);
|
||||||
throw new Error('Shape type not implemented: ' + this.shapeType);
|
throw new Error('Shape type not implemented: ' + this.shapeType);
|
||||||
|
|
Loading…
Reference in New Issue