three-stdlib 2.22.10 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts +2 -2
- 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} +52 -49
- package/dist/exporters/GLTFExporter.js +52 -49
- 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,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const THREE = require("three");
|
|
4
|
+
const hilbert2D = (center = new THREE.Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3) => {
|
|
3
5
|
const half = size / 2;
|
|
4
6
|
const vec_s = [
|
|
5
|
-
new Vector3(center.x - half, center.y, center.z - half),
|
|
6
|
-
new Vector3(center.x - half, center.y, center.z + half),
|
|
7
|
-
new Vector3(center.x + half, center.y, center.z + half),
|
|
8
|
-
new Vector3(center.x + half, center.y, center.z - half)
|
|
7
|
+
new THREE.Vector3(center.x - half, center.y, center.z - half),
|
|
8
|
+
new THREE.Vector3(center.x - half, center.y, center.z + half),
|
|
9
|
+
new THREE.Vector3(center.x + half, center.y, center.z + half),
|
|
10
|
+
new THREE.Vector3(center.x + half, center.y, center.z - half)
|
|
9
11
|
];
|
|
10
12
|
const vec = [vec_s[v0], vec_s[v1], vec_s[v2], vec_s[v3]];
|
|
11
13
|
if (0 <= --iterations) {
|
|
@@ -18,17 +20,17 @@ const hilbert2D = (center = new Vector3(0, 0, 0), size = 10, iterations = 1, v0
|
|
|
18
20
|
}
|
|
19
21
|
return vec;
|
|
20
22
|
};
|
|
21
|
-
const hilbert3D = (center = new Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3, v4 = 4, v5 = 5, v6 = 6, v7 = 7) => {
|
|
23
|
+
const hilbert3D = (center = new THREE.Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3, v4 = 4, v5 = 5, v6 = 6, v7 = 7) => {
|
|
22
24
|
const half = size / 2;
|
|
23
25
|
const vec_s = [
|
|
24
|
-
new Vector3(center.x - half, center.y + half, center.z - half),
|
|
25
|
-
new Vector3(center.x - half, center.y + half, center.z + half),
|
|
26
|
-
new Vector3(center.x - half, center.y - half, center.z + half),
|
|
27
|
-
new Vector3(center.x - half, center.y - half, center.z - half),
|
|
28
|
-
new Vector3(center.x + half, center.y - half, center.z - half),
|
|
29
|
-
new Vector3(center.x + half, center.y - half, center.z + half),
|
|
30
|
-
new Vector3(center.x + half, center.y + half, center.z + half),
|
|
31
|
-
new Vector3(center.x + half, center.y + half, center.z - half)
|
|
26
|
+
new THREE.Vector3(center.x - half, center.y + half, center.z - half),
|
|
27
|
+
new THREE.Vector3(center.x - half, center.y + half, center.z + half),
|
|
28
|
+
new THREE.Vector3(center.x - half, center.y - half, center.z + half),
|
|
29
|
+
new THREE.Vector3(center.x - half, center.y - half, center.z - half),
|
|
30
|
+
new THREE.Vector3(center.x + half, center.y - half, center.z - half),
|
|
31
|
+
new THREE.Vector3(center.x + half, center.y - half, center.z + half),
|
|
32
|
+
new THREE.Vector3(center.x + half, center.y + half, center.z + half),
|
|
33
|
+
new THREE.Vector3(center.x + half, center.y + half, center.z - half)
|
|
32
34
|
];
|
|
33
35
|
const vec = [vec_s[v0], vec_s[v1], vec_s[v2], vec_s[v3], vec_s[v4], vec_s[v5], vec_s[v6], vec_s[v7]];
|
|
34
36
|
if (--iterations >= 0) {
|
|
@@ -104,6 +106,4 @@ const GeometryUtils = {
|
|
|
104
106
|
gosper,
|
|
105
107
|
hilbert2D
|
|
106
108
|
};
|
|
107
|
-
|
|
108
|
-
GeometryUtils
|
|
109
|
-
};
|
|
109
|
+
exports.GeometryUtils = GeometryUtils;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const THREE = require("three");
|
|
4
|
-
const hilbert2D = (center = new THREE.Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3) => {
|
|
1
|
+
import { Vector3 } from "three";
|
|
2
|
+
const hilbert2D = (center = new Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3) => {
|
|
5
3
|
const half = size / 2;
|
|
6
4
|
const vec_s = [
|
|
7
|
-
new
|
|
8
|
-
new
|
|
9
|
-
new
|
|
10
|
-
new
|
|
5
|
+
new Vector3(center.x - half, center.y, center.z - half),
|
|
6
|
+
new Vector3(center.x - half, center.y, center.z + half),
|
|
7
|
+
new Vector3(center.x + half, center.y, center.z + half),
|
|
8
|
+
new Vector3(center.x + half, center.y, center.z - half)
|
|
11
9
|
];
|
|
12
10
|
const vec = [vec_s[v0], vec_s[v1], vec_s[v2], vec_s[v3]];
|
|
13
11
|
if (0 <= --iterations) {
|
|
@@ -20,17 +18,17 @@ const hilbert2D = (center = new THREE.Vector3(0, 0, 0), size = 10, iterations =
|
|
|
20
18
|
}
|
|
21
19
|
return vec;
|
|
22
20
|
};
|
|
23
|
-
const hilbert3D = (center = new
|
|
21
|
+
const hilbert3D = (center = new Vector3(0, 0, 0), size = 10, iterations = 1, v0 = 0, v1 = 1, v2 = 2, v3 = 3, v4 = 4, v5 = 5, v6 = 6, v7 = 7) => {
|
|
24
22
|
const half = size / 2;
|
|
25
23
|
const vec_s = [
|
|
26
|
-
new
|
|
27
|
-
new
|
|
28
|
-
new
|
|
29
|
-
new
|
|
30
|
-
new
|
|
31
|
-
new
|
|
32
|
-
new
|
|
33
|
-
new
|
|
24
|
+
new Vector3(center.x - half, center.y + half, center.z - half),
|
|
25
|
+
new Vector3(center.x - half, center.y + half, center.z + half),
|
|
26
|
+
new Vector3(center.x - half, center.y - half, center.z + half),
|
|
27
|
+
new Vector3(center.x - half, center.y - half, center.z - half),
|
|
28
|
+
new Vector3(center.x + half, center.y - half, center.z - half),
|
|
29
|
+
new Vector3(center.x + half, center.y - half, center.z + half),
|
|
30
|
+
new Vector3(center.x + half, center.y + half, center.z + half),
|
|
31
|
+
new Vector3(center.x + half, center.y + half, center.z - half)
|
|
34
32
|
];
|
|
35
33
|
const vec = [vec_s[v0], vec_s[v1], vec_s[v2], vec_s[v3], vec_s[v4], vec_s[v5], vec_s[v6], vec_s[v7]];
|
|
36
34
|
if (--iterations >= 0) {
|
|
@@ -106,4 +104,6 @@ const GeometryUtils = {
|
|
|
106
104
|
gosper,
|
|
107
105
|
hilbert2D
|
|
108
106
|
};
|
|
109
|
-
|
|
107
|
+
export {
|
|
108
|
+
GeometryUtils
|
|
109
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
4
|
var __publicField = (obj, key, value) => {
|
|
4
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
6
|
return value;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
|
+
const THREE = require("three");
|
|
8
10
|
var _mipmapMaterial = /* @__PURE__ */ _getMipmapMaterial();
|
|
9
|
-
var _mesh = /* @__PURE__ */ new Mesh(/* @__PURE__ */ new PlaneGeometry(2, 2), _mipmapMaterial);
|
|
10
|
-
var _flatCamera = /* @__PURE__ */ new OrthographicCamera(0, 1, 0, 1, 0, 1);
|
|
11
|
+
var _mesh = /* @__PURE__ */ new THREE.Mesh(/* @__PURE__ */ new THREE.PlaneGeometry(2, 2), _mipmapMaterial);
|
|
12
|
+
var _flatCamera = /* @__PURE__ */ new THREE.OrthographicCamera(0, 1, 0, 1, 0, 1);
|
|
11
13
|
var _tempTarget = null;
|
|
12
14
|
class RoughnessMipmapper {
|
|
13
15
|
constructor(renderer) {
|
|
@@ -21,7 +23,7 @@ class RoughnessMipmapper {
|
|
|
21
23
|
material.userData.roughnessUpdated = true;
|
|
22
24
|
var width = Math.max(roughnessMap.image.width, normalMap.image.width);
|
|
23
25
|
var height = Math.max(roughnessMap.image.height, normalMap.image.height);
|
|
24
|
-
if (!MathUtils.isPowerOfTwo(width) || !MathUtils.isPowerOfTwo(height))
|
|
26
|
+
if (!THREE.MathUtils.isPowerOfTwo(width) || !THREE.MathUtils.isPowerOfTwo(height))
|
|
25
27
|
return;
|
|
26
28
|
var oldTarget = this._renderer.getRenderTarget();
|
|
27
29
|
var autoClear = this._renderer.autoClear;
|
|
@@ -29,7 +31,7 @@ class RoughnessMipmapper {
|
|
|
29
31
|
if (_tempTarget === null || _tempTarget.width !== width || _tempTarget.height !== height) {
|
|
30
32
|
if (_tempTarget !== null)
|
|
31
33
|
_tempTarget.dispose();
|
|
32
|
-
_tempTarget = new WebGLRenderTarget(width, height, {
|
|
34
|
+
_tempTarget = new THREE.WebGLRenderTarget(width, height, {
|
|
33
35
|
depthBuffer: false
|
|
34
36
|
});
|
|
35
37
|
_tempTarget.scissorTest = true;
|
|
@@ -42,7 +44,7 @@ class RoughnessMipmapper {
|
|
|
42
44
|
minFilter: roughnessMap.minFilter,
|
|
43
45
|
depthBuffer: false
|
|
44
46
|
};
|
|
45
|
-
var newRoughnessTarget = new WebGLRenderTarget(width, height, params);
|
|
47
|
+
var newRoughnessTarget = new THREE.WebGLRenderTarget(width, height, params);
|
|
46
48
|
newRoughnessTarget.texture.generateMipmaps = true;
|
|
47
49
|
this._renderer.setRenderTarget(newRoughnessTarget);
|
|
48
50
|
material.roughnessMap = newRoughnessTarget.texture;
|
|
@@ -53,7 +55,7 @@ class RoughnessMipmapper {
|
|
|
53
55
|
}
|
|
54
56
|
_mipmapMaterial.uniforms.roughnessMap.value = roughnessMap;
|
|
55
57
|
_mipmapMaterial.uniforms.normalMap.value = normalMap;
|
|
56
|
-
var position = new Vector2(0, 0);
|
|
58
|
+
var position = new THREE.Vector2(0, 0);
|
|
57
59
|
var texelSize = _mipmapMaterial.uniforms.texelSize.value;
|
|
58
60
|
for (let mip = 0; width >= 1 && height >= 1; ++mip, width /= 2, height /= 2) {
|
|
59
61
|
texelSize.set(1 / width, 1 / height);
|
|
@@ -82,11 +84,11 @@ class RoughnessMipmapper {
|
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
function _getMipmapMaterial() {
|
|
85
|
-
var shaderMaterial = new RawShaderMaterial({
|
|
87
|
+
var shaderMaterial = new THREE.RawShaderMaterial({
|
|
86
88
|
uniforms: {
|
|
87
89
|
roughnessMap: { value: null },
|
|
88
90
|
normalMap: { value: null },
|
|
89
|
-
texelSize: { value: new Vector2(1, 1) }
|
|
91
|
+
texelSize: { value: new THREE.Vector2(1, 1) }
|
|
90
92
|
},
|
|
91
93
|
vertexShader: (
|
|
92
94
|
/* glsl */
|
|
@@ -211,13 +213,11 @@ function _getMipmapMaterial() {
|
|
|
211
213
|
}
|
|
212
214
|
`
|
|
213
215
|
),
|
|
214
|
-
blending: NoBlending,
|
|
216
|
+
blending: THREE.NoBlending,
|
|
215
217
|
depthTest: false,
|
|
216
218
|
depthWrite: false
|
|
217
219
|
});
|
|
218
220
|
shaderMaterial.type = "RoughnessMipmapper";
|
|
219
221
|
return shaderMaterial;
|
|
220
222
|
}
|
|
221
|
-
|
|
222
|
-
RoughnessMipmapper
|
|
223
|
-
};
|
|
223
|
+
exports.RoughnessMipmapper = RoughnessMipmapper;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
3
|
var __publicField = (obj, key, value) => {
|
|
5
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
5
|
return value;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
const THREE = require("three");
|
|
7
|
+
import { Mesh, PlaneGeometry, OrthographicCamera, MathUtils, WebGLRenderTarget, Vector2, RawShaderMaterial, NoBlending } from "three";
|
|
10
8
|
var _mipmapMaterial = /* @__PURE__ */ _getMipmapMaterial();
|
|
11
|
-
var _mesh = /* @__PURE__ */ new
|
|
12
|
-
var _flatCamera = /* @__PURE__ */ new
|
|
9
|
+
var _mesh = /* @__PURE__ */ new Mesh(/* @__PURE__ */ new PlaneGeometry(2, 2), _mipmapMaterial);
|
|
10
|
+
var _flatCamera = /* @__PURE__ */ new OrthographicCamera(0, 1, 0, 1, 0, 1);
|
|
13
11
|
var _tempTarget = null;
|
|
14
12
|
class RoughnessMipmapper {
|
|
15
13
|
constructor(renderer) {
|
|
@@ -23,7 +21,7 @@ class RoughnessMipmapper {
|
|
|
23
21
|
material.userData.roughnessUpdated = true;
|
|
24
22
|
var width = Math.max(roughnessMap.image.width, normalMap.image.width);
|
|
25
23
|
var height = Math.max(roughnessMap.image.height, normalMap.image.height);
|
|
26
|
-
if (!
|
|
24
|
+
if (!MathUtils.isPowerOfTwo(width) || !MathUtils.isPowerOfTwo(height))
|
|
27
25
|
return;
|
|
28
26
|
var oldTarget = this._renderer.getRenderTarget();
|
|
29
27
|
var autoClear = this._renderer.autoClear;
|
|
@@ -31,7 +29,7 @@ class RoughnessMipmapper {
|
|
|
31
29
|
if (_tempTarget === null || _tempTarget.width !== width || _tempTarget.height !== height) {
|
|
32
30
|
if (_tempTarget !== null)
|
|
33
31
|
_tempTarget.dispose();
|
|
34
|
-
_tempTarget = new
|
|
32
|
+
_tempTarget = new WebGLRenderTarget(width, height, {
|
|
35
33
|
depthBuffer: false
|
|
36
34
|
});
|
|
37
35
|
_tempTarget.scissorTest = true;
|
|
@@ -44,7 +42,7 @@ class RoughnessMipmapper {
|
|
|
44
42
|
minFilter: roughnessMap.minFilter,
|
|
45
43
|
depthBuffer: false
|
|
46
44
|
};
|
|
47
|
-
var newRoughnessTarget = new
|
|
45
|
+
var newRoughnessTarget = new WebGLRenderTarget(width, height, params);
|
|
48
46
|
newRoughnessTarget.texture.generateMipmaps = true;
|
|
49
47
|
this._renderer.setRenderTarget(newRoughnessTarget);
|
|
50
48
|
material.roughnessMap = newRoughnessTarget.texture;
|
|
@@ -55,7 +53,7 @@ class RoughnessMipmapper {
|
|
|
55
53
|
}
|
|
56
54
|
_mipmapMaterial.uniforms.roughnessMap.value = roughnessMap;
|
|
57
55
|
_mipmapMaterial.uniforms.normalMap.value = normalMap;
|
|
58
|
-
var position = new
|
|
56
|
+
var position = new Vector2(0, 0);
|
|
59
57
|
var texelSize = _mipmapMaterial.uniforms.texelSize.value;
|
|
60
58
|
for (let mip = 0; width >= 1 && height >= 1; ++mip, width /= 2, height /= 2) {
|
|
61
59
|
texelSize.set(1 / width, 1 / height);
|
|
@@ -84,11 +82,11 @@ class RoughnessMipmapper {
|
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
function _getMipmapMaterial() {
|
|
87
|
-
var shaderMaterial = new
|
|
85
|
+
var shaderMaterial = new RawShaderMaterial({
|
|
88
86
|
uniforms: {
|
|
89
87
|
roughnessMap: { value: null },
|
|
90
88
|
normalMap: { value: null },
|
|
91
|
-
texelSize: { value: new
|
|
89
|
+
texelSize: { value: new Vector2(1, 1) }
|
|
92
90
|
},
|
|
93
91
|
vertexShader: (
|
|
94
92
|
/* glsl */
|
|
@@ -213,11 +211,13 @@ function _getMipmapMaterial() {
|
|
|
213
211
|
}
|
|
214
212
|
`
|
|
215
213
|
),
|
|
216
|
-
blending:
|
|
214
|
+
blending: NoBlending,
|
|
217
215
|
depthTest: false,
|
|
218
216
|
depthWrite: false
|
|
219
217
|
});
|
|
220
218
|
shaderMaterial.type = "RoughnessMipmapper";
|
|
221
219
|
return shaderMaterial;
|
|
222
220
|
}
|
|
223
|
-
|
|
221
|
+
export {
|
|
222
|
+
RoughnessMipmapper
|
|
223
|
+
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const THREE = require("three");
|
|
2
4
|
const SceneUtils = {
|
|
3
5
|
createMeshesFromInstancedMesh: function(instancedMesh) {
|
|
4
|
-
const group = new Group();
|
|
6
|
+
const group = new THREE.Group();
|
|
5
7
|
const count = instancedMesh.count;
|
|
6
8
|
const geometry = instancedMesh.geometry;
|
|
7
9
|
const material = instancedMesh.material;
|
|
8
10
|
for (let i = 0; i < count; i++) {
|
|
9
|
-
const mesh = new Mesh(geometry, material);
|
|
11
|
+
const mesh = new THREE.Mesh(geometry, material);
|
|
10
12
|
instancedMesh.getMatrixAt(i, mesh.matrix);
|
|
11
13
|
mesh.matrix.decompose(mesh.position, mesh.quaternion, mesh.scale);
|
|
12
14
|
group.add(mesh);
|
|
@@ -16,9 +18,9 @@ const SceneUtils = {
|
|
|
16
18
|
return group;
|
|
17
19
|
},
|
|
18
20
|
createMultiMaterialObject: function(geometry, materials) {
|
|
19
|
-
const group = new Group();
|
|
21
|
+
const group = new THREE.Group();
|
|
20
22
|
for (let i = 0, l = materials.length; i < l; i++) {
|
|
21
|
-
group.add(new Mesh(geometry, materials[i]));
|
|
23
|
+
group.add(new THREE.Mesh(geometry, materials[i]));
|
|
22
24
|
}
|
|
23
25
|
return group;
|
|
24
26
|
},
|
|
@@ -31,6 +33,4 @@ const SceneUtils = {
|
|
|
31
33
|
parent.attach(child);
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
|
-
|
|
35
|
-
SceneUtils
|
|
36
|
-
};
|
|
36
|
+
exports.SceneUtils = SceneUtils;
|
package/dist/utils/SceneUtils.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const THREE = require("three");
|
|
1
|
+
import { Group, Mesh } from "three";
|
|
4
2
|
const SceneUtils = {
|
|
5
3
|
createMeshesFromInstancedMesh: function(instancedMesh) {
|
|
6
|
-
const group = new
|
|
4
|
+
const group = new Group();
|
|
7
5
|
const count = instancedMesh.count;
|
|
8
6
|
const geometry = instancedMesh.geometry;
|
|
9
7
|
const material = instancedMesh.material;
|
|
10
8
|
for (let i = 0; i < count; i++) {
|
|
11
|
-
const mesh = new
|
|
9
|
+
const mesh = new Mesh(geometry, material);
|
|
12
10
|
instancedMesh.getMatrixAt(i, mesh.matrix);
|
|
13
11
|
mesh.matrix.decompose(mesh.position, mesh.quaternion, mesh.scale);
|
|
14
12
|
group.add(mesh);
|
|
@@ -18,9 +16,9 @@ const SceneUtils = {
|
|
|
18
16
|
return group;
|
|
19
17
|
},
|
|
20
18
|
createMultiMaterialObject: function(geometry, materials) {
|
|
21
|
-
const group = new
|
|
19
|
+
const group = new Group();
|
|
22
20
|
for (let i = 0, l = materials.length; i < l; i++) {
|
|
23
|
-
group.add(new
|
|
21
|
+
group.add(new Mesh(geometry, materials[i]));
|
|
24
22
|
}
|
|
25
23
|
return group;
|
|
26
24
|
},
|
|
@@ -33,4 +31,6 @@ const SceneUtils = {
|
|
|
33
31
|
parent.attach(child);
|
|
34
32
|
}
|
|
35
33
|
};
|
|
36
|
-
|
|
34
|
+
export {
|
|
35
|
+
SceneUtils
|
|
36
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const THREE = require("three");
|
|
4
|
+
const UnpackDepthRGBAShader = require("../shaders/UnpackDepthRGBAShader.cjs");
|
|
3
5
|
class ShadowMapViewer {
|
|
4
6
|
constructor(light) {
|
|
5
7
|
const scope = this;
|
|
@@ -11,7 +13,7 @@ class ShadowMapViewer {
|
|
|
11
13
|
width: 256,
|
|
12
14
|
height: 256
|
|
13
15
|
};
|
|
14
|
-
const camera = new OrthographicCamera(
|
|
16
|
+
const camera = new THREE.OrthographicCamera(
|
|
15
17
|
window.innerWidth / -2,
|
|
16
18
|
window.innerWidth / 2,
|
|
17
19
|
window.innerHeight / 2,
|
|
@@ -20,16 +22,16 @@ class ShadowMapViewer {
|
|
|
20
22
|
10
|
|
21
23
|
);
|
|
22
24
|
camera.position.set(0, 0, 2);
|
|
23
|
-
const scene = new Scene();
|
|
24
|
-
const shader = UnpackDepthRGBAShader;
|
|
25
|
-
const uniforms = UniformsUtils.clone(shader.uniforms);
|
|
26
|
-
const material = new ShaderMaterial({
|
|
25
|
+
const scene = new THREE.Scene();
|
|
26
|
+
const shader = UnpackDepthRGBAShader.UnpackDepthRGBAShader;
|
|
27
|
+
const uniforms = THREE.UniformsUtils.clone(shader.uniforms);
|
|
28
|
+
const material = new THREE.ShaderMaterial({
|
|
27
29
|
uniforms,
|
|
28
30
|
vertexShader: shader.vertexShader,
|
|
29
31
|
fragmentShader: shader.fragmentShader
|
|
30
32
|
});
|
|
31
|
-
const plane = new PlaneGeometry(frame.width, frame.height);
|
|
32
|
-
const mesh = new Mesh(plane, material);
|
|
33
|
+
const plane = new THREE.PlaneGeometry(frame.width, frame.height);
|
|
34
|
+
const mesh = new THREE.Mesh(plane, material);
|
|
33
35
|
scene.add(mesh);
|
|
34
36
|
let labelCanvas, labelMesh;
|
|
35
37
|
if (doRenderLabel) {
|
|
@@ -42,14 +44,14 @@ class ShadowMapViewer {
|
|
|
42
44
|
context.font = "Bold 20px Arial";
|
|
43
45
|
context.fillStyle = "rgba( 255, 0, 0, 1 )";
|
|
44
46
|
context.fillText(light.name, 0, 20);
|
|
45
|
-
const labelTexture = new Texture(labelCanvas);
|
|
46
|
-
labelTexture.magFilter = LinearFilter;
|
|
47
|
-
labelTexture.minFilter = LinearFilter;
|
|
47
|
+
const labelTexture = new THREE.Texture(labelCanvas);
|
|
48
|
+
labelTexture.magFilter = THREE.LinearFilter;
|
|
49
|
+
labelTexture.minFilter = THREE.LinearFilter;
|
|
48
50
|
labelTexture.needsUpdate = true;
|
|
49
|
-
const labelMaterial = new MeshBasicMaterial({ map: labelTexture, side: DoubleSide });
|
|
51
|
+
const labelMaterial = new THREE.MeshBasicMaterial({ map: labelTexture, side: THREE.DoubleSide });
|
|
50
52
|
labelMaterial.transparent = true;
|
|
51
|
-
const labelPlane = new PlaneGeometry(labelCanvas.width, labelCanvas.height);
|
|
52
|
-
labelMesh = new Mesh(labelPlane, labelMaterial);
|
|
53
|
+
const labelPlane = new THREE.PlaneGeometry(labelCanvas.width, labelCanvas.height);
|
|
54
|
+
labelMesh = new THREE.Mesh(labelPlane, labelMaterial);
|
|
53
55
|
scene.add(labelMesh);
|
|
54
56
|
}
|
|
55
57
|
function resetPosition() {
|
|
@@ -106,6 +108,4 @@ class ShadowMapViewer {
|
|
|
106
108
|
this.update();
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
|
-
|
|
110
|
-
ShadowMapViewer
|
|
111
|
-
};
|
|
111
|
+
exports.ShadowMapViewer = ShadowMapViewer;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const THREE = require("three");
|
|
4
|
-
const UnpackDepthRGBAShader = require("../shaders/UnpackDepthRGBAShader.js");
|
|
1
|
+
import { OrthographicCamera, Scene, UniformsUtils, ShaderMaterial, PlaneGeometry, Mesh, Texture, LinearFilter, MeshBasicMaterial, DoubleSide } from "three";
|
|
2
|
+
import { UnpackDepthRGBAShader } from "../shaders/UnpackDepthRGBAShader.js";
|
|
5
3
|
class ShadowMapViewer {
|
|
6
4
|
constructor(light) {
|
|
7
5
|
const scope = this;
|
|
@@ -13,7 +11,7 @@ class ShadowMapViewer {
|
|
|
13
11
|
width: 256,
|
|
14
12
|
height: 256
|
|
15
13
|
};
|
|
16
|
-
const camera = new
|
|
14
|
+
const camera = new OrthographicCamera(
|
|
17
15
|
window.innerWidth / -2,
|
|
18
16
|
window.innerWidth / 2,
|
|
19
17
|
window.innerHeight / 2,
|
|
@@ -22,16 +20,16 @@ class ShadowMapViewer {
|
|
|
22
20
|
10
|
|
23
21
|
);
|
|
24
22
|
camera.position.set(0, 0, 2);
|
|
25
|
-
const scene = new
|
|
26
|
-
const shader = UnpackDepthRGBAShader
|
|
27
|
-
const uniforms =
|
|
28
|
-
const material = new
|
|
23
|
+
const scene = new Scene();
|
|
24
|
+
const shader = UnpackDepthRGBAShader;
|
|
25
|
+
const uniforms = UniformsUtils.clone(shader.uniforms);
|
|
26
|
+
const material = new ShaderMaterial({
|
|
29
27
|
uniforms,
|
|
30
28
|
vertexShader: shader.vertexShader,
|
|
31
29
|
fragmentShader: shader.fragmentShader
|
|
32
30
|
});
|
|
33
|
-
const plane = new
|
|
34
|
-
const mesh = new
|
|
31
|
+
const plane = new PlaneGeometry(frame.width, frame.height);
|
|
32
|
+
const mesh = new Mesh(plane, material);
|
|
35
33
|
scene.add(mesh);
|
|
36
34
|
let labelCanvas, labelMesh;
|
|
37
35
|
if (doRenderLabel) {
|
|
@@ -44,14 +42,14 @@ class ShadowMapViewer {
|
|
|
44
42
|
context.font = "Bold 20px Arial";
|
|
45
43
|
context.fillStyle = "rgba( 255, 0, 0, 1 )";
|
|
46
44
|
context.fillText(light.name, 0, 20);
|
|
47
|
-
const labelTexture = new
|
|
48
|
-
labelTexture.magFilter =
|
|
49
|
-
labelTexture.minFilter =
|
|
45
|
+
const labelTexture = new Texture(labelCanvas);
|
|
46
|
+
labelTexture.magFilter = LinearFilter;
|
|
47
|
+
labelTexture.minFilter = LinearFilter;
|
|
50
48
|
labelTexture.needsUpdate = true;
|
|
51
|
-
const labelMaterial = new
|
|
49
|
+
const labelMaterial = new MeshBasicMaterial({ map: labelTexture, side: DoubleSide });
|
|
52
50
|
labelMaterial.transparent = true;
|
|
53
|
-
const labelPlane = new
|
|
54
|
-
labelMesh = new
|
|
51
|
+
const labelPlane = new PlaneGeometry(labelCanvas.width, labelCanvas.height);
|
|
52
|
+
labelMesh = new Mesh(labelPlane, labelMaterial);
|
|
55
53
|
scene.add(labelMesh);
|
|
56
54
|
}
|
|
57
55
|
function resetPosition() {
|
|
@@ -108,4 +106,6 @@ class ShadowMapViewer {
|
|
|
108
106
|
this.update();
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
|
-
|
|
109
|
+
export {
|
|
110
|
+
ShadowMapViewer
|
|
111
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const THREE = require("three");
|
|
2
4
|
function retarget(target, source, options = {}) {
|
|
3
|
-
const pos = new Vector3(), quat = new Quaternion(), scale = new Vector3(), bindBoneMatrix = new Matrix4(), relativeMatrix = new Matrix4(), globalMatrix = new Matrix4();
|
|
5
|
+
const pos = new THREE.Vector3(), quat = new THREE.Quaternion(), scale = new THREE.Vector3(), bindBoneMatrix = new THREE.Matrix4(), relativeMatrix = new THREE.Matrix4(), globalMatrix = new THREE.Matrix4();
|
|
4
6
|
options.preserveMatrix = options.preserveMatrix !== void 0 ? options.preserveMatrix : true;
|
|
5
7
|
options.preservePosition = options.preservePosition !== void 0 ? options.preservePosition : true;
|
|
6
8
|
options.preserveHipPosition = options.preserveHipPosition !== void 0 ? options.preserveHipPosition : false;
|
|
@@ -95,7 +97,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
95
97
|
if (!source.isObject3D) {
|
|
96
98
|
source = getHelperFromSkeleton(source);
|
|
97
99
|
}
|
|
98
|
-
const numFrames = Math.round(clip.duration * (options.fps / 1e3) * 1e3), delta = 1 / options.fps, convertedTracks = [], mixer = new AnimationMixer(source), bones = getBones(target.skeleton), boneDatas = [];
|
|
100
|
+
const numFrames = Math.round(clip.duration * (options.fps / 1e3) * 1e3), delta = 1 / options.fps, convertedTracks = [], mixer = new THREE.AnimationMixer(source), bones = getBones(target.skeleton), boneDatas = [];
|
|
99
101
|
let positionOffset, bone, boneTo, boneData, name;
|
|
100
102
|
mixer.clipAction(clip).play();
|
|
101
103
|
mixer.update(0);
|
|
@@ -143,7 +145,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
143
145
|
if (boneData) {
|
|
144
146
|
if (boneData.pos) {
|
|
145
147
|
convertedTracks.push(
|
|
146
|
-
new VectorKeyframeTrack(
|
|
148
|
+
new THREE.VectorKeyframeTrack(
|
|
147
149
|
".bones[" + boneData.bone.name + "].position",
|
|
148
150
|
boneData.pos.times,
|
|
149
151
|
boneData.pos.values
|
|
@@ -151,7 +153,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
151
153
|
);
|
|
152
154
|
}
|
|
153
155
|
convertedTracks.push(
|
|
154
|
-
new QuaternionKeyframeTrack(
|
|
156
|
+
new THREE.QuaternionKeyframeTrack(
|
|
155
157
|
".bones[" + boneData.bone.name + "].quaternion",
|
|
156
158
|
boneData.quat.times,
|
|
157
159
|
boneData.quat.values
|
|
@@ -160,7 +162,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
mixer.uncacheAction(clip);
|
|
163
|
-
return new AnimationClip(clip.name, -1, convertedTracks);
|
|
165
|
+
return new THREE.AnimationClip(clip.name, -1, convertedTracks);
|
|
164
166
|
}
|
|
165
167
|
function clone(source) {
|
|
166
168
|
const sourceLookup = /* @__PURE__ */ new Map();
|
|
@@ -195,7 +197,7 @@ function getBones(skeleton) {
|
|
|
195
197
|
return Array.isArray(skeleton) ? skeleton : skeleton.bones;
|
|
196
198
|
}
|
|
197
199
|
function getHelperFromSkeleton(skeleton) {
|
|
198
|
-
const source = new SkeletonHelper(skeleton.bones[0]);
|
|
200
|
+
const source = new THREE.SkeletonHelper(skeleton.bones[0]);
|
|
199
201
|
source.skeleton = skeleton;
|
|
200
202
|
return source;
|
|
201
203
|
}
|
|
@@ -206,6 +208,4 @@ function parallelTraverse(a, b, callback) {
|
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
const SkeletonUtils = { retarget, retargetClip, clone };
|
|
209
|
-
|
|
210
|
-
SkeletonUtils
|
|
211
|
-
};
|
|
211
|
+
exports.SkeletonUtils = SkeletonUtils;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const THREE = require("three");
|
|
1
|
+
import { Vector3, Quaternion, Matrix4, AnimationMixer, VectorKeyframeTrack, QuaternionKeyframeTrack, AnimationClip, SkeletonHelper } from "three";
|
|
4
2
|
function retarget(target, source, options = {}) {
|
|
5
|
-
const pos = new
|
|
3
|
+
const pos = new Vector3(), quat = new Quaternion(), scale = new Vector3(), bindBoneMatrix = new Matrix4(), relativeMatrix = new Matrix4(), globalMatrix = new Matrix4();
|
|
6
4
|
options.preserveMatrix = options.preserveMatrix !== void 0 ? options.preserveMatrix : true;
|
|
7
5
|
options.preservePosition = options.preservePosition !== void 0 ? options.preservePosition : true;
|
|
8
6
|
options.preserveHipPosition = options.preserveHipPosition !== void 0 ? options.preserveHipPosition : false;
|
|
@@ -97,7 +95,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
97
95
|
if (!source.isObject3D) {
|
|
98
96
|
source = getHelperFromSkeleton(source);
|
|
99
97
|
}
|
|
100
|
-
const numFrames = Math.round(clip.duration * (options.fps / 1e3) * 1e3), delta = 1 / options.fps, convertedTracks = [], mixer = new
|
|
98
|
+
const numFrames = Math.round(clip.duration * (options.fps / 1e3) * 1e3), delta = 1 / options.fps, convertedTracks = [], mixer = new AnimationMixer(source), bones = getBones(target.skeleton), boneDatas = [];
|
|
101
99
|
let positionOffset, bone, boneTo, boneData, name;
|
|
102
100
|
mixer.clipAction(clip).play();
|
|
103
101
|
mixer.update(0);
|
|
@@ -145,7 +143,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
145
143
|
if (boneData) {
|
|
146
144
|
if (boneData.pos) {
|
|
147
145
|
convertedTracks.push(
|
|
148
|
-
new
|
|
146
|
+
new VectorKeyframeTrack(
|
|
149
147
|
".bones[" + boneData.bone.name + "].position",
|
|
150
148
|
boneData.pos.times,
|
|
151
149
|
boneData.pos.values
|
|
@@ -153,7 +151,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
153
151
|
);
|
|
154
152
|
}
|
|
155
153
|
convertedTracks.push(
|
|
156
|
-
new
|
|
154
|
+
new QuaternionKeyframeTrack(
|
|
157
155
|
".bones[" + boneData.bone.name + "].quaternion",
|
|
158
156
|
boneData.quat.times,
|
|
159
157
|
boneData.quat.values
|
|
@@ -162,7 +160,7 @@ function retargetClip(target, source, clip, options = {}) {
|
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
mixer.uncacheAction(clip);
|
|
165
|
-
return new
|
|
163
|
+
return new AnimationClip(clip.name, -1, convertedTracks);
|
|
166
164
|
}
|
|
167
165
|
function clone(source) {
|
|
168
166
|
const sourceLookup = /* @__PURE__ */ new Map();
|
|
@@ -197,7 +195,7 @@ function getBones(skeleton) {
|
|
|
197
195
|
return Array.isArray(skeleton) ? skeleton : skeleton.bones;
|
|
198
196
|
}
|
|
199
197
|
function getHelperFromSkeleton(skeleton) {
|
|
200
|
-
const source = new
|
|
198
|
+
const source = new SkeletonHelper(skeleton.bones[0]);
|
|
201
199
|
source.skeleton = skeleton;
|
|
202
200
|
return source;
|
|
203
201
|
}
|
|
@@ -208,4 +206,6 @@ function parallelTraverse(a, b, callback) {
|
|
|
208
206
|
}
|
|
209
207
|
}
|
|
210
208
|
const SkeletonUtils = { retarget, retargetClip, clone };
|
|
211
|
-
|
|
209
|
+
export {
|
|
210
|
+
SkeletonUtils
|
|
211
|
+
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const THREE = require("three");
|
|
2
4
|
function UVsDebug(geometry, size = 1024) {
|
|
3
5
|
const abc = "abc";
|
|
4
|
-
const a = new Vector2();
|
|
5
|
-
const b = new Vector2();
|
|
6
|
-
const uvs = [new Vector2(), new Vector2(), new Vector2()];
|
|
6
|
+
const a = new THREE.Vector2();
|
|
7
|
+
const b = new THREE.Vector2();
|
|
8
|
+
const uvs = [new THREE.Vector2(), new THREE.Vector2(), new THREE.Vector2()];
|
|
7
9
|
const face = [];
|
|
8
10
|
const canvas = document.createElement("canvas");
|
|
9
11
|
const width = size;
|
|
@@ -75,6 +77,4 @@ function UVsDebug(geometry, size = 1024) {
|
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
|
-
|
|
79
|
-
UVsDebug
|
|
80
|
-
};
|
|
80
|
+
exports.UVsDebug = UVsDebug;
|