diff --git a/node_modules/ammo-debug-drawer/AmmoDebugDrawer.js b/node_modules/ammo-debug-drawer/AmmoDebugDrawer.js index 16e7a2f..17bd9f0 100644 --- a/node_modules/ammo-debug-drawer/AmmoDebugDrawer.js +++ b/node_modules/ammo-debug-drawer/AmmoDebugDrawer.js @@ -41,13 +41,13 @@ THREE.AmmoDebugDrawer = function(scene, world, options) { var vertices = new Float32Array(maxBufferSize * 3); var colors = new Float32Array(maxBufferSize * 3); - this.geometry.addAttribute("position", new THREE.BufferAttribute(vertices, 3).setDynamic(true)); - this.geometry.addAttribute("color", new THREE.BufferAttribute(colors, 3).setDynamic(true)); + this.geometry.setAttribute("position", new THREE.BufferAttribute(vertices, 3).setUsage(THREE.DynamicDrawUsage)); + this.geometry.setAttribute("color", new THREE.BufferAttribute(colors, 3).setUsage(THREE.DynamicDrawUsage)); this.index = 0; var material = new THREE.LineBasicMaterial({ - vertexColors: THREE.VertexColors, + vertexColors: true, depthTest: !drawOnTop });