Просмотр исходного кода

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 лет назад
Родитель
Сommit
b3fdc29e22
1 измененных файлов с 1 добавлено и 0 удалено
  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>)),