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,14 +1,12 @@
|
|
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
|
-
|
10
|
-
const
|
11
|
-
const _LightningStrike = class extends THREE.BufferGeometry {
|
7
|
+
import { BufferGeometry, Vector3, Uint32BufferAttribute, Float32BufferAttribute, DynamicDrawUsage, MathUtils } from "three";
|
8
|
+
import { SimplexNoise } from "../math/SimplexNoise.js";
|
9
|
+
const _LightningStrike = class extends BufferGeometry {
|
12
10
|
constructor(rayParameters = {}) {
|
13
11
|
super();
|
14
12
|
this.isLightningStrike = true;
|
@@ -46,8 +44,8 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
46
44
|
return v.clone();
|
47
45
|
}
|
48
46
|
};
|
49
|
-
dest.sourceOffset = source.sourceOffset !== void 0 ? vecCopy(source.sourceOffset) : new
|
50
|
-
dest.up1 = source.up1 !== void 0 ? vecCopy(source.up1) : new
|
47
|
+
dest.sourceOffset = source.sourceOffset !== void 0 ? vecCopy(source.sourceOffset) : new Vector3(0, 100, 0), dest.destOffset = source.destOffset !== void 0 ? vecCopy(source.destOffset) : new Vector3(0, 0, 0), dest.timeScale = source.timeScale !== void 0 ? source.timeScale : 1, dest.roughness = source.roughness !== void 0 ? source.roughness : 0.9, dest.straightness = source.straightness !== void 0 ? source.straightness : 0.7, dest.up0 = source.up0 !== void 0 ? vecCopy(source.up0) : new Vector3(0, 0, 1);
|
48
|
+
dest.up1 = source.up1 !== void 0 ? vecCopy(source.up1) : new Vector3(0, 0, 1), dest.radius0 = source.radius0 !== void 0 ? source.radius0 : 1, dest.radius1 = source.radius1 !== void 0 ? source.radius1 : 1, dest.radius0Factor = source.radius0Factor !== void 0 ? source.radius0Factor : 0.5, dest.radius1Factor = source.radius1Factor !== void 0 ? source.radius1Factor : 0.2, dest.minRadius = source.minRadius !== void 0 ? source.minRadius : 0.2, // These parameters should not be changed after lightning creation. They can be changed but the ray will change its form abruptly:
|
51
49
|
dest.isEternal = source.isEternal !== void 0 ? source.isEternal : source.birthTime === void 0 || source.deathTime === void 0, dest.birthTime = source.birthTime, dest.deathTime = source.deathTime, dest.propagationTimeFactor = source.propagationTimeFactor !== void 0 ? source.propagationTimeFactor : 0.1, dest.vanishingTimeFactor = source.vanishingTimeFactor !== void 0 ? source.vanishingTimeFactor : 0.9, dest.subrayPeriod = source.subrayPeriod !== void 0 ? source.subrayPeriod : 4, dest.subrayDutyCycle = source.subrayDutyCycle !== void 0 ? source.subrayDutyCycle : 0.6;
|
52
50
|
dest.maxIterations = source.maxIterations !== void 0 ? source.maxIterations : 9;
|
53
51
|
dest.isStatic = source.isStatic !== void 0 ? source.isStatic : false;
|
@@ -142,18 +140,18 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
142
140
|
this.indices = null;
|
143
141
|
this.positionAttribute = null;
|
144
142
|
this.uvsAttribute = null;
|
145
|
-
this.simplexX = new SimplexNoise
|
146
|
-
this.simplexY = new SimplexNoise
|
147
|
-
this.simplexZ = new SimplexNoise
|
148
|
-
this.forwards = new
|
149
|
-
this.forwardsFill = new
|
150
|
-
this.side = new
|
151
|
-
this.down = new
|
152
|
-
this.middlePos = new
|
153
|
-
this.middleLinPos = new
|
154
|
-
this.newPos = new
|
155
|
-
this.vPos = new
|
156
|
-
this.cross1 = new
|
143
|
+
this.simplexX = new SimplexNoise(this.seedGenerator);
|
144
|
+
this.simplexY = new SimplexNoise(this.seedGenerator);
|
145
|
+
this.simplexZ = new SimplexNoise(this.seedGenerator);
|
146
|
+
this.forwards = new Vector3();
|
147
|
+
this.forwardsFill = new Vector3();
|
148
|
+
this.side = new Vector3();
|
149
|
+
this.down = new Vector3();
|
150
|
+
this.middlePos = new Vector3();
|
151
|
+
this.middleLinPos = new Vector3();
|
152
|
+
this.newPos = new Vector3();
|
153
|
+
this.vPos = new Vector3();
|
154
|
+
this.cross1 = new Vector3();
|
157
155
|
}
|
158
156
|
createMesh() {
|
159
157
|
const maxDrawableSegmentsPerSubRay = 1 << this.maxIterations;
|
@@ -165,18 +163,18 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
165
163
|
this.uvs = new Float32Array(maxVerts * 2);
|
166
164
|
}
|
167
165
|
this.fillMesh(0);
|
168
|
-
this.setIndex(new
|
169
|
-
this.positionAttribute = new
|
166
|
+
this.setIndex(new Uint32BufferAttribute(this.indices, 1));
|
167
|
+
this.positionAttribute = new Float32BufferAttribute(this.vertices, 3);
|
170
168
|
this.setAttribute("position", this.positionAttribute);
|
171
169
|
if (this.generateUVs) {
|
172
|
-
this.uvsAttribute = new
|
170
|
+
this.uvsAttribute = new Float32BufferAttribute(new Float32Array(this.uvs), 2);
|
173
171
|
this.setAttribute("uv", this.uvsAttribute);
|
174
172
|
}
|
175
173
|
if (!this.isStatic) {
|
176
|
-
this.index.usage =
|
177
|
-
this.positionAttribute.usage =
|
174
|
+
this.index.usage = DynamicDrawUsage;
|
175
|
+
this.positionAttribute.usage = DynamicDrawUsage;
|
178
176
|
if (this.generateUVs) {
|
179
|
-
this.uvsAttribute.usage =
|
177
|
+
this.uvsAttribute.usage = DynamicDrawUsage;
|
180
178
|
}
|
181
179
|
}
|
182
180
|
this.vertices = this.positionAttribute.array;
|
@@ -253,8 +251,8 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
253
251
|
const subray = this.subrays[subrayIndex];
|
254
252
|
this.currentSubray = subray;
|
255
253
|
this.randomGenerator.setSeed(subray.seed);
|
256
|
-
subray.endPropagationTime =
|
257
|
-
subray.beginVanishingTime =
|
254
|
+
subray.endPropagationTime = MathUtils.lerp(subray.birthTime, subray.deathTime, subray.propagationTimeFactor);
|
255
|
+
subray.beginVanishingTime = MathUtils.lerp(subray.deathTime, subray.birthTime, 1 - subray.vanishingTimeFactor);
|
258
256
|
const random1 = this.randomGenerator.random;
|
259
257
|
subray.linPos0.set(random1(), random1(), random1()).multiplyScalar(1e3);
|
260
258
|
subray.linPos1.set(random1(), random1(), random1()).multiplyScalar(1e3);
|
@@ -416,7 +414,7 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
416
414
|
const subray = lightningStrike.currentSubray;
|
417
415
|
const period = lightningStrike.rayParameters.subrayPeriod;
|
418
416
|
const dutyCycle = lightningStrike.rayParameters.subrayDutyCycle;
|
419
|
-
const phase0 = lightningStrike.rayParameters.isEternal && subray.recursion == 0 ? -random1() * period :
|
417
|
+
const phase0 = lightningStrike.rayParameters.isEternal && subray.recursion == 0 ? -random1() * period : MathUtils.lerp(subray.birthTime, subray.endPropagationTime, segment.fraction0) - random1() * period;
|
420
418
|
const phase = lightningStrike.time - phase0;
|
421
419
|
const currentCycle = Math.floor(phase / period);
|
422
420
|
const childSubraySeed = random1() * (currentCycle + 1);
|
@@ -456,10 +454,10 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
456
454
|
lightningStrike.randomGenerator.setSeed(parentSeed);
|
457
455
|
}
|
458
456
|
};
|
459
|
-
const vec1Pos = new
|
460
|
-
const vec2Forward = new
|
461
|
-
const vec3Side = new
|
462
|
-
const vec4Up = new
|
457
|
+
const vec1Pos = new Vector3();
|
458
|
+
const vec2Forward = new Vector3();
|
459
|
+
const vec3Side = new Vector3();
|
460
|
+
const vec4Up = new Vector3();
|
463
461
|
this.onSubrayCreation = function(segment, parentSubray, childSubray, lightningStrike) {
|
464
462
|
lightningStrike.subrayCylinderPosition(segment, parentSubray, childSubray, 0.5, 0.6, 0.2);
|
465
463
|
};
|
@@ -493,12 +491,12 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
493
491
|
seed: 0,
|
494
492
|
maxIterations: 0,
|
495
493
|
recursion: 0,
|
496
|
-
pos0: new
|
497
|
-
pos1: new
|
498
|
-
linPos0: new
|
499
|
-
linPos1: new
|
500
|
-
up0: new
|
501
|
-
up1: new
|
494
|
+
pos0: new Vector3(),
|
495
|
+
pos1: new Vector3(),
|
496
|
+
linPos0: new Vector3(),
|
497
|
+
linPos1: new Vector3(),
|
498
|
+
up0: new Vector3(),
|
499
|
+
up1: new Vector3(),
|
502
500
|
radius0: 0,
|
503
501
|
radius1: 0,
|
504
502
|
birthTime: 0,
|
@@ -515,12 +513,12 @@ const _LightningStrike = class extends THREE.BufferGeometry {
|
|
515
513
|
createSegment() {
|
516
514
|
return {
|
517
515
|
iteration: 0,
|
518
|
-
pos0: new
|
519
|
-
pos1: new
|
520
|
-
linPos0: new
|
521
|
-
linPos1: new
|
522
|
-
up0: new
|
523
|
-
up1: new
|
516
|
+
pos0: new Vector3(),
|
517
|
+
pos1: new Vector3(),
|
518
|
+
linPos0: new Vector3(),
|
519
|
+
linPos1: new Vector3(),
|
520
|
+
up0: new Vector3(),
|
521
|
+
up1: new Vector3(),
|
524
522
|
radius0: 0,
|
525
523
|
radius1: 0,
|
526
524
|
fraction0: 0,
|
@@ -550,4 +548,6 @@ __publicField(LightningStrike, "RAY_VANISHING", 4);
|
|
550
548
|
__publicField(LightningStrike, "RAY_EXTINGUISHED", 5);
|
551
549
|
__publicField(LightningStrike, "COS30DEG", Math.cos(30 * Math.PI / 180));
|
552
550
|
__publicField(LightningStrike, "SIN30DEG", Math.sin(30 * Math.PI / 180));
|
553
|
-
|
551
|
+
export {
|
552
|
+
LightningStrike
|
553
|
+
};
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const ParametricGeometry = require("./ParametricGeometry.cjs");
|
5
|
+
class TubeGeometry extends ParametricGeometry.ParametricGeometry {
|
4
6
|
constructor(path, segments = 64, radius = 1, segmentsRadius = 8, closed = false) {
|
5
7
|
const numpoints = segments + 1;
|
6
8
|
const frames = path.computeFrenetFrames(segments, closed), tangents = frames.tangents, normals = frames.normals, binormals = frames.binormals;
|
7
|
-
const position = new Vector3();
|
9
|
+
const position = new THREE.Vector3();
|
8
10
|
function ParametricTube(u, v, target) {
|
9
11
|
v *= 2 * Math.PI;
|
10
12
|
const i = Math.floor(u * (numpoints - 1));
|
@@ -77,8 +79,8 @@ const ParametricGeometries = {
|
|
77
79
|
TubeGeometry,
|
78
80
|
TorusKnotGeometry: class TorusKnotGeometry extends TubeGeometry {
|
79
81
|
constructor(radius = 200, tube = 40, segmentsT = 64, segmentsR = 8, p = 2, q = 3) {
|
80
|
-
class TorusKnotCurve extends Curve {
|
81
|
-
getPoint(t, optionalTarget = new Vector3()) {
|
82
|
+
class TorusKnotCurve extends THREE.Curve {
|
83
|
+
getPoint(t, optionalTarget = new THREE.Vector3()) {
|
82
84
|
const point = optionalTarget;
|
83
85
|
t *= Math.PI * 2;
|
84
86
|
const r = 0.5;
|
@@ -100,7 +102,7 @@ const ParametricGeometries = {
|
|
100
102
|
this.q = q;
|
101
103
|
}
|
102
104
|
},
|
103
|
-
SphereGeometry: class SphereGeometry extends ParametricGeometry {
|
105
|
+
SphereGeometry: class SphereGeometry extends ParametricGeometry.ParametricGeometry {
|
104
106
|
constructor(size, u, v) {
|
105
107
|
function sphere(u2, v2, target) {
|
106
108
|
u2 *= Math.PI;
|
@@ -113,7 +115,7 @@ const ParametricGeometries = {
|
|
113
115
|
super(sphere, u, v);
|
114
116
|
}
|
115
117
|
},
|
116
|
-
PlaneGeometry: class PlaneGeometry extends ParametricGeometry {
|
118
|
+
PlaneGeometry: class PlaneGeometry extends ParametricGeometry.ParametricGeometry {
|
117
119
|
constructor(width, depth, segmentsWidth, segmentsDepth) {
|
118
120
|
function plane(u, v, target) {
|
119
121
|
const x = u * width;
|
@@ -125,6 +127,4 @@ const ParametricGeometries = {
|
|
125
127
|
}
|
126
128
|
}
|
127
129
|
};
|
128
|
-
|
129
|
-
ParametricGeometries
|
130
|
-
};
|
130
|
+
exports.ParametricGeometries = ParametricGeometries;
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const ParametricGeometry = require("./ParametricGeometry.js");
|
5
|
-
class TubeGeometry extends ParametricGeometry.ParametricGeometry {
|
1
|
+
import { Vector3, Curve } from "three";
|
2
|
+
import { ParametricGeometry } from "./ParametricGeometry.js";
|
3
|
+
class TubeGeometry extends ParametricGeometry {
|
6
4
|
constructor(path, segments = 64, radius = 1, segmentsRadius = 8, closed = false) {
|
7
5
|
const numpoints = segments + 1;
|
8
6
|
const frames = path.computeFrenetFrames(segments, closed), tangents = frames.tangents, normals = frames.normals, binormals = frames.binormals;
|
9
|
-
const position = new
|
7
|
+
const position = new Vector3();
|
10
8
|
function ParametricTube(u, v, target) {
|
11
9
|
v *= 2 * Math.PI;
|
12
10
|
const i = Math.floor(u * (numpoints - 1));
|
@@ -79,8 +77,8 @@ const ParametricGeometries = {
|
|
79
77
|
TubeGeometry,
|
80
78
|
TorusKnotGeometry: class TorusKnotGeometry extends TubeGeometry {
|
81
79
|
constructor(radius = 200, tube = 40, segmentsT = 64, segmentsR = 8, p = 2, q = 3) {
|
82
|
-
class TorusKnotCurve extends
|
83
|
-
getPoint(t, optionalTarget = new
|
80
|
+
class TorusKnotCurve extends Curve {
|
81
|
+
getPoint(t, optionalTarget = new Vector3()) {
|
84
82
|
const point = optionalTarget;
|
85
83
|
t *= Math.PI * 2;
|
86
84
|
const r = 0.5;
|
@@ -102,7 +100,7 @@ const ParametricGeometries = {
|
|
102
100
|
this.q = q;
|
103
101
|
}
|
104
102
|
},
|
105
|
-
SphereGeometry: class SphereGeometry extends ParametricGeometry
|
103
|
+
SphereGeometry: class SphereGeometry extends ParametricGeometry {
|
106
104
|
constructor(size, u, v) {
|
107
105
|
function sphere(u2, v2, target) {
|
108
106
|
u2 *= Math.PI;
|
@@ -115,7 +113,7 @@ const ParametricGeometries = {
|
|
115
113
|
super(sphere, u, v);
|
116
114
|
}
|
117
115
|
},
|
118
|
-
PlaneGeometry: class PlaneGeometry extends ParametricGeometry
|
116
|
+
PlaneGeometry: class PlaneGeometry extends ParametricGeometry {
|
119
117
|
constructor(width, depth, segmentsWidth, segmentsDepth) {
|
120
118
|
function plane(u, v, target) {
|
121
119
|
const x = u * width;
|
@@ -127,4 +125,6 @@ const ParametricGeometries = {
|
|
127
125
|
}
|
128
126
|
}
|
129
127
|
};
|
130
|
-
|
128
|
+
export {
|
129
|
+
ParametricGeometries
|
130
|
+
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class ParametricGeometry extends THREE.BufferGeometry {
|
3
5
|
constructor(func = (u, v, target) => target.set(u, v, Math.cos(u) * Math.sin(v)), slices = 8, stacks = 8) {
|
4
6
|
super();
|
5
7
|
this.type = "ParametricGeometry";
|
@@ -13,9 +15,9 @@ class ParametricGeometry extends BufferGeometry {
|
|
13
15
|
const normals = [];
|
14
16
|
const uvs = [];
|
15
17
|
const EPS = 1e-5;
|
16
|
-
const normal = new Vector3();
|
17
|
-
const p0 = new Vector3(), p1 = new Vector3();
|
18
|
-
const pu = new Vector3(), pv = new Vector3();
|
18
|
+
const normal = new THREE.Vector3();
|
19
|
+
const p0 = new THREE.Vector3(), p1 = new THREE.Vector3();
|
20
|
+
const pu = new THREE.Vector3(), pv = new THREE.Vector3();
|
19
21
|
const sliceCount = slices + 1;
|
20
22
|
for (let i = 0; i <= stacks; i++) {
|
21
23
|
const v = i / stacks;
|
@@ -53,11 +55,9 @@ class ParametricGeometry extends BufferGeometry {
|
|
53
55
|
}
|
54
56
|
}
|
55
57
|
this.setIndex(indices);
|
56
|
-
this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
57
|
-
this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
|
58
|
-
this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
58
|
+
this.setAttribute("position", new THREE.Float32BufferAttribute(vertices, 3));
|
59
|
+
this.setAttribute("normal", new THREE.Float32BufferAttribute(normals, 3));
|
60
|
+
this.setAttribute("uv", new THREE.Float32BufferAttribute(uvs, 2));
|
59
61
|
}
|
60
62
|
}
|
61
|
-
|
62
|
-
ParametricGeometry
|
63
|
-
};
|
63
|
+
exports.ParametricGeometry = ParametricGeometry;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class ParametricGeometry extends THREE.BufferGeometry {
|
1
|
+
import { BufferGeometry, Vector3, Float32BufferAttribute } from "three";
|
2
|
+
class ParametricGeometry extends BufferGeometry {
|
5
3
|
constructor(func = (u, v, target) => target.set(u, v, Math.cos(u) * Math.sin(v)), slices = 8, stacks = 8) {
|
6
4
|
super();
|
7
5
|
this.type = "ParametricGeometry";
|
@@ -15,9 +13,9 @@ class ParametricGeometry extends THREE.BufferGeometry {
|
|
15
13
|
const normals = [];
|
16
14
|
const uvs = [];
|
17
15
|
const EPS = 1e-5;
|
18
|
-
const normal = new
|
19
|
-
const p0 = new
|
20
|
-
const pu = new
|
16
|
+
const normal = new Vector3();
|
17
|
+
const p0 = new Vector3(), p1 = new Vector3();
|
18
|
+
const pu = new Vector3(), pv = new Vector3();
|
21
19
|
const sliceCount = slices + 1;
|
22
20
|
for (let i = 0; i <= stacks; i++) {
|
23
21
|
const v = i / stacks;
|
@@ -55,9 +53,11 @@ class ParametricGeometry extends THREE.BufferGeometry {
|
|
55
53
|
}
|
56
54
|
}
|
57
55
|
this.setIndex(indices);
|
58
|
-
this.setAttribute("position", new
|
59
|
-
this.setAttribute("normal", new
|
60
|
-
this.setAttribute("uv", new
|
56
|
+
this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
57
|
+
this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
|
58
|
+
this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
61
59
|
}
|
62
60
|
}
|
63
|
-
|
61
|
+
export {
|
62
|
+
ParametricGeometry
|
63
|
+
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
const tempNormal = /* @__PURE__ */ new THREE.Vector3();
|
3
5
|
function getUv(faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength) {
|
4
6
|
const totArcLength = 2 * Math.PI * radius / 4;
|
5
7
|
const centerLength = Math.max(sideLength - 2 * radius, 0);
|
@@ -16,7 +18,7 @@ function getUv(faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength
|
|
16
18
|
return lenUv + arcUvRatio + arcUvRatio * (1 - arcAngleRatio);
|
17
19
|
}
|
18
20
|
}
|
19
|
-
class RoundedBoxGeometry extends BoxGeometry {
|
21
|
+
class RoundedBoxGeometry extends THREE.BoxGeometry {
|
20
22
|
constructor(width = 1, height = 1, depth = 1, segments = 2, radius = 0.1) {
|
21
23
|
segments = segments * 2 + 1;
|
22
24
|
radius = Math.min(width / 2, height / 2, depth / 2, radius);
|
@@ -28,14 +30,14 @@ class RoundedBoxGeometry extends BoxGeometry {
|
|
28
30
|
this.attributes.position = geometry2.attributes.position;
|
29
31
|
this.attributes.normal = geometry2.attributes.normal;
|
30
32
|
this.attributes.uv = geometry2.attributes.uv;
|
31
|
-
const position = new Vector3();
|
32
|
-
const normal = new Vector3();
|
33
|
-
const box = new Vector3(width, height, depth).divideScalar(2).subScalar(radius);
|
33
|
+
const position = new THREE.Vector3();
|
34
|
+
const normal = new THREE.Vector3();
|
35
|
+
const box = new THREE.Vector3(width, height, depth).divideScalar(2).subScalar(radius);
|
34
36
|
const positions = this.attributes.position.array;
|
35
37
|
const normals = this.attributes.normal.array;
|
36
38
|
const uvs = this.attributes.uv.array;
|
37
39
|
const faceTris = positions.length / 6;
|
38
|
-
const faceDirVector = new Vector3();
|
40
|
+
const faceDirVector = new THREE.Vector3();
|
39
41
|
const halfSegmentSize = 0.5 / segments;
|
40
42
|
for (let i = 0, j = 0; i < positions.length; i += 3, j += 2) {
|
41
43
|
position.fromArray(positions, i);
|
@@ -86,6 +88,4 @@ class RoundedBoxGeometry extends BoxGeometry {
|
|
86
88
|
}
|
87
89
|
}
|
88
90
|
}
|
89
|
-
|
90
|
-
RoundedBoxGeometry
|
91
|
-
};
|
91
|
+
exports.RoundedBoxGeometry = RoundedBoxGeometry;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
const tempNormal = /* @__PURE__ */ new THREE.Vector3();
|
1
|
+
import { Vector3, BoxGeometry } from "three";
|
2
|
+
const tempNormal = /* @__PURE__ */ new Vector3();
|
5
3
|
function getUv(faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength) {
|
6
4
|
const totArcLength = 2 * Math.PI * radius / 4;
|
7
5
|
const centerLength = Math.max(sideLength - 2 * radius, 0);
|
@@ -18,7 +16,7 @@ function getUv(faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength
|
|
18
16
|
return lenUv + arcUvRatio + arcUvRatio * (1 - arcAngleRatio);
|
19
17
|
}
|
20
18
|
}
|
21
|
-
class RoundedBoxGeometry extends
|
19
|
+
class RoundedBoxGeometry extends BoxGeometry {
|
22
20
|
constructor(width = 1, height = 1, depth = 1, segments = 2, radius = 0.1) {
|
23
21
|
segments = segments * 2 + 1;
|
24
22
|
radius = Math.min(width / 2, height / 2, depth / 2, radius);
|
@@ -30,14 +28,14 @@ class RoundedBoxGeometry extends THREE.BoxGeometry {
|
|
30
28
|
this.attributes.position = geometry2.attributes.position;
|
31
29
|
this.attributes.normal = geometry2.attributes.normal;
|
32
30
|
this.attributes.uv = geometry2.attributes.uv;
|
33
|
-
const position = new
|
34
|
-
const normal = new
|
35
|
-
const box = new
|
31
|
+
const position = new Vector3();
|
32
|
+
const normal = new Vector3();
|
33
|
+
const box = new Vector3(width, height, depth).divideScalar(2).subScalar(radius);
|
36
34
|
const positions = this.attributes.position.array;
|
37
35
|
const normals = this.attributes.normal.array;
|
38
36
|
const uvs = this.attributes.uv.array;
|
39
37
|
const faceTris = positions.length / 6;
|
40
|
-
const faceDirVector = new
|
38
|
+
const faceDirVector = new Vector3();
|
41
39
|
const halfSegmentSize = 0.5 / segments;
|
42
40
|
for (let i = 0, j = 0; i < positions.length; i += 3, j += 2) {
|
43
41
|
position.fromArray(positions, i);
|
@@ -88,4 +86,6 @@ class RoundedBoxGeometry extends THREE.BoxGeometry {
|
|
88
86
|
}
|
89
87
|
}
|
90
88
|
}
|
91
|
-
|
89
|
+
export {
|
90
|
+
RoundedBoxGeometry
|
91
|
+
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class TeapotGeometry extends THREE.BufferGeometry {
|
3
5
|
constructor(size, segments, bottom, lid, body, fitLid, blinn) {
|
4
6
|
const teapotPatches = [
|
5
7
|
/*rim*/
|
@@ -1416,7 +1418,7 @@ class TeapotGeometry extends BufferGeometry {
|
|
1416
1418
|
const vertices = new Float32Array(numVertices * 3);
|
1417
1419
|
const normals = new Float32Array(numVertices * 3);
|
1418
1420
|
const uvs = new Float32Array(numVertices * 2);
|
1419
|
-
const ms = new Matrix4();
|
1421
|
+
const ms = new THREE.Matrix4();
|
1420
1422
|
ms.set(-1, 3, -3, 1, 3, -6, 3, 0, -3, 3, 0, 0, 1, 0, 0, 0);
|
1421
1423
|
const g = [];
|
1422
1424
|
let i, r, c;
|
@@ -1428,28 +1430,28 @@ class TeapotGeometry extends BufferGeometry {
|
|
1428
1430
|
const vert = [];
|
1429
1431
|
const sdir = [];
|
1430
1432
|
const tdir = [];
|
1431
|
-
const norm = new Vector3();
|
1433
|
+
const norm = new THREE.Vector3();
|
1432
1434
|
let tcoord;
|
1433
1435
|
let sstep, tstep;
|
1434
1436
|
let vertPerRow;
|
1435
1437
|
let s, t, sval, tval, p;
|
1436
1438
|
let dsval = 0;
|
1437
1439
|
let dtval = 0;
|
1438
|
-
const normOut = new Vector3();
|
1440
|
+
const normOut = new THREE.Vector3();
|
1439
1441
|
let v1, v2, v3, v4;
|
1440
|
-
const gmx = new Matrix4();
|
1441
|
-
const tmtx = new Matrix4();
|
1442
|
-
const vsp = new Vector4();
|
1443
|
-
const vtp = new Vector4();
|
1444
|
-
const vdsp = new Vector4();
|
1445
|
-
const vdtp = new Vector4();
|
1446
|
-
const vsdir = new Vector3();
|
1447
|
-
const vtdir = new Vector3();
|
1442
|
+
const gmx = new THREE.Matrix4();
|
1443
|
+
const tmtx = new THREE.Matrix4();
|
1444
|
+
const vsp = new THREE.Vector4();
|
1445
|
+
const vtp = new THREE.Vector4();
|
1446
|
+
const vdsp = new THREE.Vector4();
|
1447
|
+
const vdtp = new THREE.Vector4();
|
1448
|
+
const vsdir = new THREE.Vector3();
|
1449
|
+
const vtdir = new THREE.Vector3();
|
1448
1450
|
const mst = ms.clone();
|
1449
1451
|
mst.transpose();
|
1450
1452
|
const notDegenerate = (vtx1, vtx2, vtx3) => !(vertices[vtx1 * 3] === vertices[vtx2 * 3] && vertices[vtx1 * 3 + 1] === vertices[vtx2 * 3 + 1] && vertices[vtx1 * 3 + 2] === vertices[vtx2 * 3 + 2] || vertices[vtx1 * 3] === vertices[vtx3 * 3] && vertices[vtx1 * 3 + 1] === vertices[vtx3 * 3 + 1] && vertices[vtx1 * 3 + 2] === vertices[vtx3 * 3 + 2] || vertices[vtx2 * 3] === vertices[vtx3 * 3] && vertices[vtx2 * 3 + 1] === vertices[vtx3 * 3 + 1] && vertices[vtx2 * 3 + 2] === vertices[vtx3 * 3 + 2]);
|
1451
1453
|
for (i = 0; i < 3; i++) {
|
1452
|
-
mgm[i] = new Matrix4();
|
1454
|
+
mgm[i] = new THREE.Matrix4();
|
1453
1455
|
}
|
1454
1456
|
const minPatches = body ? 0 : 20;
|
1455
1457
|
const maxPatches = bottom ? 32 : 28;
|
@@ -1551,13 +1553,11 @@ class TeapotGeometry extends BufferGeometry {
|
|
1551
1553
|
surfCount++;
|
1552
1554
|
}
|
1553
1555
|
}
|
1554
|
-
this.setIndex(new BufferAttribute(indices, 1));
|
1555
|
-
this.setAttribute("position", new BufferAttribute(vertices, 3));
|
1556
|
-
this.setAttribute("normal", new BufferAttribute(normals, 3));
|
1557
|
-
this.setAttribute("uv", new BufferAttribute(uvs, 2));
|
1556
|
+
this.setIndex(new THREE.BufferAttribute(indices, 1));
|
1557
|
+
this.setAttribute("position", new THREE.BufferAttribute(vertices, 3));
|
1558
|
+
this.setAttribute("normal", new THREE.BufferAttribute(normals, 3));
|
1559
|
+
this.setAttribute("uv", new THREE.BufferAttribute(uvs, 2));
|
1558
1560
|
this.computeBoundingSphere();
|
1559
1561
|
}
|
1560
1562
|
}
|
1561
|
-
|
1562
|
-
TeapotGeometry
|
1563
|
-
};
|
1563
|
+
exports.TeapotGeometry = TeapotGeometry;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class TeapotGeometry extends THREE.BufferGeometry {
|
1
|
+
import { BufferGeometry, Matrix4, Vector3, Vector4, BufferAttribute } from "three";
|
2
|
+
class TeapotGeometry extends BufferGeometry {
|
5
3
|
constructor(size, segments, bottom, lid, body, fitLid, blinn) {
|
6
4
|
const teapotPatches = [
|
7
5
|
/*rim*/
|
@@ -1418,7 +1416,7 @@ class TeapotGeometry extends THREE.BufferGeometry {
|
|
1418
1416
|
const vertices = new Float32Array(numVertices * 3);
|
1419
1417
|
const normals = new Float32Array(numVertices * 3);
|
1420
1418
|
const uvs = new Float32Array(numVertices * 2);
|
1421
|
-
const ms = new
|
1419
|
+
const ms = new Matrix4();
|
1422
1420
|
ms.set(-1, 3, -3, 1, 3, -6, 3, 0, -3, 3, 0, 0, 1, 0, 0, 0);
|
1423
1421
|
const g = [];
|
1424
1422
|
let i, r, c;
|
@@ -1430,28 +1428,28 @@ class TeapotGeometry extends THREE.BufferGeometry {
|
|
1430
1428
|
const vert = [];
|
1431
1429
|
const sdir = [];
|
1432
1430
|
const tdir = [];
|
1433
|
-
const norm = new
|
1431
|
+
const norm = new Vector3();
|
1434
1432
|
let tcoord;
|
1435
1433
|
let sstep, tstep;
|
1436
1434
|
let vertPerRow;
|
1437
1435
|
let s, t, sval, tval, p;
|
1438
1436
|
let dsval = 0;
|
1439
1437
|
let dtval = 0;
|
1440
|
-
const normOut = new
|
1438
|
+
const normOut = new Vector3();
|
1441
1439
|
let v1, v2, v3, v4;
|
1442
|
-
const gmx = new
|
1443
|
-
const tmtx = new
|
1444
|
-
const vsp = new
|
1445
|
-
const vtp = new
|
1446
|
-
const vdsp = new
|
1447
|
-
const vdtp = new
|
1448
|
-
const vsdir = new
|
1449
|
-
const vtdir = new
|
1440
|
+
const gmx = new Matrix4();
|
1441
|
+
const tmtx = new Matrix4();
|
1442
|
+
const vsp = new Vector4();
|
1443
|
+
const vtp = new Vector4();
|
1444
|
+
const vdsp = new Vector4();
|
1445
|
+
const vdtp = new Vector4();
|
1446
|
+
const vsdir = new Vector3();
|
1447
|
+
const vtdir = new Vector3();
|
1450
1448
|
const mst = ms.clone();
|
1451
1449
|
mst.transpose();
|
1452
1450
|
const notDegenerate = (vtx1, vtx2, vtx3) => !(vertices[vtx1 * 3] === vertices[vtx2 * 3] && vertices[vtx1 * 3 + 1] === vertices[vtx2 * 3 + 1] && vertices[vtx1 * 3 + 2] === vertices[vtx2 * 3 + 2] || vertices[vtx1 * 3] === vertices[vtx3 * 3] && vertices[vtx1 * 3 + 1] === vertices[vtx3 * 3 + 1] && vertices[vtx1 * 3 + 2] === vertices[vtx3 * 3 + 2] || vertices[vtx2 * 3] === vertices[vtx3 * 3] && vertices[vtx2 * 3 + 1] === vertices[vtx3 * 3 + 1] && vertices[vtx2 * 3 + 2] === vertices[vtx3 * 3 + 2]);
|
1453
1451
|
for (i = 0; i < 3; i++) {
|
1454
|
-
mgm[i] = new
|
1452
|
+
mgm[i] = new Matrix4();
|
1455
1453
|
}
|
1456
1454
|
const minPatches = body ? 0 : 20;
|
1457
1455
|
const maxPatches = bottom ? 32 : 28;
|
@@ -1553,11 +1551,13 @@ class TeapotGeometry extends THREE.BufferGeometry {
|
|
1553
1551
|
surfCount++;
|
1554
1552
|
}
|
1555
1553
|
}
|
1556
|
-
this.setIndex(new
|
1557
|
-
this.setAttribute("position", new
|
1558
|
-
this.setAttribute("normal", new
|
1559
|
-
this.setAttribute("uv", new
|
1554
|
+
this.setIndex(new BufferAttribute(indices, 1));
|
1555
|
+
this.setAttribute("position", new BufferAttribute(vertices, 3));
|
1556
|
+
this.setAttribute("normal", new BufferAttribute(normals, 3));
|
1557
|
+
this.setAttribute("uv", new BufferAttribute(uvs, 2));
|
1560
1558
|
this.computeBoundingSphere();
|
1561
1559
|
}
|
1562
1560
|
}
|
1563
|
-
|
1561
|
+
export {
|
1562
|
+
TeapotGeometry
|
1563
|
+
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class TextGeometry extends THREE.ExtrudeGeometry {
|
3
5
|
constructor(text, parameters = {}) {
|
4
6
|
const {
|
5
7
|
bevelEnabled = false,
|
@@ -21,7 +23,5 @@ class TextGeometry extends ExtrudeGeometry {
|
|
21
23
|
this.type = "TextGeometry";
|
22
24
|
}
|
23
25
|
}
|
24
|
-
|
25
|
-
|
26
|
-
TextGeometry
|
27
|
-
};
|
26
|
+
exports.TextBufferGeometry = TextGeometry;
|
27
|
+
exports.TextGeometry = TextGeometry;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class TextGeometry extends THREE.ExtrudeGeometry {
|
1
|
+
import { ExtrudeGeometry } from "three";
|
2
|
+
class TextGeometry extends ExtrudeGeometry {
|
5
3
|
constructor(text, parameters = {}) {
|
6
4
|
const {
|
7
5
|
bevelEnabled = false,
|
@@ -23,5 +21,7 @@ class TextGeometry extends THREE.ExtrudeGeometry {
|
|
23
21
|
this.type = "TextGeometry";
|
24
22
|
}
|
25
23
|
}
|
26
|
-
|
27
|
-
|
24
|
+
export {
|
25
|
+
TextGeometry as TextBufferGeometry,
|
26
|
+
TextGeometry
|
27
|
+
};
|