From c159a4e1aac4569843367e8e5e67058411f80146 Mon Sep 17 00:00:00 2001 From: polygonboutique Date: Thu, 10 Nov 2016 11:09:55 +0100 Subject: [PATCH] - added a modified version of cannon.js - convex|trimesh collisions work - modified shape.js (added type_plane) --- src/game-lib-shape.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game-lib-shape.js b/src/game-lib-shape.js index 7494c3b..1734411 100644 --- a/src/game-lib-shape.js +++ b/src/game-lib-shape.js @@ -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);