Ver código fonte

Merge pull request #233 from Tresjs/bugfix/229-tresbuffergeometry-get-broken-with-the-last-tresjs-update-attributes-assign

fix: avoid assigning args as BufferAttribute to BufferGeometry
Alvaro Saburido 2 anos atrás
pai
commit
b3fdc29e22
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      src/core/nodeOps.ts

+ 1 - 0
src/core/nodeOps.ts

@@ -132,6 +132,7 @@ export const nodeOps: RendererOptions<TresObject, TresObject> = {
       let target = root?.[finalKey]
 
       if (root.type === 'BufferGeometry') {
+        if (key === 'args') return
         root.setAttribute(
           kebabToCamel(key),
           new BufferAttribute(...(nextValue as ConstructorParameters<typeof BufferAttribute>)),