浏览代码

Core: Add missing annotations. (#21643)

Michael Herzog 4 年之前
父节点
当前提交
92572b795c
共有 3 个文件被更改,包括 9 次插入9 次删除
  1. 2 2
      src/core/BufferAttribute.js
  2. 6 6
      src/core/BufferGeometry.js
  3. 1 1
      src/core/InterleavedBufferAttribute.js

+ 2 - 2
src/core/BufferAttribute.js

@@ -4,8 +4,8 @@ import { Vector2 } from '../math/Vector2.js';
 import { Color } from '../math/Color.js';
 import { StaticDrawUsage } from '../constants.js';
 
-const _vector = new Vector3();
-const _vector2 = new Vector2();
+const _vector = new /*@__PURE__*/ Vector3();
+const _vector2 = new /*@__PURE__*/ Vector2();
 
 class BufferAttribute {
 

+ 6 - 6
src/core/BufferGeometry.js

@@ -12,12 +12,12 @@ import { arrayMax } from '../utils.js';
 
 let _id = 0;
 
-const _m1 = new Matrix4();
-const _obj = new Object3D();
-const _offset = new Vector3();
-const _box = new Box3();
-const _boxMorphTargets = new Box3();
-const _vector = new Vector3();
+const _m1 = new /*@__PURE__*/ Matrix4();
+const _obj = new /*@__PURE__*/ Object3D();
+const _offset = new /*@__PURE__*/ Vector3();
+const _box = new /*@__PURE__*/ Box3();
+const _boxMorphTargets = new /*@__PURE__*/ Box3();
+const _vector = new /*@__PURE__*/ Vector3();
 
 class BufferGeometry extends EventDispatcher {
 

+ 1 - 1
src/core/InterleavedBufferAttribute.js

@@ -1,7 +1,7 @@
 import { Vector3 } from '../math/Vector3.js';
 import { BufferAttribute } from './BufferAttribute.js';
 
-const _vector = new Vector3();
+const _vector = new /*@__PURE__*/ Vector3();
 
 class InterleavedBufferAttribute {