three-stdlib 2.23.0 → 2.23.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_polyfill/CompressedArrayTexture.cjs +12 -0
- package/dist/_polyfill/CompressedArrayTexture.js +6 -6
- package/dist/_polyfill/Data3DTexture.cjs +17 -0
- package/dist/_polyfill/Data3DTexture.js +8 -8
- package/dist/animation/{AnimationClipCreator.mjs → AnimationClipCreator.cjs} +18 -18
- package/dist/animation/AnimationClipCreator.js +18 -18
- package/dist/animation/{CCDIKSolver.mjs → CCDIKSolver.cjs} +32 -32
- package/dist/animation/CCDIKSolver.js +32 -32
- package/dist/animation/{MMDAnimationHelper.mjs → MMDAnimationHelper.cjs} +17 -17
- package/dist/animation/MMDAnimationHelper.js +17 -17
- package/dist/animation/{MMDPhysics.mjs → MMDPhysics.cjs} +25 -25
- package/dist/animation/MMDPhysics.js +25 -25
- package/dist/cameras/{CinematicCamera.mjs → CinematicCamera.cjs} +17 -17
- package/dist/cameras/CinematicCamera.js +17 -17
- package/dist/controls/{ArcballControls.mjs → ArcballControls.cjs} +102 -102
- package/dist/controls/ArcballControls.js +102 -102
- package/dist/controls/{DeviceOrientationControls.mjs → DeviceOrientationControls.cjs} +14 -14
- package/dist/controls/DeviceOrientationControls.js +14 -14
- package/dist/controls/{DragControls.mjs → DragControls.cjs} +12 -12
- package/dist/controls/DragControls.js +12 -12
- package/dist/controls/{FirstPersonControls.mjs → FirstPersonControls.cjs} +16 -16
- package/dist/controls/FirstPersonControls.js +16 -16
- package/dist/controls/{FlyControls.mjs → FlyControls.cjs} +10 -10
- package/dist/controls/FlyControls.js +10 -10
- package/dist/controls/{OrbitControls.mjs → OrbitControls.cjs} +52 -54
- package/dist/controls/OrbitControls.d.ts +4 -4
- package/dist/controls/OrbitControls.js +52 -54
- package/dist/controls/{PointerLockControls.mjs → PointerLockControls.cjs} +8 -8
- package/dist/controls/PointerLockControls.js +8 -8
- package/dist/controls/{TrackballControls.mjs → TrackballControls.cjs} +32 -32
- package/dist/controls/TrackballControls.js +32 -32
- package/dist/controls/{TransformControls.mjs → TransformControls.cjs} +169 -169
- package/dist/controls/TransformControls.js +169 -169
- package/dist/controls/experimental/{CameraControls.mjs → CameraControls.cjs} +59 -59
- package/dist/controls/experimental/CameraControls.js +59 -59
- package/dist/csm/{CSM.mjs → CSM.cjs} +17 -17
- package/dist/csm/CSM.js +17 -17
- package/dist/csm/{CSMFrustum.mjs → CSMFrustum.cjs} +7 -7
- package/dist/csm/CSMFrustum.js +7 -7
- package/dist/csm/{CSMHelper.mjs → CSMHelper.cjs} +14 -14
- package/dist/csm/CSMHelper.js +14 -14
- package/dist/csm/{CSMShader.mjs → CSMShader.cjs} +5 -5
- package/dist/csm/CSMShader.js +5 -5
- package/dist/curves/{CurveExtras.mjs → CurveExtras.cjs} +45 -45
- package/dist/curves/CurveExtras.js +45 -45
- package/dist/curves/{NURBSCurve.mjs → NURBSCurve.cjs} +11 -11
- package/dist/curves/NURBSCurve.js +11 -11
- package/dist/curves/{NURBSSurface.mjs → NURBSSurface.cjs} +7 -7
- package/dist/curves/NURBSSurface.js +7 -7
- package/dist/curves/{NURBSUtils.mjs → NURBSUtils.cjs} +17 -17
- package/dist/curves/NURBSUtils.js +17 -17
- package/dist/deprecated/{Geometry.mjs → Geometry.cjs} +51 -51
- package/dist/deprecated/Geometry.js +51 -51
- package/dist/effects/{AnaglyphEffect.mjs → AnaglyphEffect.cjs} +14 -14
- package/dist/effects/AnaglyphEffect.js +14 -14
- package/dist/effects/{AsciiEffect.mjs → AsciiEffect.cjs} +3 -3
- package/dist/effects/AsciiEffect.js +3 -3
- package/dist/effects/{OutlineEffect.mjs → OutlineEffect.cjs} +8 -8
- package/dist/effects/OutlineEffect.js +8 -8
- package/dist/effects/{ParallaxBarrierEffect.mjs → ParallaxBarrierEffect.cjs} +12 -12
- package/dist/effects/ParallaxBarrierEffect.js +12 -12
- package/dist/effects/{PeppersGhostEffect.mjs → PeppersGhostEffect.cjs} +11 -11
- package/dist/effects/PeppersGhostEffect.js +11 -11
- package/dist/effects/{StereoEffect.mjs → StereoEffect.cjs} +6 -6
- package/dist/effects/StereoEffect.js +6 -6
- package/dist/environments/RoomEnvironment.cjs +95 -0
- package/dist/environments/RoomEnvironment.js +23 -40
- package/dist/exporters/{ColladaExporter.mjs → ColladaExporter.cjs} +16 -16
- package/dist/exporters/ColladaExporter.js +16 -16
- package/dist/exporters/{DRACOExporter.mjs → DRACOExporter.cjs} +8 -8
- package/dist/exporters/DRACOExporter.js +8 -8
- package/dist/exporters/{GLTFExporter.mjs → GLTFExporter.cjs} +47 -47
- package/dist/exporters/GLTFExporter.js +47 -47
- package/dist/exporters/{MMDExporter.mjs → MMDExporter.cjs} +10 -10
- package/dist/exporters/MMDExporter.js +10 -10
- package/dist/exporters/{OBJExporter.mjs → OBJExporter.cjs} +13 -13
- package/dist/exporters/OBJExporter.js +13 -13
- package/dist/exporters/{PLYExporter.mjs → PLYExporter.cjs} +8 -8
- package/dist/exporters/PLYExporter.js +8 -8
- package/dist/exporters/{STLExporter.mjs → STLExporter.cjs} +12 -12
- package/dist/exporters/STLExporter.js +12 -12
- package/dist/exporters/{USDZExporter.mjs → USDZExporter.cjs} +10 -10
- package/dist/exporters/USDZExporter.js +10 -10
- package/dist/geometries/{BoxLineGeometry.mjs → BoxLineGeometry.cjs} +6 -6
- package/dist/geometries/BoxLineGeometry.js +6 -6
- package/dist/geometries/ConvexGeometry.cjs +26 -0
- package/dist/geometries/ConvexGeometry.js +9 -9
- package/dist/geometries/{DecalGeometry.mjs → DecalGeometry.cjs} +16 -16
- package/dist/geometries/DecalGeometry.js +16 -16
- package/dist/geometries/{LightningStrike.mjs → LightningStrike.cjs} +45 -45
- package/dist/geometries/LightningStrike.js +45 -45
- package/dist/geometries/{ParametricGeometries.mjs → ParametricGeometries.cjs} +11 -11
- package/dist/geometries/ParametricGeometries.js +11 -11
- package/dist/geometries/{ParametricGeometry.mjs → ParametricGeometry.cjs} +11 -11
- package/dist/geometries/ParametricGeometry.js +11 -11
- package/dist/geometries/{RoundedBoxGeometry.mjs → RoundedBoxGeometry.cjs} +10 -10
- package/dist/geometries/RoundedBoxGeometry.js +10 -10
- package/dist/geometries/{TeapotGeometry.mjs → TeapotGeometry.cjs} +21 -21
- package/dist/geometries/TeapotGeometry.js +21 -21
- package/dist/geometries/{TextGeometry.mjs → TextGeometry.cjs} +6 -6
- package/dist/geometries/TextGeometry.js +6 -6
- package/dist/helpers/{LightProbeHelper.mjs → LightProbeHelper.cjs} +7 -7
- package/dist/helpers/LightProbeHelper.js +7 -7
- package/dist/helpers/{PositionalAudioHelper.mjs → PositionalAudioHelper.cjs} +11 -11
- package/dist/helpers/PositionalAudioHelper.js +11 -11
- package/dist/helpers/{RectAreaLightHelper.mjs → RectAreaLightHelper.cjs} +11 -11
- package/dist/helpers/RectAreaLightHelper.js +11 -11
- package/dist/helpers/{VertexNormalsHelper.mjs → VertexNormalsHelper.cjs} +11 -11
- package/dist/helpers/VertexNormalsHelper.js +11 -11
- package/dist/helpers/{VertexTangentsHelper.mjs → VertexTangentsHelper.cjs} +10 -10
- package/dist/helpers/VertexTangentsHelper.js +10 -10
- package/dist/index.cjs +613 -0
- package/dist/index.js +613 -613
- package/dist/interactive/{HTMLMesh.mjs → HTMLMesh.cjs} +11 -11
- package/dist/interactive/HTMLMesh.js +11 -11
- package/dist/interactive/{InteractiveGroup.mjs → InteractiveGroup.cjs} +8 -8
- package/dist/interactive/InteractiveGroup.js +8 -8
- package/dist/interactive/{SelectionBox.mjs → SelectionBox.cjs} +21 -21
- package/dist/interactive/SelectionBox.js +21 -21
- package/dist/interactive/{SelectionHelper.mjs → SelectionHelper.cjs} +7 -7
- package/dist/interactive/SelectionHelper.js +7 -7
- package/dist/libs/{MeshoptDecoder.mjs → MeshoptDecoder.cjs} +3 -3
- package/dist/libs/MeshoptDecoder.js +3 -3
- package/dist/libs/{MotionControllers.mjs → MotionControllers.cjs} +6 -6
- package/dist/libs/MotionControllers.js +6 -6
- package/dist/lights/{LightProbeGenerator.mjs → LightProbeGenerator.cjs} +16 -16
- package/dist/lights/LightProbeGenerator.js +16 -16
- package/dist/lights/{RectAreaLightUniformsLib.mjs → RectAreaLightUniformsLib.cjs} +42 -42
- package/dist/lights/RectAreaLightUniformsLib.js +42 -42
- package/dist/lines/Line2.cjs +13 -0
- package/dist/lines/Line2.js +8 -8
- package/dist/lines/{LineGeometry.mjs → LineGeometry.cjs} +5 -5
- package/dist/lines/LineGeometry.js +5 -5
- package/dist/lines/{LineMaterial.mjs → LineMaterial.cjs} +10 -10
- package/dist/lines/LineMaterial.js +10 -10
- package/dist/lines/{LineSegments2.mjs → LineSegments2.cjs} +28 -28
- package/dist/lines/LineSegments2.js +28 -28
- package/dist/lines/{LineSegmentsGeometry.mjs → LineSegmentsGeometry.cjs} +18 -18
- package/dist/lines/LineSegmentsGeometry.js +18 -18
- package/dist/lines/Wireframe.cjs +32 -0
- package/dist/lines/Wireframe.js +13 -13
- package/dist/lines/WireframeGeometry2.cjs +13 -0
- package/dist/lines/WireframeGeometry2.js +7 -7
- package/dist/loaders/{3DMLoader.mjs → 3DMLoader.cjs} +37 -37
- package/dist/loaders/3DMLoader.js +37 -37
- package/dist/loaders/{3MFLoader.mjs → 3MFLoader.cjs} +53 -53
- package/dist/loaders/3MFLoader.js +53 -53
- package/dist/loaders/{AMFLoader.mjs → AMFLoader.cjs} +19 -19
- package/dist/loaders/AMFLoader.js +19 -19
- package/dist/loaders/{AssimpLoader.mjs → AssimpLoader.cjs} +41 -41
- package/dist/loaders/AssimpLoader.js +41 -41
- package/dist/loaders/{BVHLoader.mjs → BVHLoader.cjs} +18 -18
- package/dist/loaders/BVHLoader.js +18 -18
- package/dist/loaders/{BasisTextureLoader.mjs → BasisTextureLoader.cjs} +22 -22
- package/dist/loaders/BasisTextureLoader.js +22 -22
- package/dist/loaders/{ColladaLoader.mjs → ColladaLoader.cjs} +76 -76
- package/dist/loaders/ColladaLoader.js +76 -76
- package/dist/loaders/{DDSLoader.mjs → DDSLoader.cjs} +10 -10
- package/dist/loaders/DDSLoader.js +10 -10
- package/dist/loaders/{DRACOLoader.mjs → DRACOLoader.cjs} +12 -12
- package/dist/loaders/DRACOLoader.js +12 -12
- package/dist/loaders/{EXRLoader.mjs → EXRLoader.cjs} +23 -23
- package/dist/loaders/EXRLoader.js +23 -23
- package/dist/loaders/{FBXLoader.mjs → FBXLoader.cjs} +116 -116
- package/dist/loaders/FBXLoader.js +116 -116
- package/dist/loaders/{FontLoader.mjs → FontLoader.cjs} +9 -9
- package/dist/loaders/FontLoader.js +9 -9
- package/dist/loaders/{GCodeLoader.mjs → GCodeLoader.cjs} +13 -13
- package/dist/loaders/GCodeLoader.js +13 -13
- package/dist/loaders/{GLTFLoader.mjs → GLTFLoader.cjs} +112 -112
- package/dist/loaders/GLTFLoader.js +112 -112
- package/dist/loaders/{HDRCubeTextureLoader.mjs → HDRCubeTextureLoader.cjs} +15 -15
- package/dist/loaders/HDRCubeTextureLoader.js +15 -15
- package/dist/loaders/{KMZLoader.mjs → KMZLoader.cjs} +13 -13
- package/dist/loaders/KMZLoader.js +13 -13
- package/dist/loaders/{KTX2Loader.mjs → KTX2Loader.cjs} +65 -65
- package/dist/loaders/KTX2Loader.js +65 -65
- package/dist/loaders/{KTXLoader.mjs → KTXLoader.cjs} +5 -5
- package/dist/loaders/KTXLoader.js +5 -5
- package/dist/loaders/{LDrawLoader.mjs → LDrawLoader.cjs} +39 -39
- package/dist/loaders/LDrawLoader.js +39 -39
- package/dist/loaders/{LUT3dlLoader.mjs → LUT3dlLoader.cjs} +22 -22
- package/dist/loaders/LUT3dlLoader.js +22 -22
- package/dist/loaders/{LUTCubeLoader.mjs → LUTCubeLoader.cjs} +22 -22
- package/dist/loaders/LUTCubeLoader.js +22 -22
- package/dist/loaders/{LWOLoader.mjs → LWOLoader.cjs} +42 -42
- package/dist/loaders/LWOLoader.js +42 -42
- package/dist/loaders/{LottieLoader.mjs → LottieLoader.cjs} +8 -8
- package/dist/loaders/LottieLoader.js +8 -8
- package/dist/loaders/{MD2Loader.mjs → MD2Loader.cjs} +15 -15
- package/dist/loaders/MD2Loader.js +15 -15
- package/dist/loaders/{MDDLoader.mjs → MDDLoader.cjs} +9 -9
- package/dist/loaders/MDDLoader.js +9 -9
- package/dist/loaders/{MMDLoader.mjs → MMDLoader.cjs} +59 -59
- package/dist/loaders/MMDLoader.js +59 -59
- package/dist/loaders/{MTLLoader.mjs → MTLLoader.cjs} +17 -17
- package/dist/loaders/MTLLoader.js +17 -17
- package/dist/loaders/{NRRDLoader.mjs → NRRDLoader.cjs} +17 -17
- package/dist/loaders/NRRDLoader.js +17 -17
- package/dist/loaders/{OBJLoader.mjs → OBJLoader.cjs} +37 -37
- package/dist/loaders/OBJLoader.js +37 -37
- package/dist/loaders/{PCDLoader.mjs → PCDLoader.cjs} +13 -13
- package/dist/loaders/PCDLoader.js +13 -13
- package/dist/loaders/{PDBLoader.mjs → PDBLoader.cjs} +11 -11
- package/dist/loaders/PDBLoader.js +11 -11
- package/dist/loaders/{PLYLoader.mjs → PLYLoader.cjs} +13 -13
- package/dist/loaders/PLYLoader.js +13 -13
- package/dist/loaders/{PRWMLoader.mjs → PRWMLoader.cjs} +9 -9
- package/dist/loaders/PRWMLoader.js +9 -9
- package/dist/loaders/{PVRLoader.mjs → PVRLoader.cjs} +11 -11
- package/dist/loaders/PVRLoader.js +11 -11
- package/dist/loaders/{RGBELoader.mjs → RGBELoader.cjs} +18 -18
- package/dist/loaders/RGBELoader.js +18 -18
- package/dist/loaders/{RGBMLoader.mjs → RGBMLoader.cjs} +16 -16
- package/dist/loaders/RGBMLoader.js +16 -16
- package/dist/loaders/{STLLoader.mjs → STLLoader.cjs} +15 -15
- package/dist/loaders/STLLoader.js +15 -15
- package/dist/loaders/{SVGLoader.mjs → SVGLoader.cjs} +55 -55
- package/dist/loaders/SVGLoader.js +55 -55
- package/dist/loaders/{TDSLoader.mjs → TDSLoader.cjs} +20 -20
- package/dist/loaders/TDSLoader.js +20 -20
- package/dist/loaders/{TGALoader.mjs → TGALoader.cjs} +6 -6
- package/dist/loaders/TGALoader.js +6 -6
- package/dist/loaders/{TTFLoader.mjs → TTFLoader.cjs} +9 -9
- package/dist/loaders/TTFLoader.js +9 -9
- package/dist/loaders/{TiltLoader.mjs → TiltLoader.cjs} +26 -26
- package/dist/loaders/TiltLoader.js +26 -26
- package/dist/loaders/{VOXLoader.mjs → VOXLoader.cjs} +18 -18
- package/dist/loaders/VOXLoader.js +18 -18
- package/dist/loaders/{VRMLLoader.mjs → VRMLLoader.cjs} +125 -125
- package/dist/loaders/VRMLLoader.js +125 -125
- package/dist/loaders/{VRMLoader.mjs → VRMLoader.cjs} +7 -7
- package/dist/loaders/VRMLoader.js +7 -7
- package/dist/loaders/{VTKLoader.mjs → VTKLoader.cjs} +24 -24
- package/dist/loaders/VTKLoader.js +24 -24
- package/dist/loaders/{XLoader.mjs → XLoader.cjs} +42 -42
- package/dist/loaders/XLoader.js +42 -42
- package/dist/loaders/{XYZLoader.mjs → XYZLoader.cjs} +9 -9
- package/dist/loaders/XYZLoader.js +9 -9
- package/dist/loaders/lwo/{IFFParser.mjs → IFFParser.cjs} +7 -7
- package/dist/loaders/lwo/IFFParser.js +7 -7
- package/dist/loaders/lwo/{LWO2Parser.mjs → LWO2Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO2Parser.js +3 -3
- package/dist/loaders/lwo/{LWO3Parser.mjs → LWO3Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO3Parser.js +3 -3
- package/dist/math/{Capsule.mjs → Capsule.cjs} +8 -8
- package/dist/math/Capsule.js +8 -8
- package/dist/math/{ColorConverter.mjs → ColorConverter.cjs} +7 -7
- package/dist/math/ColorConverter.js +7 -7
- package/dist/math/{ConvexHull.mjs → ConvexHull.cjs} +18 -18
- package/dist/math/ConvexHull.js +18 -18
- package/dist/math/{ImprovedNoise.mjs → ImprovedNoise.cjs} +3 -3
- package/dist/math/ImprovedNoise.js +3 -3
- package/dist/math/{Lut.mjs → Lut.cjs} +14 -14
- package/dist/math/Lut.js +14 -14
- package/dist/math/{MeshSurfaceSampler.mjs → MeshSurfaceSampler.cjs} +6 -6
- package/dist/math/MeshSurfaceSampler.js +6 -6
- package/dist/math/{OBB.mjs → OBB.cjs} +21 -21
- package/dist/math/OBB.js +21 -21
- package/dist/math/{Octree.mjs → Octree.cjs} +19 -19
- package/dist/math/Octree.js +19 -19
- package/dist/math/{SimplexNoise.mjs → SimplexNoise.cjs} +3 -3
- package/dist/math/SimplexNoise.js +3 -3
- package/dist/misc/{ConvexObjectBreaker.mjs → ConvexObjectBreaker.cjs} +25 -25
- package/dist/misc/ConvexObjectBreaker.js +25 -25
- package/dist/misc/{GPUComputationRenderer.mjs → GPUComputationRenderer.cjs} +19 -19
- package/dist/misc/GPUComputationRenderer.js +19 -19
- package/dist/misc/{Gyroscope.mjs → Gyroscope.cjs} +11 -11
- package/dist/misc/Gyroscope.js +11 -11
- package/dist/misc/{MD2Character.mjs → MD2Character.cjs} +14 -14
- package/dist/misc/MD2Character.js +14 -14
- package/dist/misc/{MD2CharacterComplex.mjs → MD2CharacterComplex.cjs} +20 -20
- package/dist/misc/MD2CharacterComplex.js +20 -20
- package/dist/misc/{MorphAnimMesh.mjs → MorphAnimMesh.cjs} +8 -8
- package/dist/misc/MorphAnimMesh.js +8 -8
- package/dist/misc/{MorphBlendMesh.mjs → MorphBlendMesh.cjs} +6 -6
- package/dist/misc/MorphBlendMesh.js +6 -6
- package/dist/misc/{ProgressiveLightmap.mjs → ProgressiveLightmap.cjs} +17 -17
- package/dist/misc/ProgressiveLightmap.js +17 -17
- package/dist/misc/{RollerCoaster.mjs → RollerCoaster.cjs} +77 -77
- package/dist/misc/RollerCoaster.js +77 -77
- package/dist/misc/{Timer.mjs → Timer.cjs} +3 -3
- package/dist/misc/Timer.js +3 -3
- package/dist/misc/{TubePainter.mjs → TubePainter.cjs} +24 -24
- package/dist/misc/TubePainter.js +24 -24
- package/dist/misc/{Volume.mjs → Volume.cjs} +18 -18
- package/dist/misc/Volume.js +18 -18
- package/dist/misc/{VolumeSlice.mjs → VolumeSlice.cjs} +10 -10
- package/dist/misc/VolumeSlice.js +10 -10
- package/dist/misc/{WebGL.mjs → WebGL.cjs} +7 -7
- package/dist/misc/WebGL.js +7 -7
- package/dist/modifiers/{CurveModifier.mjs → CurveModifier.cjs} +17 -17
- package/dist/modifiers/CurveModifier.js +17 -17
- package/dist/modifiers/{EdgeSplitModifier.mjs → EdgeSplitModifier.cjs} +12 -13
- package/dist/modifiers/EdgeSplitModifier.js +13 -12
- package/dist/modifiers/{SimplifyModifier.mjs → SimplifyModifier.cjs} +12 -12
- package/dist/modifiers/SimplifyModifier.js +12 -12
- package/dist/modifiers/{TessellateModifier.mjs → TessellateModifier.cjs} +30 -30
- package/dist/modifiers/TessellateModifier.js +30 -30
- package/dist/objects/{GroundProjectedEnv.mjs → GroundProjectedEnv.cjs} +8 -8
- package/dist/objects/GroundProjectedEnv.js +8 -8
- package/dist/objects/{Lensflare.mjs → Lensflare.cjs} +37 -37
- package/dist/objects/Lensflare.js +37 -37
- package/dist/objects/{LightningStorm.mjs → LightningStorm.cjs} +17 -17
- package/dist/objects/LightningStorm.js +17 -17
- package/dist/objects/{MarchingCubes.mjs → MarchingCubes.cjs} +21 -21
- package/dist/objects/MarchingCubes.js +21 -21
- package/dist/objects/{Reflector.mjs → Reflector.cjs} +23 -23
- package/dist/objects/Reflector.js +23 -23
- package/dist/objects/{ReflectorForSSRPass.mjs → ReflectorForSSRPass.cjs} +33 -33
- package/dist/objects/ReflectorForSSRPass.js +33 -33
- package/dist/objects/ReflectorRTT.cjs +10 -0
- package/dist/objects/ReflectorRTT.js +5 -5
- package/dist/objects/{Refractor.mjs → Refractor.cjs} +26 -26
- package/dist/objects/Refractor.js +26 -26
- package/dist/objects/{ShadowMesh.mjs → ShadowMesh.cjs} +9 -9
- package/dist/objects/ShadowMesh.js +9 -9
- package/dist/objects/{Sky.mjs → Sky.cjs} +11 -11
- package/dist/objects/Sky.js +11 -11
- package/dist/objects/{Water.mjs → Water.cjs} +33 -33
- package/dist/objects/Water.js +33 -33
- package/dist/objects/{Water2.mjs → Water2.cjs} +20 -20
- package/dist/objects/Water2.js +20 -20
- package/dist/physics/{AmmoPhysics.mjs → AmmoPhysics.cjs} +3 -3
- package/dist/physics/AmmoPhysics.js +3 -3
- package/dist/postprocessing/{AdaptiveToneMappingPass.mjs → AdaptiveToneMappingPass.cjs} +32 -32
- package/dist/postprocessing/AdaptiveToneMappingPass.js +32 -32
- package/dist/postprocessing/{AfterimagePass.mjs → AfterimagePass.cjs} +21 -21
- package/dist/postprocessing/AfterimagePass.js +21 -21
- package/dist/postprocessing/{BloomPass.mjs → BloomPass.cjs} +20 -20
- package/dist/postprocessing/BloomPass.js +20 -20
- package/dist/postprocessing/{BokehPass.mjs → BokehPass.cjs} +19 -19
- package/dist/postprocessing/BokehPass.js +19 -19
- package/dist/postprocessing/{ClearPass.mjs → ClearPass.cjs} +7 -7
- package/dist/postprocessing/ClearPass.js +7 -7
- package/dist/postprocessing/{CubeTexturePass.mjs → CubeTexturePass.cjs} +14 -14
- package/dist/postprocessing/CubeTexturePass.js +14 -14
- package/dist/postprocessing/{DotScreenPass.mjs → DotScreenPass.cjs} +12 -12
- package/dist/postprocessing/DotScreenPass.js +12 -12
- package/dist/postprocessing/{EffectComposer.mjs → EffectComposer.cjs} +20 -20
- package/dist/postprocessing/EffectComposer.js +20 -20
- package/dist/postprocessing/{FilmPass.mjs → FilmPass.cjs} +12 -12
- package/dist/postprocessing/FilmPass.js +12 -12
- package/dist/postprocessing/{GlitchPass.mjs → GlitchPass.cjs} +26 -26
- package/dist/postprocessing/GlitchPass.js +26 -26
- package/dist/postprocessing/{HalftonePass.mjs → HalftonePass.cjs} +13 -13
- package/dist/postprocessing/HalftonePass.js +13 -13
- package/dist/postprocessing/{LUTPass.mjs → LUTPass.cjs} +5 -5
- package/dist/postprocessing/LUTPass.js +5 -5
- package/dist/postprocessing/{MaskPass.mjs → MaskPass.cjs} +7 -7
- package/dist/postprocessing/MaskPass.js +7 -7
- package/dist/postprocessing/{OutlinePass.mjs → OutlinePass.cjs} +45 -45
- package/dist/postprocessing/OutlinePass.js +45 -45
- package/dist/postprocessing/{Pass.mjs → Pass.cjs} +8 -8
- package/dist/postprocessing/Pass.js +8 -8
- package/dist/postprocessing/{RenderPass.mjs → RenderPass.cjs} +7 -7
- package/dist/postprocessing/RenderPass.js +7 -7
- package/dist/postprocessing/{RenderPixelatedPass.mjs → RenderPixelatedPass.cjs} +18 -18
- package/dist/postprocessing/RenderPixelatedPass.js +18 -18
- package/dist/postprocessing/{SAOPass.mjs → SAOPass.cjs} +69 -69
- package/dist/postprocessing/SAOPass.js +69 -69
- package/dist/postprocessing/{SMAAPass.mjs → SMAAPass.cjs} +30 -30
- package/dist/postprocessing/SMAAPass.js +30 -30
- package/dist/postprocessing/{SSAARenderPass.mjs → SSAARenderPass.cjs} +19 -19
- package/dist/postprocessing/SSAARenderPass.js +19 -19
- package/dist/postprocessing/{SSAOPass.mjs → SSAOPass.cjs} +63 -63
- package/dist/postprocessing/SSAOPass.js +63 -63
- package/dist/postprocessing/{SSRPass.mjs → SSRPass.cjs} +86 -86
- package/dist/postprocessing/SSRPass.js +86 -86
- package/dist/postprocessing/{SavePass.mjs → SavePass.cjs} +13 -13
- package/dist/postprocessing/SavePass.js +13 -13
- package/dist/postprocessing/{ShaderPass.mjs → ShaderPass.cjs} +10 -10
- package/dist/postprocessing/ShaderPass.js +10 -10
- package/dist/postprocessing/{TAARenderPass.mjs → TAARenderPass.cjs} +8 -8
- package/dist/postprocessing/TAARenderPass.js +8 -8
- package/dist/postprocessing/{TexturePass.mjs → TexturePass.cjs} +11 -11
- package/dist/postprocessing/TexturePass.js +11 -11
- package/dist/postprocessing/{UnrealBloomPass.mjs → UnrealBloomPass.cjs} +36 -36
- package/dist/postprocessing/UnrealBloomPass.js +36 -36
- package/dist/postprocessing/{WaterPass.mjs → WaterPass.cjs} +10 -10
- package/dist/postprocessing/WaterPass.js +10 -10
- package/dist/renderers/{CSS2DRenderer.mjs → CSS2DRenderer.cjs} +12 -12
- package/dist/renderers/CSS2DRenderer.js +12 -12
- package/dist/renderers/{CSS3DRenderer.mjs → CSS3DRenderer.cjs} +12 -12
- package/dist/renderers/CSS3DRenderer.js +12 -12
- package/dist/renderers/{Projector.mjs → Projector.cjs} +21 -21
- package/dist/renderers/Projector.js +21 -21
- package/dist/renderers/{SVGRenderer.mjs → SVGRenderer.cjs} +12 -12
- package/dist/renderers/SVGRenderer.js +12 -12
- package/dist/shaders/{ACESFilmicToneMappingShader.mjs → ACESFilmicToneMappingShader.cjs} +3 -3
- package/dist/shaders/ACESFilmicToneMappingShader.js +3 -3
- package/dist/shaders/{AfterimageShader.mjs → AfterimageShader.cjs} +3 -3
- package/dist/shaders/AfterimageShader.js +3 -3
- package/dist/shaders/{BasicShader.mjs → BasicShader.cjs} +3 -3
- package/dist/shaders/BasicShader.js +3 -3
- package/dist/shaders/{BleachBypassShader.mjs → BleachBypassShader.cjs} +3 -3
- package/dist/shaders/BleachBypassShader.js +3 -3
- package/dist/shaders/{BlendShader.mjs → BlendShader.cjs} +3 -3
- package/dist/shaders/BlendShader.js +3 -3
- package/dist/shaders/{BokehShader.mjs → BokehShader.cjs} +3 -3
- package/dist/shaders/BokehShader.js +3 -3
- package/dist/shaders/{BokehShader2.mjs → BokehShader2.cjs} +6 -6
- package/dist/shaders/BokehShader2.js +6 -6
- package/dist/shaders/{BrightnessContrastShader.mjs → BrightnessContrastShader.cjs} +3 -3
- package/dist/shaders/BrightnessContrastShader.js +3 -3
- package/dist/shaders/{ColorCorrectionShader.mjs → ColorCorrectionShader.cjs} +7 -7
- package/dist/shaders/ColorCorrectionShader.js +7 -7
- package/dist/shaders/{ColorifyShader.mjs → ColorifyShader.cjs} +5 -5
- package/dist/shaders/ColorifyShader.js +5 -5
- package/dist/shaders/{ConvolutionShader.mjs → ConvolutionShader.cjs} +5 -5
- package/dist/shaders/ConvolutionShader.js +5 -5
- package/dist/shaders/{CopyShader.mjs → CopyShader.cjs} +3 -3
- package/dist/shaders/CopyShader.js +3 -3
- package/dist/shaders/{DOFMipMapShader.mjs → DOFMipMapShader.cjs} +3 -3
- package/dist/shaders/DOFMipMapShader.js +3 -3
- package/dist/shaders/{DepthLimitedBlurShader.mjs → DepthLimitedBlurShader.cjs} +7 -7
- package/dist/shaders/DepthLimitedBlurShader.js +7 -7
- package/dist/shaders/{DigitalGlitch.mjs → DigitalGlitch.cjs} +3 -3
- package/dist/shaders/DigitalGlitch.js +3 -3
- package/dist/shaders/{DotScreenShader.mjs → DotScreenShader.cjs} +6 -6
- package/dist/shaders/DotScreenShader.js +6 -6
- package/dist/shaders/{FXAAShader.mjs → FXAAShader.cjs} +5 -5
- package/dist/shaders/FXAAShader.js +5 -5
- package/dist/shaders/{FilmShader.mjs → FilmShader.cjs} +3 -3
- package/dist/shaders/FilmShader.js +3 -3
- package/dist/shaders/{FocusShader.mjs → FocusShader.cjs} +3 -3
- package/dist/shaders/FocusShader.js +3 -3
- package/dist/shaders/{FreiChenShader.mjs → FreiChenShader.cjs} +5 -5
- package/dist/shaders/FreiChenShader.js +5 -5
- package/dist/shaders/{FresnelShader.mjs → FresnelShader.cjs} +3 -3
- package/dist/shaders/FresnelShader.js +3 -3
- package/dist/shaders/{GammaCorrectionShader.mjs → GammaCorrectionShader.cjs} +3 -3
- package/dist/shaders/GammaCorrectionShader.js +3 -3
- package/dist/shaders/{GodRaysShader.mjs → GodRaysShader.cjs} +11 -11
- package/dist/shaders/GodRaysShader.js +11 -11
- package/dist/shaders/{HalftoneShader.mjs → HalftoneShader.cjs} +3 -3
- package/dist/shaders/HalftoneShader.js +3 -3
- package/dist/shaders/{HorizontalBlurShader.mjs → HorizontalBlurShader.cjs} +3 -3
- package/dist/shaders/HorizontalBlurShader.js +3 -3
- package/dist/shaders/{HorizontalTiltShiftShader.mjs → HorizontalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/HorizontalTiltShiftShader.js +3 -3
- package/dist/shaders/{HueSaturationShader.mjs → HueSaturationShader.cjs} +3 -3
- package/dist/shaders/HueSaturationShader.js +3 -3
- package/dist/shaders/{KaleidoShader.mjs → KaleidoShader.cjs} +3 -3
- package/dist/shaders/KaleidoShader.js +3 -3
- package/dist/shaders/{LuminosityHighPassShader.mjs → LuminosityHighPassShader.cjs} +5 -5
- package/dist/shaders/LuminosityHighPassShader.js +5 -5
- package/dist/shaders/{LuminosityShader.mjs → LuminosityShader.cjs} +3 -3
- package/dist/shaders/LuminosityShader.js +3 -3
- package/dist/shaders/{MirrorShader.mjs → MirrorShader.cjs} +3 -3
- package/dist/shaders/MirrorShader.js +3 -3
- package/dist/shaders/{NormalMapShader.mjs → NormalMapShader.cjs} +6 -6
- package/dist/shaders/NormalMapShader.js +6 -6
- package/dist/shaders/{ParallaxShader.mjs → ParallaxShader.cjs} +3 -3
- package/dist/shaders/ParallaxShader.js +3 -3
- package/dist/shaders/{PixelShader.mjs → PixelShader.cjs} +3 -3
- package/dist/shaders/PixelShader.js +3 -3
- package/dist/shaders/{RGBShiftShader.mjs → RGBShiftShader.cjs} +3 -3
- package/dist/shaders/RGBShiftShader.js +3 -3
- package/dist/shaders/{SAOShader.mjs → SAOShader.cjs} +7 -7
- package/dist/shaders/SAOShader.js +7 -7
- package/dist/shaders/{SMAAShader.mjs → SMAAShader.cjs} +9 -9
- package/dist/shaders/SMAAShader.js +9 -9
- package/dist/shaders/{SSAOShader.mjs → SSAOShader.cjs} +10 -10
- package/dist/shaders/SSAOShader.js +10 -10
- package/dist/shaders/{SSRShader.mjs → SSRShader.cjs} +10 -10
- package/dist/shaders/SSRShader.js +10 -10
- package/dist/shaders/{SepiaShader.mjs → SepiaShader.cjs} +3 -3
- package/dist/shaders/SepiaShader.js +3 -3
- package/dist/shaders/{SobelOperatorShader.mjs → SobelOperatorShader.cjs} +5 -5
- package/dist/shaders/SobelOperatorShader.js +5 -5
- package/dist/shaders/{SubsurfaceScatteringShader.mjs → SubsurfaceScatteringShader.cjs} +13 -13
- package/dist/shaders/SubsurfaceScatteringShader.js +13 -13
- package/dist/shaders/{TechnicolorShader.mjs → TechnicolorShader.cjs} +3 -3
- package/dist/shaders/TechnicolorShader.js +3 -3
- package/dist/shaders/{ToneMapShader.mjs → ToneMapShader.cjs} +3 -3
- package/dist/shaders/ToneMapShader.js +3 -3
- package/dist/shaders/{ToonShader.mjs → ToonShader.cjs} +32 -32
- package/dist/shaders/ToonShader.js +32 -32
- package/dist/shaders/{TriangleBlurShader.mjs → TriangleBlurShader.cjs} +5 -5
- package/dist/shaders/TriangleBlurShader.js +5 -5
- package/dist/shaders/{UnpackDepthRGBAShader.mjs → UnpackDepthRGBAShader.cjs} +3 -3
- package/dist/shaders/UnpackDepthRGBAShader.js +3 -3
- package/dist/shaders/{VerticalBlurShader.mjs → VerticalBlurShader.cjs} +3 -3
- package/dist/shaders/VerticalBlurShader.js +3 -3
- package/dist/shaders/{VerticalTiltShiftShader.mjs → VerticalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/VerticalTiltShiftShader.js +3 -3
- package/dist/shaders/{VignetteShader.mjs → VignetteShader.cjs} +3 -3
- package/dist/shaders/VignetteShader.js +3 -3
- package/dist/shaders/{VolumeShader.mjs → VolumeShader.cjs} +6 -6
- package/dist/shaders/VolumeShader.js +6 -6
- package/dist/shaders/{WaterRefractionShader.mjs → WaterRefractionShader.cjs} +3 -3
- package/dist/shaders/WaterRefractionShader.js +3 -3
- package/dist/shaders/types.cjs +1 -0
- package/dist/shaders/types.js +1 -1
- package/dist/textures/{FlakesTexture.mjs → FlakesTexture.cjs} +3 -3
- package/dist/textures/FlakesTexture.js +3 -3
- package/dist/types/Loader.cjs +26 -0
- package/dist/types/Loader.js +5 -22
- package/dist/types/helpers.cjs +4 -0
- package/dist/types/helpers.js +3 -3
- package/dist/utils/{BufferGeometryUtils.mjs → BufferGeometryUtils.cjs} +41 -41
- package/dist/utils/BufferGeometryUtils.js +41 -41
- package/dist/utils/{GeometryCompressionUtils.mjs → GeometryCompressionUtils.cjs} +94 -94
- package/dist/utils/GeometryCompressionUtils.js +94 -94
- package/dist/utils/{GeometryUtils.mjs → GeometryUtils.cjs} +18 -18
- package/dist/utils/GeometryUtils.js +18 -18
- package/dist/utils/{RoughnessMipmapper.mjs → RoughnessMipmapper.cjs} +13 -13
- package/dist/utils/RoughnessMipmapper.js +13 -13
- package/dist/utils/{SceneUtils.mjs → SceneUtils.cjs} +8 -8
- package/dist/utils/SceneUtils.js +8 -8
- package/dist/utils/{ShadowMapViewer.mjs → ShadowMapViewer.cjs} +18 -18
- package/dist/utils/ShadowMapViewer.js +18 -18
- package/dist/utils/{SkeletonUtils.mjs → SkeletonUtils.cjs} +10 -10
- package/dist/utils/SkeletonUtils.js +10 -10
- package/dist/utils/{UVsDebug.mjs → UVsDebug.cjs} +7 -7
- package/dist/utils/UVsDebug.js +7 -7
- package/dist/utils/{WorkerPool.mjs → WorkerPool.cjs} +3 -3
- package/dist/utils/WorkerPool.js +3 -3
- package/dist/webxr/{ARButton.mjs → ARButton.cjs} +3 -3
- package/dist/webxr/ARButton.js +3 -3
- package/dist/webxr/{OculusHandModel.mjs → OculusHandModel.cjs} +9 -9
- package/dist/webxr/OculusHandModel.js +9 -9
- package/dist/webxr/{OculusHandPointerModel.mjs → OculusHandPointerModel.cjs} +41 -24
- package/dist/webxr/OculusHandPointerModel.js +24 -41
- package/dist/webxr/Text2D.cjs +48 -0
- package/dist/webxr/Text2D.js +9 -26
- package/dist/webxr/{VRButton.mjs → VRButton.cjs} +3 -3
- package/dist/webxr/VRButton.js +3 -3
- package/dist/webxr/{XRControllerModelFactory.mjs → XRControllerModelFactory.cjs} +18 -18
- package/dist/webxr/XRControllerModelFactory.js +18 -18
- package/dist/webxr/{XREstimatedLight.mjs → XREstimatedLight.cjs} +8 -8
- package/dist/webxr/XREstimatedLight.js +8 -8
- package/dist/webxr/{XRHandMeshModel.mjs → XRHandMeshModel.cjs} +5 -5
- package/dist/webxr/XRHandMeshModel.js +5 -5
- package/dist/webxr/{XRHandModelFactory.mjs → XRHandModelFactory.cjs} +10 -10
- package/dist/webxr/XRHandModelFactory.js +10 -10
- package/dist/webxr/{XRHandPrimitiveModel.mjs → XRHandPrimitiveModel.cjs} +11 -11
- package/dist/webxr/XRHandPrimitiveModel.js +11 -11
- package/package.json +3 -3
- package/dist/_polyfill/CompressedArrayTexture.mjs +0 -12
- package/dist/_polyfill/Data3DTexture.mjs +0 -17
- package/dist/environments/RoomEnvironment.mjs +0 -78
- package/dist/geometries/ConvexGeometry.mjs +0 -26
- package/dist/index.mjs +0 -613
- package/dist/lines/Line2.mjs +0 -13
- package/dist/lines/Wireframe.mjs +0 -32
- package/dist/lines/WireframeGeometry2.mjs +0 -13
- package/dist/objects/ReflectorRTT.mjs +0 -10
- package/dist/shaders/types.mjs +0 -1
- package/dist/types/Loader.mjs +0 -9
- package/dist/types/helpers.mjs +0 -4
- package/dist/webxr/Text2D.mjs +0 -31
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class TDSLoader extends THREE.Loader {
|
3
5
|
constructor(manager) {
|
4
6
|
super(manager);
|
5
7
|
this.debug = false;
|
@@ -19,8 +21,8 @@ class TDSLoader extends Loader {
|
|
19
21
|
*/
|
20
22
|
load(url, onLoad, onProgress, onError) {
|
21
23
|
const scope = this;
|
22
|
-
const path = this.path === "" ? LoaderUtils.extractUrlBase(url) : this.path;
|
23
|
-
const loader = new FileLoader(this.manager);
|
24
|
+
const path = this.path === "" ? THREE.LoaderUtils.extractUrlBase(url) : this.path;
|
25
|
+
const loader = new THREE.FileLoader(this.manager);
|
24
26
|
loader.setPath(this.path);
|
25
27
|
loader.setResponseType("arraybuffer");
|
26
28
|
loader.setRequestHeader(this.requestHeader);
|
@@ -52,7 +54,7 @@ class TDSLoader extends Loader {
|
|
52
54
|
* @return {Group} Group loaded from 3ds file.
|
53
55
|
*/
|
54
56
|
parse(arraybuffer, path) {
|
55
|
-
this.group = new Group();
|
57
|
+
this.group = new THREE.Group();
|
56
58
|
this.position = 0;
|
57
59
|
this.materials = [];
|
58
60
|
this.meshes = [];
|
@@ -155,7 +157,7 @@ class TDSLoader extends Loader {
|
|
155
157
|
readMaterialEntry(data, path) {
|
156
158
|
const chunk = this.readChunk(data);
|
157
159
|
let next = this.nextChunk(data, chunk);
|
158
|
-
const material = new MeshPhongMaterial();
|
160
|
+
const material = new THREE.MeshPhongMaterial();
|
159
161
|
while (next !== 0) {
|
160
162
|
if (next === MAT_NAME) {
|
161
163
|
material.name = this.readString(data, 64);
|
@@ -168,11 +170,11 @@ class TDSLoader extends Loader {
|
|
168
170
|
material.wireframeLinewidth = value;
|
169
171
|
this.debugMessage(" Wireframe Thickness: " + value);
|
170
172
|
} else if (next === MAT_TWO_SIDE) {
|
171
|
-
material.side = DoubleSide;
|
173
|
+
material.side = THREE.DoubleSide;
|
172
174
|
this.debugMessage(" DoubleSided");
|
173
175
|
} else if (next === MAT_ADDITIVE) {
|
174
176
|
this.debugMessage(" Additive Blending");
|
175
|
-
material.blending = AdditiveBlending;
|
177
|
+
material.blending = THREE.AdditiveBlending;
|
176
178
|
} else if (next === MAT_DIFFUSE) {
|
177
179
|
this.debugMessage(" Diffuse Color");
|
178
180
|
material.color = this.readColor(data);
|
@@ -225,9 +227,9 @@ class TDSLoader extends Loader {
|
|
225
227
|
readMesh(data) {
|
226
228
|
const chunk = this.readChunk(data);
|
227
229
|
let next = this.nextChunk(data, chunk);
|
228
|
-
const geometry = new BufferGeometry();
|
229
|
-
const material = new MeshPhongMaterial();
|
230
|
-
const mesh = new Mesh(geometry, material);
|
230
|
+
const geometry = new THREE.BufferGeometry();
|
231
|
+
const material = new THREE.MeshPhongMaterial();
|
232
|
+
const mesh = new THREE.Mesh(geometry, material);
|
231
233
|
mesh.name = "mesh";
|
232
234
|
while (next !== 0) {
|
233
235
|
if (next === POINT_ARRAY) {
|
@@ -239,7 +241,7 @@ class TDSLoader extends Loader {
|
|
239
241
|
vertices.push(this.readFloat(data));
|
240
242
|
vertices.push(this.readFloat(data));
|
241
243
|
}
|
242
|
-
geometry.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
244
|
+
geometry.setAttribute("position", new THREE.Float32BufferAttribute(vertices, 3));
|
243
245
|
} else if (next === FACE_ARRAY) {
|
244
246
|
this.resetPosition(data);
|
245
247
|
this.readFaceArray(data, mesh);
|
@@ -251,14 +253,14 @@ class TDSLoader extends Loader {
|
|
251
253
|
uvs.push(this.readFloat(data));
|
252
254
|
uvs.push(this.readFloat(data));
|
253
255
|
}
|
254
|
-
geometry.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
256
|
+
geometry.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
|
255
257
|
} else if (next === MESH_MATRIX) {
|
256
258
|
this.debugMessage(" Tranformation Matrix (TODO)");
|
257
259
|
const values = [];
|
258
260
|
for (let i = 0; i < 12; i++) {
|
259
261
|
values[i] = this.readFloat(data);
|
260
262
|
}
|
261
|
-
const matrix = new Matrix4();
|
263
|
+
const matrix = new THREE.Matrix4();
|
262
264
|
matrix.elements[0] = values[0];
|
263
265
|
matrix.elements[1] = values[6];
|
264
266
|
matrix.elements[2] = values[3];
|
@@ -276,7 +278,7 @@ class TDSLoader extends Loader {
|
|
276
278
|
matrix.elements[14] = 0;
|
277
279
|
matrix.elements[15] = 1;
|
278
280
|
matrix.transpose();
|
279
|
-
const inverse = new Matrix4();
|
281
|
+
const inverse = new THREE.Matrix4();
|
280
282
|
inverse.copy(matrix).invert();
|
281
283
|
geometry.applyMatrix4(inverse);
|
282
284
|
matrix.decompose(mesh.position, mesh.quaternion, mesh.scale);
|
@@ -345,7 +347,7 @@ class TDSLoader extends Loader {
|
|
345
347
|
const chunk = this.readChunk(data);
|
346
348
|
let next = this.nextChunk(data, chunk);
|
347
349
|
let texture = {};
|
348
|
-
const loader = new TextureLoader(this.manager);
|
350
|
+
const loader = new THREE.TextureLoader(this.manager);
|
349
351
|
loader.setPath(this.resourcePath || path).setCrossOrigin(this.crossOrigin);
|
350
352
|
while (next !== 0) {
|
351
353
|
if (next === MAT_MAPNAME) {
|
@@ -400,7 +402,7 @@ class TDSLoader extends Loader {
|
|
400
402
|
*/
|
401
403
|
readColor(data) {
|
402
404
|
const chunk = this.readChunk(data);
|
403
|
-
const color = new Color();
|
405
|
+
const color = new THREE.Color();
|
404
406
|
if (chunk.id === COLOR_24 || chunk.id === LIN_COLOR_24) {
|
405
407
|
const r = this.readByte(data);
|
406
408
|
const g = this.readByte(data);
|
@@ -645,6 +647,4 @@ const FACE_ARRAY = 16672;
|
|
645
647
|
const MSH_MAT_GROUP = 16688;
|
646
648
|
const TEX_VERTS = 16704;
|
647
649
|
const MESH_MATRIX = 16736;
|
648
|
-
|
649
|
-
TDSLoader
|
650
|
-
};
|
650
|
+
exports.TDSLoader = TDSLoader;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class TDSLoader extends THREE.Loader {
|
1
|
+
import { Loader, LoaderUtils, FileLoader, Group, MeshPhongMaterial, DoubleSide, AdditiveBlending, BufferGeometry, Mesh, Float32BufferAttribute, Matrix4, TextureLoader, Color } from "three";
|
2
|
+
class TDSLoader extends Loader {
|
5
3
|
constructor(manager) {
|
6
4
|
super(manager);
|
7
5
|
this.debug = false;
|
@@ -21,8 +19,8 @@ class TDSLoader extends THREE.Loader {
|
|
21
19
|
*/
|
22
20
|
load(url, onLoad, onProgress, onError) {
|
23
21
|
const scope = this;
|
24
|
-
const path = this.path === "" ?
|
25
|
-
const loader = new
|
22
|
+
const path = this.path === "" ? LoaderUtils.extractUrlBase(url) : this.path;
|
23
|
+
const loader = new FileLoader(this.manager);
|
26
24
|
loader.setPath(this.path);
|
27
25
|
loader.setResponseType("arraybuffer");
|
28
26
|
loader.setRequestHeader(this.requestHeader);
|
@@ -54,7 +52,7 @@ class TDSLoader extends THREE.Loader {
|
|
54
52
|
* @return {Group} Group loaded from 3ds file.
|
55
53
|
*/
|
56
54
|
parse(arraybuffer, path) {
|
57
|
-
this.group = new
|
55
|
+
this.group = new Group();
|
58
56
|
this.position = 0;
|
59
57
|
this.materials = [];
|
60
58
|
this.meshes = [];
|
@@ -157,7 +155,7 @@ class TDSLoader extends THREE.Loader {
|
|
157
155
|
readMaterialEntry(data, path) {
|
158
156
|
const chunk = this.readChunk(data);
|
159
157
|
let next = this.nextChunk(data, chunk);
|
160
|
-
const material = new
|
158
|
+
const material = new MeshPhongMaterial();
|
161
159
|
while (next !== 0) {
|
162
160
|
if (next === MAT_NAME) {
|
163
161
|
material.name = this.readString(data, 64);
|
@@ -170,11 +168,11 @@ class TDSLoader extends THREE.Loader {
|
|
170
168
|
material.wireframeLinewidth = value;
|
171
169
|
this.debugMessage(" Wireframe Thickness: " + value);
|
172
170
|
} else if (next === MAT_TWO_SIDE) {
|
173
|
-
material.side =
|
171
|
+
material.side = DoubleSide;
|
174
172
|
this.debugMessage(" DoubleSided");
|
175
173
|
} else if (next === MAT_ADDITIVE) {
|
176
174
|
this.debugMessage(" Additive Blending");
|
177
|
-
material.blending =
|
175
|
+
material.blending = AdditiveBlending;
|
178
176
|
} else if (next === MAT_DIFFUSE) {
|
179
177
|
this.debugMessage(" Diffuse Color");
|
180
178
|
material.color = this.readColor(data);
|
@@ -227,9 +225,9 @@ class TDSLoader extends THREE.Loader {
|
|
227
225
|
readMesh(data) {
|
228
226
|
const chunk = this.readChunk(data);
|
229
227
|
let next = this.nextChunk(data, chunk);
|
230
|
-
const geometry = new
|
231
|
-
const material = new
|
232
|
-
const mesh = new
|
228
|
+
const geometry = new BufferGeometry();
|
229
|
+
const material = new MeshPhongMaterial();
|
230
|
+
const mesh = new Mesh(geometry, material);
|
233
231
|
mesh.name = "mesh";
|
234
232
|
while (next !== 0) {
|
235
233
|
if (next === POINT_ARRAY) {
|
@@ -241,7 +239,7 @@ class TDSLoader extends THREE.Loader {
|
|
241
239
|
vertices.push(this.readFloat(data));
|
242
240
|
vertices.push(this.readFloat(data));
|
243
241
|
}
|
244
|
-
geometry.setAttribute("position", new
|
242
|
+
geometry.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
245
243
|
} else if (next === FACE_ARRAY) {
|
246
244
|
this.resetPosition(data);
|
247
245
|
this.readFaceArray(data, mesh);
|
@@ -253,14 +251,14 @@ class TDSLoader extends THREE.Loader {
|
|
253
251
|
uvs.push(this.readFloat(data));
|
254
252
|
uvs.push(this.readFloat(data));
|
255
253
|
}
|
256
|
-
geometry.setAttribute("uv", new
|
254
|
+
geometry.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
257
255
|
} else if (next === MESH_MATRIX) {
|
258
256
|
this.debugMessage(" Tranformation Matrix (TODO)");
|
259
257
|
const values = [];
|
260
258
|
for (let i = 0; i < 12; i++) {
|
261
259
|
values[i] = this.readFloat(data);
|
262
260
|
}
|
263
|
-
const matrix = new
|
261
|
+
const matrix = new Matrix4();
|
264
262
|
matrix.elements[0] = values[0];
|
265
263
|
matrix.elements[1] = values[6];
|
266
264
|
matrix.elements[2] = values[3];
|
@@ -278,7 +276,7 @@ class TDSLoader extends THREE.Loader {
|
|
278
276
|
matrix.elements[14] = 0;
|
279
277
|
matrix.elements[15] = 1;
|
280
278
|
matrix.transpose();
|
281
|
-
const inverse = new
|
279
|
+
const inverse = new Matrix4();
|
282
280
|
inverse.copy(matrix).invert();
|
283
281
|
geometry.applyMatrix4(inverse);
|
284
282
|
matrix.decompose(mesh.position, mesh.quaternion, mesh.scale);
|
@@ -347,7 +345,7 @@ class TDSLoader extends THREE.Loader {
|
|
347
345
|
const chunk = this.readChunk(data);
|
348
346
|
let next = this.nextChunk(data, chunk);
|
349
347
|
let texture = {};
|
350
|
-
const loader = new
|
348
|
+
const loader = new TextureLoader(this.manager);
|
351
349
|
loader.setPath(this.resourcePath || path).setCrossOrigin(this.crossOrigin);
|
352
350
|
while (next !== 0) {
|
353
351
|
if (next === MAT_MAPNAME) {
|
@@ -402,7 +400,7 @@ class TDSLoader extends THREE.Loader {
|
|
402
400
|
*/
|
403
401
|
readColor(data) {
|
404
402
|
const chunk = this.readChunk(data);
|
405
|
-
const color = new
|
403
|
+
const color = new Color();
|
406
404
|
if (chunk.id === COLOR_24 || chunk.id === LIN_COLOR_24) {
|
407
405
|
const r = this.readByte(data);
|
408
406
|
const g = this.readByte(data);
|
@@ -647,4 +645,6 @@ const FACE_ARRAY = 16672;
|
|
647
645
|
const MSH_MAT_GROUP = 16688;
|
648
646
|
const TEX_VERTS = 16704;
|
649
647
|
const MESH_MATRIX = 16736;
|
650
|
-
|
648
|
+
export {
|
649
|
+
TDSLoader
|
650
|
+
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class TGALoader extends THREE.DataTextureLoader {
|
3
5
|
constructor(manager) {
|
4
6
|
super(manager);
|
5
7
|
}
|
@@ -276,10 +278,8 @@ class TGALoader extends DataTextureLoader {
|
|
276
278
|
height: header.height,
|
277
279
|
flipY: true,
|
278
280
|
generateMipmaps: true,
|
279
|
-
minFilter: LinearMipmapLinearFilter
|
281
|
+
minFilter: THREE.LinearMipmapLinearFilter
|
280
282
|
};
|
281
283
|
}
|
282
284
|
}
|
283
|
-
|
284
|
-
TGALoader
|
285
|
-
};
|
285
|
+
exports.TGALoader = TGALoader;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class TGALoader extends THREE.DataTextureLoader {
|
1
|
+
import { DataTextureLoader, LinearMipmapLinearFilter } from "three";
|
2
|
+
class TGALoader extends DataTextureLoader {
|
5
3
|
constructor(manager) {
|
6
4
|
super(manager);
|
7
5
|
}
|
@@ -278,8 +276,10 @@ class TGALoader extends THREE.DataTextureLoader {
|
|
278
276
|
height: header.height,
|
279
277
|
flipY: true,
|
280
278
|
generateMipmaps: true,
|
281
|
-
minFilter:
|
279
|
+
minFilter: LinearMipmapLinearFilter
|
282
280
|
};
|
283
281
|
}
|
284
282
|
}
|
285
|
-
|
283
|
+
export {
|
284
|
+
TGALoader
|
285
|
+
};
|
@@ -1,13 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const opentype_js = require("opentype.js");
|
5
|
+
class TTFLoader extends THREE.Loader {
|
4
6
|
constructor(manager) {
|
5
7
|
super(manager);
|
6
8
|
this.reversed = false;
|
7
9
|
}
|
8
10
|
load(url, onLoad, onProgress, onError) {
|
9
11
|
const scope = this;
|
10
|
-
const loader = new FileLoader(this.manager);
|
12
|
+
const loader = new THREE.FileLoader(this.manager);
|
11
13
|
loader.setPath(this.path);
|
12
14
|
loader.setResponseType("arraybuffer");
|
13
15
|
loader.setRequestHeader(this.requestHeader);
|
@@ -16,7 +18,7 @@ class TTFLoader extends Loader {
|
|
16
18
|
url,
|
17
19
|
function(buffer) {
|
18
20
|
try {
|
19
|
-
onLoad(parse(buffer));
|
21
|
+
onLoad(opentype_js.parse(buffer));
|
20
22
|
} catch (e) {
|
21
23
|
if (onError) {
|
22
24
|
onError(e);
|
@@ -123,9 +125,7 @@ class TTFLoader extends Loader {
|
|
123
125
|
});
|
124
126
|
return reversed;
|
125
127
|
}
|
126
|
-
return convert(parse(arraybuffer), this.reversed);
|
128
|
+
return convert(opentype_js.parse(arraybuffer), this.reversed);
|
127
129
|
}
|
128
130
|
}
|
129
|
-
|
130
|
-
TTFLoader
|
131
|
-
};
|
131
|
+
exports.TTFLoader = TTFLoader;
|
@@ -1,15 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const opentype_js = require("opentype.js");
|
5
|
-
class TTFLoader extends THREE.Loader {
|
1
|
+
import { Loader, FileLoader } from "three";
|
2
|
+
import { parse } from "opentype.js";
|
3
|
+
class TTFLoader extends Loader {
|
6
4
|
constructor(manager) {
|
7
5
|
super(manager);
|
8
6
|
this.reversed = false;
|
9
7
|
}
|
10
8
|
load(url, onLoad, onProgress, onError) {
|
11
9
|
const scope = this;
|
12
|
-
const loader = new
|
10
|
+
const loader = new FileLoader(this.manager);
|
13
11
|
loader.setPath(this.path);
|
14
12
|
loader.setResponseType("arraybuffer");
|
15
13
|
loader.setRequestHeader(this.requestHeader);
|
@@ -18,7 +16,7 @@ class TTFLoader extends THREE.Loader {
|
|
18
16
|
url,
|
19
17
|
function(buffer) {
|
20
18
|
try {
|
21
|
-
onLoad(
|
19
|
+
onLoad(parse(buffer));
|
22
20
|
} catch (e) {
|
23
21
|
if (onError) {
|
24
22
|
onError(e);
|
@@ -125,7 +123,9 @@ class TTFLoader extends THREE.Loader {
|
|
125
123
|
});
|
126
124
|
return reversed;
|
127
125
|
}
|
128
|
-
return convert(
|
126
|
+
return convert(parse(arraybuffer), this.reversed);
|
129
127
|
}
|
130
128
|
}
|
131
|
-
|
129
|
+
export {
|
130
|
+
TTFLoader
|
131
|
+
};
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const fflate = require("fflate");
|
5
|
+
class TiltLoader extends THREE.Loader {
|
4
6
|
load(url, onLoad, onProgress, onError) {
|
5
7
|
const scope = this;
|
6
|
-
const loader = new FileLoader(this.manager);
|
8
|
+
const loader = new THREE.FileLoader(this.manager);
|
7
9
|
loader.setPath(this.path);
|
8
10
|
loader.setResponseType("arraybuffer");
|
9
11
|
loader.setWithCredentials(this.withCredentials);
|
@@ -26,9 +28,9 @@ class TiltLoader extends Loader {
|
|
26
28
|
);
|
27
29
|
}
|
28
30
|
parse(buffer) {
|
29
|
-
const group = new Group();
|
30
|
-
const zip = unzipSync(new Uint8Array(buffer.slice(16)));
|
31
|
-
const metadata = JSON.parse(strFromU8(zip["metadata.json"]));
|
31
|
+
const group = new THREE.Group();
|
32
|
+
const zip = fflate.unzipSync(new Uint8Array(buffer.slice(16)));
|
33
|
+
const metadata = JSON.parse(fflate.strFromU8(zip["metadata.json"]));
|
32
34
|
const data = new DataView(zip["data.sketch"].buffer);
|
33
35
|
const num_strokes = data.getInt32(16, true);
|
34
36
|
const brushes = {};
|
@@ -76,25 +78,25 @@ class TiltLoader extends Loader {
|
|
76
78
|
for (const brush_index in brushes) {
|
77
79
|
const geometry = new StrokeGeometry(brushes[brush_index]);
|
78
80
|
const material = getMaterial(metadata.BrushIndex[brush_index]);
|
79
|
-
group.add(new Mesh(geometry, material));
|
81
|
+
group.add(new THREE.Mesh(geometry, material));
|
80
82
|
}
|
81
83
|
return group;
|
82
84
|
}
|
83
85
|
}
|
84
|
-
class StrokeGeometry extends BufferGeometry {
|
86
|
+
class StrokeGeometry extends THREE.BufferGeometry {
|
85
87
|
constructor(strokes) {
|
86
88
|
super();
|
87
89
|
const vertices = [];
|
88
90
|
const colors = [];
|
89
91
|
const uvs = [];
|
90
|
-
const position = new Vector3();
|
91
|
-
const prevPosition = new Vector3();
|
92
|
-
const quaternion = new Quaternion();
|
93
|
-
const prevQuaternion = new Quaternion();
|
94
|
-
const vector1 = new Vector3();
|
95
|
-
const vector2 = new Vector3();
|
96
|
-
const vector3 = new Vector3();
|
97
|
-
const vector4 = new Vector3();
|
92
|
+
const position = new THREE.Vector3();
|
93
|
+
const prevPosition = new THREE.Vector3();
|
94
|
+
const quaternion = new THREE.Quaternion();
|
95
|
+
const prevQuaternion = new THREE.Quaternion();
|
96
|
+
const vector1 = new THREE.Vector3();
|
97
|
+
const vector2 = new THREE.Vector3();
|
98
|
+
const vector3 = new THREE.Vector3();
|
99
|
+
const vector4 = new THREE.Vector3();
|
98
100
|
for (const k in strokes) {
|
99
101
|
const stroke = strokes[k];
|
100
102
|
const positions = stroke[0];
|
@@ -142,9 +144,9 @@ class StrokeGeometry extends BufferGeometry {
|
|
142
144
|
uvs.push(p2, 0);
|
143
145
|
}
|
144
146
|
}
|
145
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
146
|
-
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 4));
|
147
|
-
this.setAttribute("uv", new BufferAttribute(new Float32Array(uvs), 2));
|
147
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
148
|
+
this.setAttribute("color", new THREE.BufferAttribute(new Float32Array(colors), 4));
|
149
|
+
this.setAttribute("uv", new THREE.BufferAttribute(new Float32Array(uvs), 2));
|
148
150
|
}
|
149
151
|
}
|
150
152
|
const BRUSH_LIST_ARRAY = {
|
@@ -283,7 +285,7 @@ const shaders = () => ({
|
|
283
285
|
Light: {
|
284
286
|
uniforms: {
|
285
287
|
mainTex: {
|
286
|
-
value: /* @__PURE__ */ new TextureLoader().setPath("./textures/tiltbrush/").loader.load("Light.webp")
|
288
|
+
value: /* @__PURE__ */ new THREE.TextureLoader().setPath("./textures/tiltbrush/").loader.load("Light.webp")
|
287
289
|
},
|
288
290
|
alphaTest: { value: 0.067 },
|
289
291
|
emission_gain: { value: 0.45 },
|
@@ -365,11 +367,9 @@ function getMaterial(GUID) {
|
|
365
367
|
const name = BRUSH_LIST_ARRAY[GUID];
|
366
368
|
switch (name) {
|
367
369
|
case "Light":
|
368
|
-
return new RawShaderMaterial(shaders().Light);
|
370
|
+
return new THREE.RawShaderMaterial(shaders().Light);
|
369
371
|
default:
|
370
|
-
return new MeshBasicMaterial({ vertexColors: true, side: DoubleSide });
|
372
|
+
return new THREE.MeshBasicMaterial({ vertexColors: true, side: THREE.DoubleSide });
|
371
373
|
}
|
372
374
|
}
|
373
|
-
|
374
|
-
TiltLoader
|
375
|
-
};
|
375
|
+
exports.TiltLoader = TiltLoader;
|
@@ -1,11 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const fflate = require("fflate");
|
5
|
-
class TiltLoader extends THREE.Loader {
|
1
|
+
import { Loader, FileLoader, Group, Mesh, BufferGeometry, Vector3, Quaternion, BufferAttribute, TextureLoader, MeshBasicMaterial, DoubleSide, RawShaderMaterial } from "three";
|
2
|
+
import { unzipSync, strFromU8 } from "fflate";
|
3
|
+
class TiltLoader extends Loader {
|
6
4
|
load(url, onLoad, onProgress, onError) {
|
7
5
|
const scope = this;
|
8
|
-
const loader = new
|
6
|
+
const loader = new FileLoader(this.manager);
|
9
7
|
loader.setPath(this.path);
|
10
8
|
loader.setResponseType("arraybuffer");
|
11
9
|
loader.setWithCredentials(this.withCredentials);
|
@@ -28,9 +26,9 @@ class TiltLoader extends THREE.Loader {
|
|
28
26
|
);
|
29
27
|
}
|
30
28
|
parse(buffer) {
|
31
|
-
const group = new
|
32
|
-
const zip =
|
33
|
-
const metadata = JSON.parse(
|
29
|
+
const group = new Group();
|
30
|
+
const zip = unzipSync(new Uint8Array(buffer.slice(16)));
|
31
|
+
const metadata = JSON.parse(strFromU8(zip["metadata.json"]));
|
34
32
|
const data = new DataView(zip["data.sketch"].buffer);
|
35
33
|
const num_strokes = data.getInt32(16, true);
|
36
34
|
const brushes = {};
|
@@ -78,25 +76,25 @@ class TiltLoader extends THREE.Loader {
|
|
78
76
|
for (const brush_index in brushes) {
|
79
77
|
const geometry = new StrokeGeometry(brushes[brush_index]);
|
80
78
|
const material = getMaterial(metadata.BrushIndex[brush_index]);
|
81
|
-
group.add(new
|
79
|
+
group.add(new Mesh(geometry, material));
|
82
80
|
}
|
83
81
|
return group;
|
84
82
|
}
|
85
83
|
}
|
86
|
-
class StrokeGeometry extends
|
84
|
+
class StrokeGeometry extends BufferGeometry {
|
87
85
|
constructor(strokes) {
|
88
86
|
super();
|
89
87
|
const vertices = [];
|
90
88
|
const colors = [];
|
91
89
|
const uvs = [];
|
92
|
-
const position = new
|
93
|
-
const prevPosition = new
|
94
|
-
const quaternion = new
|
95
|
-
const prevQuaternion = new
|
96
|
-
const vector1 = new
|
97
|
-
const vector2 = new
|
98
|
-
const vector3 = new
|
99
|
-
const vector4 = new
|
90
|
+
const position = new Vector3();
|
91
|
+
const prevPosition = new Vector3();
|
92
|
+
const quaternion = new Quaternion();
|
93
|
+
const prevQuaternion = new Quaternion();
|
94
|
+
const vector1 = new Vector3();
|
95
|
+
const vector2 = new Vector3();
|
96
|
+
const vector3 = new Vector3();
|
97
|
+
const vector4 = new Vector3();
|
100
98
|
for (const k in strokes) {
|
101
99
|
const stroke = strokes[k];
|
102
100
|
const positions = stroke[0];
|
@@ -144,9 +142,9 @@ class StrokeGeometry extends THREE.BufferGeometry {
|
|
144
142
|
uvs.push(p2, 0);
|
145
143
|
}
|
146
144
|
}
|
147
|
-
this.setAttribute("position", new
|
148
|
-
this.setAttribute("color", new
|
149
|
-
this.setAttribute("uv", new
|
145
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
146
|
+
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 4));
|
147
|
+
this.setAttribute("uv", new BufferAttribute(new Float32Array(uvs), 2));
|
150
148
|
}
|
151
149
|
}
|
152
150
|
const BRUSH_LIST_ARRAY = {
|
@@ -285,7 +283,7 @@ const shaders = () => ({
|
|
285
283
|
Light: {
|
286
284
|
uniforms: {
|
287
285
|
mainTex: {
|
288
|
-
value: /* @__PURE__ */ new
|
286
|
+
value: /* @__PURE__ */ new TextureLoader().setPath("./textures/tiltbrush/").loader.load("Light.webp")
|
289
287
|
},
|
290
288
|
alphaTest: { value: 0.067 },
|
291
289
|
emission_gain: { value: 0.45 },
|
@@ -367,9 +365,11 @@ function getMaterial(GUID) {
|
|
367
365
|
const name = BRUSH_LIST_ARRAY[GUID];
|
368
366
|
switch (name) {
|
369
367
|
case "Light":
|
370
|
-
return new
|
368
|
+
return new RawShaderMaterial(shaders().Light);
|
371
369
|
default:
|
372
|
-
return new
|
370
|
+
return new MeshBasicMaterial({ vertexColors: true, side: DoubleSide });
|
373
371
|
}
|
374
372
|
}
|
375
|
-
|
373
|
+
export {
|
374
|
+
TiltLoader
|
375
|
+
};
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const Data3DTexture = require("../_polyfill/Data3DTexture.cjs");
|
5
|
+
class VOXLoader extends THREE.Loader {
|
4
6
|
load(url, onLoad, onProgress, onError) {
|
5
7
|
const scope = this;
|
6
|
-
const loader = new FileLoader(scope.manager);
|
8
|
+
const loader = new THREE.FileLoader(scope.manager);
|
7
9
|
loader.setPath(scope.path);
|
8
10
|
loader.setResponseType("arraybuffer");
|
9
11
|
loader.setRequestHeader(scope.requestHeader);
|
@@ -334,7 +336,7 @@ class VOXLoader extends Loader {
|
|
334
336
|
return chunks;
|
335
337
|
}
|
336
338
|
}
|
337
|
-
class VOXMesh extends Mesh {
|
339
|
+
class VOXMesh extends THREE.Mesh {
|
338
340
|
constructor(chunk) {
|
339
341
|
const data = chunk.data;
|
340
342
|
const size = chunk.size;
|
@@ -392,18 +394,18 @@ class VOXMesh extends Mesh {
|
|
392
394
|
if (array[index - offsetz] === 0 || z === 0)
|
393
395
|
add(nz, x, z, -y, r, g, b);
|
394
396
|
}
|
395
|
-
const geometry = new BufferGeometry();
|
396
|
-
geometry.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
397
|
+
const geometry = new THREE.BufferGeometry();
|
398
|
+
geometry.setAttribute("position", new THREE.Float32BufferAttribute(vertices, 3));
|
397
399
|
geometry.computeVertexNormals();
|
398
|
-
const material = new MeshStandardMaterial();
|
400
|
+
const material = new THREE.MeshStandardMaterial();
|
399
401
|
if (hasColors) {
|
400
|
-
geometry.setAttribute("color", new Float32BufferAttribute(colors, 3));
|
402
|
+
geometry.setAttribute("color", new THREE.Float32BufferAttribute(colors, 3));
|
401
403
|
material.vertexColors = true;
|
402
404
|
}
|
403
405
|
super(geometry, material);
|
404
406
|
}
|
405
407
|
}
|
406
|
-
class VOXData3DTexture extends Data3DTexture {
|
408
|
+
class VOXData3DTexture extends Data3DTexture.Data3DTexture {
|
407
409
|
constructor(chunk) {
|
408
410
|
const data = chunk.data;
|
409
411
|
const size = chunk.size;
|
@@ -418,15 +420,13 @@ class VOXData3DTexture extends Data3DTexture {
|
|
418
420
|
array[index] = 255;
|
419
421
|
}
|
420
422
|
super(array, size.x, size.y, size.z);
|
421
|
-
this.format = RedFormat;
|
422
|
-
this.minFilter = NearestFilter;
|
423
|
-
this.magFilter = LinearFilter;
|
423
|
+
this.format = THREE.RedFormat;
|
424
|
+
this.minFilter = THREE.NearestFilter;
|
425
|
+
this.magFilter = THREE.LinearFilter;
|
424
426
|
this.unpackAlignment = 1;
|
425
427
|
this.needsUpdate = true;
|
426
428
|
}
|
427
429
|
}
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
VOXMesh
|
432
|
-
};
|
430
|
+
exports.VOXData3DTexture = VOXData3DTexture;
|
431
|
+
exports.VOXLoader = VOXLoader;
|
432
|
+
exports.VOXMesh = VOXMesh;
|