- added a modified version of cannon.js

- convex|trimesh collisions work
- modified shape.js (added type_plane)
beta.r3js.org
polygonboutique 2016-11-10 11:09:55 +01:00
parent 66c8e76983
commit c159a4e1aa
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,7 @@ GameLib.D3.Shape.SHAPE_TYPE_TRIMESH = 3;
GameLib.D3.Shape.SHAPE_TYPE_CYLINDER = 4;
GameLib.D3.Shape.SHAPE_TYPE_HEIGHT_MAP = 5;
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
);
} else if(this.shapeType == GameLib.D3.Shape.SHAPE_TYPE_PLANE) {
instance = new this.engine.instance.Plane();
} else {
console.warn('Shape type not implemented: ' + this.shapeType);
throw new Error('Shape type not implemented: ' + this.shapeType);