three-stdlib 2.23.0 → 2.23.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_polyfill/CompressedArrayTexture.cjs +12 -0
- package/dist/_polyfill/CompressedArrayTexture.js +6 -6
- package/dist/_polyfill/Data3DTexture.cjs +17 -0
- package/dist/_polyfill/Data3DTexture.js +8 -8
- package/dist/animation/{AnimationClipCreator.mjs → AnimationClipCreator.cjs} +18 -18
- package/dist/animation/AnimationClipCreator.js +18 -18
- package/dist/animation/{CCDIKSolver.mjs → CCDIKSolver.cjs} +32 -32
- package/dist/animation/CCDIKSolver.js +32 -32
- package/dist/animation/{MMDAnimationHelper.mjs → MMDAnimationHelper.cjs} +17 -17
- package/dist/animation/MMDAnimationHelper.js +17 -17
- package/dist/animation/{MMDPhysics.mjs → MMDPhysics.cjs} +25 -25
- package/dist/animation/MMDPhysics.js +25 -25
- package/dist/cameras/{CinematicCamera.mjs → CinematicCamera.cjs} +17 -17
- package/dist/cameras/CinematicCamera.js +17 -17
- package/dist/controls/{ArcballControls.mjs → ArcballControls.cjs} +102 -102
- package/dist/controls/ArcballControls.js +102 -102
- package/dist/controls/{DeviceOrientationControls.mjs → DeviceOrientationControls.cjs} +14 -14
- package/dist/controls/DeviceOrientationControls.js +14 -14
- package/dist/controls/{DragControls.mjs → DragControls.cjs} +12 -12
- package/dist/controls/DragControls.js +12 -12
- package/dist/controls/{FirstPersonControls.mjs → FirstPersonControls.cjs} +16 -16
- package/dist/controls/FirstPersonControls.js +16 -16
- package/dist/controls/{FlyControls.mjs → FlyControls.cjs} +10 -10
- package/dist/controls/FlyControls.js +10 -10
- package/dist/controls/{OrbitControls.mjs → OrbitControls.cjs} +52 -54
- package/dist/controls/OrbitControls.d.ts +4 -4
- package/dist/controls/OrbitControls.js +52 -54
- package/dist/controls/{PointerLockControls.mjs → PointerLockControls.cjs} +8 -8
- package/dist/controls/PointerLockControls.js +8 -8
- package/dist/controls/{TrackballControls.mjs → TrackballControls.cjs} +32 -32
- package/dist/controls/TrackballControls.js +32 -32
- package/dist/controls/{TransformControls.mjs → TransformControls.cjs} +169 -169
- package/dist/controls/TransformControls.js +169 -169
- package/dist/controls/experimental/{CameraControls.mjs → CameraControls.cjs} +59 -59
- package/dist/controls/experimental/CameraControls.js +59 -59
- package/dist/csm/{CSM.mjs → CSM.cjs} +17 -17
- package/dist/csm/CSM.js +17 -17
- package/dist/csm/{CSMFrustum.mjs → CSMFrustum.cjs} +7 -7
- package/dist/csm/CSMFrustum.js +7 -7
- package/dist/csm/{CSMHelper.mjs → CSMHelper.cjs} +14 -14
- package/dist/csm/CSMHelper.js +14 -14
- package/dist/csm/{CSMShader.mjs → CSMShader.cjs} +5 -5
- package/dist/csm/CSMShader.js +5 -5
- package/dist/curves/{CurveExtras.mjs → CurveExtras.cjs} +45 -45
- package/dist/curves/CurveExtras.js +45 -45
- package/dist/curves/{NURBSCurve.mjs → NURBSCurve.cjs} +11 -11
- package/dist/curves/NURBSCurve.js +11 -11
- package/dist/curves/{NURBSSurface.mjs → NURBSSurface.cjs} +7 -7
- package/dist/curves/NURBSSurface.js +7 -7
- package/dist/curves/{NURBSUtils.mjs → NURBSUtils.cjs} +17 -17
- package/dist/curves/NURBSUtils.js +17 -17
- package/dist/deprecated/{Geometry.mjs → Geometry.cjs} +51 -51
- package/dist/deprecated/Geometry.js +51 -51
- package/dist/effects/{AnaglyphEffect.mjs → AnaglyphEffect.cjs} +14 -14
- package/dist/effects/AnaglyphEffect.js +14 -14
- package/dist/effects/{AsciiEffect.mjs → AsciiEffect.cjs} +3 -3
- package/dist/effects/AsciiEffect.js +3 -3
- package/dist/effects/{OutlineEffect.mjs → OutlineEffect.cjs} +8 -8
- package/dist/effects/OutlineEffect.js +8 -8
- package/dist/effects/{ParallaxBarrierEffect.mjs → ParallaxBarrierEffect.cjs} +12 -12
- package/dist/effects/ParallaxBarrierEffect.js +12 -12
- package/dist/effects/{PeppersGhostEffect.mjs → PeppersGhostEffect.cjs} +11 -11
- package/dist/effects/PeppersGhostEffect.js +11 -11
- package/dist/effects/{StereoEffect.mjs → StereoEffect.cjs} +6 -6
- package/dist/effects/StereoEffect.js +6 -6
- package/dist/environments/RoomEnvironment.cjs +95 -0
- package/dist/environments/RoomEnvironment.js +23 -40
- package/dist/exporters/{ColladaExporter.mjs → ColladaExporter.cjs} +16 -16
- package/dist/exporters/ColladaExporter.js +16 -16
- package/dist/exporters/{DRACOExporter.mjs → DRACOExporter.cjs} +8 -8
- package/dist/exporters/DRACOExporter.js +8 -8
- package/dist/exporters/{GLTFExporter.mjs → GLTFExporter.cjs} +47 -47
- package/dist/exporters/GLTFExporter.js +47 -47
- package/dist/exporters/{MMDExporter.mjs → MMDExporter.cjs} +10 -10
- package/dist/exporters/MMDExporter.js +10 -10
- package/dist/exporters/{OBJExporter.mjs → OBJExporter.cjs} +13 -13
- package/dist/exporters/OBJExporter.js +13 -13
- package/dist/exporters/{PLYExporter.mjs → PLYExporter.cjs} +8 -8
- package/dist/exporters/PLYExporter.js +8 -8
- package/dist/exporters/{STLExporter.mjs → STLExporter.cjs} +12 -12
- package/dist/exporters/STLExporter.js +12 -12
- package/dist/exporters/{USDZExporter.mjs → USDZExporter.cjs} +10 -10
- package/dist/exporters/USDZExporter.js +10 -10
- package/dist/geometries/{BoxLineGeometry.mjs → BoxLineGeometry.cjs} +6 -6
- package/dist/geometries/BoxLineGeometry.js +6 -6
- package/dist/geometries/ConvexGeometry.cjs +26 -0
- package/dist/geometries/ConvexGeometry.js +9 -9
- package/dist/geometries/{DecalGeometry.mjs → DecalGeometry.cjs} +16 -16
- package/dist/geometries/DecalGeometry.js +16 -16
- package/dist/geometries/{LightningStrike.mjs → LightningStrike.cjs} +45 -45
- package/dist/geometries/LightningStrike.js +45 -45
- package/dist/geometries/{ParametricGeometries.mjs → ParametricGeometries.cjs} +11 -11
- package/dist/geometries/ParametricGeometries.js +11 -11
- package/dist/geometries/{ParametricGeometry.mjs → ParametricGeometry.cjs} +11 -11
- package/dist/geometries/ParametricGeometry.js +11 -11
- package/dist/geometries/{RoundedBoxGeometry.mjs → RoundedBoxGeometry.cjs} +10 -10
- package/dist/geometries/RoundedBoxGeometry.js +10 -10
- package/dist/geometries/{TeapotGeometry.mjs → TeapotGeometry.cjs} +21 -21
- package/dist/geometries/TeapotGeometry.js +21 -21
- package/dist/geometries/{TextGeometry.mjs → TextGeometry.cjs} +6 -6
- package/dist/geometries/TextGeometry.js +6 -6
- package/dist/helpers/{LightProbeHelper.mjs → LightProbeHelper.cjs} +7 -7
- package/dist/helpers/LightProbeHelper.js +7 -7
- package/dist/helpers/{PositionalAudioHelper.mjs → PositionalAudioHelper.cjs} +11 -11
- package/dist/helpers/PositionalAudioHelper.js +11 -11
- package/dist/helpers/{RectAreaLightHelper.mjs → RectAreaLightHelper.cjs} +11 -11
- package/dist/helpers/RectAreaLightHelper.js +11 -11
- package/dist/helpers/{VertexNormalsHelper.mjs → VertexNormalsHelper.cjs} +11 -11
- package/dist/helpers/VertexNormalsHelper.js +11 -11
- package/dist/helpers/{VertexTangentsHelper.mjs → VertexTangentsHelper.cjs} +10 -10
- package/dist/helpers/VertexTangentsHelper.js +10 -10
- package/dist/index.cjs +613 -0
- package/dist/index.js +613 -613
- package/dist/interactive/{HTMLMesh.mjs → HTMLMesh.cjs} +11 -11
- package/dist/interactive/HTMLMesh.js +11 -11
- package/dist/interactive/{InteractiveGroup.mjs → InteractiveGroup.cjs} +8 -8
- package/dist/interactive/InteractiveGroup.js +8 -8
- package/dist/interactive/{SelectionBox.mjs → SelectionBox.cjs} +21 -21
- package/dist/interactive/SelectionBox.js +21 -21
- package/dist/interactive/{SelectionHelper.mjs → SelectionHelper.cjs} +7 -7
- package/dist/interactive/SelectionHelper.js +7 -7
- package/dist/libs/{MeshoptDecoder.mjs → MeshoptDecoder.cjs} +3 -3
- package/dist/libs/MeshoptDecoder.js +3 -3
- package/dist/libs/{MotionControllers.mjs → MotionControllers.cjs} +6 -6
- package/dist/libs/MotionControllers.js +6 -6
- package/dist/lights/{LightProbeGenerator.mjs → LightProbeGenerator.cjs} +16 -16
- package/dist/lights/LightProbeGenerator.js +16 -16
- package/dist/lights/{RectAreaLightUniformsLib.mjs → RectAreaLightUniformsLib.cjs} +42 -42
- package/dist/lights/RectAreaLightUniformsLib.js +42 -42
- package/dist/lines/Line2.cjs +13 -0
- package/dist/lines/Line2.js +8 -8
- package/dist/lines/{LineGeometry.mjs → LineGeometry.cjs} +5 -5
- package/dist/lines/LineGeometry.js +5 -5
- package/dist/lines/{LineMaterial.mjs → LineMaterial.cjs} +10 -10
- package/dist/lines/LineMaterial.js +10 -10
- package/dist/lines/{LineSegments2.mjs → LineSegments2.cjs} +28 -28
- package/dist/lines/LineSegments2.js +28 -28
- package/dist/lines/{LineSegmentsGeometry.mjs → LineSegmentsGeometry.cjs} +18 -18
- package/dist/lines/LineSegmentsGeometry.js +18 -18
- package/dist/lines/Wireframe.cjs +32 -0
- package/dist/lines/Wireframe.js +13 -13
- package/dist/lines/WireframeGeometry2.cjs +13 -0
- package/dist/lines/WireframeGeometry2.js +7 -7
- package/dist/loaders/{3DMLoader.mjs → 3DMLoader.cjs} +37 -37
- package/dist/loaders/3DMLoader.js +37 -37
- package/dist/loaders/{3MFLoader.mjs → 3MFLoader.cjs} +53 -53
- package/dist/loaders/3MFLoader.js +53 -53
- package/dist/loaders/{AMFLoader.mjs → AMFLoader.cjs} +19 -19
- package/dist/loaders/AMFLoader.js +19 -19
- package/dist/loaders/{AssimpLoader.mjs → AssimpLoader.cjs} +41 -41
- package/dist/loaders/AssimpLoader.js +41 -41
- package/dist/loaders/{BVHLoader.mjs → BVHLoader.cjs} +18 -18
- package/dist/loaders/BVHLoader.js +18 -18
- package/dist/loaders/{BasisTextureLoader.mjs → BasisTextureLoader.cjs} +22 -22
- package/dist/loaders/BasisTextureLoader.js +22 -22
- package/dist/loaders/{ColladaLoader.mjs → ColladaLoader.cjs} +76 -76
- package/dist/loaders/ColladaLoader.js +76 -76
- package/dist/loaders/{DDSLoader.mjs → DDSLoader.cjs} +10 -10
- package/dist/loaders/DDSLoader.js +10 -10
- package/dist/loaders/{DRACOLoader.mjs → DRACOLoader.cjs} +12 -12
- package/dist/loaders/DRACOLoader.js +12 -12
- package/dist/loaders/{EXRLoader.mjs → EXRLoader.cjs} +23 -23
- package/dist/loaders/EXRLoader.js +23 -23
- package/dist/loaders/{FBXLoader.mjs → FBXLoader.cjs} +116 -116
- package/dist/loaders/FBXLoader.js +116 -116
- package/dist/loaders/{FontLoader.mjs → FontLoader.cjs} +9 -9
- package/dist/loaders/FontLoader.js +9 -9
- package/dist/loaders/{GCodeLoader.mjs → GCodeLoader.cjs} +13 -13
- package/dist/loaders/GCodeLoader.js +13 -13
- package/dist/loaders/{GLTFLoader.mjs → GLTFLoader.cjs} +112 -112
- package/dist/loaders/GLTFLoader.js +112 -112
- package/dist/loaders/{HDRCubeTextureLoader.mjs → HDRCubeTextureLoader.cjs} +15 -15
- package/dist/loaders/HDRCubeTextureLoader.js +15 -15
- package/dist/loaders/{KMZLoader.mjs → KMZLoader.cjs} +13 -13
- package/dist/loaders/KMZLoader.js +13 -13
- package/dist/loaders/{KTX2Loader.mjs → KTX2Loader.cjs} +65 -65
- package/dist/loaders/KTX2Loader.js +65 -65
- package/dist/loaders/{KTXLoader.mjs → KTXLoader.cjs} +5 -5
- package/dist/loaders/KTXLoader.js +5 -5
- package/dist/loaders/{LDrawLoader.mjs → LDrawLoader.cjs} +39 -39
- package/dist/loaders/LDrawLoader.js +39 -39
- package/dist/loaders/{LUT3dlLoader.mjs → LUT3dlLoader.cjs} +22 -22
- package/dist/loaders/LUT3dlLoader.js +22 -22
- package/dist/loaders/{LUTCubeLoader.mjs → LUTCubeLoader.cjs} +22 -22
- package/dist/loaders/LUTCubeLoader.js +22 -22
- package/dist/loaders/{LWOLoader.mjs → LWOLoader.cjs} +42 -42
- package/dist/loaders/LWOLoader.js +42 -42
- package/dist/loaders/{LottieLoader.mjs → LottieLoader.cjs} +8 -8
- package/dist/loaders/LottieLoader.js +8 -8
- package/dist/loaders/{MD2Loader.mjs → MD2Loader.cjs} +15 -15
- package/dist/loaders/MD2Loader.js +15 -15
- package/dist/loaders/{MDDLoader.mjs → MDDLoader.cjs} +9 -9
- package/dist/loaders/MDDLoader.js +9 -9
- package/dist/loaders/{MMDLoader.mjs → MMDLoader.cjs} +59 -59
- package/dist/loaders/MMDLoader.js +59 -59
- package/dist/loaders/{MTLLoader.mjs → MTLLoader.cjs} +17 -17
- package/dist/loaders/MTLLoader.js +17 -17
- package/dist/loaders/{NRRDLoader.mjs → NRRDLoader.cjs} +17 -17
- package/dist/loaders/NRRDLoader.js +17 -17
- package/dist/loaders/{OBJLoader.mjs → OBJLoader.cjs} +37 -37
- package/dist/loaders/OBJLoader.js +37 -37
- package/dist/loaders/{PCDLoader.mjs → PCDLoader.cjs} +13 -13
- package/dist/loaders/PCDLoader.js +13 -13
- package/dist/loaders/{PDBLoader.mjs → PDBLoader.cjs} +11 -11
- package/dist/loaders/PDBLoader.js +11 -11
- package/dist/loaders/{PLYLoader.mjs → PLYLoader.cjs} +13 -13
- package/dist/loaders/PLYLoader.js +13 -13
- package/dist/loaders/{PRWMLoader.mjs → PRWMLoader.cjs} +9 -9
- package/dist/loaders/PRWMLoader.js +9 -9
- package/dist/loaders/{PVRLoader.mjs → PVRLoader.cjs} +11 -11
- package/dist/loaders/PVRLoader.js +11 -11
- package/dist/loaders/{RGBELoader.mjs → RGBELoader.cjs} +18 -18
- package/dist/loaders/RGBELoader.js +18 -18
- package/dist/loaders/{RGBMLoader.mjs → RGBMLoader.cjs} +16 -16
- package/dist/loaders/RGBMLoader.js +16 -16
- package/dist/loaders/{STLLoader.mjs → STLLoader.cjs} +15 -15
- package/dist/loaders/STLLoader.js +15 -15
- package/dist/loaders/{SVGLoader.mjs → SVGLoader.cjs} +55 -55
- package/dist/loaders/SVGLoader.js +55 -55
- package/dist/loaders/{TDSLoader.mjs → TDSLoader.cjs} +20 -20
- package/dist/loaders/TDSLoader.js +20 -20
- package/dist/loaders/{TGALoader.mjs → TGALoader.cjs} +6 -6
- package/dist/loaders/TGALoader.js +6 -6
- package/dist/loaders/{TTFLoader.mjs → TTFLoader.cjs} +9 -9
- package/dist/loaders/TTFLoader.js +9 -9
- package/dist/loaders/{TiltLoader.mjs → TiltLoader.cjs} +26 -26
- package/dist/loaders/TiltLoader.js +26 -26
- package/dist/loaders/{VOXLoader.mjs → VOXLoader.cjs} +18 -18
- package/dist/loaders/VOXLoader.js +18 -18
- package/dist/loaders/{VRMLLoader.mjs → VRMLLoader.cjs} +125 -125
- package/dist/loaders/VRMLLoader.js +125 -125
- package/dist/loaders/{VRMLoader.mjs → VRMLoader.cjs} +7 -7
- package/dist/loaders/VRMLoader.js +7 -7
- package/dist/loaders/{VTKLoader.mjs → VTKLoader.cjs} +24 -24
- package/dist/loaders/VTKLoader.js +24 -24
- package/dist/loaders/{XLoader.mjs → XLoader.cjs} +42 -42
- package/dist/loaders/XLoader.js +42 -42
- package/dist/loaders/{XYZLoader.mjs → XYZLoader.cjs} +9 -9
- package/dist/loaders/XYZLoader.js +9 -9
- package/dist/loaders/lwo/{IFFParser.mjs → IFFParser.cjs} +7 -7
- package/dist/loaders/lwo/IFFParser.js +7 -7
- package/dist/loaders/lwo/{LWO2Parser.mjs → LWO2Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO2Parser.js +3 -3
- package/dist/loaders/lwo/{LWO3Parser.mjs → LWO3Parser.cjs} +3 -3
- package/dist/loaders/lwo/LWO3Parser.js +3 -3
- package/dist/math/{Capsule.mjs → Capsule.cjs} +8 -8
- package/dist/math/Capsule.js +8 -8
- package/dist/math/{ColorConverter.mjs → ColorConverter.cjs} +7 -7
- package/dist/math/ColorConverter.js +7 -7
- package/dist/math/{ConvexHull.mjs → ConvexHull.cjs} +18 -18
- package/dist/math/ConvexHull.js +18 -18
- package/dist/math/{ImprovedNoise.mjs → ImprovedNoise.cjs} +3 -3
- package/dist/math/ImprovedNoise.js +3 -3
- package/dist/math/{Lut.mjs → Lut.cjs} +14 -14
- package/dist/math/Lut.js +14 -14
- package/dist/math/{MeshSurfaceSampler.mjs → MeshSurfaceSampler.cjs} +6 -6
- package/dist/math/MeshSurfaceSampler.js +6 -6
- package/dist/math/{OBB.mjs → OBB.cjs} +21 -21
- package/dist/math/OBB.js +21 -21
- package/dist/math/{Octree.mjs → Octree.cjs} +19 -19
- package/dist/math/Octree.js +19 -19
- package/dist/math/{SimplexNoise.mjs → SimplexNoise.cjs} +3 -3
- package/dist/math/SimplexNoise.js +3 -3
- package/dist/misc/{ConvexObjectBreaker.mjs → ConvexObjectBreaker.cjs} +25 -25
- package/dist/misc/ConvexObjectBreaker.js +25 -25
- package/dist/misc/{GPUComputationRenderer.mjs → GPUComputationRenderer.cjs} +19 -19
- package/dist/misc/GPUComputationRenderer.js +19 -19
- package/dist/misc/{Gyroscope.mjs → Gyroscope.cjs} +11 -11
- package/dist/misc/Gyroscope.js +11 -11
- package/dist/misc/{MD2Character.mjs → MD2Character.cjs} +14 -14
- package/dist/misc/MD2Character.js +14 -14
- package/dist/misc/{MD2CharacterComplex.mjs → MD2CharacterComplex.cjs} +20 -20
- package/dist/misc/MD2CharacterComplex.js +20 -20
- package/dist/misc/{MorphAnimMesh.mjs → MorphAnimMesh.cjs} +8 -8
- package/dist/misc/MorphAnimMesh.js +8 -8
- package/dist/misc/{MorphBlendMesh.mjs → MorphBlendMesh.cjs} +6 -6
- package/dist/misc/MorphBlendMesh.js +6 -6
- package/dist/misc/{ProgressiveLightmap.mjs → ProgressiveLightmap.cjs} +17 -17
- package/dist/misc/ProgressiveLightmap.js +17 -17
- package/dist/misc/{RollerCoaster.mjs → RollerCoaster.cjs} +77 -77
- package/dist/misc/RollerCoaster.js +77 -77
- package/dist/misc/{Timer.mjs → Timer.cjs} +3 -3
- package/dist/misc/Timer.js +3 -3
- package/dist/misc/{TubePainter.mjs → TubePainter.cjs} +24 -24
- package/dist/misc/TubePainter.js +24 -24
- package/dist/misc/{Volume.mjs → Volume.cjs} +18 -18
- package/dist/misc/Volume.js +18 -18
- package/dist/misc/{VolumeSlice.mjs → VolumeSlice.cjs} +10 -10
- package/dist/misc/VolumeSlice.js +10 -10
- package/dist/misc/{WebGL.mjs → WebGL.cjs} +7 -7
- package/dist/misc/WebGL.js +7 -7
- package/dist/modifiers/{CurveModifier.mjs → CurveModifier.cjs} +17 -17
- package/dist/modifiers/CurveModifier.js +17 -17
- package/dist/modifiers/{EdgeSplitModifier.mjs → EdgeSplitModifier.cjs} +12 -13
- package/dist/modifiers/EdgeSplitModifier.js +13 -12
- package/dist/modifiers/{SimplifyModifier.mjs → SimplifyModifier.cjs} +12 -12
- package/dist/modifiers/SimplifyModifier.js +12 -12
- package/dist/modifiers/{TessellateModifier.mjs → TessellateModifier.cjs} +30 -30
- package/dist/modifiers/TessellateModifier.js +30 -30
- package/dist/objects/{GroundProjectedEnv.mjs → GroundProjectedEnv.cjs} +8 -8
- package/dist/objects/GroundProjectedEnv.js +8 -8
- package/dist/objects/{Lensflare.mjs → Lensflare.cjs} +37 -37
- package/dist/objects/Lensflare.js +37 -37
- package/dist/objects/{LightningStorm.mjs → LightningStorm.cjs} +17 -17
- package/dist/objects/LightningStorm.js +17 -17
- package/dist/objects/{MarchingCubes.mjs → MarchingCubes.cjs} +21 -21
- package/dist/objects/MarchingCubes.js +21 -21
- package/dist/objects/{Reflector.mjs → Reflector.cjs} +23 -23
- package/dist/objects/Reflector.js +23 -23
- package/dist/objects/{ReflectorForSSRPass.mjs → ReflectorForSSRPass.cjs} +33 -33
- package/dist/objects/ReflectorForSSRPass.js +33 -33
- package/dist/objects/ReflectorRTT.cjs +10 -0
- package/dist/objects/ReflectorRTT.js +5 -5
- package/dist/objects/{Refractor.mjs → Refractor.cjs} +26 -26
- package/dist/objects/Refractor.js +26 -26
- package/dist/objects/{ShadowMesh.mjs → ShadowMesh.cjs} +9 -9
- package/dist/objects/ShadowMesh.js +9 -9
- package/dist/objects/{Sky.mjs → Sky.cjs} +11 -11
- package/dist/objects/Sky.js +11 -11
- package/dist/objects/{Water.mjs → Water.cjs} +33 -33
- package/dist/objects/Water.js +33 -33
- package/dist/objects/{Water2.mjs → Water2.cjs} +20 -20
- package/dist/objects/Water2.js +20 -20
- package/dist/physics/{AmmoPhysics.mjs → AmmoPhysics.cjs} +3 -3
- package/dist/physics/AmmoPhysics.js +3 -3
- package/dist/postprocessing/{AdaptiveToneMappingPass.mjs → AdaptiveToneMappingPass.cjs} +32 -32
- package/dist/postprocessing/AdaptiveToneMappingPass.js +32 -32
- package/dist/postprocessing/{AfterimagePass.mjs → AfterimagePass.cjs} +21 -21
- package/dist/postprocessing/AfterimagePass.js +21 -21
- package/dist/postprocessing/{BloomPass.mjs → BloomPass.cjs} +20 -20
- package/dist/postprocessing/BloomPass.js +20 -20
- package/dist/postprocessing/{BokehPass.mjs → BokehPass.cjs} +19 -19
- package/dist/postprocessing/BokehPass.js +19 -19
- package/dist/postprocessing/{ClearPass.mjs → ClearPass.cjs} +7 -7
- package/dist/postprocessing/ClearPass.js +7 -7
- package/dist/postprocessing/{CubeTexturePass.mjs → CubeTexturePass.cjs} +14 -14
- package/dist/postprocessing/CubeTexturePass.js +14 -14
- package/dist/postprocessing/{DotScreenPass.mjs → DotScreenPass.cjs} +12 -12
- package/dist/postprocessing/DotScreenPass.js +12 -12
- package/dist/postprocessing/{EffectComposer.mjs → EffectComposer.cjs} +20 -20
- package/dist/postprocessing/EffectComposer.js +20 -20
- package/dist/postprocessing/{FilmPass.mjs → FilmPass.cjs} +12 -12
- package/dist/postprocessing/FilmPass.js +12 -12
- package/dist/postprocessing/{GlitchPass.mjs → GlitchPass.cjs} +26 -26
- package/dist/postprocessing/GlitchPass.js +26 -26
- package/dist/postprocessing/{HalftonePass.mjs → HalftonePass.cjs} +13 -13
- package/dist/postprocessing/HalftonePass.js +13 -13
- package/dist/postprocessing/{LUTPass.mjs → LUTPass.cjs} +5 -5
- package/dist/postprocessing/LUTPass.js +5 -5
- package/dist/postprocessing/{MaskPass.mjs → MaskPass.cjs} +7 -7
- package/dist/postprocessing/MaskPass.js +7 -7
- package/dist/postprocessing/{OutlinePass.mjs → OutlinePass.cjs} +45 -45
- package/dist/postprocessing/OutlinePass.js +45 -45
- package/dist/postprocessing/{Pass.mjs → Pass.cjs} +8 -8
- package/dist/postprocessing/Pass.js +8 -8
- package/dist/postprocessing/{RenderPass.mjs → RenderPass.cjs} +7 -7
- package/dist/postprocessing/RenderPass.js +7 -7
- package/dist/postprocessing/{RenderPixelatedPass.mjs → RenderPixelatedPass.cjs} +18 -18
- package/dist/postprocessing/RenderPixelatedPass.js +18 -18
- package/dist/postprocessing/{SAOPass.mjs → SAOPass.cjs} +69 -69
- package/dist/postprocessing/SAOPass.js +69 -69
- package/dist/postprocessing/{SMAAPass.mjs → SMAAPass.cjs} +30 -30
- package/dist/postprocessing/SMAAPass.js +30 -30
- package/dist/postprocessing/{SSAARenderPass.mjs → SSAARenderPass.cjs} +19 -19
- package/dist/postprocessing/SSAARenderPass.js +19 -19
- package/dist/postprocessing/{SSAOPass.mjs → SSAOPass.cjs} +63 -63
- package/dist/postprocessing/SSAOPass.js +63 -63
- package/dist/postprocessing/{SSRPass.mjs → SSRPass.cjs} +86 -86
- package/dist/postprocessing/SSRPass.js +86 -86
- package/dist/postprocessing/{SavePass.mjs → SavePass.cjs} +13 -13
- package/dist/postprocessing/SavePass.js +13 -13
- package/dist/postprocessing/{ShaderPass.mjs → ShaderPass.cjs} +10 -10
- package/dist/postprocessing/ShaderPass.js +10 -10
- package/dist/postprocessing/{TAARenderPass.mjs → TAARenderPass.cjs} +8 -8
- package/dist/postprocessing/TAARenderPass.js +8 -8
- package/dist/postprocessing/{TexturePass.mjs → TexturePass.cjs} +11 -11
- package/dist/postprocessing/TexturePass.js +11 -11
- package/dist/postprocessing/{UnrealBloomPass.mjs → UnrealBloomPass.cjs} +36 -36
- package/dist/postprocessing/UnrealBloomPass.js +36 -36
- package/dist/postprocessing/{WaterPass.mjs → WaterPass.cjs} +10 -10
- package/dist/postprocessing/WaterPass.js +10 -10
- package/dist/renderers/{CSS2DRenderer.mjs → CSS2DRenderer.cjs} +12 -12
- package/dist/renderers/CSS2DRenderer.js +12 -12
- package/dist/renderers/{CSS3DRenderer.mjs → CSS3DRenderer.cjs} +12 -12
- package/dist/renderers/CSS3DRenderer.js +12 -12
- package/dist/renderers/{Projector.mjs → Projector.cjs} +21 -21
- package/dist/renderers/Projector.js +21 -21
- package/dist/renderers/{SVGRenderer.mjs → SVGRenderer.cjs} +12 -12
- package/dist/renderers/SVGRenderer.js +12 -12
- package/dist/shaders/{ACESFilmicToneMappingShader.mjs → ACESFilmicToneMappingShader.cjs} +3 -3
- package/dist/shaders/ACESFilmicToneMappingShader.js +3 -3
- package/dist/shaders/{AfterimageShader.mjs → AfterimageShader.cjs} +3 -3
- package/dist/shaders/AfterimageShader.js +3 -3
- package/dist/shaders/{BasicShader.mjs → BasicShader.cjs} +3 -3
- package/dist/shaders/BasicShader.js +3 -3
- package/dist/shaders/{BleachBypassShader.mjs → BleachBypassShader.cjs} +3 -3
- package/dist/shaders/BleachBypassShader.js +3 -3
- package/dist/shaders/{BlendShader.mjs → BlendShader.cjs} +3 -3
- package/dist/shaders/BlendShader.js +3 -3
- package/dist/shaders/{BokehShader.mjs → BokehShader.cjs} +3 -3
- package/dist/shaders/BokehShader.js +3 -3
- package/dist/shaders/{BokehShader2.mjs → BokehShader2.cjs} +6 -6
- package/dist/shaders/BokehShader2.js +6 -6
- package/dist/shaders/{BrightnessContrastShader.mjs → BrightnessContrastShader.cjs} +3 -3
- package/dist/shaders/BrightnessContrastShader.js +3 -3
- package/dist/shaders/{ColorCorrectionShader.mjs → ColorCorrectionShader.cjs} +7 -7
- package/dist/shaders/ColorCorrectionShader.js +7 -7
- package/dist/shaders/{ColorifyShader.mjs → ColorifyShader.cjs} +5 -5
- package/dist/shaders/ColorifyShader.js +5 -5
- package/dist/shaders/{ConvolutionShader.mjs → ConvolutionShader.cjs} +5 -5
- package/dist/shaders/ConvolutionShader.js +5 -5
- package/dist/shaders/{CopyShader.mjs → CopyShader.cjs} +3 -3
- package/dist/shaders/CopyShader.js +3 -3
- package/dist/shaders/{DOFMipMapShader.mjs → DOFMipMapShader.cjs} +3 -3
- package/dist/shaders/DOFMipMapShader.js +3 -3
- package/dist/shaders/{DepthLimitedBlurShader.mjs → DepthLimitedBlurShader.cjs} +7 -7
- package/dist/shaders/DepthLimitedBlurShader.js +7 -7
- package/dist/shaders/{DigitalGlitch.mjs → DigitalGlitch.cjs} +3 -3
- package/dist/shaders/DigitalGlitch.js +3 -3
- package/dist/shaders/{DotScreenShader.mjs → DotScreenShader.cjs} +6 -6
- package/dist/shaders/DotScreenShader.js +6 -6
- package/dist/shaders/{FXAAShader.mjs → FXAAShader.cjs} +5 -5
- package/dist/shaders/FXAAShader.js +5 -5
- package/dist/shaders/{FilmShader.mjs → FilmShader.cjs} +3 -3
- package/dist/shaders/FilmShader.js +3 -3
- package/dist/shaders/{FocusShader.mjs → FocusShader.cjs} +3 -3
- package/dist/shaders/FocusShader.js +3 -3
- package/dist/shaders/{FreiChenShader.mjs → FreiChenShader.cjs} +5 -5
- package/dist/shaders/FreiChenShader.js +5 -5
- package/dist/shaders/{FresnelShader.mjs → FresnelShader.cjs} +3 -3
- package/dist/shaders/FresnelShader.js +3 -3
- package/dist/shaders/{GammaCorrectionShader.mjs → GammaCorrectionShader.cjs} +3 -3
- package/dist/shaders/GammaCorrectionShader.js +3 -3
- package/dist/shaders/{GodRaysShader.mjs → GodRaysShader.cjs} +11 -11
- package/dist/shaders/GodRaysShader.js +11 -11
- package/dist/shaders/{HalftoneShader.mjs → HalftoneShader.cjs} +3 -3
- package/dist/shaders/HalftoneShader.js +3 -3
- package/dist/shaders/{HorizontalBlurShader.mjs → HorizontalBlurShader.cjs} +3 -3
- package/dist/shaders/HorizontalBlurShader.js +3 -3
- package/dist/shaders/{HorizontalTiltShiftShader.mjs → HorizontalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/HorizontalTiltShiftShader.js +3 -3
- package/dist/shaders/{HueSaturationShader.mjs → HueSaturationShader.cjs} +3 -3
- package/dist/shaders/HueSaturationShader.js +3 -3
- package/dist/shaders/{KaleidoShader.mjs → KaleidoShader.cjs} +3 -3
- package/dist/shaders/KaleidoShader.js +3 -3
- package/dist/shaders/{LuminosityHighPassShader.mjs → LuminosityHighPassShader.cjs} +5 -5
- package/dist/shaders/LuminosityHighPassShader.js +5 -5
- package/dist/shaders/{LuminosityShader.mjs → LuminosityShader.cjs} +3 -3
- package/dist/shaders/LuminosityShader.js +3 -3
- package/dist/shaders/{MirrorShader.mjs → MirrorShader.cjs} +3 -3
- package/dist/shaders/MirrorShader.js +3 -3
- package/dist/shaders/{NormalMapShader.mjs → NormalMapShader.cjs} +6 -6
- package/dist/shaders/NormalMapShader.js +6 -6
- package/dist/shaders/{ParallaxShader.mjs → ParallaxShader.cjs} +3 -3
- package/dist/shaders/ParallaxShader.js +3 -3
- package/dist/shaders/{PixelShader.mjs → PixelShader.cjs} +3 -3
- package/dist/shaders/PixelShader.js +3 -3
- package/dist/shaders/{RGBShiftShader.mjs → RGBShiftShader.cjs} +3 -3
- package/dist/shaders/RGBShiftShader.js +3 -3
- package/dist/shaders/{SAOShader.mjs → SAOShader.cjs} +7 -7
- package/dist/shaders/SAOShader.js +7 -7
- package/dist/shaders/{SMAAShader.mjs → SMAAShader.cjs} +9 -9
- package/dist/shaders/SMAAShader.js +9 -9
- package/dist/shaders/{SSAOShader.mjs → SSAOShader.cjs} +10 -10
- package/dist/shaders/SSAOShader.js +10 -10
- package/dist/shaders/{SSRShader.mjs → SSRShader.cjs} +10 -10
- package/dist/shaders/SSRShader.js +10 -10
- package/dist/shaders/{SepiaShader.mjs → SepiaShader.cjs} +3 -3
- package/dist/shaders/SepiaShader.js +3 -3
- package/dist/shaders/{SobelOperatorShader.mjs → SobelOperatorShader.cjs} +5 -5
- package/dist/shaders/SobelOperatorShader.js +5 -5
- package/dist/shaders/{SubsurfaceScatteringShader.mjs → SubsurfaceScatteringShader.cjs} +13 -13
- package/dist/shaders/SubsurfaceScatteringShader.js +13 -13
- package/dist/shaders/{TechnicolorShader.mjs → TechnicolorShader.cjs} +3 -3
- package/dist/shaders/TechnicolorShader.js +3 -3
- package/dist/shaders/{ToneMapShader.mjs → ToneMapShader.cjs} +3 -3
- package/dist/shaders/ToneMapShader.js +3 -3
- package/dist/shaders/{ToonShader.mjs → ToonShader.cjs} +32 -32
- package/dist/shaders/ToonShader.js +32 -32
- package/dist/shaders/{TriangleBlurShader.mjs → TriangleBlurShader.cjs} +5 -5
- package/dist/shaders/TriangleBlurShader.js +5 -5
- package/dist/shaders/{UnpackDepthRGBAShader.mjs → UnpackDepthRGBAShader.cjs} +3 -3
- package/dist/shaders/UnpackDepthRGBAShader.js +3 -3
- package/dist/shaders/{VerticalBlurShader.mjs → VerticalBlurShader.cjs} +3 -3
- package/dist/shaders/VerticalBlurShader.js +3 -3
- package/dist/shaders/{VerticalTiltShiftShader.mjs → VerticalTiltShiftShader.cjs} +3 -3
- package/dist/shaders/VerticalTiltShiftShader.js +3 -3
- package/dist/shaders/{VignetteShader.mjs → VignetteShader.cjs} +3 -3
- package/dist/shaders/VignetteShader.js +3 -3
- package/dist/shaders/{VolumeShader.mjs → VolumeShader.cjs} +6 -6
- package/dist/shaders/VolumeShader.js +6 -6
- package/dist/shaders/{WaterRefractionShader.mjs → WaterRefractionShader.cjs} +3 -3
- package/dist/shaders/WaterRefractionShader.js +3 -3
- package/dist/shaders/types.cjs +1 -0
- package/dist/shaders/types.js +1 -1
- package/dist/textures/{FlakesTexture.mjs → FlakesTexture.cjs} +3 -3
- package/dist/textures/FlakesTexture.js +3 -3
- package/dist/types/Loader.cjs +26 -0
- package/dist/types/Loader.js +5 -22
- package/dist/types/helpers.cjs +4 -0
- package/dist/types/helpers.js +3 -3
- package/dist/utils/{BufferGeometryUtils.mjs → BufferGeometryUtils.cjs} +41 -41
- package/dist/utils/BufferGeometryUtils.js +41 -41
- package/dist/utils/{GeometryCompressionUtils.mjs → GeometryCompressionUtils.cjs} +94 -94
- package/dist/utils/GeometryCompressionUtils.js +94 -94
- package/dist/utils/{GeometryUtils.mjs → GeometryUtils.cjs} +18 -18
- package/dist/utils/GeometryUtils.js +18 -18
- package/dist/utils/{RoughnessMipmapper.mjs → RoughnessMipmapper.cjs} +13 -13
- package/dist/utils/RoughnessMipmapper.js +13 -13
- package/dist/utils/{SceneUtils.mjs → SceneUtils.cjs} +8 -8
- package/dist/utils/SceneUtils.js +8 -8
- package/dist/utils/{ShadowMapViewer.mjs → ShadowMapViewer.cjs} +18 -18
- package/dist/utils/ShadowMapViewer.js +18 -18
- package/dist/utils/{SkeletonUtils.mjs → SkeletonUtils.cjs} +10 -10
- package/dist/utils/SkeletonUtils.js +10 -10
- package/dist/utils/{UVsDebug.mjs → UVsDebug.cjs} +7 -7
- package/dist/utils/UVsDebug.js +7 -7
- package/dist/utils/{WorkerPool.mjs → WorkerPool.cjs} +3 -3
- package/dist/utils/WorkerPool.js +3 -3
- package/dist/webxr/{ARButton.mjs → ARButton.cjs} +3 -3
- package/dist/webxr/ARButton.js +3 -3
- package/dist/webxr/{OculusHandModel.mjs → OculusHandModel.cjs} +9 -9
- package/dist/webxr/OculusHandModel.js +9 -9
- package/dist/webxr/{OculusHandPointerModel.mjs → OculusHandPointerModel.cjs} +41 -24
- package/dist/webxr/OculusHandPointerModel.js +24 -41
- package/dist/webxr/Text2D.cjs +48 -0
- package/dist/webxr/Text2D.js +9 -26
- package/dist/webxr/{VRButton.mjs → VRButton.cjs} +3 -3
- package/dist/webxr/VRButton.js +3 -3
- package/dist/webxr/{XRControllerModelFactory.mjs → XRControllerModelFactory.cjs} +18 -18
- package/dist/webxr/XRControllerModelFactory.js +18 -18
- package/dist/webxr/{XREstimatedLight.mjs → XREstimatedLight.cjs} +8 -8
- package/dist/webxr/XREstimatedLight.js +8 -8
- package/dist/webxr/{XRHandMeshModel.mjs → XRHandMeshModel.cjs} +5 -5
- package/dist/webxr/XRHandMeshModel.js +5 -5
- package/dist/webxr/{XRHandModelFactory.mjs → XRHandModelFactory.cjs} +10 -10
- package/dist/webxr/XRHandModelFactory.js +10 -10
- package/dist/webxr/{XRHandPrimitiveModel.mjs → XRHandPrimitiveModel.cjs} +11 -11
- package/dist/webxr/XRHandPrimitiveModel.js +11 -11
- package/package.json +3 -3
- package/dist/_polyfill/CompressedArrayTexture.mjs +0 -12
- package/dist/_polyfill/Data3DTexture.mjs +0 -17
- package/dist/environments/RoomEnvironment.mjs +0 -78
- package/dist/geometries/ConvexGeometry.mjs +0 -26
- package/dist/index.mjs +0 -613
- package/dist/lines/Line2.mjs +0 -13
- package/dist/lines/Wireframe.mjs +0 -32
- package/dist/lines/WireframeGeometry2.mjs +0 -13
- package/dist/objects/ReflectorRTT.mjs +0 -10
- package/dist/shaders/types.mjs +0 -1
- package/dist/types/Loader.mjs +0 -9
- package/dist/types/helpers.mjs +0 -4
- package/dist/webxr/Text2D.mjs +0 -31
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
4
|
+
class RollerCoasterGeometry extends THREE.BufferGeometry {
|
3
5
|
constructor(curve, divisions) {
|
4
6
|
super();
|
5
7
|
const vertices = [];
|
@@ -7,38 +9,38 @@ class RollerCoasterGeometry extends BufferGeometry {
|
|
7
9
|
const colors = [];
|
8
10
|
const color1 = [1, 1, 1];
|
9
11
|
const color2 = [1, 1, 0];
|
10
|
-
const up = new Vector3(0, 1, 0);
|
11
|
-
const forward = new Vector3();
|
12
|
-
const right = new Vector3();
|
13
|
-
const quaternion = new Quaternion();
|
14
|
-
const prevQuaternion = new Quaternion();
|
12
|
+
const up = new THREE.Vector3(0, 1, 0);
|
13
|
+
const forward = new THREE.Vector3();
|
14
|
+
const right = new THREE.Vector3();
|
15
|
+
const quaternion = new THREE.Quaternion();
|
16
|
+
const prevQuaternion = new THREE.Quaternion();
|
15
17
|
prevQuaternion.setFromAxisAngle(up, Math.PI / 2);
|
16
|
-
const point = new Vector3();
|
17
|
-
const prevPoint = new Vector3();
|
18
|
+
const point = new THREE.Vector3();
|
19
|
+
const prevPoint = new THREE.Vector3();
|
18
20
|
prevPoint.copy(curve.getPointAt(0));
|
19
21
|
const step = [
|
20
|
-
new Vector3(-0.225, 0, 0),
|
21
|
-
new Vector3(0, -0.05, 0),
|
22
|
-
new Vector3(0, -0.175, 0),
|
23
|
-
new Vector3(0, -0.05, 0),
|
24
|
-
new Vector3(0.225, 0, 0),
|
25
|
-
new Vector3(0, -0.175, 0)
|
22
|
+
new THREE.Vector3(-0.225, 0, 0),
|
23
|
+
new THREE.Vector3(0, -0.05, 0),
|
24
|
+
new THREE.Vector3(0, -0.175, 0),
|
25
|
+
new THREE.Vector3(0, -0.05, 0),
|
26
|
+
new THREE.Vector3(0.225, 0, 0),
|
27
|
+
new THREE.Vector3(0, -0.175, 0)
|
26
28
|
];
|
27
29
|
const PI2 = Math.PI * 2;
|
28
30
|
let sides = 5;
|
29
31
|
const tube1 = [];
|
30
32
|
for (let i = 0; i < sides; i++) {
|
31
33
|
const angle = i / sides * PI2;
|
32
|
-
tube1.push(new Vector3(Math.sin(angle) * 0.06, Math.cos(angle) * 0.06, 0));
|
34
|
+
tube1.push(new THREE.Vector3(Math.sin(angle) * 0.06, Math.cos(angle) * 0.06, 0));
|
33
35
|
}
|
34
36
|
sides = 6;
|
35
37
|
const tube2 = [];
|
36
38
|
for (let i = 0; i < sides; i++) {
|
37
39
|
const angle = i / sides * PI2;
|
38
|
-
tube2.push(new Vector3(Math.sin(angle) * 0.025, Math.cos(angle) * 0.025, 0));
|
40
|
+
tube2.push(new THREE.Vector3(Math.sin(angle) * 0.025, Math.cos(angle) * 0.025, 0));
|
39
41
|
}
|
40
|
-
const vector = new Vector3();
|
41
|
-
const normal = new Vector3();
|
42
|
+
const vector = new THREE.Vector3();
|
43
|
+
const normal = new THREE.Vector3();
|
42
44
|
function drawShape(shape, color) {
|
43
45
|
normal.set(0, 0, -1).applyQuaternion(quaternion);
|
44
46
|
for (let j = 0; j < shape.length; j++) {
|
@@ -59,14 +61,14 @@ class RollerCoasterGeometry extends BufferGeometry {
|
|
59
61
|
colors.push(color[0], color[1], color[2]);
|
60
62
|
}
|
61
63
|
}
|
62
|
-
const vector1 = new Vector3();
|
63
|
-
const vector2 = new Vector3();
|
64
|
-
const vector3 = new Vector3();
|
65
|
-
const vector4 = new Vector3();
|
66
|
-
const normal1 = new Vector3();
|
67
|
-
const normal2 = new Vector3();
|
68
|
-
const normal3 = new Vector3();
|
69
|
-
const normal4 = new Vector3();
|
64
|
+
const vector1 = new THREE.Vector3();
|
65
|
+
const vector2 = new THREE.Vector3();
|
66
|
+
const vector3 = new THREE.Vector3();
|
67
|
+
const vector4 = new THREE.Vector3();
|
68
|
+
const normal1 = new THREE.Vector3();
|
69
|
+
const normal2 = new THREE.Vector3();
|
70
|
+
const normal3 = new THREE.Vector3();
|
71
|
+
const normal4 = new THREE.Vector3();
|
70
72
|
function extrudeShape(shape, offset2, color) {
|
71
73
|
for (let j = 0, jl = shape.length; j < jl; j++) {
|
72
74
|
const point1 = shape[j];
|
@@ -115,7 +117,7 @@ class RollerCoasterGeometry extends BufferGeometry {
|
|
115
117
|
colors.push(color[0], color[1], color[2]);
|
116
118
|
}
|
117
119
|
}
|
118
|
-
const offset = new Vector3();
|
120
|
+
const offset = new THREE.Vector3();
|
119
121
|
for (let i = 1; i <= divisions; i++) {
|
120
122
|
point.copy(curve.getPointAt(i / divisions));
|
121
123
|
up.set(0, 1, 0);
|
@@ -133,31 +135,31 @@ class RollerCoasterGeometry extends BufferGeometry {
|
|
133
135
|
prevPoint.copy(point);
|
134
136
|
prevQuaternion.copy(quaternion);
|
135
137
|
}
|
136
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
137
|
-
this.setAttribute("normal", new BufferAttribute(new Float32Array(normals), 3));
|
138
|
-
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 3));
|
138
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
139
|
+
this.setAttribute("normal", new THREE.BufferAttribute(new Float32Array(normals), 3));
|
140
|
+
this.setAttribute("color", new THREE.BufferAttribute(new Float32Array(colors), 3));
|
139
141
|
}
|
140
142
|
}
|
141
|
-
class RollerCoasterLiftersGeometry extends BufferGeometry {
|
143
|
+
class RollerCoasterLiftersGeometry extends THREE.BufferGeometry {
|
142
144
|
constructor(curve, divisions) {
|
143
145
|
super();
|
144
146
|
const vertices = [];
|
145
147
|
const normals = [];
|
146
|
-
const quaternion = new Quaternion();
|
147
|
-
const up = new Vector3(0, 1, 0);
|
148
|
-
const point = new Vector3();
|
149
|
-
const tangent = new Vector3();
|
150
|
-
const tube1 = [new Vector3(0, 0.05, -0.05), new Vector3(0, 0.05, 0.05), new Vector3(0, -0.05, 0)];
|
151
|
-
const tube2 = [new Vector3(-0.05, 0, 0.05), new Vector3(-0.05, 0, -0.05), new Vector3(0.05, 0, 0)];
|
152
|
-
const tube3 = [new Vector3(0.05, 0, -0.05), new Vector3(0.05, 0, 0.05), new Vector3(-0.05, 0, 0)];
|
153
|
-
const vector1 = new Vector3();
|
154
|
-
const vector2 = new Vector3();
|
155
|
-
const vector3 = new Vector3();
|
156
|
-
const vector4 = new Vector3();
|
157
|
-
const normal1 = new Vector3();
|
158
|
-
const normal2 = new Vector3();
|
159
|
-
const normal3 = new Vector3();
|
160
|
-
const normal4 = new Vector3();
|
148
|
+
const quaternion = new THREE.Quaternion();
|
149
|
+
const up = new THREE.Vector3(0, 1, 0);
|
150
|
+
const point = new THREE.Vector3();
|
151
|
+
const tangent = new THREE.Vector3();
|
152
|
+
const tube1 = [new THREE.Vector3(0, 0.05, -0.05), new THREE.Vector3(0, 0.05, 0.05), new THREE.Vector3(0, -0.05, 0)];
|
153
|
+
const tube2 = [new THREE.Vector3(-0.05, 0, 0.05), new THREE.Vector3(-0.05, 0, -0.05), new THREE.Vector3(0.05, 0, 0)];
|
154
|
+
const tube3 = [new THREE.Vector3(0.05, 0, -0.05), new THREE.Vector3(0.05, 0, 0.05), new THREE.Vector3(-0.05, 0, 0)];
|
155
|
+
const vector1 = new THREE.Vector3();
|
156
|
+
const vector2 = new THREE.Vector3();
|
157
|
+
const vector3 = new THREE.Vector3();
|
158
|
+
const vector4 = new THREE.Vector3();
|
159
|
+
const normal1 = new THREE.Vector3();
|
160
|
+
const normal2 = new THREE.Vector3();
|
161
|
+
const normal3 = new THREE.Vector3();
|
162
|
+
const normal4 = new THREE.Vector3();
|
161
163
|
function extrudeShape(shape, fromPoint2, toPoint2) {
|
162
164
|
for (let j = 0, jl = shape.length; j < jl; j++) {
|
163
165
|
const point1 = shape[j];
|
@@ -200,8 +202,8 @@ class RollerCoasterLiftersGeometry extends BufferGeometry {
|
|
200
202
|
normals.push(normal4.x, normal4.y, normal4.z);
|
201
203
|
}
|
202
204
|
}
|
203
|
-
const fromPoint = new Vector3();
|
204
|
-
const toPoint = new Vector3();
|
205
|
+
const fromPoint = new THREE.Vector3();
|
206
|
+
const toPoint = new THREE.Vector3();
|
205
207
|
for (let i = 1; i <= divisions; i++) {
|
206
208
|
point.copy(curve.getPointAt(i / divisions));
|
207
209
|
tangent.copy(curve.getTangentAt(i / divisions));
|
@@ -239,27 +241,27 @@ class RollerCoasterLiftersGeometry extends BufferGeometry {
|
|
239
241
|
extrudeShape(tube3, fromPoint, toPoint);
|
240
242
|
}
|
241
243
|
}
|
242
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
243
|
-
this.setAttribute("normal", new BufferAttribute(new Float32Array(normals), 3));
|
244
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
245
|
+
this.setAttribute("normal", new THREE.BufferAttribute(new Float32Array(normals), 3));
|
244
246
|
}
|
245
247
|
}
|
246
|
-
class RollerCoasterShadowGeometry extends BufferGeometry {
|
248
|
+
class RollerCoasterShadowGeometry extends THREE.BufferGeometry {
|
247
249
|
constructor(curve, divisions) {
|
248
250
|
super();
|
249
251
|
const vertices = [];
|
250
|
-
const up = new Vector3(0, 1, 0);
|
251
|
-
const forward = new Vector3();
|
252
|
-
const quaternion = new Quaternion();
|
253
|
-
const prevQuaternion = new Quaternion();
|
252
|
+
const up = new THREE.Vector3(0, 1, 0);
|
253
|
+
const forward = new THREE.Vector3();
|
254
|
+
const quaternion = new THREE.Quaternion();
|
255
|
+
const prevQuaternion = new THREE.Quaternion();
|
254
256
|
prevQuaternion.setFromAxisAngle(up, Math.PI / 2);
|
255
|
-
const point = new Vector3();
|
256
|
-
const prevPoint = new Vector3();
|
257
|
+
const point = new THREE.Vector3();
|
258
|
+
const prevPoint = new THREE.Vector3();
|
257
259
|
prevPoint.copy(curve.getPointAt(0));
|
258
260
|
prevPoint.y = 0;
|
259
|
-
const vector1 = new Vector3();
|
260
|
-
const vector2 = new Vector3();
|
261
|
-
const vector3 = new Vector3();
|
262
|
-
const vector4 = new Vector3();
|
261
|
+
const vector1 = new THREE.Vector3();
|
262
|
+
const vector2 = new THREE.Vector3();
|
263
|
+
const vector3 = new THREE.Vector3();
|
264
|
+
const vector4 = new THREE.Vector3();
|
263
265
|
for (let i = 1; i <= divisions; i++) {
|
264
266
|
point.copy(curve.getPointAt(i / divisions));
|
265
267
|
point.y = 0;
|
@@ -287,10 +289,10 @@ class RollerCoasterShadowGeometry extends BufferGeometry {
|
|
287
289
|
prevPoint.copy(point);
|
288
290
|
prevQuaternion.copy(quaternion);
|
289
291
|
}
|
290
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
292
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
291
293
|
}
|
292
294
|
}
|
293
|
-
class SkyGeometry extends BufferGeometry {
|
295
|
+
class SkyGeometry extends THREE.BufferGeometry {
|
294
296
|
constructor() {
|
295
297
|
super();
|
296
298
|
const vertices = [];
|
@@ -306,17 +308,17 @@ class SkyGeometry extends BufferGeometry {
|
|
306
308
|
vertices.push(x + size, y, z + size);
|
307
309
|
vertices.push(x - size, y, z + size);
|
308
310
|
}
|
309
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
311
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
310
312
|
}
|
311
313
|
}
|
312
|
-
class TreesGeometry extends BufferGeometry {
|
314
|
+
class TreesGeometry extends THREE.BufferGeometry {
|
313
315
|
constructor(landscape) {
|
314
316
|
super();
|
315
317
|
const vertices = [];
|
316
318
|
const colors = [];
|
317
|
-
const raycaster = new Raycaster();
|
319
|
+
const raycaster = new THREE.Raycaster();
|
318
320
|
raycaster.ray.direction.set(0, -1, 0);
|
319
|
-
const _color = new Color();
|
321
|
+
const _color = new THREE.Color();
|
320
322
|
for (let i = 0; i < 2e3; i++) {
|
321
323
|
const x = Math.random() * 500 - 250;
|
322
324
|
const z = Math.random() * 500 - 250;
|
@@ -340,14 +342,12 @@ class TreesGeometry extends BufferGeometry {
|
|
340
342
|
colors.push(_color.r, _color.g, _color.b);
|
341
343
|
}
|
342
344
|
}
|
343
|
-
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
344
|
-
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 3));
|
345
|
+
this.setAttribute("position", new THREE.BufferAttribute(new Float32Array(vertices), 3));
|
346
|
+
this.setAttribute("color", new THREE.BufferAttribute(new Float32Array(colors), 3));
|
345
347
|
}
|
346
348
|
}
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
TreesGeometry
|
353
|
-
};
|
349
|
+
exports.RollerCoasterGeometry = RollerCoasterGeometry;
|
350
|
+
exports.RollerCoasterLiftersGeometry = RollerCoasterLiftersGeometry;
|
351
|
+
exports.RollerCoasterShadowGeometry = RollerCoasterShadowGeometry;
|
352
|
+
exports.SkyGeometry = SkyGeometry;
|
353
|
+
exports.TreesGeometry = TreesGeometry;
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const THREE = require("three");
|
4
|
-
class RollerCoasterGeometry extends THREE.BufferGeometry {
|
1
|
+
import { BufferGeometry, Vector3, Quaternion, BufferAttribute, Raycaster, Color } from "three";
|
2
|
+
class RollerCoasterGeometry extends BufferGeometry {
|
5
3
|
constructor(curve, divisions) {
|
6
4
|
super();
|
7
5
|
const vertices = [];
|
@@ -9,38 +7,38 @@ class RollerCoasterGeometry extends THREE.BufferGeometry {
|
|
9
7
|
const colors = [];
|
10
8
|
const color1 = [1, 1, 1];
|
11
9
|
const color2 = [1, 1, 0];
|
12
|
-
const up = new
|
13
|
-
const forward = new
|
14
|
-
const right = new
|
15
|
-
const quaternion = new
|
16
|
-
const prevQuaternion = new
|
10
|
+
const up = new Vector3(0, 1, 0);
|
11
|
+
const forward = new Vector3();
|
12
|
+
const right = new Vector3();
|
13
|
+
const quaternion = new Quaternion();
|
14
|
+
const prevQuaternion = new Quaternion();
|
17
15
|
prevQuaternion.setFromAxisAngle(up, Math.PI / 2);
|
18
|
-
const point = new
|
19
|
-
const prevPoint = new
|
16
|
+
const point = new Vector3();
|
17
|
+
const prevPoint = new Vector3();
|
20
18
|
prevPoint.copy(curve.getPointAt(0));
|
21
19
|
const step = [
|
22
|
-
new
|
23
|
-
new
|
24
|
-
new
|
25
|
-
new
|
26
|
-
new
|
27
|
-
new
|
20
|
+
new Vector3(-0.225, 0, 0),
|
21
|
+
new Vector3(0, -0.05, 0),
|
22
|
+
new Vector3(0, -0.175, 0),
|
23
|
+
new Vector3(0, -0.05, 0),
|
24
|
+
new Vector3(0.225, 0, 0),
|
25
|
+
new Vector3(0, -0.175, 0)
|
28
26
|
];
|
29
27
|
const PI2 = Math.PI * 2;
|
30
28
|
let sides = 5;
|
31
29
|
const tube1 = [];
|
32
30
|
for (let i = 0; i < sides; i++) {
|
33
31
|
const angle = i / sides * PI2;
|
34
|
-
tube1.push(new
|
32
|
+
tube1.push(new Vector3(Math.sin(angle) * 0.06, Math.cos(angle) * 0.06, 0));
|
35
33
|
}
|
36
34
|
sides = 6;
|
37
35
|
const tube2 = [];
|
38
36
|
for (let i = 0; i < sides; i++) {
|
39
37
|
const angle = i / sides * PI2;
|
40
|
-
tube2.push(new
|
38
|
+
tube2.push(new Vector3(Math.sin(angle) * 0.025, Math.cos(angle) * 0.025, 0));
|
41
39
|
}
|
42
|
-
const vector = new
|
43
|
-
const normal = new
|
40
|
+
const vector = new Vector3();
|
41
|
+
const normal = new Vector3();
|
44
42
|
function drawShape(shape, color) {
|
45
43
|
normal.set(0, 0, -1).applyQuaternion(quaternion);
|
46
44
|
for (let j = 0; j < shape.length; j++) {
|
@@ -61,14 +59,14 @@ class RollerCoasterGeometry extends THREE.BufferGeometry {
|
|
61
59
|
colors.push(color[0], color[1], color[2]);
|
62
60
|
}
|
63
61
|
}
|
64
|
-
const vector1 = new
|
65
|
-
const vector2 = new
|
66
|
-
const vector3 = new
|
67
|
-
const vector4 = new
|
68
|
-
const normal1 = new
|
69
|
-
const normal2 = new
|
70
|
-
const normal3 = new
|
71
|
-
const normal4 = new
|
62
|
+
const vector1 = new Vector3();
|
63
|
+
const vector2 = new Vector3();
|
64
|
+
const vector3 = new Vector3();
|
65
|
+
const vector4 = new Vector3();
|
66
|
+
const normal1 = new Vector3();
|
67
|
+
const normal2 = new Vector3();
|
68
|
+
const normal3 = new Vector3();
|
69
|
+
const normal4 = new Vector3();
|
72
70
|
function extrudeShape(shape, offset2, color) {
|
73
71
|
for (let j = 0, jl = shape.length; j < jl; j++) {
|
74
72
|
const point1 = shape[j];
|
@@ -117,7 +115,7 @@ class RollerCoasterGeometry extends THREE.BufferGeometry {
|
|
117
115
|
colors.push(color[0], color[1], color[2]);
|
118
116
|
}
|
119
117
|
}
|
120
|
-
const offset = new
|
118
|
+
const offset = new Vector3();
|
121
119
|
for (let i = 1; i <= divisions; i++) {
|
122
120
|
point.copy(curve.getPointAt(i / divisions));
|
123
121
|
up.set(0, 1, 0);
|
@@ -135,31 +133,31 @@ class RollerCoasterGeometry extends THREE.BufferGeometry {
|
|
135
133
|
prevPoint.copy(point);
|
136
134
|
prevQuaternion.copy(quaternion);
|
137
135
|
}
|
138
|
-
this.setAttribute("position", new
|
139
|
-
this.setAttribute("normal", new
|
140
|
-
this.setAttribute("color", new
|
136
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
137
|
+
this.setAttribute("normal", new BufferAttribute(new Float32Array(normals), 3));
|
138
|
+
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 3));
|
141
139
|
}
|
142
140
|
}
|
143
|
-
class RollerCoasterLiftersGeometry extends
|
141
|
+
class RollerCoasterLiftersGeometry extends BufferGeometry {
|
144
142
|
constructor(curve, divisions) {
|
145
143
|
super();
|
146
144
|
const vertices = [];
|
147
145
|
const normals = [];
|
148
|
-
const quaternion = new
|
149
|
-
const up = new
|
150
|
-
const point = new
|
151
|
-
const tangent = new
|
152
|
-
const tube1 = [new
|
153
|
-
const tube2 = [new
|
154
|
-
const tube3 = [new
|
155
|
-
const vector1 = new
|
156
|
-
const vector2 = new
|
157
|
-
const vector3 = new
|
158
|
-
const vector4 = new
|
159
|
-
const normal1 = new
|
160
|
-
const normal2 = new
|
161
|
-
const normal3 = new
|
162
|
-
const normal4 = new
|
146
|
+
const quaternion = new Quaternion();
|
147
|
+
const up = new Vector3(0, 1, 0);
|
148
|
+
const point = new Vector3();
|
149
|
+
const tangent = new Vector3();
|
150
|
+
const tube1 = [new Vector3(0, 0.05, -0.05), new Vector3(0, 0.05, 0.05), new Vector3(0, -0.05, 0)];
|
151
|
+
const tube2 = [new Vector3(-0.05, 0, 0.05), new Vector3(-0.05, 0, -0.05), new Vector3(0.05, 0, 0)];
|
152
|
+
const tube3 = [new Vector3(0.05, 0, -0.05), new Vector3(0.05, 0, 0.05), new Vector3(-0.05, 0, 0)];
|
153
|
+
const vector1 = new Vector3();
|
154
|
+
const vector2 = new Vector3();
|
155
|
+
const vector3 = new Vector3();
|
156
|
+
const vector4 = new Vector3();
|
157
|
+
const normal1 = new Vector3();
|
158
|
+
const normal2 = new Vector3();
|
159
|
+
const normal3 = new Vector3();
|
160
|
+
const normal4 = new Vector3();
|
163
161
|
function extrudeShape(shape, fromPoint2, toPoint2) {
|
164
162
|
for (let j = 0, jl = shape.length; j < jl; j++) {
|
165
163
|
const point1 = shape[j];
|
@@ -202,8 +200,8 @@ class RollerCoasterLiftersGeometry extends THREE.BufferGeometry {
|
|
202
200
|
normals.push(normal4.x, normal4.y, normal4.z);
|
203
201
|
}
|
204
202
|
}
|
205
|
-
const fromPoint = new
|
206
|
-
const toPoint = new
|
203
|
+
const fromPoint = new Vector3();
|
204
|
+
const toPoint = new Vector3();
|
207
205
|
for (let i = 1; i <= divisions; i++) {
|
208
206
|
point.copy(curve.getPointAt(i / divisions));
|
209
207
|
tangent.copy(curve.getTangentAt(i / divisions));
|
@@ -241,27 +239,27 @@ class RollerCoasterLiftersGeometry extends THREE.BufferGeometry {
|
|
241
239
|
extrudeShape(tube3, fromPoint, toPoint);
|
242
240
|
}
|
243
241
|
}
|
244
|
-
this.setAttribute("position", new
|
245
|
-
this.setAttribute("normal", new
|
242
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
243
|
+
this.setAttribute("normal", new BufferAttribute(new Float32Array(normals), 3));
|
246
244
|
}
|
247
245
|
}
|
248
|
-
class RollerCoasterShadowGeometry extends
|
246
|
+
class RollerCoasterShadowGeometry extends BufferGeometry {
|
249
247
|
constructor(curve, divisions) {
|
250
248
|
super();
|
251
249
|
const vertices = [];
|
252
|
-
const up = new
|
253
|
-
const forward = new
|
254
|
-
const quaternion = new
|
255
|
-
const prevQuaternion = new
|
250
|
+
const up = new Vector3(0, 1, 0);
|
251
|
+
const forward = new Vector3();
|
252
|
+
const quaternion = new Quaternion();
|
253
|
+
const prevQuaternion = new Quaternion();
|
256
254
|
prevQuaternion.setFromAxisAngle(up, Math.PI / 2);
|
257
|
-
const point = new
|
258
|
-
const prevPoint = new
|
255
|
+
const point = new Vector3();
|
256
|
+
const prevPoint = new Vector3();
|
259
257
|
prevPoint.copy(curve.getPointAt(0));
|
260
258
|
prevPoint.y = 0;
|
261
|
-
const vector1 = new
|
262
|
-
const vector2 = new
|
263
|
-
const vector3 = new
|
264
|
-
const vector4 = new
|
259
|
+
const vector1 = new Vector3();
|
260
|
+
const vector2 = new Vector3();
|
261
|
+
const vector3 = new Vector3();
|
262
|
+
const vector4 = new Vector3();
|
265
263
|
for (let i = 1; i <= divisions; i++) {
|
266
264
|
point.copy(curve.getPointAt(i / divisions));
|
267
265
|
point.y = 0;
|
@@ -289,10 +287,10 @@ class RollerCoasterShadowGeometry extends THREE.BufferGeometry {
|
|
289
287
|
prevPoint.copy(point);
|
290
288
|
prevQuaternion.copy(quaternion);
|
291
289
|
}
|
292
|
-
this.setAttribute("position", new
|
290
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
293
291
|
}
|
294
292
|
}
|
295
|
-
class SkyGeometry extends
|
293
|
+
class SkyGeometry extends BufferGeometry {
|
296
294
|
constructor() {
|
297
295
|
super();
|
298
296
|
const vertices = [];
|
@@ -308,17 +306,17 @@ class SkyGeometry extends THREE.BufferGeometry {
|
|
308
306
|
vertices.push(x + size, y, z + size);
|
309
307
|
vertices.push(x - size, y, z + size);
|
310
308
|
}
|
311
|
-
this.setAttribute("position", new
|
309
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
312
310
|
}
|
313
311
|
}
|
314
|
-
class TreesGeometry extends
|
312
|
+
class TreesGeometry extends BufferGeometry {
|
315
313
|
constructor(landscape) {
|
316
314
|
super();
|
317
315
|
const vertices = [];
|
318
316
|
const colors = [];
|
319
|
-
const raycaster = new
|
317
|
+
const raycaster = new Raycaster();
|
320
318
|
raycaster.ray.direction.set(0, -1, 0);
|
321
|
-
const _color = new
|
319
|
+
const _color = new Color();
|
322
320
|
for (let i = 0; i < 2e3; i++) {
|
323
321
|
const x = Math.random() * 500 - 250;
|
324
322
|
const z = Math.random() * 500 - 250;
|
@@ -342,12 +340,14 @@ class TreesGeometry extends THREE.BufferGeometry {
|
|
342
340
|
colors.push(_color.r, _color.g, _color.b);
|
343
341
|
}
|
344
342
|
}
|
345
|
-
this.setAttribute("position", new
|
346
|
-
this.setAttribute("color", new
|
343
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(vertices), 3));
|
344
|
+
this.setAttribute("color", new BufferAttribute(new Float32Array(colors), 3));
|
347
345
|
}
|
348
346
|
}
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
347
|
+
export {
|
348
|
+
RollerCoasterGeometry,
|
349
|
+
RollerCoasterLiftersGeometry,
|
350
|
+
RollerCoasterShadowGeometry,
|
351
|
+
SkyGeometry,
|
352
|
+
TreesGeometry
|
353
|
+
};
|
@@ -1,9 +1,11 @@
|
|
1
|
+
"use strict";
|
1
2
|
var __defProp = Object.defineProperty;
|
2
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
4
|
var __publicField = (obj, key, value) => {
|
4
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
5
6
|
return value;
|
6
7
|
};
|
8
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
7
9
|
class Timer {
|
8
10
|
constructor() {
|
9
11
|
__publicField(this, "_previousTime");
|
@@ -96,6 +98,4 @@ function handleVisibilityChange() {
|
|
96
98
|
if (document.hidden === false)
|
97
99
|
this.reset();
|
98
100
|
}
|
99
|
-
|
100
|
-
Timer
|
101
|
-
};
|
101
|
+
exports.Timer = Timer;
|
package/dist/misc/Timer.js
CHANGED
@@ -1,11 +1,9 @@
|
|
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
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
9
7
|
class Timer {
|
10
8
|
constructor() {
|
11
9
|
__publicField(this, "_previousTime");
|
@@ -98,4 +96,6 @@ function handleVisibilityChange() {
|
|
98
96
|
if (document.hidden === false)
|
99
97
|
this.reset();
|
100
98
|
}
|
101
|
-
|
99
|
+
export {
|
100
|
+
Timer
|
101
|
+
};
|
@@ -1,21 +1,23 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const THREE = require("three");
|
2
4
|
function TubePainter() {
|
3
5
|
const BUFFER_SIZE = 1e6 * 3;
|
4
|
-
const positions = new BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
5
|
-
positions.usage = DynamicDrawUsage;
|
6
|
-
const normals = new BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
7
|
-
normals.usage = DynamicDrawUsage;
|
8
|
-
const colors = new BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
9
|
-
colors.usage = DynamicDrawUsage;
|
10
|
-
const geometry = new BufferGeometry();
|
6
|
+
const positions = new THREE.BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
7
|
+
positions.usage = THREE.DynamicDrawUsage;
|
8
|
+
const normals = new THREE.BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
9
|
+
normals.usage = THREE.DynamicDrawUsage;
|
10
|
+
const colors = new THREE.BufferAttribute(new Float32Array(BUFFER_SIZE), 3);
|
11
|
+
colors.usage = THREE.DynamicDrawUsage;
|
12
|
+
const geometry = new THREE.BufferGeometry();
|
11
13
|
geometry.setAttribute("position", positions);
|
12
14
|
geometry.setAttribute("normal", normals);
|
13
15
|
geometry.setAttribute("color", colors);
|
14
16
|
geometry.drawRange.count = 0;
|
15
|
-
const material = new MeshStandardMaterial({
|
17
|
+
const material = new THREE.MeshStandardMaterial({
|
16
18
|
vertexColors: true
|
17
19
|
});
|
18
|
-
const mesh = new Mesh(geometry, material);
|
20
|
+
const mesh = new THREE.Mesh(geometry, material);
|
19
21
|
mesh.frustumCulled = false;
|
20
22
|
function getPoints(size2) {
|
21
23
|
const PI2 = Math.PI * 2;
|
@@ -24,15 +26,15 @@ function TubePainter() {
|
|
24
26
|
const radius = 0.01 * size2;
|
25
27
|
for (let i = 0; i < sides; i++) {
|
26
28
|
const angle = i / sides * PI2;
|
27
|
-
array.push(new Vector3(Math.sin(angle) * radius, Math.cos(angle) * radius, 0));
|
29
|
+
array.push(new THREE.Vector3(Math.sin(angle) * radius, Math.cos(angle) * radius, 0));
|
28
30
|
}
|
29
31
|
return array;
|
30
32
|
}
|
31
|
-
const vector1 = new Vector3();
|
32
|
-
const vector2 = new Vector3();
|
33
|
-
const vector3 = new Vector3();
|
34
|
-
const vector4 = new Vector3();
|
35
|
-
const color = new Color(16777215);
|
33
|
+
const vector1 = new THREE.Vector3();
|
34
|
+
const vector2 = new THREE.Vector3();
|
35
|
+
const vector3 = new THREE.Vector3();
|
36
|
+
const vector4 = new THREE.Vector3();
|
37
|
+
const color = new THREE.Color(16777215);
|
36
38
|
let size = 1;
|
37
39
|
function stroke(position1, position2, matrix12, matrix22) {
|
38
40
|
if (position1.distanceToSquared(position2) === 0)
|
@@ -72,11 +74,11 @@ function TubePainter() {
|
|
72
74
|
}
|
73
75
|
geometry.drawRange.count = count2;
|
74
76
|
}
|
75
|
-
const up = new Vector3(0, 1, 0);
|
76
|
-
const point1 = new Vector3();
|
77
|
-
const point2 = new Vector3();
|
78
|
-
const matrix1 = new Matrix4();
|
79
|
-
const matrix2 = new Matrix4();
|
77
|
+
const up = new THREE.Vector3(0, 1, 0);
|
78
|
+
const point1 = new THREE.Vector3();
|
79
|
+
const point2 = new THREE.Vector3();
|
80
|
+
const matrix1 = new THREE.Matrix4();
|
81
|
+
const matrix2 = new THREE.Matrix4();
|
80
82
|
function moveTo(position) {
|
81
83
|
point1.copy(position);
|
82
84
|
matrix1.lookAt(point2, point1, up);
|
@@ -118,6 +120,4 @@ function TubePainter() {
|
|
118
120
|
update
|
119
121
|
};
|
120
122
|
}
|
121
|
-
|
122
|
-
TubePainter
|
123
|
-
};
|
123
|
+
exports.TubePainter = TubePainter;
|