Skip to content

Commit

Permalink
fix: tree-shake webxr
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed May 26, 2023
1 parent d31e8bb commit b28d498
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
22 changes: 11 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ export * from './controls/FlyControls'
// export * from './postprocessing/RenderPixelatedPass'
// export * from './postprocessing/BloomPass'
// export * from './postprocessing/WaterPass'
// export * from './webxr/ARButton'
// export * from './webxr/OculusHandModel'
// export * from './webxr/OculusHandPointerModel'
// export * from './webxr/Text2D'
// export * from './webxr/VRButton'
// export * from './webxr/XRControllerModelFactory'
// export * from './webxr/XREstimatedLight'
// export * from './webxr/XRHandMeshModel'
// export * from './webxr/XRHandModelFactory'
// export * from './webxr/XRHandPrimitiveModel'
export * from './webxr/ARButton'
// export * from './webxr/OculusHandModel' //
// export * from './webxr/OculusHandPointerModel' //
export * from './webxr/Text2D'
// export * from './webxr/VRButton' //
// export * from './webxr/XRControllerModelFactory' //
export * from './webxr/XREstimatedLight'
// export * from './webxr/XRHandMeshModel' //
// export * from './webxr/XRHandModelFactory' //
export * from './webxr/XRHandPrimitiveModel'
export * from './geometries/ParametricGeometries'
export * from './geometries/ParametricGeometry'
export * from './geometries/ConvexGeometry'
Expand Down Expand Up @@ -318,4 +318,4 @@ export * from './curves/NURBSSurface'
export * from './curves/CurveExtras'
export * from './deprecated/Geometry'
export * from './libs/MeshoptDecoder'
// export * from './libs/MotionControllers'
// export * from './libs/MotionControllers' //
4 changes: 2 additions & 2 deletions src/webxr/OculusHandPointerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const POINTER_LENGTH = 0.035
const POINTER_SEGMENTS = 16
const POINTER_RINGS = 12
const POINTER_HEMISPHERE_ANGLE = 110
const YAXIS = new THREE.Vector3(0, 1, 0)
const ZAXIS = new THREE.Vector3(0, 0, 1)
const YAXIS = /* @__PURE__ */ new THREE.Vector3(0, 1, 0)
const ZAXIS = /* @__PURE__ */ new THREE.Vector3(0, 0, 1)

const CURSOR_RADIUS = 0.02
const CURSOR_MAX_DISTANCE = 1.5
Expand Down
1 change: 0 additions & 1 deletion src/webxr/XRControllerModelFactory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Mesh, Object3D, SphereGeometry, MeshBasicMaterial } from 'three'
import type { Texture, Group } from 'three'
// @ts-ignore
import { GLTFLoader } from '../loaders/GLTFLoader'
import { fetchProfile, MotionController, MotionControllerConstants } from '../libs/MotionControllers'

Expand Down
1 change: 0 additions & 1 deletion src/webxr/XRHandMeshModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Object3D } from 'three'
// @ts-ignore
import { GLTFLoader } from '../loaders/GLTFLoader'

const DEFAULT_HAND_PROFILE_PATH =
Expand Down
4 changes: 2 additions & 2 deletions src/webxr/XRHandPrimitiveModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
Vector3,
} from 'three'

const _matrix = new Matrix4()
const _vector = new Vector3()
const _matrix = /* @__PURE__ */ /* @__PURE__ */ new Matrix4()
const _vector = /* @__PURE__ */ new Vector3()

class XRHandPrimitiveModel {
constructor(handModel, controller, path, handedness, options) {
Expand Down

0 comments on commit b28d498

Please sign in to comment.