@@ -519,13 +519,13 @@ THREE.AmmoDebugDrawer = function(scene, world, options) {
519519 var vertices = new Float32Array(maxBufferSize * 3);
520520 var colors = new Float32Array(maxBufferSize * 3);
521521
522- this.geometry.addAttribute ("position", new THREE.BufferAttribute(vertices, 3).setDynamic(true ));
523- this.geometry.addAttribute ("color", new THREE.BufferAttribute(colors, 3).setDynamic(true ));
522+ this.geometry.setAttribute ("position", new THREE.BufferAttribute(vertices, 3).setUsage(THREE.DynamicDrawUsage ));
523+ this.geometry.setAttribute ("color", new THREE.BufferAttribute(colors, 3).setUsage(THREE.DynamicDrawUsage ));
524524
525525 this.index = 0;
526526
527527 var material = new THREE.LineBasicMaterial({
528- vertexColors: THREE.VertexColors,
528+ vertexColors: true,
529529 depthTest: !drawOnTop
530530 });
531531
@@ -14523,7 +14523,7 @@ const _iterateGeometries = (function() {
1452314523 const inverse = new THREE.Matrix4();
1452414524 const bufferGeometry = new THREE.BufferGeometry();
1452514525 return function(root, options, cb) {
14526- inverse.copy(root.matrixWorld).invert();
14526+ inverse.copy(root.matrixWorld).invert();
1452714527 root.traverse(mesh => {
1452814528 if (
1452914529 mesh.isMesh &&
@@ -17490,7 +17490,7 @@ var Shape = {
1749017490
1749117491 //rotate by 90 degrees similar to mesh2shape:createCylinderShape
1749217492 var quat = new CANNON.Quaternion();
17493- quat.setFromEuler(90 * THREE.Math .DEG2RAD, 0, 0, 'XYZ').normalize();
17493+ quat.setFromEuler(90 * THREE.MathUtils .DEG2RAD, 0, 0, 'XYZ').normalize();
1749417494 orientation.mult(quat, orientation);
1749517495 break;
1749617496 default:
0 commit comments