瀏覽代碼

fix: avoid assigning args as BufferAttribute to BufferGeometry

alvarosabu 2 年之前
父節點
當前提交
1cc67b08c1
共有 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>)),