Skip to content

Commit b28d498

Browse files
fix: tree-shake webxr
1 parent d31e8bb commit b28d498

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

src/index.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ export * from './controls/FlyControls'
159159
// export * from './postprocessing/RenderPixelatedPass'
160160
// export * from './postprocessing/BloomPass'
161161
// export * from './postprocessing/WaterPass'
162-
// export * from './webxr/ARButton'
163-
// export * from './webxr/OculusHandModel'
164-
// export * from './webxr/OculusHandPointerModel'
165-
// export * from './webxr/Text2D'
166-
// export * from './webxr/VRButton'
167-
// export * from './webxr/XRControllerModelFactory'
168-
// export * from './webxr/XREstimatedLight'
169-
// export * from './webxr/XRHandMeshModel'
170-
// export * from './webxr/XRHandModelFactory'
171-
// export * from './webxr/XRHandPrimitiveModel'
162+
export * from './webxr/ARButton'
163+
// export * from './webxr/OculusHandModel' //
164+
// export * from './webxr/OculusHandPointerModel' //
165+
export * from './webxr/Text2D'
166+
// export * from './webxr/VRButton' //
167+
// export * from './webxr/XRControllerModelFactory' //
168+
export * from './webxr/XREstimatedLight'
169+
// export * from './webxr/XRHandMeshModel' //
170+
// export * from './webxr/XRHandModelFactory' //
171+
export * from './webxr/XRHandPrimitiveModel'
172172
export * from './geometries/ParametricGeometries'
173173
export * from './geometries/ParametricGeometry'
174174
export * from './geometries/ConvexGeometry'
@@ -318,4 +318,4 @@ export * from './curves/NURBSSurface'
318318
export * from './curves/CurveExtras'
319319
export * from './deprecated/Geometry'
320320
export * from './libs/MeshoptDecoder'
321-
// export * from './libs/MotionControllers'
321+
// export * from './libs/MotionControllers' //

src/webxr/OculusHandPointerModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const POINTER_LENGTH = 0.035
1313
const POINTER_SEGMENTS = 16
1414
const POINTER_RINGS = 12
1515
const POINTER_HEMISPHERE_ANGLE = 110
16-
const YAXIS = new THREE.Vector3(0, 1, 0)
17-
const ZAXIS = new THREE.Vector3(0, 0, 1)
16+
const YAXIS = /* @__PURE__ */ new THREE.Vector3(0, 1, 0)
17+
const ZAXIS = /* @__PURE__ */ new THREE.Vector3(0, 0, 1)
1818

1919
const CURSOR_RADIUS = 0.02
2020
const CURSOR_MAX_DISTANCE = 1.5

src/webxr/XRControllerModelFactory.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Mesh, Object3D, SphereGeometry, MeshBasicMaterial } from 'three'
22
import type { Texture, Group } from 'three'
3-
// @ts-ignore
43
import { GLTFLoader } from '../loaders/GLTFLoader'
54
import { fetchProfile, MotionController, MotionControllerConstants } from '../libs/MotionControllers'
65

src/webxr/XRHandMeshModel.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Object3D } from 'three'
2-
// @ts-ignore
32
import { GLTFLoader } from '../loaders/GLTFLoader'
43

54
const DEFAULT_HAND_PROFILE_PATH =

src/webxr/XRHandPrimitiveModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
Vector3,
99
} from 'three'
1010

11-
const _matrix = new Matrix4()
12-
const _vector = new Vector3()
11+
const _matrix = /* @__PURE__ */ /* @__PURE__ */ new Matrix4()
12+
const _vector = /* @__PURE__ */ new Vector3()
1313

1414
class XRHandPrimitiveModel {
1515
constructor(handModel, controller, path, handedness, options) {

0 commit comments

Comments
 (0)