Skip to content

Commit 46a86cd

Browse files
authored
Add PURE annotations (#1400)
1 parent 1a187d9 commit 46a86cd

17 files changed

+62
-62
lines changed

src/three/plugins/TileCompressionPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Vector3, LinearFilter, BufferAttribute, MathUtils } from 'three';
22

3-
const _vec = new Vector3();
3+
const _vec = /* @__PURE__ */ new Vector3();
44
function compressAttribute( attribute, arrayType ) {
55

66
if ( attribute.isInterleavedBufferAttribute || attribute.array instanceof arrayType ) {

src/three/plugins/batched/ExpandingBatchedMesh.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Mesh, Box3, Sphere } from 'three';
22
import { ModelViewBatchedMesh } from './ModelViewBatchedMesh.js';
33

4-
const _raycastMesh = new Mesh();
4+
const _raycastMesh = /* @__PURE__ */ new Mesh();
55
const _batchIntersects = [];
66

77
// Implementation of BatchedMesh that automatically expands

src/three/plugins/batched/ModelViewBatchedMesh.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BatchedMesh, Matrix4, Vector3, Source } from 'three';
22

3-
const matrix = new Matrix4();
4-
const vec1 = new Vector3();
5-
const vec2 = new Vector3();
3+
const matrix = /* @__PURE__ */ new Matrix4();
4+
const vec1 = /* @__PURE__ */ new Vector3();
5+
const vec2 = /* @__PURE__ */ new Vector3();
66
export class ModelViewBatchedMesh extends BatchedMesh {
77

88
constructor( ...args ) {

src/three/plugins/fade/TilesFadePlugin.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { FadeMaterialManager } from './FadeMaterialManager.js';
44
import { FadeBatchedMesh } from './FadeBatchedMesh.js';
55

66
const HAS_POPPED_IN = Symbol( 'HAS_POPPED_IN' );
7-
const _fromPos = new Vector3();
8-
const _toPos = new Vector3();
9-
const _fromQuat = new Quaternion();
10-
const _toQuat = new Quaternion();
11-
const _scale = new Vector3();
7+
const _fromPos = /* @__PURE__ */ new Vector3();
8+
const _toPos = /* @__PURE__ */ new Vector3();
9+
const _fromQuat = /* @__PURE__ */ new Quaternion();
10+
const _toQuat = /* @__PURE__ */ new Quaternion();
11+
const _scale = /* @__PURE__ */ new Vector3();
1212

1313
function onUpdateBefore() {
1414

src/three/plugins/objects/SphereHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LineSegments, BufferGeometry, Vector3, BufferAttribute, LineBasicMaterial } from 'three';
22

3-
const _vector = new Vector3();
3+
const _vector = /* @__PURE__ */ new Vector3();
44
const axes = [ 'x', 'y', 'z' ];
55
export class SphereHelper extends LineSegments {
66

src/three/renderer/controls/CameraTransitionManager.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Clock, EventDispatcher, MathUtils, OrthographicCamera, PerspectiveCamera, Quaternion, Vector3 } from 'three';
22

3-
const _forward = new Vector3();
4-
const _vec = new Vector3();
5-
const _orthographicCamera = new OrthographicCamera();
6-
const _targetOffset = new Vector3();
7-
const _perspOffset = new Vector3();
8-
const _orthoOffset = new Vector3();
9-
const _quat = new Quaternion();
10-
const _targetQuat = new Quaternion();
3+
const _forward = /* @__PURE__ */ new Vector3();
4+
const _vec = /* @__PURE__ */ new Vector3();
5+
const _orthographicCamera = /* @__PURE__ */ new OrthographicCamera();
6+
const _targetOffset = /* @__PURE__ */ new Vector3();
7+
const _perspOffset = /* @__PURE__ */ new Vector3();
8+
const _orthoOffset = /* @__PURE__ */ new Vector3();
9+
const _quat = /* @__PURE__ */ new Quaternion();
10+
const _targetQuat = /* @__PURE__ */ new Quaternion();
1111

1212
export class CameraTransitionManager extends EventDispatcher {
1313

src/three/renderer/controls/PointerTracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Vector2 } from 'three';
22

3-
const _vec = new Vector2();
4-
const _vec2 = new Vector2();
3+
const _vec = /* @__PURE__ */ new Vector2();
4+
const _vec2 = /* @__PURE__ */ new Vector2();
55
export class PointerTracker {
66

77
constructor() {

src/three/renderer/controls/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Matrix4, Ray, Vector3 } from 'three';
22

3-
const _matrix = new Matrix4();
4-
const _vec = new Vector3();
3+
const _matrix = /* @__PURE__ */ new Matrix4();
4+
const _vec = /* @__PURE__ */ new Vector3();
55

66
// helper function for constructing a matrix for rotating around a point
77
export function makeRotateAroundPoint( point, quat, target ) {

src/three/renderer/loaders/decodeOctNormal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Vector2, MathUtils, Vector3 } from 'three';
22

3-
const f = new Vector2();
3+
const f = /* @__PURE__ */ new Vector2();
44

55
/**
66
* Decode an octahedron-encoded normal (as a pair of 8-bit unsigned numbers) into a Vector3.

src/three/renderer/math/Ellipsoid.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { Vector3, Spherical, MathUtils, Ray, Matrix4, Sphere, Euler } from 'three';
22
import { swapToGeoFrame, latitudeToSphericalPhi } from './GeoUtils.js';
33

4-
const _spherical = new Spherical();
5-
const _norm = new Vector3();
6-
const _vec = new Vector3();
7-
const _vec2 = new Vector3();
8-
const _matrix = new Matrix4();
9-
const _matrix2 = new Matrix4();
10-
const _matrix3 = new Matrix4();
11-
const _sphere = new Sphere();
12-
const _euler = new Euler();
13-
14-
const _vecX = new Vector3();
15-
const _vecY = new Vector3();
16-
const _vecZ = new Vector3();
17-
const _pos = new Vector3();
18-
19-
const _ray = new Ray();
4+
const _spherical = /* @__PURE__ */ new Spherical();
5+
const _norm = /* @__PURE__ */ new Vector3();
6+
const _vec = /* @__PURE__ */ new Vector3();
7+
const _vec2 = /* @__PURE__ */ new Vector3();
8+
const _matrix = /* @__PURE__ */ new Matrix4();
9+
const _matrix2 = /* @__PURE__ */ new Matrix4();
10+
const _matrix3 = /* @__PURE__ */ new Matrix4();
11+
const _sphere = /* @__PURE__ */ new Sphere();
12+
const _euler = /* @__PURE__ */ new Euler();
13+
14+
const _vecX = /* @__PURE__ */ new Vector3();
15+
const _vecY = /* @__PURE__ */ new Vector3();
16+
const _vecZ = /* @__PURE__ */ new Vector3();
17+
const _pos = /* @__PURE__ */ new Vector3();
18+
19+
const _ray = /* @__PURE__ */ new Ray();
2020

2121
const EPSILON12 = 1e-12;
2222
const CENTER_EPS = 0.1;

0 commit comments

Comments
 (0)