three-stdlib 2.22.10 → 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.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,18 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const _m1 = /* @__PURE__ */ new THREE.Matrix4();
|
5
|
+
const _obj = /* @__PURE__ */ new THREE.Object3D();
|
6
|
+
const _offset = /* @__PURE__ */ new THREE.Vector3();
|
7
|
+
class Geometry extends THREE.EventDispatcher {
|
6
8
|
static createBufferGeometryFromObject(object) {
|
7
|
-
let buffergeometry = new BufferGeometry();
|
9
|
+
let buffergeometry = new THREE.BufferGeometry();
|
8
10
|
const geometry = object.geometry;
|
9
11
|
if (object.isPoints || object.isLine) {
|
10
|
-
const positions = new Float32BufferAttribute(geometry.vertices.length * 3, 3);
|
11
|
-
const colors = new Float32BufferAttribute(geometry.colors.length * 3, 3);
|
12
|
+
const positions = new THREE.Float32BufferAttribute(geometry.vertices.length * 3, 3);
|
13
|
+
const colors = new THREE.Float32BufferAttribute(geometry.colors.length * 3, 3);
|
12
14
|
buffergeometry.setAttribute("position", positions.copyVector3sArray(geometry.vertices));
|
13
15
|
buffergeometry.setAttribute("color", colors.copyColorsArray(geometry.colors));
|
14
16
|
if (geometry.lineDistances && geometry.lineDistances.length === geometry.vertices.length) {
|
15
|
-
const lineDistances = new Float32BufferAttribute(geometry.lineDistances.length, 1);
|
17
|
+
const lineDistances = new THREE.Float32BufferAttribute(geometry.lineDistances.length, 1);
|
16
18
|
buffergeometry.setAttribute("lineDistance", lineDistances.copyArray(geometry.lineDistances));
|
17
19
|
}
|
18
20
|
if (geometry.boundingSphere !== null) {
|
@@ -29,7 +31,7 @@ class Geometry extends EventDispatcher {
|
|
29
31
|
constructor() {
|
30
32
|
super();
|
31
33
|
this.isGeometry = true;
|
32
|
-
this.uuid = MathUtils.generateUUID();
|
34
|
+
this.uuid = THREE.MathUtils.generateUUID();
|
33
35
|
this.name = "";
|
34
36
|
this.type = "Geometry";
|
35
37
|
this.vertices = [];
|
@@ -52,7 +54,7 @@ class Geometry extends EventDispatcher {
|
|
52
54
|
this.groupsNeedUpdate = false;
|
53
55
|
}
|
54
56
|
applyMatrix4(matrix) {
|
55
|
-
const normalMatrix = new Matrix3().getNormalMatrix(matrix);
|
57
|
+
const normalMatrix = new THREE.Matrix3().getNormalMatrix(matrix);
|
56
58
|
for (let i = 0, il = this.vertices.length; i < il; i++) {
|
57
59
|
const vertex = this.vertices[i];
|
58
60
|
vertex.applyMatrix4(matrix);
|
@@ -121,32 +123,32 @@ class Geometry extends EventDispatcher {
|
|
121
123
|
if (uv2 !== void 0)
|
122
124
|
this.faceVertexUvs[1] = [];
|
123
125
|
for (let i = 0; i < position.count; i++) {
|
124
|
-
scope.vertices.push(new Vector3().fromBufferAttribute(position, i));
|
126
|
+
scope.vertices.push(new THREE.Vector3().fromBufferAttribute(position, i));
|
125
127
|
if (color !== void 0) {
|
126
|
-
scope.colors.push(new Color().fromBufferAttribute(color, i));
|
128
|
+
scope.colors.push(new THREE.Color().fromBufferAttribute(color, i));
|
127
129
|
}
|
128
130
|
}
|
129
131
|
function addFace(a, b, c, materialIndex) {
|
130
132
|
const vertexColors = color === void 0 ? [] : [scope.colors[a].clone(), scope.colors[b].clone(), scope.colors[c].clone()];
|
131
133
|
const vertexNormals = normal === void 0 ? [] : [
|
132
|
-
new Vector3().fromBufferAttribute(normal, a),
|
133
|
-
new Vector3().fromBufferAttribute(normal, b),
|
134
|
-
new Vector3().fromBufferAttribute(normal, c)
|
134
|
+
new THREE.Vector3().fromBufferAttribute(normal, a),
|
135
|
+
new THREE.Vector3().fromBufferAttribute(normal, b),
|
136
|
+
new THREE.Vector3().fromBufferAttribute(normal, c)
|
135
137
|
];
|
136
138
|
const face = new Face3(a, b, c, vertexNormals, vertexColors, materialIndex);
|
137
139
|
scope.faces.push(face);
|
138
140
|
if (uv !== void 0) {
|
139
141
|
scope.faceVertexUvs[0].push([
|
140
|
-
new Vector2().fromBufferAttribute(uv, a),
|
141
|
-
new Vector2().fromBufferAttribute(uv, b),
|
142
|
-
new Vector2().fromBufferAttribute(uv, c)
|
142
|
+
new THREE.Vector2().fromBufferAttribute(uv, a),
|
143
|
+
new THREE.Vector2().fromBufferAttribute(uv, b),
|
144
|
+
new THREE.Vector2().fromBufferAttribute(uv, c)
|
143
145
|
]);
|
144
146
|
}
|
145
147
|
if (uv2 !== void 0) {
|
146
148
|
scope.faceVertexUvs[1].push([
|
147
|
-
new Vector2().fromBufferAttribute(uv2, a),
|
148
|
-
new Vector2().fromBufferAttribute(uv2, b),
|
149
|
-
new Vector2().fromBufferAttribute(uv2, c)
|
149
|
+
new THREE.Vector2().fromBufferAttribute(uv2, a),
|
150
|
+
new THREE.Vector2().fromBufferAttribute(uv2, b),
|
151
|
+
new THREE.Vector2().fromBufferAttribute(uv2, c)
|
150
152
|
]);
|
151
153
|
}
|
152
154
|
}
|
@@ -195,13 +197,13 @@ class Geometry extends EventDispatcher {
|
|
195
197
|
const center = this.boundingSphere.center;
|
196
198
|
const radius = this.boundingSphere.radius;
|
197
199
|
const s = radius === 0 ? 1 : 1 / radius;
|
198
|
-
const matrix = new Matrix4();
|
200
|
+
const matrix = new THREE.Matrix4();
|
199
201
|
matrix.set(s, 0, 0, -s * center.x, 0, s, 0, -s * center.y, 0, 0, s, -s * center.z, 0, 0, 0, 1);
|
200
202
|
this.applyMatrix4(matrix);
|
201
203
|
return this;
|
202
204
|
}
|
203
205
|
computeFaceNormals() {
|
204
|
-
const cb = new Vector3(), ab = new Vector3();
|
206
|
+
const cb = new THREE.Vector3(), ab = new THREE.Vector3();
|
205
207
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
206
208
|
const face = this.faces[f];
|
207
209
|
const vA = this.vertices[face.a];
|
@@ -217,10 +219,10 @@ class Geometry extends EventDispatcher {
|
|
217
219
|
computeVertexNormals(areaWeighted = true) {
|
218
220
|
const vertices = new Array(this.vertices.length);
|
219
221
|
for (let v = 0, vl = this.vertices.length; v < vl; v++) {
|
220
|
-
vertices[v] = new Vector3();
|
222
|
+
vertices[v] = new THREE.Vector3();
|
221
223
|
}
|
222
224
|
if (areaWeighted) {
|
223
|
-
const cb = new Vector3(), ab = new Vector3();
|
225
|
+
const cb = new THREE.Vector3(), ab = new THREE.Vector3();
|
224
226
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
225
227
|
const face = this.faces[f];
|
226
228
|
const vA = this.vertices[face.a];
|
@@ -309,11 +311,11 @@ class Geometry extends EventDispatcher {
|
|
309
311
|
const dstNormalsFace = this.morphNormals[i].faceNormals;
|
310
312
|
const dstNormalsVertex = this.morphNormals[i].vertexNormals;
|
311
313
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
312
|
-
const faceNormal = new Vector3();
|
314
|
+
const faceNormal = new THREE.Vector3();
|
313
315
|
const vertexNormals = {
|
314
|
-
a: new Vector3(),
|
315
|
-
b: new Vector3(),
|
316
|
-
c: new Vector3()
|
316
|
+
a: new THREE.Vector3(),
|
317
|
+
b: new THREE.Vector3(),
|
318
|
+
c: new THREE.Vector3()
|
317
319
|
};
|
318
320
|
dstNormalsFace.push(faceNormal);
|
319
321
|
dstNormalsVertex.push(vertexNormals);
|
@@ -341,13 +343,13 @@ class Geometry extends EventDispatcher {
|
|
341
343
|
}
|
342
344
|
computeBoundingBox() {
|
343
345
|
if (this.boundingBox === null) {
|
344
|
-
this.boundingBox = new Box3();
|
346
|
+
this.boundingBox = new THREE.Box3();
|
345
347
|
}
|
346
348
|
this.boundingBox.setFromPoints(this.vertices);
|
347
349
|
}
|
348
350
|
computeBoundingSphere() {
|
349
351
|
if (this.boundingSphere === null) {
|
350
|
-
this.boundingSphere = new Sphere();
|
352
|
+
this.boundingSphere = new THREE.Sphere();
|
351
353
|
}
|
352
354
|
this.boundingSphere.setFromPoints(this.vertices);
|
353
355
|
}
|
@@ -359,7 +361,7 @@ class Geometry extends EventDispatcher {
|
|
359
361
|
let normalMatrix;
|
360
362
|
const vertexOffset = this.vertices.length, vertices1 = this.vertices, vertices2 = geometry.vertices, faces1 = this.faces, faces2 = geometry.faces, colors1 = this.colors, colors2 = geometry.colors;
|
361
363
|
if (matrix !== void 0) {
|
362
|
-
normalMatrix = new Matrix3().getNormalMatrix(matrix);
|
364
|
+
normalMatrix = new THREE.Matrix3().getNormalMatrix(matrix);
|
363
365
|
}
|
364
366
|
for (let i = 0, il = vertices2.length; i < il; i++) {
|
365
367
|
const vertex = vertices2[i];
|
@@ -466,7 +468,7 @@ class Geometry extends EventDispatcher {
|
|
466
468
|
this.vertices = [];
|
467
469
|
for (let i = 0, l = points.length; i < l; i++) {
|
468
470
|
const point = points[i];
|
469
|
-
this.vertices.push(new Vector3(point.x, point.y, point.z || 0));
|
471
|
+
this.vertices.push(new THREE.Vector3(point.x, point.y, point.z || 0));
|
470
472
|
}
|
471
473
|
return this;
|
472
474
|
}
|
@@ -724,24 +726,24 @@ class Geometry extends EventDispatcher {
|
|
724
726
|
}
|
725
727
|
toBufferGeometry() {
|
726
728
|
const geometry = new DirectGeometry().fromGeometry(this);
|
727
|
-
const buffergeometry = new BufferGeometry();
|
729
|
+
const buffergeometry = new THREE.BufferGeometry();
|
728
730
|
const positions = new Float32Array(geometry.vertices.length * 3);
|
729
|
-
buffergeometry.setAttribute("position", new BufferAttribute(positions, 3).copyVector3sArray(geometry.vertices));
|
731
|
+
buffergeometry.setAttribute("position", new THREE.BufferAttribute(positions, 3).copyVector3sArray(geometry.vertices));
|
730
732
|
if (geometry.normals.length > 0) {
|
731
733
|
const normals = new Float32Array(geometry.normals.length * 3);
|
732
|
-
buffergeometry.setAttribute("normal", new BufferAttribute(normals, 3).copyVector3sArray(geometry.normals));
|
734
|
+
buffergeometry.setAttribute("normal", new THREE.BufferAttribute(normals, 3).copyVector3sArray(geometry.normals));
|
733
735
|
}
|
734
736
|
if (geometry.colors.length > 0) {
|
735
737
|
const colors = new Float32Array(geometry.colors.length * 3);
|
736
|
-
buffergeometry.setAttribute("color", new BufferAttribute(colors, 3).copyColorsArray(geometry.colors));
|
738
|
+
buffergeometry.setAttribute("color", new THREE.BufferAttribute(colors, 3).copyColorsArray(geometry.colors));
|
737
739
|
}
|
738
740
|
if (geometry.uvs.length > 0) {
|
739
741
|
const uvs = new Float32Array(geometry.uvs.length * 2);
|
740
|
-
buffergeometry.setAttribute("uv", new BufferAttribute(uvs, 2).copyVector2sArray(geometry.uvs));
|
742
|
+
buffergeometry.setAttribute("uv", new THREE.BufferAttribute(uvs, 2).copyVector2sArray(geometry.uvs));
|
741
743
|
}
|
742
744
|
if (geometry.uvs2.length > 0) {
|
743
745
|
const uvs2 = new Float32Array(geometry.uvs2.length * 2);
|
744
|
-
buffergeometry.setAttribute("uv2", new BufferAttribute(uvs2, 2).copyVector2sArray(geometry.uvs2));
|
746
|
+
buffergeometry.setAttribute("uv2", new THREE.BufferAttribute(uvs2, 2).copyVector2sArray(geometry.uvs2));
|
745
747
|
}
|
746
748
|
buffergeometry.groups = geometry.groups;
|
747
749
|
for (let name in geometry.morphTargets) {
|
@@ -749,18 +751,18 @@ class Geometry extends EventDispatcher {
|
|
749
751
|
const morphTargets = geometry.morphTargets[name];
|
750
752
|
for (let i = 0, l = morphTargets.length; i < l; i++) {
|
751
753
|
const morphTarget = morphTargets[i];
|
752
|
-
const attribute = new Float32BufferAttribute(morphTarget.data.length * 3, 3);
|
754
|
+
const attribute = new THREE.Float32BufferAttribute(morphTarget.data.length * 3, 3);
|
753
755
|
attribute.name = morphTarget.name;
|
754
756
|
array.push(attribute.copyVector3sArray(morphTarget.data));
|
755
757
|
}
|
756
758
|
buffergeometry.morphAttributes[name] = array;
|
757
759
|
}
|
758
760
|
if (geometry.skinIndices.length > 0) {
|
759
|
-
const skinIndices = new Float32BufferAttribute(geometry.skinIndices.length * 4, 4);
|
761
|
+
const skinIndices = new THREE.Float32BufferAttribute(geometry.skinIndices.length * 4, 4);
|
760
762
|
buffergeometry.setAttribute("skinIndex", skinIndices.copyVector4sArray(geometry.skinIndices));
|
761
763
|
}
|
762
764
|
if (geometry.skinWeights.length > 0) {
|
763
|
-
const skinWeights = new Float32BufferAttribute(geometry.skinWeights.length * 4, 4);
|
765
|
+
const skinWeights = new THREE.Float32BufferAttribute(geometry.skinWeights.length * 4, 4);
|
764
766
|
buffergeometry.setAttribute("skinWeight", skinWeights.copyVector4sArray(geometry.skinWeights));
|
765
767
|
}
|
766
768
|
if (geometry.boundingSphere !== null) {
|
@@ -893,7 +895,7 @@ class DirectGeometry {
|
|
893
895
|
this.uvs.push(vertexUvs[0], vertexUvs[1], vertexUvs[2]);
|
894
896
|
} else {
|
895
897
|
console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", i);
|
896
|
-
this.uvs.push(new Vector2(), new Vector2(), new Vector2());
|
898
|
+
this.uvs.push(new THREE.Vector2(), new THREE.Vector2(), new THREE.Vector2());
|
897
899
|
}
|
898
900
|
}
|
899
901
|
if (hasFaceVertexUv2 === true) {
|
@@ -902,7 +904,7 @@ class DirectGeometry {
|
|
902
904
|
this.uvs2.push(vertexUvs[0], vertexUvs[1], vertexUvs[2]);
|
903
905
|
} else {
|
904
906
|
console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", i);
|
905
|
-
this.uvs2.push(new Vector2(), new Vector2(), new Vector2());
|
907
|
+
this.uvs2.push(new THREE.Vector2(), new THREE.Vector2(), new THREE.Vector2());
|
906
908
|
}
|
907
909
|
}
|
908
910
|
for (let j = 0; j < morphTargetsLength; j++) {
|
@@ -940,9 +942,9 @@ class Face3 {
|
|
940
942
|
this.a = a;
|
941
943
|
this.b = b;
|
942
944
|
this.c = c;
|
943
|
-
this.normal = normal && normal.isVector3 ? normal : new Vector3();
|
945
|
+
this.normal = normal && normal.isVector3 ? normal : new THREE.Vector3();
|
944
946
|
this.vertexNormals = Array.isArray(normal) ? normal : [];
|
945
|
-
this.color = color && color.isColor ? color : new Color();
|
947
|
+
this.color = color && color.isColor ? color : new THREE.Color();
|
946
948
|
this.vertexColors = Array.isArray(color) ? color : [];
|
947
949
|
this.materialIndex = materialIndex;
|
948
950
|
}
|
@@ -965,7 +967,5 @@ class Face3 {
|
|
965
967
|
return this;
|
966
968
|
}
|
967
969
|
}
|
968
|
-
|
969
|
-
|
970
|
-
Geometry
|
971
|
-
};
|
970
|
+
exports.Face3 = Face3;
|
971
|
+
exports.Geometry = Geometry;
|
@@ -1,20 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
const _offset = /* @__PURE__ */ new THREE.Vector3();
|
7
|
-
class Geometry extends THREE.EventDispatcher {
|
1
|
+
import { Matrix4, Object3D, Vector3, EventDispatcher, BufferGeometry, Float32BufferAttribute, MathUtils, Matrix3, Color, Vector2, Box3, Sphere, BufferAttribute } from "three";
|
2
|
+
const _m1 = /* @__PURE__ */ new Matrix4();
|
3
|
+
const _obj = /* @__PURE__ */ new Object3D();
|
4
|
+
const _offset = /* @__PURE__ */ new Vector3();
|
5
|
+
class Geometry extends EventDispatcher {
|
8
6
|
static createBufferGeometryFromObject(object) {
|
9
|
-
let buffergeometry = new
|
7
|
+
let buffergeometry = new BufferGeometry();
|
10
8
|
const geometry = object.geometry;
|
11
9
|
if (object.isPoints || object.isLine) {
|
12
|
-
const positions = new
|
13
|
-
const colors = new
|
10
|
+
const positions = new Float32BufferAttribute(geometry.vertices.length * 3, 3);
|
11
|
+
const colors = new Float32BufferAttribute(geometry.colors.length * 3, 3);
|
14
12
|
buffergeometry.setAttribute("position", positions.copyVector3sArray(geometry.vertices));
|
15
13
|
buffergeometry.setAttribute("color", colors.copyColorsArray(geometry.colors));
|
16
14
|
if (geometry.lineDistances && geometry.lineDistances.length === geometry.vertices.length) {
|
17
|
-
const lineDistances = new
|
15
|
+
const lineDistances = new Float32BufferAttribute(geometry.lineDistances.length, 1);
|
18
16
|
buffergeometry.setAttribute("lineDistance", lineDistances.copyArray(geometry.lineDistances));
|
19
17
|
}
|
20
18
|
if (geometry.boundingSphere !== null) {
|
@@ -31,7 +29,7 @@ class Geometry extends THREE.EventDispatcher {
|
|
31
29
|
constructor() {
|
32
30
|
super();
|
33
31
|
this.isGeometry = true;
|
34
|
-
this.uuid =
|
32
|
+
this.uuid = MathUtils.generateUUID();
|
35
33
|
this.name = "";
|
36
34
|
this.type = "Geometry";
|
37
35
|
this.vertices = [];
|
@@ -54,7 +52,7 @@ class Geometry extends THREE.EventDispatcher {
|
|
54
52
|
this.groupsNeedUpdate = false;
|
55
53
|
}
|
56
54
|
applyMatrix4(matrix) {
|
57
|
-
const normalMatrix = new
|
55
|
+
const normalMatrix = new Matrix3().getNormalMatrix(matrix);
|
58
56
|
for (let i = 0, il = this.vertices.length; i < il; i++) {
|
59
57
|
const vertex = this.vertices[i];
|
60
58
|
vertex.applyMatrix4(matrix);
|
@@ -123,32 +121,32 @@ class Geometry extends THREE.EventDispatcher {
|
|
123
121
|
if (uv2 !== void 0)
|
124
122
|
this.faceVertexUvs[1] = [];
|
125
123
|
for (let i = 0; i < position.count; i++) {
|
126
|
-
scope.vertices.push(new
|
124
|
+
scope.vertices.push(new Vector3().fromBufferAttribute(position, i));
|
127
125
|
if (color !== void 0) {
|
128
|
-
scope.colors.push(new
|
126
|
+
scope.colors.push(new Color().fromBufferAttribute(color, i));
|
129
127
|
}
|
130
128
|
}
|
131
129
|
function addFace(a, b, c, materialIndex) {
|
132
130
|
const vertexColors = color === void 0 ? [] : [scope.colors[a].clone(), scope.colors[b].clone(), scope.colors[c].clone()];
|
133
131
|
const vertexNormals = normal === void 0 ? [] : [
|
134
|
-
new
|
135
|
-
new
|
136
|
-
new
|
132
|
+
new Vector3().fromBufferAttribute(normal, a),
|
133
|
+
new Vector3().fromBufferAttribute(normal, b),
|
134
|
+
new Vector3().fromBufferAttribute(normal, c)
|
137
135
|
];
|
138
136
|
const face = new Face3(a, b, c, vertexNormals, vertexColors, materialIndex);
|
139
137
|
scope.faces.push(face);
|
140
138
|
if (uv !== void 0) {
|
141
139
|
scope.faceVertexUvs[0].push([
|
142
|
-
new
|
143
|
-
new
|
144
|
-
new
|
140
|
+
new Vector2().fromBufferAttribute(uv, a),
|
141
|
+
new Vector2().fromBufferAttribute(uv, b),
|
142
|
+
new Vector2().fromBufferAttribute(uv, c)
|
145
143
|
]);
|
146
144
|
}
|
147
145
|
if (uv2 !== void 0) {
|
148
146
|
scope.faceVertexUvs[1].push([
|
149
|
-
new
|
150
|
-
new
|
151
|
-
new
|
147
|
+
new Vector2().fromBufferAttribute(uv2, a),
|
148
|
+
new Vector2().fromBufferAttribute(uv2, b),
|
149
|
+
new Vector2().fromBufferAttribute(uv2, c)
|
152
150
|
]);
|
153
151
|
}
|
154
152
|
}
|
@@ -197,13 +195,13 @@ class Geometry extends THREE.EventDispatcher {
|
|
197
195
|
const center = this.boundingSphere.center;
|
198
196
|
const radius = this.boundingSphere.radius;
|
199
197
|
const s = radius === 0 ? 1 : 1 / radius;
|
200
|
-
const matrix = new
|
198
|
+
const matrix = new Matrix4();
|
201
199
|
matrix.set(s, 0, 0, -s * center.x, 0, s, 0, -s * center.y, 0, 0, s, -s * center.z, 0, 0, 0, 1);
|
202
200
|
this.applyMatrix4(matrix);
|
203
201
|
return this;
|
204
202
|
}
|
205
203
|
computeFaceNormals() {
|
206
|
-
const cb = new
|
204
|
+
const cb = new Vector3(), ab = new Vector3();
|
207
205
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
208
206
|
const face = this.faces[f];
|
209
207
|
const vA = this.vertices[face.a];
|
@@ -219,10 +217,10 @@ class Geometry extends THREE.EventDispatcher {
|
|
219
217
|
computeVertexNormals(areaWeighted = true) {
|
220
218
|
const vertices = new Array(this.vertices.length);
|
221
219
|
for (let v = 0, vl = this.vertices.length; v < vl; v++) {
|
222
|
-
vertices[v] = new
|
220
|
+
vertices[v] = new Vector3();
|
223
221
|
}
|
224
222
|
if (areaWeighted) {
|
225
|
-
const cb = new
|
223
|
+
const cb = new Vector3(), ab = new Vector3();
|
226
224
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
227
225
|
const face = this.faces[f];
|
228
226
|
const vA = this.vertices[face.a];
|
@@ -311,11 +309,11 @@ class Geometry extends THREE.EventDispatcher {
|
|
311
309
|
const dstNormalsFace = this.morphNormals[i].faceNormals;
|
312
310
|
const dstNormalsVertex = this.morphNormals[i].vertexNormals;
|
313
311
|
for (let f = 0, fl = this.faces.length; f < fl; f++) {
|
314
|
-
const faceNormal = new
|
312
|
+
const faceNormal = new Vector3();
|
315
313
|
const vertexNormals = {
|
316
|
-
a: new
|
317
|
-
b: new
|
318
|
-
c: new
|
314
|
+
a: new Vector3(),
|
315
|
+
b: new Vector3(),
|
316
|
+
c: new Vector3()
|
319
317
|
};
|
320
318
|
dstNormalsFace.push(faceNormal);
|
321
319
|
dstNormalsVertex.push(vertexNormals);
|
@@ -343,13 +341,13 @@ class Geometry extends THREE.EventDispatcher {
|
|
343
341
|
}
|
344
342
|
computeBoundingBox() {
|
345
343
|
if (this.boundingBox === null) {
|
346
|
-
this.boundingBox = new
|
344
|
+
this.boundingBox = new Box3();
|
347
345
|
}
|
348
346
|
this.boundingBox.setFromPoints(this.vertices);
|
349
347
|
}
|
350
348
|
computeBoundingSphere() {
|
351
349
|
if (this.boundingSphere === null) {
|
352
|
-
this.boundingSphere = new
|
350
|
+
this.boundingSphere = new Sphere();
|
353
351
|
}
|
354
352
|
this.boundingSphere.setFromPoints(this.vertices);
|
355
353
|
}
|
@@ -361,7 +359,7 @@ class Geometry extends THREE.EventDispatcher {
|
|
361
359
|
let normalMatrix;
|
362
360
|
const vertexOffset = this.vertices.length, vertices1 = this.vertices, vertices2 = geometry.vertices, faces1 = this.faces, faces2 = geometry.faces, colors1 = this.colors, colors2 = geometry.colors;
|
363
361
|
if (matrix !== void 0) {
|
364
|
-
normalMatrix = new
|
362
|
+
normalMatrix = new Matrix3().getNormalMatrix(matrix);
|
365
363
|
}
|
366
364
|
for (let i = 0, il = vertices2.length; i < il; i++) {
|
367
365
|
const vertex = vertices2[i];
|
@@ -468,7 +466,7 @@ class Geometry extends THREE.EventDispatcher {
|
|
468
466
|
this.vertices = [];
|
469
467
|
for (let i = 0, l = points.length; i < l; i++) {
|
470
468
|
const point = points[i];
|
471
|
-
this.vertices.push(new
|
469
|
+
this.vertices.push(new Vector3(point.x, point.y, point.z || 0));
|
472
470
|
}
|
473
471
|
return this;
|
474
472
|
}
|
@@ -726,24 +724,24 @@ class Geometry extends THREE.EventDispatcher {
|
|
726
724
|
}
|
727
725
|
toBufferGeometry() {
|
728
726
|
const geometry = new DirectGeometry().fromGeometry(this);
|
729
|
-
const buffergeometry = new
|
727
|
+
const buffergeometry = new BufferGeometry();
|
730
728
|
const positions = new Float32Array(geometry.vertices.length * 3);
|
731
|
-
buffergeometry.setAttribute("position", new
|
729
|
+
buffergeometry.setAttribute("position", new BufferAttribute(positions, 3).copyVector3sArray(geometry.vertices));
|
732
730
|
if (geometry.normals.length > 0) {
|
733
731
|
const normals = new Float32Array(geometry.normals.length * 3);
|
734
|
-
buffergeometry.setAttribute("normal", new
|
732
|
+
buffergeometry.setAttribute("normal", new BufferAttribute(normals, 3).copyVector3sArray(geometry.normals));
|
735
733
|
}
|
736
734
|
if (geometry.colors.length > 0) {
|
737
735
|
const colors = new Float32Array(geometry.colors.length * 3);
|
738
|
-
buffergeometry.setAttribute("color", new
|
736
|
+
buffergeometry.setAttribute("color", new BufferAttribute(colors, 3).copyColorsArray(geometry.colors));
|
739
737
|
}
|
740
738
|
if (geometry.uvs.length > 0) {
|
741
739
|
const uvs = new Float32Array(geometry.uvs.length * 2);
|
742
|
-
buffergeometry.setAttribute("uv", new
|
740
|
+
buffergeometry.setAttribute("uv", new BufferAttribute(uvs, 2).copyVector2sArray(geometry.uvs));
|
743
741
|
}
|
744
742
|
if (geometry.uvs2.length > 0) {
|
745
743
|
const uvs2 = new Float32Array(geometry.uvs2.length * 2);
|
746
|
-
buffergeometry.setAttribute("uv2", new
|
744
|
+
buffergeometry.setAttribute("uv2", new BufferAttribute(uvs2, 2).copyVector2sArray(geometry.uvs2));
|
747
745
|
}
|
748
746
|
buffergeometry.groups = geometry.groups;
|
749
747
|
for (let name in geometry.morphTargets) {
|
@@ -751,18 +749,18 @@ class Geometry extends THREE.EventDispatcher {
|
|
751
749
|
const morphTargets = geometry.morphTargets[name];
|
752
750
|
for (let i = 0, l = morphTargets.length; i < l; i++) {
|
753
751
|
const morphTarget = morphTargets[i];
|
754
|
-
const attribute = new
|
752
|
+
const attribute = new Float32BufferAttribute(morphTarget.data.length * 3, 3);
|
755
753
|
attribute.name = morphTarget.name;
|
756
754
|
array.push(attribute.copyVector3sArray(morphTarget.data));
|
757
755
|
}
|
758
756
|
buffergeometry.morphAttributes[name] = array;
|
759
757
|
}
|
760
758
|
if (geometry.skinIndices.length > 0) {
|
761
|
-
const skinIndices = new
|
759
|
+
const skinIndices = new Float32BufferAttribute(geometry.skinIndices.length * 4, 4);
|
762
760
|
buffergeometry.setAttribute("skinIndex", skinIndices.copyVector4sArray(geometry.skinIndices));
|
763
761
|
}
|
764
762
|
if (geometry.skinWeights.length > 0) {
|
765
|
-
const skinWeights = new
|
763
|
+
const skinWeights = new Float32BufferAttribute(geometry.skinWeights.length * 4, 4);
|
766
764
|
buffergeometry.setAttribute("skinWeight", skinWeights.copyVector4sArray(geometry.skinWeights));
|
767
765
|
}
|
768
766
|
if (geometry.boundingSphere !== null) {
|
@@ -895,7 +893,7 @@ class DirectGeometry {
|
|
895
893
|
this.uvs.push(vertexUvs[0], vertexUvs[1], vertexUvs[2]);
|
896
894
|
} else {
|
897
895
|
console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", i);
|
898
|
-
this.uvs.push(new
|
896
|
+
this.uvs.push(new Vector2(), new Vector2(), new Vector2());
|
899
897
|
}
|
900
898
|
}
|
901
899
|
if (hasFaceVertexUv2 === true) {
|
@@ -904,7 +902,7 @@ class DirectGeometry {
|
|
904
902
|
this.uvs2.push(vertexUvs[0], vertexUvs[1], vertexUvs[2]);
|
905
903
|
} else {
|
906
904
|
console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", i);
|
907
|
-
this.uvs2.push(new
|
905
|
+
this.uvs2.push(new Vector2(), new Vector2(), new Vector2());
|
908
906
|
}
|
909
907
|
}
|
910
908
|
for (let j = 0; j < morphTargetsLength; j++) {
|
@@ -942,9 +940,9 @@ class Face3 {
|
|
942
940
|
this.a = a;
|
943
941
|
this.b = b;
|
944
942
|
this.c = c;
|
945
|
-
this.normal = normal && normal.isVector3 ? normal : new
|
943
|
+
this.normal = normal && normal.isVector3 ? normal : new Vector3();
|
946
944
|
this.vertexNormals = Array.isArray(normal) ? normal : [];
|
947
|
-
this.color = color && color.isColor ? color : new
|
945
|
+
this.color = color && color.isColor ? color : new Color();
|
948
946
|
this.vertexColors = Array.isArray(color) ? color : [];
|
949
947
|
this.materialIndex = materialIndex;
|
950
948
|
}
|
@@ -967,5 +965,7 @@ class Face3 {
|
|
967
965
|
return this;
|
968
966
|
}
|
969
967
|
}
|
970
|
-
|
971
|
-
|
968
|
+
export {
|
969
|
+
Face3,
|
970
|
+
Geometry
|
971
|
+
};
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
2
4
|
class AnaglyphEffect {
|
3
5
|
constructor(renderer, width = 512, height = 512) {
|
4
|
-
this.colorMatrixLeft = new Matrix3().fromArray([
|
6
|
+
this.colorMatrixLeft = new THREE.Matrix3().fromArray([
|
5
7
|
0.4561,
|
6
8
|
-0.0400822,
|
7
9
|
-0.0152161,
|
@@ -12,7 +14,7 @@ class AnaglyphEffect {
|
|
12
14
|
-0.0157589,
|
13
15
|
-546856e-8
|
14
16
|
]);
|
15
|
-
this.colorMatrixRight = new Matrix3().fromArray([
|
17
|
+
this.colorMatrixRight = new THREE.Matrix3().fromArray([
|
16
18
|
-0.0434706,
|
17
19
|
0.378476,
|
18
20
|
-0.0721527,
|
@@ -23,13 +25,13 @@ class AnaglyphEffect {
|
|
23
25
|
-0.0184503,
|
24
26
|
1.2264
|
25
27
|
]);
|
26
|
-
const _camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
27
|
-
const _scene = new Scene();
|
28
|
-
const _stereo = new StereoCamera();
|
29
|
-
const _params = { minFilter: LinearFilter, magFilter: NearestFilter, format: RGBAFormat };
|
30
|
-
const _renderTargetL = new WebGLRenderTarget(width, height, _params);
|
31
|
-
const _renderTargetR = new WebGLRenderTarget(width, height, _params);
|
32
|
-
const _material = new ShaderMaterial({
|
28
|
+
const _camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
29
|
+
const _scene = new THREE.Scene();
|
30
|
+
const _stereo = new THREE.StereoCamera();
|
31
|
+
const _params = { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter, format: THREE.RGBAFormat };
|
32
|
+
const _renderTargetL = new THREE.WebGLRenderTarget(width, height, _params);
|
33
|
+
const _renderTargetR = new THREE.WebGLRenderTarget(width, height, _params);
|
34
|
+
const _material = new THREE.ShaderMaterial({
|
33
35
|
uniforms: {
|
34
36
|
mapLeft: { value: _renderTargetL.texture },
|
35
37
|
mapRight: { value: _renderTargetR.texture },
|
@@ -64,7 +66,7 @@ class AnaglyphEffect {
|
|
64
66
|
"}"
|
65
67
|
].join("\n")
|
66
68
|
});
|
67
|
-
const _mesh = new Mesh(new PlaneGeometry(2, 2), _material);
|
69
|
+
const _mesh = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), _material);
|
68
70
|
_scene.add(_mesh);
|
69
71
|
this.setSize = function(width2, height2) {
|
70
72
|
renderer.setSize(width2, height2);
|
@@ -97,6 +99,4 @@ class AnaglyphEffect {
|
|
97
99
|
};
|
98
100
|
}
|
99
101
|
}
|
100
|
-
|
101
|
-
AnaglyphEffect
|
102
|
-
};
|
102
|
+
exports.AnaglyphEffect = AnaglyphEffect;
|
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const THREE = require("three");
|
1
|
+
import { Matrix3, OrthographicCamera, Scene, StereoCamera, LinearFilter, NearestFilter, RGBAFormat, WebGLRenderTarget, ShaderMaterial, Mesh, PlaneGeometry } from "three";
|
4
2
|
class AnaglyphEffect {
|
5
3
|
constructor(renderer, width = 512, height = 512) {
|
6
|
-
this.colorMatrixLeft = new
|
4
|
+
this.colorMatrixLeft = new Matrix3().fromArray([
|
7
5
|
0.4561,
|
8
6
|
-0.0400822,
|
9
7
|
-0.0152161,
|
@@ -14,7 +12,7 @@ class AnaglyphEffect {
|
|
14
12
|
-0.0157589,
|
15
13
|
-546856e-8
|
16
14
|
]);
|
17
|
-
this.colorMatrixRight = new
|
15
|
+
this.colorMatrixRight = new Matrix3().fromArray([
|
18
16
|
-0.0434706,
|
19
17
|
0.378476,
|
20
18
|
-0.0721527,
|
@@ -25,13 +23,13 @@ class AnaglyphEffect {
|
|
25
23
|
-0.0184503,
|
26
24
|
1.2264
|
27
25
|
]);
|
28
|
-
const _camera = new
|
29
|
-
const _scene = new
|
30
|
-
const _stereo = new
|
31
|
-
const _params = { minFilter:
|
32
|
-
const _renderTargetL = new
|
33
|
-
const _renderTargetR = new
|
34
|
-
const _material = new
|
26
|
+
const _camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
27
|
+
const _scene = new Scene();
|
28
|
+
const _stereo = new StereoCamera();
|
29
|
+
const _params = { minFilter: LinearFilter, magFilter: NearestFilter, format: RGBAFormat };
|
30
|
+
const _renderTargetL = new WebGLRenderTarget(width, height, _params);
|
31
|
+
const _renderTargetR = new WebGLRenderTarget(width, height, _params);
|
32
|
+
const _material = new ShaderMaterial({
|
35
33
|
uniforms: {
|
36
34
|
mapLeft: { value: _renderTargetL.texture },
|
37
35
|
mapRight: { value: _renderTargetR.texture },
|
@@ -66,7 +64,7 @@ class AnaglyphEffect {
|
|
66
64
|
"}"
|
67
65
|
].join("\n")
|
68
66
|
});
|
69
|
-
const _mesh = new
|
67
|
+
const _mesh = new Mesh(new PlaneGeometry(2, 2), _material);
|
70
68
|
_scene.add(_mesh);
|
71
69
|
this.setSize = function(width2, height2) {
|
72
70
|
renderer.setSize(width2, height2);
|
@@ -99,4 +97,6 @@ class AnaglyphEffect {
|
|
99
97
|
};
|
100
98
|
}
|
101
99
|
}
|
102
|
-
|
100
|
+
export {
|
101
|
+
AnaglyphEffect
|
102
|
+
};
|
@@ -1,3 +1,5 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
1
3
|
class AsciiEffect {
|
2
4
|
constructor(renderer, charSet = " .:-=+*#%@", options = {}) {
|
3
5
|
const fResolution = options["resolution"] || 0.15;
|
@@ -150,6 +152,4 @@ class AsciiEffect {
|
|
150
152
|
}
|
151
153
|
}
|
152
154
|
}
|
153
|
-
|
154
|
-
AsciiEffect
|
155
|
-
};
|
155
|
+
exports.AsciiEffect = AsciiEffect;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
1
|
class AsciiEffect {
|
4
2
|
constructor(renderer, charSet = " .:-=+*#%@", options = {}) {
|
5
3
|
const fResolution = options["resolution"] || 0.15;
|
@@ -152,4 +150,6 @@ class AsciiEffect {
|
|
152
150
|
}
|
153
151
|
}
|
154
152
|
}
|
155
|
-
|
153
|
+
export {
|
154
|
+
AsciiEffect
|
155
|
+
};
|