Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 417cff9 commit 9ef1a1fCopy full SHA for 9ef1a1f
libs/rapier/src/lib/debug.ts
@@ -39,8 +39,12 @@ export class NgtrDebug {
39
if (!lineSegments) return;
40
41
const buffers = worldSingleton.proxy.debugRender();
42
- lineSegments.geometry.setAttribute('position', new THREE.BufferAttribute(buffers.vertices, 3));
43
- lineSegments.geometry.setAttribute('color', new THREE.BufferAttribute(buffers.colors, 4));
+ const geometry = new THREE.BufferGeometry();
+ geometry.setAttribute('position', new THREE.BufferAttribute(buffers.vertices, 3));
44
+ geometry.setAttribute('color', new THREE.BufferAttribute(buffers.colors, 4));
45
+
46
+ lineSegments.geometry.dispose();
47
+ lineSegments.geometry = geometry;
48
});
49
}
50
0 commit comments