three-stdlib 2.22.4 → 2.22.6
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +0 -2
- package/package.json +34 -14
- package/BufferGeometryUtils-903f7ecb.js +0 -1
- package/BufferGeometryUtils-f2288d1c.js +0 -740
- package/Nodes-2106b101.js +0 -352
- package/Nodes-8947ba9a.js +0 -1
- package/_polyfill/CompressedArrayTexture.cjs.js +0 -1
- package/_polyfill/CompressedArrayTexture.js +0 -13
- package/_polyfill/Data3DTexture.cjs.js +0 -1
- package/_polyfill/Data3DTexture.js +0 -23
- package/animation/AnimationClipCreator.cjs.js +0 -1
- package/animation/AnimationClipCreator.d.ts +0 -12
- package/animation/AnimationClipCreator.js +0 -77
- package/animation/CCDIKSolver.cjs.js +0 -1
- package/animation/CCDIKSolver.d.ts +0 -25
- package/animation/CCDIKSolver.js +0 -304
- package/animation/MMDAnimationHelper.cjs.js +0 -1
- package/animation/MMDAnimationHelper.d.ts +0 -103
- package/animation/MMDAnimationHelper.js +0 -705
- package/animation/MMDPhysics.cjs.js +0 -1
- package/animation/MMDPhysics.d.ts +0 -119
- package/animation/MMDPhysics.js +0 -976
- package/cameras/CinematicCamera.cjs.js +0 -1
- package/cameras/CinematicCamera.d.ts +0 -41
- package/cameras/CinematicCamera.js +0 -139
- package/controls/ArcballControls.cjs.js +0 -1
- package/controls/ArcballControls.d.ts +0 -161
- package/controls/ArcballControls.js +0 -2642
- package/controls/DeviceOrientationControls.cjs.js +0 -1
- package/controls/DeviceOrientationControls.d.ts +0 -24
- package/controls/DeviceOrientationControls.js +0 -119
- package/controls/DragControls.cjs.js +0 -1
- package/controls/DragControls.d.ts +0 -34
- package/controls/DragControls.js +0 -274
- package/controls/FirstPersonControls.cjs.js +0 -1
- package/controls/FirstPersonControls.d.ts +0 -48
- package/controls/FirstPersonControls.js +0 -290
- package/controls/FlyControls.cjs.js +0 -1
- package/controls/FlyControls.d.ts +0 -32
- package/controls/FlyControls.js +0 -309
- package/controls/OrbitControls.cjs.js +0 -1
- package/controls/OrbitControls.d.ts +0 -63
- package/controls/OrbitControls.js +0 -980
- package/controls/PointerLockControls.cjs.js +0 -1
- package/controls/PointerLockControls.d.ts +0 -24
- package/controls/PointerLockControls.js +0 -135
- package/controls/TrackballControls.cjs.js +0 -1
- package/controls/TrackballControls.d.ts +0 -95
- package/controls/TrackballControls.js +0 -653
- package/controls/TransformControls.cjs.js +0 -1
- package/controls/TransformControls.d.ts +0 -151
- package/controls/TransformControls.js +0 -1275
- package/controls/experimental/CameraControls.cjs.js +0 -1
- package/controls/experimental/CameraControls.d.ts +0 -170
- package/controls/experimental/CameraControls.js +0 -953
- package/csm/CSM.cjs.js +0 -1
- package/csm/CSM.d.ts +0 -61
- package/csm/CSM.js +0 -305
- package/csm/CSMFrustum.cjs.js +0 -1
- package/csm/CSMFrustum.d.ts +0 -19
- package/csm/CSMFrustum.js +0 -90
- package/csm/CSMHelper.cjs.js +0 -1
- package/csm/CSMHelper.d.ts +0 -26
- package/csm/CSMHelper.js +0 -128
- package/csm/CSMShader.cjs.js +0 -1
- package/csm/CSMShader.d.ts +0 -4
- package/csm/CSMShader.js +0 -255
- package/curves/CurveExtras.cjs.js +0 -1
- package/curves/CurveExtras.d.ts +0 -68
- package/curves/CurveExtras.js +0 -266
- package/curves/NURBSCurve.cjs.js +0 -1
- package/curves/NURBSCurve.d.ts +0 -11
- package/curves/NURBSCurve.js +0 -63
- package/curves/NURBSSurface.cjs.js +0 -1
- package/curves/NURBSSurface.d.ts +0 -13
- package/curves/NURBSSurface.js +0 -44
- package/curves/NURBSUtils.cjs.js +0 -1
- package/curves/NURBSUtils.d.ts +0 -22
- package/curves/NURBSUtils.js +0 -375
- package/custom.d.cjs.js +0 -1
- package/custom.d.js +0 -1
- package/deprecated/Geometry.cjs.js +0 -1
- package/deprecated/Geometry.d.ts +0 -342
- package/deprecated/Geometry.js +0 -1261
- package/effects/AnaglyphEffect.cjs.js +0 -1
- package/effects/AnaglyphEffect.d.ts +0 -11
- package/effects/AnaglyphEffect.js +0 -85
- package/effects/AsciiEffect.cjs.js +0 -1
- package/effects/AsciiEffect.d.ts +0 -18
- package/effects/AsciiEffect.js +0 -203
- package/effects/OutlineEffect.cjs.js +0 -1
- package/effects/OutlineEffect.d.ts +0 -28
- package/effects/OutlineEffect.js +0 -378
- package/effects/ParallaxBarrierEffect.cjs.js +0 -1
- package/effects/ParallaxBarrierEffect.d.ts +0 -8
- package/effects/ParallaxBarrierEffect.js +0 -63
- package/effects/PeppersGhostEffect.cjs.js +0 -1
- package/effects/PeppersGhostEffect.d.ts +0 -10
- package/effects/PeppersGhostEffect.js +0 -134
- package/effects/StereoEffect.cjs.js +0 -1
- package/effects/StereoEffect.d.ts +0 -9
- package/effects/StereoEffect.js +0 -36
- package/environments/RoomEnvironment.cjs.js +0 -1
- package/environments/RoomEnvironment.d.ts +0 -5
- package/environments/RoomEnvironment.js +0 -92
- package/exporters/ColladaExporter.cjs.js +0 -1
- package/exporters/ColladaExporter.d.ts +0 -39
- package/exporters/ColladaExporter.js +0 -425
- package/exporters/DRACOExporter.cjs.js +0 -1
- package/exporters/DRACOExporter.d.ts +0 -23
- package/exporters/DRACOExporter.js +0 -186
- package/exporters/GLTFExporter.cjs.js +0 -1
- package/exporters/GLTFExporter.d.ts +0 -270
- package/exporters/GLTFExporter.js +0 -1932
- package/exporters/MMDExporter.cjs.js +0 -1
- package/exporters/MMDExporter.d.ts +0 -8
- package/exporters/MMDExporter.js +0 -160
- package/exporters/OBJExporter.cjs.js +0 -1
- package/exporters/OBJExporter.d.ts +0 -18
- package/exporters/OBJExporter.js +0 -228
- package/exporters/PLYExporter.cjs.js +0 -1
- package/exporters/PLYExporter.d.ts +0 -11
- package/exporters/PLYExporter.js +0 -339
- package/exporters/STLExporter.cjs.js +0 -1
- package/exporters/STLExporter.d.ts +0 -23
- package/exporters/STLExporter.js +0 -180
- package/exporters/USDZExporter.cjs.js +0 -1
- package/exporters/USDZExporter.d.ts +0 -27
- package/exporters/USDZExporter.js +0 -388
- package/geometries/BoxLineGeometry.cjs.js +0 -1
- package/geometries/BoxLineGeometry.d.ts +0 -12
- package/geometries/BoxLineGeometry.js +0 -52
- package/geometries/ConvexGeometry.cjs.js +0 -1
- package/geometries/ConvexGeometry.d.ts +0 -5
- package/geometries/ConvexGeometry.js +0 -38
- package/geometries/DecalGeometry.cjs.js +0 -1
- package/geometries/DecalGeometry.d.ts +0 -10
- package/geometries/DecalGeometry.js +0 -238
- package/geometries/LightningStrike.cjs.js +0 -1
- package/geometries/LightningStrike.d.ts +0 -108
- package/geometries/LightningStrike.js +0 -740
- package/geometries/ParametricGeometries.cjs.js +0 -1
- package/geometries/ParametricGeometries.d.ts +0 -32
- package/geometries/ParametricGeometries.js +0 -179
- package/geometries/ParametricGeometry.cjs.js +0 -1
- package/geometries/ParametricGeometry.d.ts +0 -18
- package/geometries/ParametricGeometry.js +0 -87
- package/geometries/RoundedBoxGeometry.cjs.js +0 -1
- package/geometries/RoundedBoxGeometry.d.ts +0 -5
- package/geometries/RoundedBoxGeometry.js +0 -122
- package/geometries/TeapotGeometry.cjs.js +0 -1
- package/geometries/TeapotGeometry.d.ts +0 -13
- package/geometries/TeapotGeometry.js +0 -297
- package/geometries/TextGeometry.cjs.js +0 -1
- package/geometries/TextGeometry.d.ts +0 -18
- package/geometries/TextGeometry.js +0 -37
- package/helpers/LightProbeHelper.cjs.js +0 -1
- package/helpers/LightProbeHelper.d.ts +0 -10
- package/helpers/LightProbeHelper.js +0 -40
- package/helpers/PositionalAudioHelper.cjs.js +0 -1
- package/helpers/PositionalAudioHelper.d.ts +0 -13
- package/helpers/PositionalAudioHelper.js +0 -75
- package/helpers/RectAreaLightHelper.cjs.js +0 -1
- package/helpers/RectAreaLightHelper.d.ts +0 -10
- package/helpers/RectAreaLightHelper.js +0 -60
- package/helpers/VertexNormalsHelper.cjs.js +0 -1
- package/helpers/VertexNormalsHelper.d.ts +0 -10
- package/helpers/VertexNormalsHelper.js +0 -75
- package/helpers/VertexTangentsHelper.cjs.js +0 -1
- package/helpers/VertexTangentsHelper.d.ts +0 -10
- package/helpers/VertexTangentsHelper.js +0 -63
- package/index.cjs.js +0 -1
- package/index.d.ts +0 -254
- package/index.js +0 -337
- package/interactive/HTMLMesh.cjs.js +0 -1
- package/interactive/HTMLMesh.d.ts +0 -6
- package/interactive/HTMLMesh.js +0 -406
- package/interactive/InteractiveGroup.cjs.js +0 -1
- package/interactive/InteractiveGroup.d.ts +0 -5
- package/interactive/InteractiveGroup.js +0 -87
- package/interactive/SelectionBox.cjs.js +0 -1
- package/interactive/SelectionBox.d.ts +0 -15
- package/interactive/SelectionBox.js +0 -152
- package/interactive/SelectionHelper.cjs.js +0 -1
- package/interactive/SelectionHelper.d.ts +0 -17
- package/interactive/SelectionHelper.js +0 -59
- package/libs/MeshoptDecoder.cjs.js +0 -1
- package/libs/MeshoptDecoder.d.ts +0 -12
- package/libs/MeshoptDecoder.js +0 -124
- package/libs/MotionControllers.cjs.js +0 -1
- package/libs/MotionControllers.d.ts +0 -132
- package/libs/MotionControllers.js +0 -455
- package/lights/LightProbeGenerator.cjs.js +0 -1
- package/lights/LightProbeGenerator.d.ts +0 -6
- package/lights/LightProbeGenerator.js +0 -200
- package/lights/RectAreaLightUniformsLib.cjs.js +0 -1
- package/lights/RectAreaLightUniformsLib.d.ts +0 -3
- package/lights/RectAreaLightUniformsLib.js +0 -9
- package/lines/Line2.cjs.js +0 -1
- package/lines/Line2.d.ts +0 -11
- package/lines/Line2.js +0 -16
- package/lines/LineGeometry.cjs.js +0 -1
- package/lines/LineGeometry.d.ts +0 -10
- package/lines/LineGeometry.js +0 -56
- package/lines/LineMaterial.cjs.js +0 -1
- package/lines/LineMaterial.d.ts +0 -31
- package/lines/LineMaterial.js +0 -577
- package/lines/LineSegments2.cjs.js +0 -1
- package/lines/LineSegments2.d.ts +0 -14
- package/lines/LineSegments2.js +0 -311
- package/lines/LineSegmentsGeometry.cjs.js +0 -1
- package/lines/LineSegmentsGeometry.d.ts +0 -23
- package/lines/LineSegmentsGeometry.js +0 -166
- package/lines/Wireframe.cjs.js +0 -1
- package/lines/Wireframe.d.ts +0 -11
- package/lines/Wireframe.js +0 -45
- package/lines/WireframeGeometry2.cjs.js +0 -1
- package/lines/WireframeGeometry2.d.ts +0 -8
- package/lines/WireframeGeometry2.js +0 -14
- package/loaders/3DMLoader.cjs.js +0 -1
- package/loaders/3DMLoader.d.ts +0 -17
- package/loaders/3DMLoader.js +0 -1037
- package/loaders/3MFLoader.cjs.js +0 -1
- package/loaders/3MFLoader.d.ts +0 -16
- package/loaders/3MFLoader.js +0 -1053
- package/loaders/AMFLoader.cjs.js +0 -1
- package/loaders/AMFLoader.d.ts +0 -14
- package/loaders/AMFLoader.js +0 -389
- package/loaders/AssimpLoader.cjs.js +0 -1
- package/loaders/AssimpLoader.js +0 -1793
- package/loaders/BVHLoader.cjs.js +0 -1
- package/loaders/BVHLoader.d.ts +0 -21
- package/loaders/BVHLoader.js +0 -313
- package/loaders/BasisTextureLoader.cjs.js +0 -1
- package/loaders/BasisTextureLoader.d.ts +0 -32
- package/loaders/BasisTextureLoader.js +0 -602
- package/loaders/ColladaLoader.cjs.js +0 -1
- package/loaders/ColladaLoader.d.ts +0 -20
- package/loaders/ColladaLoader.js +0 -2993
- package/loaders/DDSLoader.cjs.js +0 -1
- package/loaders/DDSLoader.d.ts +0 -16
- package/loaders/DDSLoader.js +0 -214
- package/loaders/DRACOLoader.cjs.js +0 -1
- package/loaders/DRACOLoader.d.ts +0 -18
- package/loaders/DRACOLoader.js +0 -447
- package/loaders/EXRLoader.cjs.js +0 -1
- package/loaders/EXRLoader.d.ts +0 -18
- package/loaders/EXRLoader.js +0 -1699
- package/loaders/FBXLoader.cjs.js +0 -1
- package/loaders/FBXLoader.d.ts +0 -14
- package/loaders/FBXLoader.js +0 -2917
- package/loaders/FontLoader.cjs.js +0 -1
- package/loaders/FontLoader.d.ts +0 -36
- package/loaders/FontLoader.js +0 -144
- package/loaders/GCodeLoader.cjs.js +0 -1
- package/loaders/GCodeLoader.d.ts +0 -15
- package/loaders/GCodeLoader.js +0 -189
- package/loaders/GLTFLoader.cjs.js +0 -1
- package/loaders/GLTFLoader.d.ts +0 -151
- package/loaders/GLTFLoader.js +0 -3136
- package/loaders/HDRCubeTextureLoader.cjs.js +0 -1
- package/loaders/HDRCubeTextureLoader.d.ts +0 -18
- package/loaders/HDRCubeTextureLoader.js +0 -77
- package/loaders/KMZLoader.cjs.js +0 -1
- package/loaders/KMZLoader.d.ts +0 -16
- package/loaders/KMZLoader.js +0 -88
- package/loaders/KTX2Loader.cjs.js +0 -1
- package/loaders/KTX2Loader.d.ts +0 -16
- package/loaders/KTX2Loader.js +0 -596
- package/loaders/KTXLoader.cjs.js +0 -1
- package/loaders/KTXLoader.d.ts +0 -16
- package/loaders/KTXLoader.js +0 -149
- package/loaders/LDrawLoader.cjs.js +0 -1
- package/loaders/LDrawLoader.d.ts +0 -26
- package/loaders/LDrawLoader.js +0 -1842
- package/loaders/LUT3dlLoader.cjs.js +0 -1
- package/loaders/LUT3dlLoader.d.ts +0 -20
- package/loaders/LUT3dlLoader.js +0 -115
- package/loaders/LUTCubeLoader.cjs.js +0 -1
- package/loaders/LUTCubeLoader.d.ts +0 -23
- package/loaders/LUTCubeLoader.js +0 -118
- package/loaders/LWOLoader.cjs.js +0 -1
- package/loaders/LWOLoader.d.ts +0 -26
- package/loaders/LWOLoader.js +0 -737
- package/loaders/LottieLoader.cjs.js +0 -1
- package/loaders/LottieLoader.d.ts +0 -15
- package/loaders/LottieLoader.js +0 -49
- package/loaders/MD2Loader.cjs.js +0 -1
- package/loaders/MD2Loader.d.ts +0 -14
- package/loaders/MD2Loader.js +0 -202
- package/loaders/MDDLoader.cjs.js +0 -1
- package/loaders/MDDLoader.d.ts +0 -19
- package/loaders/MDDLoader.js +0 -78
- package/loaders/MMDLoader.cjs.js +0 -1
- package/loaders/MMDLoader.d.ts +0 -63
- package/loaders/MMDLoader.js +0 -1434
- package/loaders/MTLLoader.cjs.js +0 -1
- package/loaders/MTLLoader.d.ts +0 -112
- package/loaders/MTLLoader.js +0 -390
- package/loaders/NRRDLoader.cjs.js +0 -1
- package/loaders/NRRDLoader.d.ts +0 -21
- package/loaders/NRRDLoader.js +0 -482
- package/loaders/NodeMaterialLoader.cjs.js +0 -1
- package/loaders/NodeMaterialLoader.js +0 -39
- package/loaders/OBJLoader.cjs.js +0 -1
- package/loaders/OBJLoader.d.ts +0 -17
- package/loaders/OBJLoader.js +0 -609
- package/loaders/PCDLoader.cjs.js +0 -1
- package/loaders/PCDLoader.d.ts +0 -15
- package/loaders/PCDLoader.js +0 -267
- package/loaders/PDBLoader.cjs.js +0 -1
- package/loaders/PDBLoader.d.ts +0 -22
- package/loaders/PDBLoader.js +0 -264
- package/loaders/PLYLoader.cjs.js +0 -1
- package/loaders/PLYLoader.d.ts +0 -16
- package/loaders/PLYLoader.js +0 -414
- package/loaders/PRWMLoader.cjs.js +0 -1
- package/loaders/PRWMLoader.d.ts +0 -16
- package/loaders/PRWMLoader.js +0 -197
- package/loaders/PVRLoader.cjs.js +0 -1
- package/loaders/PVRLoader.d.ts +0 -16
- package/loaders/PVRLoader.js +0 -192
- package/loaders/RGBELoader.cjs.js +0 -1
- package/loaders/RGBELoader.d.ts +0 -20
- package/loaders/RGBELoader.js +0 -382
- package/loaders/RGBMLoader.cjs.js +0 -1
- package/loaders/RGBMLoader.d.ts +0 -32
- package/loaders/RGBMLoader.js +0 -1168
- package/loaders/STLLoader.cjs.js +0 -1
- package/loaders/STLLoader.d.ts +0 -14
- package/loaders/STLLoader.js +0 -296
- package/loaders/SVGLoader.cjs.js +0 -1
- package/loaders/SVGLoader.d.ts +0 -63
- package/loaders/SVGLoader.js +0 -2083
- package/loaders/TDSLoader.cjs.js +0 -1
- package/loaders/TDSLoader.d.ts +0 -42
- package/loaders/TDSLoader.js +0 -870
- package/loaders/TGALoader.cjs.js +0 -1
- package/loaders/TGALoader.d.ts +0 -14
- package/loaders/TGALoader.js +0 -396
- package/loaders/TTFLoader.cjs.js +0 -1
- package/loaders/TTFLoader.d.ts +0 -15
- package/loaders/TTFLoader.js +0 -152
- package/loaders/TiltLoader.cjs.js +0 -1
- package/loaders/TiltLoader.d.ts +0 -14
- package/loaders/TiltLoader.js +0 -411
- package/loaders/VOXLoader.cjs.js +0 -1
- package/loaders/VOXLoader.d.ts +0 -28
- package/loaders/VOXLoader.js +0 -196
- package/loaders/VRMLLoader.cjs.js +0 -1
- package/loaders/VRMLLoader.d.ts +0 -14
- package/loaders/VRMLLoader.js +0 -2575
- package/loaders/VRMLoader.cjs.js +0 -1
- package/loaders/VRMLoader.js +0 -46
- package/loaders/VTKLoader.cjs.js +0 -1
- package/loaders/VTKLoader.d.ts +0 -14
- package/loaders/VTKLoader.js +0 -834
- package/loaders/XLoader.cjs.js +0 -1
- package/loaders/XLoader.js +0 -1434
- package/loaders/XYZLoader.cjs.js +0 -1
- package/loaders/XYZLoader.d.ts +0 -14
- package/loaders/XYZLoader.js +0 -66
- package/loaders/lwo/IFFParser.cjs.js +0 -1
- package/loaders/lwo/IFFParser.js +0 -951
- package/loaders/lwo/LWO2Parser.cjs.js +0 -1
- package/loaders/lwo/LWO2Parser.js +0 -430
- package/loaders/lwo/LWO3Parser.cjs.js +0 -1
- package/loaders/lwo/LWO3Parser.js +0 -385
- package/math/Capsule.cjs.js +0 -1
- package/math/Capsule.d.ts +0 -27
- package/math/Capsule.js +0 -87
- package/math/ColorConverter.cjs.js +0 -1
- package/math/ColorConverter.d.ts +0 -21
- package/math/ColorConverter.js +0 -65
- package/math/ConvexHull.cjs.js +0 -1
- package/math/ConvexHull.d.ts +0 -89
- package/math/ConvexHull.js +0 -834
- package/math/ImprovedNoise.cjs.js +0 -1
- package/math/ImprovedNoise.d.ts +0 -4
- package/math/ImprovedNoise.js +0 -52
- package/math/Lut.cjs.js +0 -1
- package/math/Lut.d.ts +0 -27
- package/math/Lut.js +0 -119
- package/math/MeshSurfaceSampler.cjs.js +0 -1
- package/math/MeshSurfaceSampler.d.ts +0 -15
- package/math/MeshSurfaceSampler.js +0 -150
- package/math/OBB.cjs.js +0 -1
- package/math/OBB.d.ts +0 -24
- package/math/OBB.js +0 -296
- package/math/Octree.cjs.js +0 -1
- package/math/Octree.d.ts +0 -24
- package/math/Octree.js +0 -341
- package/math/SimplexNoise.cjs.js +0 -1
- package/math/SimplexNoise.d.ts +0 -17
- package/math/SimplexNoise.js +0 -446
- package/misc/ConvexObjectBreaker.cjs.js +0 -1
- package/misc/ConvexObjectBreaker.d.ts +0 -25
- package/misc/ConvexObjectBreaker.js +0 -398
- package/misc/GPUComputationRenderer.cjs.js +0 -1
- package/misc/GPUComputationRenderer.d.ts +0 -52
- package/misc/GPUComputationRenderer.js +0 -296
- package/misc/Gyroscope.cjs.js +0 -1
- package/misc/Gyroscope.d.ts +0 -5
- package/misc/Gyroscope.js +0 -41
- package/misc/MD2Character.cjs.js +0 -1
- package/misc/MD2Character.d.ts +0 -33
- package/misc/MD2Character.js +0 -184
- package/misc/MD2CharacterComplex.cjs.js +0 -1
- package/misc/MD2CharacterComplex.d.ts +0 -47
- package/misc/MD2CharacterComplex.js +0 -379
- package/misc/MorphAnimMesh.cjs.js +0 -1
- package/misc/MorphAnimMesh.d.ts +0 -13
- package/misc/MorphAnimMesh.js +0 -48
- package/misc/MorphBlendMesh.cjs.js +0 -1
- package/misc/MorphBlendMesh.d.ts +0 -21
- package/misc/MorphBlendMesh.js +0 -203
- package/misc/ProgressiveLightmap.cjs.js +0 -1
- package/misc/ProgressiveLightmap.js +0 -285
- package/misc/RollerCoaster.cjs.js +0 -1
- package/misc/RollerCoaster.d.ts +0 -21
- package/misc/RollerCoaster.js +0 -375
- package/misc/Timer.cjs.js +0 -1
- package/misc/Timer.d.ts +0 -27
- package/misc/Timer.js +0 -125
- package/misc/TubePainter.cjs.js +0 -1
- package/misc/TubePainter.d.ts +0 -10
- package/misc/TubePainter.js +0 -141
- package/misc/Volume.cjs.js +0 -1
- package/misc/Volume.d.ts +0 -37
- package/misc/Volume.js +0 -406
- package/misc/VolumeSlice.cjs.js +0 -1
- package/misc/VolumeSlice.d.ts +0 -28
- package/misc/VolumeSlice.js +0 -194
- package/misc/WebGL.cjs.js +0 -1
- package/misc/WebGL.d.ts +0 -5
- package/misc/WebGL.js +0 -71
- package/modifiers/CurveModifier.cjs.js +0 -1
- package/modifiers/CurveModifier.d.ts +0 -39
- package/modifiers/CurveModifier.js +0 -288
- package/modifiers/EdgeSplitModifier.cjs.js +0 -1
- package/modifiers/EdgeSplitModifier.d.ts +0 -19
- package/modifiers/EdgeSplitModifier.js +0 -205
- package/modifiers/SimplifyModifier.cjs.js +0 -1
- package/modifiers/SimplifyModifier.d.ts +0 -12
- package/modifiers/SimplifyModifier.js +0 -407
- package/modifiers/TessellateModifier.cjs.js +0 -1
- package/modifiers/TessellateModifier.d.ts +0 -8
- package/modifiers/TessellateModifier.js +0 -231
- package/nodes/Nodes.cjs.js +0 -1
- package/nodes/Nodes.js +0 -204
- package/nodes/ShaderNode.cjs.js +0 -1
- package/nodes/ShaderNode.js +0 -308
- package/nodes/accessors/BufferNode.cjs.js +0 -1
- package/nodes/accessors/BufferNode.js +0 -18
- package/nodes/accessors/CameraNode.cjs.js +0 -1
- package/nodes/accessors/CameraNode.js +0 -48
- package/nodes/accessors/CubeTextureNode.cjs.js +0 -1
- package/nodes/accessors/CubeTextureNode.js +0 -53
- package/nodes/accessors/MaterialNode.cjs.js +0 -1
- package/nodes/accessors/MaterialNode.js +0 -80
- package/nodes/accessors/MaterialReferenceNode.cjs.js +0 -1
- package/nodes/accessors/MaterialReferenceNode.js +0 -16
- package/nodes/accessors/ModelNode.cjs.js +0 -1
- package/nodes/accessors/ModelNode.js +0 -10
- package/nodes/accessors/ModelViewProjectionNode.cjs.js +0 -1
- package/nodes/accessors/ModelViewProjectionNode.js +0 -22
- package/nodes/accessors/NormalNode.cjs.js +0 -1
- package/nodes/accessors/NormalNode.js +0 -60
- package/nodes/accessors/Object3DNode.cjs.js +0 -1
- package/nodes/accessors/Object3DNode.js +0 -85
- package/nodes/accessors/PointUVNode.cjs.js +0 -1
- package/nodes/accessors/PointUVNode.js +0 -16
- package/nodes/accessors/PositionNode.cjs.js +0 -1
- package/nodes/accessors/PositionNode.js +0 -63
- package/nodes/accessors/ReferenceNode.cjs.js +0 -1
- package/nodes/accessors/ReferenceNode.js +0 -43
- package/nodes/accessors/ReflectNode.cjs.js +0 -1
- package/nodes/accessors/ReflectNode.js +0 -45
- package/nodes/accessors/SkinningNode.cjs.js +0 -1
- package/nodes/accessors/SkinningNode.js +0 -59
- package/nodes/accessors/TextureNode.cjs.js +0 -1
- package/nodes/accessors/TextureNode.js +0 -68
- package/nodes/accessors/UVNode.cjs.js +0 -1
- package/nodes/accessors/UVNode.js +0 -28
- package/nodes/core/ArrayUniformNode.cjs.js +0 -1
- package/nodes/core/ArrayUniformNode.js +0 -17
- package/nodes/core/AttributeNode.cjs.js +0 -1
- package/nodes/core/AttributeNode.js +0 -36
- package/nodes/core/BypassNode.cjs.js +0 -1
- package/nodes/core/BypassNode.js +0 -28
- package/nodes/core/CodeNode.cjs.js +0 -1
- package/nodes/core/CodeNode.js +0 -35
- package/nodes/core/ConstNode.cjs.js +0 -1
- package/nodes/core/ConstNode.js +0 -17
- package/nodes/core/ContextNode.cjs.js +0 -1
- package/nodes/core/ContextNode.js +0 -26
- package/nodes/core/ExpressionNode.cjs.js +0 -1
- package/nodes/core/ExpressionNode.js +0 -22
- package/nodes/core/FunctionCallNode.cjs.js +0 -1
- package/nodes/core/FunctionCallNode.js +0 -45
- package/nodes/core/FunctionNode.cjs.js +0 -1
- package/nodes/core/FunctionNode.js +0 -70
- package/nodes/core/InputNode.cjs.js +0 -1
- package/nodes/core/InputNode.js +0 -48
- package/nodes/core/Node.cjs.js +0 -1
- package/nodes/core/Node.js +0 -178
- package/nodes/core/NodeAttribute.cjs.js +0 -1
- package/nodes/core/NodeAttribute.js +0 -11
- package/nodes/core/NodeBuilder.cjs.js +0 -1
- package/nodes/core/NodeBuilder.js +0 -509
- package/nodes/core/NodeCode.cjs.js +0 -1
- package/nodes/core/NodeCode.js +0 -13
- package/nodes/core/NodeFrame.cjs.js +0 -1
- package/nodes/core/NodeFrame.js +0 -37
- package/nodes/core/NodeFunction.cjs.js +0 -1
- package/nodes/core/NodeFunction.js +0 -17
- package/nodes/core/NodeFunctionInput.cjs.js +0 -1
- package/nodes/core/NodeFunctionInput.js +0 -14
- package/nodes/core/NodeKeywords.cjs.js +0 -1
- package/nodes/core/NodeKeywords.js +0 -54
- package/nodes/core/NodeParser.cjs.js +0 -1
- package/nodes/core/NodeParser.js +0 -8
- package/nodes/core/NodeUniform.cjs.js +0 -1
- package/nodes/core/NodeUniform.js +0 -21
- package/nodes/core/NodeUtils.cjs.js +0 -1
- package/nodes/core/NodeUtils.js +0 -61
- package/nodes/core/NodeVar.cjs.js +0 -1
- package/nodes/core/NodeVar.js +0 -11
- package/nodes/core/NodeVary.cjs.js +0 -1
- package/nodes/core/NodeVary.js +0 -11
- package/nodes/core/PropertyNode.cjs.js +0 -1
- package/nodes/core/PropertyNode.js +0 -26
- package/nodes/core/TempNode.cjs.js +0 -1
- package/nodes/core/TempNode.js +0 -30
- package/nodes/core/UniformNode.cjs.js +0 -1
- package/nodes/core/UniformNode.js +0 -28
- package/nodes/core/VarNode.cjs.js +0 -1
- package/nodes/core/VarNode.js +0 -38
- package/nodes/core/VaryNode.cjs.js +0 -1
- package/nodes/core/VaryNode.js +0 -38
- package/nodes/core/constants.cjs.js +0 -1
- package/nodes/core/constants.js +0 -11
- package/nodes/display/ColorSpaceNode.cjs.js +0 -1
- package/nodes/display/ColorSpaceNode.js +0 -66
- package/nodes/display/NormalMapNode.cjs.js +0 -1
- package/nodes/display/NormalMapNode.js +0 -71
- package/nodes/fog/FogNode.cjs.js +0 -1
- package/nodes/fog/FogNode.js +0 -18
- package/nodes/fog/FogRangeNode.cjs.js +0 -1
- package/nodes/fog/FogRangeNode.js +0 -20
- package/nodes/functions/BSDFs.cjs.js +0 -1
- package/nodes/functions/BSDFs.js +0 -121
- package/nodes/functions/PhysicalMaterialFunctions.cjs.js +0 -1
- package/nodes/functions/PhysicalMaterialFunctions.js +0 -57
- package/nodes/lights/LightContextNode.cjs.js +0 -1
- package/nodes/lights/LightContextNode.js +0 -43
- package/nodes/lights/LightNode.cjs.js +0 -1
- package/nodes/lights/LightNode.js +0 -61
- package/nodes/lights/LightsNode.cjs.js +0 -1
- package/nodes/lights/LightsNode.js +0 -77
- package/nodes/loaders/NodeLoader.cjs.js +0 -1
- package/nodes/loaders/NodeLoader.js +0 -212
- package/nodes/loaders/NodeMaterialLoader.cjs.js +0 -1
- package/nodes/loaders/NodeMaterialLoader.js +0 -29
- package/nodes/loaders/NodeObjectLoader.cjs.js +0 -1
- package/nodes/loaders/NodeObjectLoader.js +0 -49
- package/nodes/materials/LineBasicNodeMaterial.cjs.js +0 -1
- package/nodes/materials/LineBasicNodeMaterial.js +0 -31
- package/nodes/materials/Materials.cjs.js +0 -1
- package/nodes/materials/Materials.js +0 -27
- package/nodes/materials/MeshBasicNodeMaterial.cjs.js +0 -1
- package/nodes/materials/MeshBasicNodeMaterial.js +0 -32
- package/nodes/materials/MeshStandardNodeMaterial.cjs.js +0 -1
- package/nodes/materials/MeshStandardNodeMaterial.js +0 -43
- package/nodes/materials/NodeMaterial.cjs.js +0 -1
- package/nodes/materials/NodeMaterial.js +0 -79
- package/nodes/materials/PointsNodeMaterial.cjs.js +0 -1
- package/nodes/materials/PointsNodeMaterial.js +0 -34
- package/nodes/math/CondNode.cjs.js +0 -1
- package/nodes/math/CondNode.js +0 -49
- package/nodes/math/MathNode.cjs.js +0 -1
- package/nodes/math/MathNode.js +0 -206
- package/nodes/math/OperatorNode.cjs.js +0 -1
- package/nodes/math/OperatorNode.js +0 -124
- package/nodes/parsers/GLSLNodeFunction.cjs.js +0 -1
- package/nodes/parsers/GLSLNodeFunction.js +0 -101
- package/nodes/parsers/GLSLNodeParser.cjs.js +0 -1
- package/nodes/parsers/GLSLNodeParser.js +0 -13
- package/nodes/parsers/WGSLNodeFunction.cjs.js +0 -1
- package/nodes/parsers/WGSLNodeFunction.js +0 -71
- package/nodes/parsers/WGSLNodeParser.cjs.js +0 -1
- package/nodes/parsers/WGSLNodeParser.js +0 -13
- package/nodes/procedural/CheckerNode.cjs.js +0 -1
- package/nodes/procedural/CheckerNode.js +0 -26
- package/nodes/utils/ArrayElementNode.cjs.js +0 -1
- package/nodes/utils/ArrayElementNode.js +0 -22
- package/nodes/utils/ConvertNode.cjs.js +0 -1
- package/nodes/utils/ConvertNode.js +0 -29
- package/nodes/utils/JoinNode.cjs.js +0 -1
- package/nodes/utils/JoinNode.js +0 -29
- package/nodes/utils/MatcapUVNode.cjs.js +0 -1
- package/nodes/utils/MatcapUVNode.js +0 -18
- package/nodes/utils/OscNode.cjs.js +0 -1
- package/nodes/utils/OscNode.js +0 -55
- package/nodes/utils/SplitNode.cjs.js +0 -1
- package/nodes/utils/SplitNode.js +0 -58
- package/nodes/utils/SpriteSheetUVNode.cjs.js +0 -1
- package/nodes/utils/SpriteSheetUVNode.js +0 -39
- package/nodes/utils/TimerNode.cjs.js +0 -1
- package/nodes/utils/TimerNode.js +0 -47
- package/objects/GroundProjectedEnv.cjs.js +0 -1
- package/objects/GroundProjectedEnv.d.ts +0 -12
- package/objects/GroundProjectedEnv.js +0 -145
- package/objects/Lensflare.cjs.js +0 -1
- package/objects/Lensflare.d.ts +0 -17
- package/objects/Lensflare.js +0 -332
- package/objects/LightningStorm.cjs.js +0 -1
- package/objects/LightningStorm.d.ts +0 -32
- package/objects/LightningStorm.js +0 -174
- package/objects/MarchingCubes.cjs.js +0 -1
- package/objects/MarchingCubes.d.ts +0 -75
- package/objects/MarchingCubes.js +0 -610
- package/objects/Reflector.cjs.js +0 -1
- package/objects/Reflector.d.ts +0 -19
- package/objects/Reflector.js +0 -188
- package/objects/ReflectorForSSRPass.cjs.js +0 -1
- package/objects/ReflectorForSSRPass.d.ts +0 -57
- package/objects/ReflectorForSSRPass.js +0 -298
- package/objects/ReflectorRTT.cjs.js +0 -1
- package/objects/ReflectorRTT.js +0 -11
- package/objects/Refractor.cjs.js +0 -1
- package/objects/Refractor.d.ts +0 -19
- package/objects/Refractor.js +0 -220
- package/objects/ShadowMesh.cjs.js +0 -1
- package/objects/ShadowMesh.d.ts +0 -7
- package/objects/ShadowMesh.js +0 -50
- package/objects/Sky.cjs.js +0 -1
- package/objects/Sky.d.ts +0 -30
- package/objects/Sky.js +0 -85
- package/objects/Water.cjs.js +0 -1
- package/objects/Water.d.ts +0 -22
- package/objects/Water.js +0 -279
- package/objects/Water2.cjs.js +0 -1
- package/objects/Water2.d.ts +0 -30
- package/objects/Water2.js +0 -288
- package/offscreen/jank.cjs.js +0 -1
- package/offscreen/jank.js +0 -30
- package/offscreen/offscreen.cjs.js +0 -1
- package/offscreen/offscreen.js +0 -7
- package/offscreen/scene.cjs.js +0 -1
- package/offscreen/scene.js +0 -73
- package/physics/AmmoPhysics.cjs.js +0 -1
- package/physics/AmmoPhysics.d.ts +0 -7
- package/physics/AmmoPhysics.js +0 -206
- package/postprocessing/AdaptiveToneMappingPass.cjs.js +0 -1
- package/postprocessing/AdaptiveToneMappingPass.d.ts +0 -29
- package/postprocessing/AdaptiveToneMappingPass.js +0 -247
- package/postprocessing/AfterimagePass.cjs.js +0 -1
- package/postprocessing/AfterimagePass.d.ts +0 -15
- package/postprocessing/AfterimagePass.js +0 -76
- package/postprocessing/BloomPass.cjs.js +0 -1
- package/postprocessing/BloomPass.d.ts +0 -16
- package/postprocessing/BloomPass.js +0 -116
- package/postprocessing/BokehPass.cjs.js +0 -1
- package/postprocessing/BokehPass.d.ts +0 -23
- package/postprocessing/BokehPass.js +0 -106
- package/postprocessing/ClearPass.cjs.js +0 -1
- package/postprocessing/ClearPass.d.ts +0 -10
- package/postprocessing/ClearPass.js +0 -42
- package/postprocessing/CubeTexturePass.cjs.js +0 -1
- package/postprocessing/CubeTexturePass.d.ts +0 -14
- package/postprocessing/CubeTexturePass.js +0 -48
- package/postprocessing/DotScreenPass.cjs.js +0 -1
- package/postprocessing/DotScreenPass.d.ts +0 -10
- package/postprocessing/DotScreenPass.js +0 -48
- package/postprocessing/EffectComposer.cjs.js +0 -1
- package/postprocessing/EffectComposer.d.ts +0 -27
- package/postprocessing/EffectComposer.js +0 -186
- package/postprocessing/FilmPass.cjs.js +0 -1
- package/postprocessing/FilmPass.d.ts +0 -10
- package/postprocessing/FilmPass.js +0 -47
- package/postprocessing/GlitchPass.cjs.js +0 -1
- package/postprocessing/GlitchPass.d.ts +0 -15
- package/postprocessing/GlitchPass.js +0 -96
- package/postprocessing/HalftonePass.cjs.js +0 -1
- package/postprocessing/HalftonePass.d.ts +0 -23
- package/postprocessing/HalftonePass.js +0 -64
- package/postprocessing/LUTPass.cjs.js +0 -1
- package/postprocessing/LUTPass.d.ts +0 -13
- package/postprocessing/LUTPass.js +0 -161
- package/postprocessing/MaskPass.cjs.js +0 -1
- package/postprocessing/MaskPass.d.ts +0 -14
- package/postprocessing/MaskPass.js +0 -79
- package/postprocessing/OutlinePass.cjs.js +0 -1
- package/postprocessing/OutlinePass.d.ts +0 -53
- package/postprocessing/OutlinePass.js +0 -580
- package/postprocessing/Pass.cjs.js +0 -1
- package/postprocessing/Pass.d.ts +0 -20
- package/postprocessing/Pass.js +0 -61
- package/postprocessing/RenderPass.cjs.js +0 -1
- package/postprocessing/RenderPass.d.ts +0 -14
- package/postprocessing/RenderPass.js +0 -71
- package/postprocessing/RenderPixelatedPass.cjs.js +0 -1
- package/postprocessing/RenderPixelatedPass.js +0 -213
- package/postprocessing/SAOPass.cjs.js +0 -1
- package/postprocessing/SAOPass.d.ts +0 -79
- package/postprocessing/SAOPass.js +0 -317
- package/postprocessing/SMAAPass.cjs.js +0 -1
- package/postprocessing/SMAAPass.d.ts +0 -21
- package/postprocessing/SMAAPass.js +0 -132
- package/postprocessing/SSAARenderPass.cjs.js +0 -1
- package/postprocessing/SSAARenderPass.d.ts +0 -17
- package/postprocessing/SSAARenderPass.js +0 -118
- package/postprocessing/SSAOPass.cjs.js +0 -1
- package/postprocessing/SSAOPass.d.ts +0 -71
- package/postprocessing/SSAOPass.js +0 -314
- package/postprocessing/SSRPass.cjs.js +0 -1
- package/postprocessing/SSRPass.d.ts +0 -124
- package/postprocessing/SSRPass.js +0 -508
- package/postprocessing/SavePass.cjs.js +0 -1
- package/postprocessing/SavePass.d.ts +0 -12
- package/postprocessing/SavePass.js +0 -42
- package/postprocessing/ShaderPass.cjs.js +0 -1
- package/postprocessing/ShaderPass.d.ts +0 -13
- package/postprocessing/ShaderPass.js +0 -55
- package/postprocessing/TAARenderPass.cjs.js +0 -1
- package/postprocessing/TAARenderPass.d.ts +0 -8
- package/postprocessing/TAARenderPass.js +0 -107
- package/postprocessing/TexturePass.cjs.js +0 -1
- package/postprocessing/TexturePass.d.ts +0 -12
- package/postprocessing/TexturePass.js +0 -40
- package/postprocessing/UnrealBloomPass.cjs.js +0 -1
- package/postprocessing/UnrealBloomPass.d.ts +0 -31
- package/postprocessing/UnrealBloomPass.js +0 -273
- package/postprocessing/WaterPass.cjs.js +0 -1
- package/postprocessing/WaterPass.d.ts +0 -12
- package/postprocessing/WaterPass.js +0 -102
- package/renderers/CSS2DRenderer.cjs.js +0 -1
- package/renderers/CSS2DRenderer.d.ts +0 -22
- package/renderers/CSS2DRenderer.js +0 -152
- package/renderers/CSS3DRenderer.cjs.js +0 -1
- package/renderers/CSS3DRenderer.d.ts +0 -26
- package/renderers/CSS3DRenderer.js +0 -166
- package/renderers/Projector.cjs.js +0 -1
- package/renderers/Projector.d.ts +0 -60
- package/renderers/Projector.js +0 -678
- package/renderers/SVGRenderer.cjs.js +0 -1
- package/renderers/SVGRenderer.d.ts +0 -25
- package/renderers/SVGRenderer.js +0 -416
- package/renderers/nodes/accessors/CameraNode.cjs.js +0 -1
- package/renderers/nodes/accessors/CameraNode.js +0 -73
- package/renderers/nodes/accessors/ModelNode.cjs.js +0 -1
- package/renderers/nodes/accessors/ModelNode.js +0 -69
- package/renderers/nodes/accessors/ModelViewProjectionNode.cjs.js +0 -1
- package/renderers/nodes/accessors/ModelViewProjectionNode.js +0 -33
- package/renderers/nodes/accessors/NormalNode.cjs.js +0 -1
- package/renderers/nodes/accessors/NormalNode.js +0 -70
- package/renderers/nodes/accessors/PositionNode.cjs.js +0 -1
- package/renderers/nodes/accessors/PositionNode.js +0 -30
- package/renderers/nodes/accessors/UVNode.cjs.js +0 -1
- package/renderers/nodes/accessors/UVNode.js +0 -17
- package/renderers/nodes/core/AttributeNode.cjs.js +0 -1
- package/renderers/nodes/core/AttributeNode.js +0 -43
- package/renderers/nodes/core/InputNode.cjs.js +0 -1
- package/renderers/nodes/core/InputNode.js +0 -40
- package/renderers/nodes/core/Node.cjs.js +0 -1
- package/renderers/nodes/core/Node.js +0 -43
- package/renderers/nodes/core/NodeAttribute.cjs.js +0 -1
- package/renderers/nodes/core/NodeAttribute.js +0 -12
- package/renderers/nodes/core/NodeBuilder.cjs.js +0 -1
- package/renderers/nodes/core/NodeBuilder.js +0 -309
- package/renderers/nodes/core/NodeFrame.cjs.js +0 -1
- package/renderers/nodes/core/NodeFrame.js +0 -37
- package/renderers/nodes/core/NodeSlot.cjs.js +0 -1
- package/renderers/nodes/core/NodeSlot.js +0 -10
- package/renderers/nodes/core/NodeUniform.cjs.js +0 -1
- package/renderers/nodes/core/NodeUniform.js +0 -22
- package/renderers/nodes/core/NodeVary.cjs.js +0 -1
- package/renderers/nodes/core/NodeVary.js +0 -13
- package/renderers/nodes/core/VaryNode.cjs.js +0 -1
- package/renderers/nodes/core/VaryNode.js +0 -27
- package/renderers/nodes/core/constants.cjs.js +0 -1
- package/renderers/nodes/core/constants.js +0 -19
- package/renderers/nodes/inputs/ColorNode.cjs.js +0 -1
- package/renderers/nodes/inputs/ColorNode.js +0 -16
- package/renderers/nodes/inputs/FloatNode.cjs.js +0 -1
- package/renderers/nodes/inputs/FloatNode.js +0 -16
- package/renderers/nodes/inputs/Matrix3Node.cjs.js +0 -1
- package/renderers/nodes/inputs/Matrix3Node.js +0 -17
- package/renderers/nodes/inputs/Matrix4Node.cjs.js +0 -1
- package/renderers/nodes/inputs/Matrix4Node.js +0 -17
- package/renderers/nodes/inputs/TextureNode.cjs.js +0 -1
- package/renderers/nodes/inputs/TextureNode.js +0 -27
- package/renderers/nodes/inputs/Vector2Node.cjs.js +0 -1
- package/renderers/nodes/inputs/Vector2Node.js +0 -16
- package/renderers/nodes/inputs/Vector3Node.cjs.js +0 -1
- package/renderers/nodes/inputs/Vector3Node.js +0 -17
- package/renderers/nodes/inputs/Vector4Node.cjs.js +0 -1
- package/renderers/nodes/inputs/Vector4Node.js +0 -17
- package/renderers/nodes/math/MathNode.cjs.js +0 -1
- package/renderers/nodes/math/MathNode.js +0 -64
- package/renderers/nodes/math/OperatorNode.cjs.js +0 -1
- package/renderers/nodes/math/OperatorNode.js +0 -57
- package/renderers/nodes/utils/SwitchNode.cjs.js +0 -1
- package/renderers/nodes/utils/SwitchNode.js +0 -24
- package/renderers/nodes/utils/TimerNode.cjs.js +0 -1
- package/renderers/nodes/utils/TimerNode.js +0 -18
- package/renderers/webgpu/WebGPU.cjs.js +0 -1
- package/renderers/webgpu/WebGPU.js +0 -25
- package/renderers/webgpu/WebGPUAttributes.cjs.js +0 -1
- package/renderers/webgpu/WebGPUAttributes.js +0 -75
- package/renderers/webgpu/WebGPUBackground.cjs.js +0 -1
- package/renderers/webgpu/WebGPUBackground.js +0 -77
- package/renderers/webgpu/WebGPUBinding.cjs.js +0 -1
- package/renderers/webgpu/WebGPUBinding.js +0 -16
- package/renderers/webgpu/WebGPUBindings.cjs.js +0 -1
- package/renderers/webgpu/WebGPUBindings.js +0 -190
- package/renderers/webgpu/WebGPUComputePipelines.cjs.js +0 -1
- package/renderers/webgpu/WebGPUComputePipelines.js +0 -54
- package/renderers/webgpu/WebGPUGeometries.cjs.js +0 -1
- package/renderers/webgpu/WebGPUGeometries.js +0 -50
- package/renderers/webgpu/WebGPUInfo.cjs.js +0 -1
- package/renderers/webgpu/WebGPUInfo.js +0 -50
- package/renderers/webgpu/WebGPUObjects.cjs.js +0 -1
- package/renderers/webgpu/WebGPUObjects.js +0 -29
- package/renderers/webgpu/WebGPUProperties.cjs.js +0 -1
- package/renderers/webgpu/WebGPUProperties.js +0 -27
- package/renderers/webgpu/WebGPURenderLists.cjs.js +0 -1
- package/renderers/webgpu/WebGPURenderLists.js +0 -134
- package/renderers/webgpu/WebGPURenderPipelines.cjs.js +0 -1
- package/renderers/webgpu/WebGPURenderPipelines.js +0 -671
- package/renderers/webgpu/WebGPURenderer.cjs.js +0 -1
- package/renderers/webgpu/WebGPURenderer.js +0 -713
- package/renderers/webgpu/WebGPUSampledTexture.cjs.js +0 -1
- package/renderers/webgpu/WebGPUSampledTexture.js +0 -53
- package/renderers/webgpu/WebGPUSampler.cjs.js +0 -1
- package/renderers/webgpu/WebGPUSampler.js +0 -19
- package/renderers/webgpu/WebGPUStorageBuffer.cjs.js +0 -1
- package/renderers/webgpu/WebGPUStorageBuffer.js +0 -19
- package/renderers/webgpu/WebGPUTextureRenderer.cjs.js +0 -1
- package/renderers/webgpu/WebGPUTextureRenderer.js +0 -28
- package/renderers/webgpu/WebGPUTextureUtils.cjs.js +0 -1
- package/renderers/webgpu/WebGPUTextureUtils.js +0 -108
- package/renderers/webgpu/WebGPUTextures.cjs.js +0 -1
- package/renderers/webgpu/WebGPUTextures.js +0 -630
- package/renderers/webgpu/WebGPUUniform.cjs.js +0 -1
- package/renderers/webgpu/WebGPUUniform.js +0 -107
- package/renderers/webgpu/WebGPUUniformsGroup.cjs.js +0 -1
- package/renderers/webgpu/WebGPUUniformsGroup.js +0 -215
- package/renderers/webgpu/constants.cjs.js +0 -1
- package/renderers/webgpu/constants.js +0 -221
- package/renderers/webgpu/nodes/ShaderLib.cjs.js +0 -1
- package/renderers/webgpu/nodes/ShaderLib.js +0 -41
- package/renderers/webgpu/nodes/WebGPUNodeBuilder.cjs.js +0 -1
- package/renderers/webgpu/nodes/WebGPUNodeBuilder.js +0 -235
- package/renderers/webgpu/nodes/WebGPUNodeUniform.cjs.js +0 -1
- package/renderers/webgpu/nodes/WebGPUNodeUniform.js +0 -87
- package/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.cjs.js +0 -1
- package/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.js +0 -15
- package/renderers/webgpu/nodes/WebGPUNodes.cjs.js +0 -1
- package/renderers/webgpu/nodes/WebGPUNodes.js +0 -77
- package/shaders/ACESFilmicToneMappingShader.cjs.js +0 -1
- package/shaders/ACESFilmicToneMappingShader.d.ts +0 -9
- package/shaders/ACESFilmicToneMappingShader.js +0 -28
- package/shaders/AfterimageShader.cjs.js +0 -1
- package/shaders/AfterimageShader.d.ts +0 -10
- package/shaders/AfterimageShader.js +0 -22
- package/shaders/BasicShader.cjs.js +0 -1
- package/shaders/BasicShader.d.ts +0 -5
- package/shaders/BasicShader.js +0 -10
- package/shaders/BleachBypassShader.cjs.js +0 -1
- package/shaders/BleachBypassShader.d.ts +0 -9
- package/shaders/BleachBypassShader.js +0 -19
- package/shaders/BlendShader.cjs.js +0 -1
- package/shaders/BlendShader.d.ts +0 -18
- package/shaders/BlendShader.js +0 -23
- package/shaders/BokehShader.cjs.js +0 -1
- package/shaders/BokehShader.d.ts +0 -19
- package/shaders/BokehShader.js +0 -44
- package/shaders/BokehShader2.cjs.js +0 -1
- package/shaders/BokehShader2.d.ts +0 -43
- package/shaders/BokehShader2.js +0 -98
- package/shaders/BrightnessContrastShader.cjs.js +0 -1
- package/shaders/BrightnessContrastShader.d.ts +0 -15
- package/shaders/BrightnessContrastShader.js +0 -23
- package/shaders/ColorCorrectionShader.cjs.js +0 -1
- package/shaders/ColorCorrectionShader.d.ts +0 -19
- package/shaders/ColorCorrectionShader.js +0 -26
- package/shaders/ColorifyShader.cjs.js +0 -1
- package/shaders/ColorifyShader.d.ts +0 -13
- package/shaders/ColorifyShader.js +0 -20
- package/shaders/ConvolutionShader.cjs.js +0 -1
- package/shaders/ConvolutionShader.d.ts +0 -16
- package/shaders/ConvolutionShader.js +0 -51
- package/shaders/CopyShader.cjs.js +0 -1
- package/shaders/CopyShader.d.ts +0 -9
- package/shaders/CopyShader.js +0 -17
- package/shaders/DOFMipMapShader.cjs.js +0 -1
- package/shaders/DOFMipMapShader.d.ts +0 -18
- package/shaders/DOFMipMapShader.js +0 -25
- package/shaders/DepthLimitedBlurShader.cjs.js +0 -1
- package/shaders/DepthLimitedBlurShader.d.ts +0 -28
- package/shaders/DepthLimitedBlurShader.js +0 -69
- package/shaders/DigitalGlitch.cjs.js +0 -1
- package/shaders/DigitalGlitch.d.ts +0 -39
- package/shaders/DigitalGlitch.js +0 -106
- package/shaders/DotScreenShader.cjs.js +0 -1
- package/shaders/DotScreenShader.d.ts +0 -22
- package/shaders/DotScreenShader.js +0 -31
- package/shaders/FXAAShader.cjs.js +0 -1
- package/shaders/FXAAShader.d.ts +0 -13
- package/shaders/FXAAShader.js +0 -23
- package/shaders/FilmShader.cjs.js +0 -1
- package/shaders/FilmShader.d.ts +0 -24
- package/shaders/FilmShader.js +0 -56
- package/shaders/FocusShader.cjs.js +0 -1
- package/shaders/FocusShader.d.ts +0 -21
- package/shaders/FocusShader.js +0 -28
- package/shaders/FreiChenShader.cjs.js +0 -1
- package/shaders/FreiChenShader.d.ts +0 -13
- package/shaders/FreiChenShader.js +0 -28
- package/shaders/FresnelShader.cjs.js +0 -1
- package/shaders/FresnelShader.d.ts +0 -21
- package/shaders/FresnelShader.js +0 -26
- package/shaders/GammaCorrectionShader.cjs.js +0 -1
- package/shaders/GammaCorrectionShader.d.ts +0 -8
- package/shaders/GammaCorrectionShader.js +0 -15
- package/shaders/GodRaysShader.cjs.js +0 -1
- package/shaders/GodRaysShader.d.ts +0 -58
- package/shaders/GodRaysShader.js +0 -137
- package/shaders/HalftoneShader.cjs.js +0 -1
- package/shaders/HalftoneShader.d.ts +0 -45
- package/shaders/HalftoneShader.js +0 -69
- package/shaders/HorizontalBlurShader.cjs.js +0 -1
- package/shaders/HorizontalBlurShader.d.ts +0 -9
- package/shaders/HorizontalBlurShader.js +0 -59
- package/shaders/HorizontalTiltShiftShader.cjs.js +0 -1
- package/shaders/HorizontalTiltShiftShader.d.ts +0 -15
- package/shaders/HorizontalTiltShiftShader.js +0 -25
- package/shaders/HueSaturationShader.cjs.js +0 -1
- package/shaders/HueSaturationShader.d.ts +0 -15
- package/shaders/HueSaturationShader.js +0 -25
- package/shaders/KaleidoShader.cjs.js +0 -1
- package/shaders/KaleidoShader.d.ts +0 -15
- package/shaders/KaleidoShader.js +0 -26
- package/shaders/LuminosityHighPassShader.cjs.js +0 -1
- package/shaders/LuminosityHighPassShader.d.ts +0 -23
- package/shaders/LuminosityHighPassShader.js +0 -31
- package/shaders/LuminosityShader.cjs.js +0 -1
- package/shaders/LuminosityShader.d.ts +0 -9
- package/shaders/LuminosityShader.js +0 -15
- package/shaders/MirrorShader.cjs.js +0 -1
- package/shaders/MirrorShader.d.ts +0 -12
- package/shaders/MirrorShader.js +0 -20
- package/shaders/NormalMapShader.cjs.js +0 -1
- package/shaders/NormalMapShader.d.ts +0 -19
- package/shaders/NormalMapShader.js +0 -27
- package/shaders/ParallaxShader.cjs.js +0 -1
- package/shaders/ParallaxShader.d.ts +0 -28
- package/shaders/ParallaxShader.js +0 -54
- package/shaders/PixelShader.cjs.js +0 -1
- package/shaders/PixelShader.d.ts +0 -15
- package/shaders/PixelShader.js +0 -20
- package/shaders/RGBShiftShader.cjs.js +0 -1
- package/shaders/RGBShiftShader.d.ts +0 -15
- package/shaders/RGBShiftShader.js +0 -26
- package/shaders/SAOShader.cjs.js +0 -1
- package/shaders/SAOShader.d.ts +0 -25
- package/shaders/SAOShader.js +0 -60
- package/shaders/SMAAShader.cjs.js +0 -1
- package/shaders/SMAAShader.d.ts +0 -55
- package/shaders/SMAAShader.js +0 -151
- package/shaders/SSAOShader.cjs.js +0 -1
- package/shaders/SSAOShader.d.ts +0 -80
- package/shaders/SSAOShader.js +0 -100
- package/shaders/SSRShader.cjs.js +0 -1
- package/shaders/SSRShader.d.ts +0 -90
- package/shaders/SSRShader.js +0 -379
- package/shaders/SepiaShader.cjs.js +0 -1
- package/shaders/SepiaShader.d.ts +0 -12
- package/shaders/SepiaShader.js +0 -19
- package/shaders/SobelOperatorShader.cjs.js +0 -1
- package/shaders/SobelOperatorShader.d.ts +0 -13
- package/shaders/SobelOperatorShader.js +0 -33
- package/shaders/SubsurfaceScatteringShader.cjs.js +0 -1
- package/shaders/SubsurfaceScatteringShader.d.ts +0 -5
- package/shaders/SubsurfaceScatteringShader.js +0 -45
- package/shaders/TechnicolorShader.cjs.js +0 -1
- package/shaders/TechnicolorShader.d.ts +0 -9
- package/shaders/TechnicolorShader.js +0 -17
- package/shaders/ToneMapShader.cjs.js +0 -1
- package/shaders/ToneMapShader.d.ts +0 -24
- package/shaders/ToneMapShader.js +0 -32
- package/shaders/ToonShader.cjs.js +0 -1
- package/shaders/ToonShader.d.ts +0 -100
- package/shaders/ToonShader.js +0 -112
- package/shaders/TriangleBlurShader.cjs.js +0 -1
- package/shaders/TriangleBlurShader.d.ts +0 -13
- package/shaders/TriangleBlurShader.js +0 -27
- package/shaders/UnpackDepthRGBAShader.cjs.js +0 -1
- package/shaders/UnpackDepthRGBAShader.d.ts +0 -12
- package/shaders/UnpackDepthRGBAShader.js +0 -18
- package/shaders/VerticalBlurShader.cjs.js +0 -1
- package/shaders/VerticalBlurShader.d.ts +0 -9
- package/shaders/VerticalBlurShader.js +0 -60
- package/shaders/VerticalTiltShiftShader.cjs.js +0 -1
- package/shaders/VerticalTiltShiftShader.d.ts +0 -15
- package/shaders/VerticalTiltShiftShader.js +0 -25
- package/shaders/VignetteShader.cjs.js +0 -1
- package/shaders/VignetteShader.d.ts +0 -15
- package/shaders/VignetteShader.js +0 -32
- package/shaders/VolumeShader.cjs.js +0 -1
- package/shaders/VolumeShader.d.ts +0 -25
- package/shaders/VolumeShader.js +0 -81
- package/shaders/WaterRefractionShader.cjs.js +0 -1
- package/shaders/WaterRefractionShader.d.ts +0 -21
- package/shaders/WaterRefractionShader.js +0 -25
- package/shaders/types.cjs.js +0 -1
- package/shaders/types.d.ts +0 -14
- package/shaders/types.js +0 -1
- package/textures/FlakesTexture.cjs.js +0 -1
- package/textures/FlakesTexture.d.ts +0 -4
- package/textures/FlakesTexture.js +0 -32
- package/types/helpers.cjs.js +0 -1
- package/types/helpers.d.ts +0 -1
- package/types/helpers.js +0 -3
- package/types/shared.cjs.js +0 -1
- package/types/shared.d.ts +0 -2
- package/types/shared.js +0 -1
- package/types/utils.cjs.js +0 -1
- package/types/utils.d.ts +0 -3
- package/types/utils.js +0 -1
- package/utils/BufferGeometryUtils.cjs.js +0 -1
- package/utils/BufferGeometryUtils.d.ts +0 -15
- package/utils/BufferGeometryUtils.js +0 -728
- package/utils/GeometryCompressionUtils.cjs.js +0 -1
- package/utils/GeometryCompressionUtils.d.ts +0 -7
- package/utils/GeometryCompressionUtils.js +0 -545
- package/utils/GeometryUtils.cjs.js +0 -1
- package/utils/GeometryUtils.d.ts +0 -6
- package/utils/GeometryUtils.js +0 -161
- package/utils/LDrawUtils.cjs.js +0 -1
- package/utils/LDrawUtils.d.ts +0 -5
- package/utils/LDrawUtils.js +0 -144
- package/utils/RoughnessMipmapper.cjs.js +0 -1
- package/utils/RoughnessMipmapper.js +0 -257
- package/utils/SceneUtils.cjs.js +0 -1
- package/utils/SceneUtils.d.ts +0 -9
- package/utils/SceneUtils.js +0 -41
- package/utils/ShadowMapViewer.cjs.js +0 -1
- package/utils/ShadowMapViewer.d.ts +0 -24
- package/utils/ShadowMapViewer.js +0 -160
- package/utils/SkeletonUtils.cjs.js +0 -1
- package/utils/SkeletonUtils.d.ts +0 -30
- package/utils/SkeletonUtils.js +0 -383
- package/utils/UVsDebug.cjs.js +0 -1
- package/utils/UVsDebug.d.ts +0 -3
- package/utils/UVsDebug.js +0 -115
- package/utils/WorkerPool.cjs.js +0 -1
- package/utils/WorkerPool.js +0 -82
- package/webxr/ARButton.cjs.js +0 -1
- package/webxr/ARButton.d.ts +0 -5
- package/webxr/ARButton.js +0 -145
- package/webxr/OculusHandModel.cjs.js +0 -1
- package/webxr/OculusHandModel.d.ts +0 -22
- package/webxr/OculusHandModel.js +0 -90
- package/webxr/OculusHandPointerModel.cjs.js +0 -1
- package/webxr/OculusHandPointerModel.d.ts +0 -63
- package/webxr/OculusHandPointerModel.js +0 -248
- package/webxr/Text2D.cjs.js +0 -1
- package/webxr/Text2D.d.ts +0 -3
- package/webxr/Text2D.js +0 -32
- package/webxr/VRButton.cjs.js +0 -1
- package/webxr/VRButton.d.ts +0 -7
- package/webxr/VRButton.js +0 -136
- package/webxr/XRControllerModelFactory.cjs.js +0 -1
- package/webxr/XRControllerModelFactory.d.ts +0 -19
- package/webxr/XRControllerModelFactory.js +0 -237
- package/webxr/XREstimatedLight.cjs.js +0 -1
- package/webxr/XREstimatedLight.d.ts +0 -32
- package/webxr/XREstimatedLight.js +0 -153
- package/webxr/XRHandMeshModel.cjs.js +0 -1
- package/webxr/XRHandMeshModel.d.ts +0 -9
- package/webxr/XRHandMeshModel.js +0 -62
- package/webxr/XRHandModelFactory.cjs.js +0 -1
- package/webxr/XRHandModelFactory.d.ts +0 -25
- package/webxr/XRHandModelFactory.js +0 -64
- package/webxr/XRHandPrimitiveModel.cjs.js +0 -1
- package/webxr/XRHandPrimitiveModel.d.ts +0 -24
- package/webxr/XRHandPrimitiveModel.js +0 -54
@@ -1,379 +0,0 @@
|
|
1
|
-
import { Object3D, Box3, MathUtils, TextureLoader, UVMapping, MeshLambertMaterial } from 'three';
|
2
|
-
import { MD2Loader } from '../loaders/MD2Loader.js';
|
3
|
-
import { MorphBlendMesh } from './MorphBlendMesh.js';
|
4
|
-
|
5
|
-
var MD2CharacterComplex = function () {
|
6
|
-
var scope = this;
|
7
|
-
this.scale = 1; // animation parameters
|
8
|
-
|
9
|
-
this.animationFPS = 6;
|
10
|
-
this.transitionFrames = 15; // movement model parameters
|
11
|
-
|
12
|
-
this.maxSpeed = 275;
|
13
|
-
this.maxReverseSpeed = -275;
|
14
|
-
this.frontAcceleration = 600;
|
15
|
-
this.backAcceleration = 600;
|
16
|
-
this.frontDecceleration = 600;
|
17
|
-
this.angularSpeed = 2.5; // rig
|
18
|
-
|
19
|
-
this.root = new Object3D();
|
20
|
-
this.meshBody = null;
|
21
|
-
this.meshWeapon = null;
|
22
|
-
this.controls = null; // skins
|
23
|
-
|
24
|
-
this.skinsBody = [];
|
25
|
-
this.skinsWeapon = [];
|
26
|
-
this.weapons = [];
|
27
|
-
this.currentSkin = undefined; //
|
28
|
-
|
29
|
-
this.onLoadComplete = function () {}; // internals
|
30
|
-
|
31
|
-
|
32
|
-
this.meshes = [];
|
33
|
-
this.animations = {};
|
34
|
-
this.loadCounter = 0; // internal movement control variables
|
35
|
-
|
36
|
-
this.speed = 0;
|
37
|
-
this.bodyOrientation = 0;
|
38
|
-
this.walkSpeed = this.maxSpeed;
|
39
|
-
this.crouchSpeed = this.maxSpeed * 0.5; // internal animation parameters
|
40
|
-
|
41
|
-
this.activeAnimation = null;
|
42
|
-
this.oldAnimation = null; // API
|
43
|
-
|
44
|
-
this.enableShadows = function (enable) {
|
45
|
-
for (let i = 0; i < this.meshes.length; i++) {
|
46
|
-
this.meshes[i].castShadow = enable;
|
47
|
-
this.meshes[i].receiveShadow = enable;
|
48
|
-
}
|
49
|
-
};
|
50
|
-
|
51
|
-
this.setVisible = function (enable) {
|
52
|
-
for (let i = 0; i < this.meshes.length; i++) {
|
53
|
-
this.meshes[i].visible = enable;
|
54
|
-
this.meshes[i].visible = enable;
|
55
|
-
}
|
56
|
-
};
|
57
|
-
|
58
|
-
this.shareParts = function (original) {
|
59
|
-
this.animations = original.animations;
|
60
|
-
this.walkSpeed = original.walkSpeed;
|
61
|
-
this.crouchSpeed = original.crouchSpeed;
|
62
|
-
this.skinsBody = original.skinsBody;
|
63
|
-
this.skinsWeapon = original.skinsWeapon; // BODY
|
64
|
-
|
65
|
-
var mesh = createPart(original.meshBody.geometry, this.skinsBody[0]);
|
66
|
-
mesh.scale.set(this.scale, this.scale, this.scale);
|
67
|
-
this.root.position.y = original.root.position.y;
|
68
|
-
this.root.add(mesh);
|
69
|
-
this.meshBody = mesh;
|
70
|
-
this.meshes.push(mesh); // WEAPONS
|
71
|
-
|
72
|
-
for (let i = 0; i < original.weapons.length; i++) {
|
73
|
-
var meshWeapon = createPart(original.weapons[i].geometry, this.skinsWeapon[i]);
|
74
|
-
meshWeapon.scale.set(this.scale, this.scale, this.scale);
|
75
|
-
meshWeapon.visible = false;
|
76
|
-
meshWeapon.name = original.weapons[i].name;
|
77
|
-
this.root.add(meshWeapon);
|
78
|
-
this.weapons[i] = meshWeapon;
|
79
|
-
this.meshWeapon = meshWeapon;
|
80
|
-
this.meshes.push(meshWeapon);
|
81
|
-
}
|
82
|
-
};
|
83
|
-
|
84
|
-
this.loadParts = function (config) {
|
85
|
-
this.animations = config.animations;
|
86
|
-
this.walkSpeed = config.walkSpeed;
|
87
|
-
this.crouchSpeed = config.crouchSpeed;
|
88
|
-
this.loadCounter = config.weapons.length * 2 + config.skins.length + 1;
|
89
|
-
var weaponsTextures = [];
|
90
|
-
|
91
|
-
for (let i = 0; i < config.weapons.length; i++) weaponsTextures[i] = config.weapons[i][1]; // SKINS
|
92
|
-
|
93
|
-
|
94
|
-
this.skinsBody = loadTextures(config.baseUrl + 'skins/', config.skins);
|
95
|
-
this.skinsWeapon = loadTextures(config.baseUrl + 'skins/', weaponsTextures); // BODY
|
96
|
-
|
97
|
-
var loader = new MD2Loader();
|
98
|
-
loader.load(config.baseUrl + config.body, function (geo) {
|
99
|
-
var boundingBox = new Box3();
|
100
|
-
boundingBox.setFromBufferAttribute(geo.attributes.position);
|
101
|
-
scope.root.position.y = -scope.scale * boundingBox.min.y;
|
102
|
-
var mesh = createPart(geo, scope.skinsBody[0]);
|
103
|
-
mesh.scale.set(scope.scale, scope.scale, scope.scale);
|
104
|
-
scope.root.add(mesh);
|
105
|
-
scope.meshBody = mesh;
|
106
|
-
scope.meshes.push(mesh);
|
107
|
-
checkLoadingComplete();
|
108
|
-
}); // WEAPONS
|
109
|
-
|
110
|
-
var generateCallback = function (index, name) {
|
111
|
-
return function (geo) {
|
112
|
-
var mesh = createPart(geo, scope.skinsWeapon[index]);
|
113
|
-
mesh.scale.set(scope.scale, scope.scale, scope.scale);
|
114
|
-
mesh.visible = false;
|
115
|
-
mesh.name = name;
|
116
|
-
scope.root.add(mesh);
|
117
|
-
scope.weapons[index] = mesh;
|
118
|
-
scope.meshWeapon = mesh;
|
119
|
-
scope.meshes.push(mesh);
|
120
|
-
checkLoadingComplete();
|
121
|
-
};
|
122
|
-
};
|
123
|
-
|
124
|
-
for (let i = 0; i < config.weapons.length; i++) {
|
125
|
-
loader.load(config.baseUrl + config.weapons[i][0], generateCallback(i, config.weapons[i][0]));
|
126
|
-
}
|
127
|
-
};
|
128
|
-
|
129
|
-
this.setPlaybackRate = function (rate) {
|
130
|
-
if (this.meshBody) this.meshBody.duration = this.meshBody.baseDuration / rate;
|
131
|
-
if (this.meshWeapon) this.meshWeapon.duration = this.meshWeapon.baseDuration / rate;
|
132
|
-
};
|
133
|
-
|
134
|
-
this.setWireframe = function (wireframeEnabled) {
|
135
|
-
if (wireframeEnabled) {
|
136
|
-
if (this.meshBody) this.meshBody.material = this.meshBody.materialWireframe;
|
137
|
-
if (this.meshWeapon) this.meshWeapon.material = this.meshWeapon.materialWireframe;
|
138
|
-
} else {
|
139
|
-
if (this.meshBody) this.meshBody.material = this.meshBody.materialTexture;
|
140
|
-
if (this.meshWeapon) this.meshWeapon.material = this.meshWeapon.materialTexture;
|
141
|
-
}
|
142
|
-
};
|
143
|
-
|
144
|
-
this.setSkin = function (index) {
|
145
|
-
if (this.meshBody && this.meshBody.material.wireframe === false) {
|
146
|
-
this.meshBody.material.map = this.skinsBody[index];
|
147
|
-
this.currentSkin = index;
|
148
|
-
}
|
149
|
-
};
|
150
|
-
|
151
|
-
this.setWeapon = function (index) {
|
152
|
-
for (let i = 0; i < this.weapons.length; i++) this.weapons[i].visible = false;
|
153
|
-
|
154
|
-
var activeWeapon = this.weapons[index];
|
155
|
-
|
156
|
-
if (activeWeapon) {
|
157
|
-
activeWeapon.visible = true;
|
158
|
-
this.meshWeapon = activeWeapon;
|
159
|
-
|
160
|
-
if (this.activeAnimation) {
|
161
|
-
activeWeapon.playAnimation(this.activeAnimation);
|
162
|
-
this.meshWeapon.setAnimationTime(this.activeAnimation, this.meshBody.getAnimationTime(this.activeAnimation));
|
163
|
-
}
|
164
|
-
}
|
165
|
-
};
|
166
|
-
|
167
|
-
this.setAnimation = function (animationName) {
|
168
|
-
if (animationName === this.activeAnimation || !animationName) return;
|
169
|
-
|
170
|
-
if (this.meshBody) {
|
171
|
-
this.meshBody.setAnimationWeight(animationName, 0);
|
172
|
-
this.meshBody.playAnimation(animationName);
|
173
|
-
this.oldAnimation = this.activeAnimation;
|
174
|
-
this.activeAnimation = animationName;
|
175
|
-
this.blendCounter = this.transitionFrames;
|
176
|
-
}
|
177
|
-
|
178
|
-
if (this.meshWeapon) {
|
179
|
-
this.meshWeapon.setAnimationWeight(animationName, 0);
|
180
|
-
this.meshWeapon.playAnimation(animationName);
|
181
|
-
}
|
182
|
-
};
|
183
|
-
|
184
|
-
this.update = function (delta) {
|
185
|
-
if (this.controls) this.updateMovementModel(delta);
|
186
|
-
|
187
|
-
if (this.animations) {
|
188
|
-
this.updateBehaviors();
|
189
|
-
this.updateAnimations(delta);
|
190
|
-
}
|
191
|
-
};
|
192
|
-
|
193
|
-
this.updateAnimations = function (delta) {
|
194
|
-
var mix = 1;
|
195
|
-
|
196
|
-
if (this.blendCounter > 0) {
|
197
|
-
mix = (this.transitionFrames - this.blendCounter) / this.transitionFrames;
|
198
|
-
this.blendCounter -= 1;
|
199
|
-
}
|
200
|
-
|
201
|
-
if (this.meshBody) {
|
202
|
-
this.meshBody.update(delta);
|
203
|
-
this.meshBody.setAnimationWeight(this.activeAnimation, mix);
|
204
|
-
this.meshBody.setAnimationWeight(this.oldAnimation, 1 - mix);
|
205
|
-
}
|
206
|
-
|
207
|
-
if (this.meshWeapon) {
|
208
|
-
this.meshWeapon.update(delta);
|
209
|
-
this.meshWeapon.setAnimationWeight(this.activeAnimation, mix);
|
210
|
-
this.meshWeapon.setAnimationWeight(this.oldAnimation, 1 - mix);
|
211
|
-
}
|
212
|
-
};
|
213
|
-
|
214
|
-
this.updateBehaviors = function () {
|
215
|
-
var controls = this.controls;
|
216
|
-
var animations = this.animations;
|
217
|
-
var moveAnimation, idleAnimation; // crouch vs stand
|
218
|
-
|
219
|
-
if (controls.crouch) {
|
220
|
-
moveAnimation = animations['crouchMove'];
|
221
|
-
idleAnimation = animations['crouchIdle'];
|
222
|
-
} else {
|
223
|
-
moveAnimation = animations['move'];
|
224
|
-
idleAnimation = animations['idle'];
|
225
|
-
} // actions
|
226
|
-
|
227
|
-
|
228
|
-
if (controls.jump) {
|
229
|
-
moveAnimation = animations['jump'];
|
230
|
-
idleAnimation = animations['jump'];
|
231
|
-
}
|
232
|
-
|
233
|
-
if (controls.attack) {
|
234
|
-
if (controls.crouch) {
|
235
|
-
moveAnimation = animations['crouchAttack'];
|
236
|
-
idleAnimation = animations['crouchAttack'];
|
237
|
-
} else {
|
238
|
-
moveAnimation = animations['attack'];
|
239
|
-
idleAnimation = animations['attack'];
|
240
|
-
}
|
241
|
-
} // set animations
|
242
|
-
|
243
|
-
|
244
|
-
if (controls.moveForward || controls.moveBackward || controls.moveLeft || controls.moveRight) {
|
245
|
-
if (this.activeAnimation !== moveAnimation) {
|
246
|
-
this.setAnimation(moveAnimation);
|
247
|
-
}
|
248
|
-
}
|
249
|
-
|
250
|
-
if (Math.abs(this.speed) < 0.2 * this.maxSpeed && !(controls.moveLeft || controls.moveRight || controls.moveForward || controls.moveBackward)) {
|
251
|
-
if (this.activeAnimation !== idleAnimation) {
|
252
|
-
this.setAnimation(idleAnimation);
|
253
|
-
}
|
254
|
-
} // set animation direction
|
255
|
-
|
256
|
-
|
257
|
-
if (controls.moveForward) {
|
258
|
-
if (this.meshBody) {
|
259
|
-
this.meshBody.setAnimationDirectionForward(this.activeAnimation);
|
260
|
-
this.meshBody.setAnimationDirectionForward(this.oldAnimation);
|
261
|
-
}
|
262
|
-
|
263
|
-
if (this.meshWeapon) {
|
264
|
-
this.meshWeapon.setAnimationDirectionForward(this.activeAnimation);
|
265
|
-
this.meshWeapon.setAnimationDirectionForward(this.oldAnimation);
|
266
|
-
}
|
267
|
-
}
|
268
|
-
|
269
|
-
if (controls.moveBackward) {
|
270
|
-
if (this.meshBody) {
|
271
|
-
this.meshBody.setAnimationDirectionBackward(this.activeAnimation);
|
272
|
-
this.meshBody.setAnimationDirectionBackward(this.oldAnimation);
|
273
|
-
}
|
274
|
-
|
275
|
-
if (this.meshWeapon) {
|
276
|
-
this.meshWeapon.setAnimationDirectionBackward(this.activeAnimation);
|
277
|
-
this.meshWeapon.setAnimationDirectionBackward(this.oldAnimation);
|
278
|
-
}
|
279
|
-
}
|
280
|
-
};
|
281
|
-
|
282
|
-
this.updateMovementModel = function (delta) {
|
283
|
-
var controls = this.controls; // speed based on controls
|
284
|
-
|
285
|
-
if (controls.crouch) this.maxSpeed = this.crouchSpeed;else this.maxSpeed = this.walkSpeed;
|
286
|
-
this.maxReverseSpeed = -this.maxSpeed;
|
287
|
-
|
288
|
-
if (controls.moveForward) {
|
289
|
-
this.speed = MathUtils.clamp(this.speed + delta * this.frontAcceleration, this.maxReverseSpeed, this.maxSpeed);
|
290
|
-
}
|
291
|
-
|
292
|
-
if (controls.moveBackward) {
|
293
|
-
this.speed = MathUtils.clamp(this.speed - delta * this.backAcceleration, this.maxReverseSpeed, this.maxSpeed);
|
294
|
-
} // orientation based on controls
|
295
|
-
// (don't just stand while turning)
|
296
|
-
|
297
|
-
|
298
|
-
var dir = 1;
|
299
|
-
|
300
|
-
if (controls.moveLeft) {
|
301
|
-
this.bodyOrientation += delta * this.angularSpeed;
|
302
|
-
this.speed = MathUtils.clamp(this.speed + dir * delta * this.frontAcceleration, this.maxReverseSpeed, this.maxSpeed);
|
303
|
-
}
|
304
|
-
|
305
|
-
if (controls.moveRight) {
|
306
|
-
this.bodyOrientation -= delta * this.angularSpeed;
|
307
|
-
this.speed = MathUtils.clamp(this.speed + dir * delta * this.frontAcceleration, this.maxReverseSpeed, this.maxSpeed);
|
308
|
-
} // speed decay
|
309
|
-
|
310
|
-
|
311
|
-
if (!(controls.moveForward || controls.moveBackward)) {
|
312
|
-
if (this.speed > 0) {
|
313
|
-
var k = exponentialEaseOut(this.speed / this.maxSpeed);
|
314
|
-
this.speed = MathUtils.clamp(this.speed - k * delta * this.frontDecceleration, 0, this.maxSpeed);
|
315
|
-
} else {
|
316
|
-
var k = exponentialEaseOut(this.speed / this.maxReverseSpeed);
|
317
|
-
this.speed = MathUtils.clamp(this.speed + k * delta * this.backAcceleration, this.maxReverseSpeed, 0);
|
318
|
-
}
|
319
|
-
} // displacement
|
320
|
-
|
321
|
-
|
322
|
-
var forwardDelta = this.speed * delta;
|
323
|
-
this.root.position.x += Math.sin(this.bodyOrientation) * forwardDelta;
|
324
|
-
this.root.position.z += Math.cos(this.bodyOrientation) * forwardDelta; // steering
|
325
|
-
|
326
|
-
this.root.rotation.y = this.bodyOrientation;
|
327
|
-
}; // internal helpers
|
328
|
-
|
329
|
-
|
330
|
-
function loadTextures(baseUrl, textureUrls) {
|
331
|
-
var textureLoader = new TextureLoader();
|
332
|
-
var textures = [];
|
333
|
-
|
334
|
-
for (let i = 0; i < textureUrls.length; i++) {
|
335
|
-
textures[i] = textureLoader.load(baseUrl + textureUrls[i], checkLoadingComplete);
|
336
|
-
textures[i].mapping = UVMapping;
|
337
|
-
textures[i].name = textureUrls[i];
|
338
|
-
if ('colorSpace' in textures[i]) textures[i].colorSpace = 'srgb';else textures[i].encoding = 3001; // sRGBEncoding
|
339
|
-
}
|
340
|
-
|
341
|
-
return textures;
|
342
|
-
}
|
343
|
-
|
344
|
-
function createPart(geometry, skinMap) {
|
345
|
-
var materialWireframe = new MeshLambertMaterial({
|
346
|
-
color: 0xffaa00,
|
347
|
-
wireframe: true,
|
348
|
-
morphTargets: true,
|
349
|
-
morphNormals: true
|
350
|
-
});
|
351
|
-
var materialTexture = new MeshLambertMaterial({
|
352
|
-
color: 0xffffff,
|
353
|
-
wireframe: false,
|
354
|
-
map: skinMap,
|
355
|
-
morphTargets: true,
|
356
|
-
morphNormals: true
|
357
|
-
}); //
|
358
|
-
|
359
|
-
var mesh = new MorphBlendMesh(geometry, materialTexture);
|
360
|
-
mesh.rotation.y = -Math.PI / 2; //
|
361
|
-
|
362
|
-
mesh.materialTexture = materialTexture;
|
363
|
-
mesh.materialWireframe = materialWireframe; //
|
364
|
-
|
365
|
-
mesh.autoCreateAnimations(scope.animationFPS);
|
366
|
-
return mesh;
|
367
|
-
}
|
368
|
-
|
369
|
-
function checkLoadingComplete() {
|
370
|
-
scope.loadCounter -= 1;
|
371
|
-
if (scope.loadCounter === 0) scope.onLoadComplete();
|
372
|
-
}
|
373
|
-
|
374
|
-
function exponentialEaseOut(k) {
|
375
|
-
return k === 1 ? 1 : -Math.pow(2, -10 * k) + 1;
|
376
|
-
}
|
377
|
-
};
|
378
|
-
|
379
|
-
export { MD2CharacterComplex };
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("three"),i=function(i,e){t.Mesh.call(this,i,e),this.type="MorphAnimMesh",this.mixer=new t.AnimationMixer(this),this.activeAction=null};(i.prototype=Object.create(t.Mesh.prototype)).constructor=i,i.prototype.setDirectionForward=function(){this.mixer.timeScale=1},i.prototype.setDirectionBackward=function(){this.mixer.timeScale=-1},i.prototype.playAnimation=function(i,e){this.activeAction&&(this.activeAction.stop(),this.activeAction=null);var o=t.AnimationClip.findByName(this,i);if(!o)throw new Error("THREE.MorphAnimMesh: animations["+i+"] undefined in .playAnimation()");var n=this.mixer.clipAction(o);n.timeScale=o.tracks.length*e/o.duration,this.activeAction=n.play()},i.prototype.updateAnimation=function(t){this.mixer.update(t)},i.prototype.copy=function(i){return t.Mesh.prototype.copy.call(this,i),this.mixer=new t.AnimationMixer(this),this},exports.MorphAnimMesh=i;
|
package/misc/MorphAnimMesh.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import { AnimationAction, AnimationMixer, BufferGeometry, Material, Mesh } from 'three';
|
2
|
-
|
3
|
-
export class MorphAnimMesh extends Mesh {
|
4
|
-
constructor(geometry: BufferGeometry, material: Material);
|
5
|
-
mixer: AnimationMixer;
|
6
|
-
activeAction: AnimationAction | null;
|
7
|
-
|
8
|
-
setDirectionForward(): void;
|
9
|
-
setDirectionBackward(): void;
|
10
|
-
playAnimation(label: string, fps: number): void;
|
11
|
-
updateAnimation(delta: number): void;
|
12
|
-
copy(source: MorphAnimMesh): this;
|
13
|
-
}
|
package/misc/MorphAnimMesh.js
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import { Mesh, AnimationMixer, AnimationClip } from 'three';
|
2
|
-
|
3
|
-
var MorphAnimMesh = function (geometry, material) {
|
4
|
-
Mesh.call(this, geometry, material);
|
5
|
-
this.type = 'MorphAnimMesh';
|
6
|
-
this.mixer = new AnimationMixer(this);
|
7
|
-
this.activeAction = null;
|
8
|
-
};
|
9
|
-
|
10
|
-
MorphAnimMesh.prototype = Object.create(Mesh.prototype);
|
11
|
-
MorphAnimMesh.prototype.constructor = MorphAnimMesh;
|
12
|
-
|
13
|
-
MorphAnimMesh.prototype.setDirectionForward = function () {
|
14
|
-
this.mixer.timeScale = 1.0;
|
15
|
-
};
|
16
|
-
|
17
|
-
MorphAnimMesh.prototype.setDirectionBackward = function () {
|
18
|
-
this.mixer.timeScale = -1.0;
|
19
|
-
};
|
20
|
-
|
21
|
-
MorphAnimMesh.prototype.playAnimation = function (label, fps) {
|
22
|
-
if (this.activeAction) {
|
23
|
-
this.activeAction.stop();
|
24
|
-
this.activeAction = null;
|
25
|
-
}
|
26
|
-
|
27
|
-
var clip = AnimationClip.findByName(this, label);
|
28
|
-
|
29
|
-
if (clip) {
|
30
|
-
var action = this.mixer.clipAction(clip);
|
31
|
-
action.timeScale = clip.tracks.length * fps / clip.duration;
|
32
|
-
this.activeAction = action.play();
|
33
|
-
} else {
|
34
|
-
throw new Error('THREE.MorphAnimMesh: animations[' + label + '] undefined in .playAnimation()');
|
35
|
-
}
|
36
|
-
};
|
37
|
-
|
38
|
-
MorphAnimMesh.prototype.updateAnimation = function (delta) {
|
39
|
-
this.mixer.update(delta);
|
40
|
-
};
|
41
|
-
|
42
|
-
MorphAnimMesh.prototype.copy = function (source) {
|
43
|
-
Mesh.prototype.copy.call(this, source);
|
44
|
-
this.mixer = new AnimationMixer(this);
|
45
|
-
return this;
|
46
|
-
};
|
47
|
-
|
48
|
-
export { MorphAnimMesh };
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("three"),i=function(i,a){t.Mesh.call(this,i,a),this.animationsMap={},this.animationsList=[];var n=Object.keys(this.morphTargetDictionary).length,e="__default",r=n-1,o=n/1;this.createAnimation(e,0,r,o),this.setAnimationWeight(e,1)};i.prototype=Object.assign(Object.create(t.Mesh.prototype),{constructor:i,createAnimation:function(t,i,a,n){var e={start:i,end:a,length:a-i+1,fps:n,duration:(a-i)/n,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[t]=e,this.animationsList.push(e)},autoCreateAnimations:function(t){var i,a=/([a-z]+)_?(\d+)/i,n={},e=0;for(let t in this.morphTargetDictionary){var r=t.match(a);if(r&&r.length>1){var o=r[1];n[o]||(n[o]={start:1/0,end:-1/0}),e<(s=n[o]).start&&(s.start=e),e>s.end&&(s.end=e),i||(i=o)}e++}for(let i in n){var s=n[i];this.createAnimation(i,s.start,s.end,t)}this.firstAnimation=i},setAnimationDirectionForward:function(t){var i=this.animationsMap[t];i&&(i.direction=1,i.directionBackwards=!1)},setAnimationDirectionBackward:function(t){var i=this.animationsMap[t];i&&(i.direction=-1,i.directionBackwards=!0)},setAnimationFPS:function(t,i){var a=this.animationsMap[t];a&&(a.fps=i,a.duration=(a.end-a.start)/a.fps)},setAnimationDuration:function(t,i){var a=this.animationsMap[t];a&&(a.duration=i,a.fps=(a.end-a.start)/a.duration)},setAnimationWeight:function(t,i){var a=this.animationsMap[t];a&&(a.weight=i)},setAnimationTime:function(t,i){var a=this.animationsMap[t];a&&(a.time=i)},getAnimationTime:function(t){var i=0,a=this.animationsMap[t];return a&&(i=a.time),i},getAnimationDuration:function(t){var i=-1,a=this.animationsMap[t];return a&&(i=a.duration),i},playAnimation:function(t){var i=this.animationsMap[t];i?(i.time=0,i.active=!0):console.warn("THREE.MorphBlendMesh: animation["+t+"] undefined in .playAnimation()")},stopAnimation:function(t){var i=this.animationsMap[t];i&&(i.active=!1)},update:function(i){for(let s=0,m=this.animationsList.length;s<m;s++){var a=this.animationsList[s];if(a.active){var n=a.duration/a.length;a.time+=a.direction*i,a.mirroredLoop?(a.time>a.duration||a.time<0)&&(a.direction*=-1,a.time>a.duration&&(a.time=a.duration,a.directionBackwards=!0),a.time<0&&(a.time=0,a.directionBackwards=!1)):(a.time=a.time%a.duration,a.time<0&&(a.time+=a.duration));var e=a.start+t.MathUtils.clamp(Math.floor(a.time/n),0,a.length-1),r=a.weight;e!==a.currentFrame&&(this.morphTargetInfluences[a.lastFrame]=0,this.morphTargetInfluences[a.currentFrame]=1*r,this.morphTargetInfluences[e]=0,a.lastFrame=a.currentFrame,a.currentFrame=e);var o=a.time%n/n;a.directionBackwards&&(o=1-o),a.currentFrame!==a.lastFrame?(this.morphTargetInfluences[a.currentFrame]=o*r,this.morphTargetInfluences[a.lastFrame]=(1-o)*r):this.morphTargetInfluences[a.currentFrame]=r}}}}),exports.MorphBlendMesh=i;
|
package/misc/MorphBlendMesh.d.ts
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
import { BufferGeometry, Material, Mesh } from 'three';
|
2
|
-
|
3
|
-
export class MorphBlendMesh extends Mesh {
|
4
|
-
constructor(geometry: BufferGeometry, material: Material);
|
5
|
-
animationsMap: object;
|
6
|
-
animationsList: object[];
|
7
|
-
|
8
|
-
createAnimation(name: string, start: number, end: number, fps: number): void;
|
9
|
-
autoCreateAnimations(fps: number): void;
|
10
|
-
setAnimationDirectionForward(name: string): void;
|
11
|
-
setAnimationDirectionBackward(name: string): void;
|
12
|
-
setAnimationFPS(name: string, fps: number): void;
|
13
|
-
setAnimationDuration(name: string, duration: number): void;
|
14
|
-
setAnimationWeight(name: string, weight: number): void;
|
15
|
-
setAnimationTime(name: string, time: number): void;
|
16
|
-
getAnimationTime(name: string): number;
|
17
|
-
getAnimationDuration(name: string): number;
|
18
|
-
playAnimation(name: string): void;
|
19
|
-
stopAnimation(name: string): void;
|
20
|
-
update(delta: number): void;
|
21
|
-
}
|
package/misc/MorphBlendMesh.js
DELETED
@@ -1,203 +0,0 @@
|
|
1
|
-
import { Mesh, MathUtils } from 'three';
|
2
|
-
|
3
|
-
var MorphBlendMesh = function (geometry, material) {
|
4
|
-
Mesh.call(this, geometry, material);
|
5
|
-
this.animationsMap = {};
|
6
|
-
this.animationsList = []; // prepare default animation
|
7
|
-
// (all frames played together in 1 second)
|
8
|
-
|
9
|
-
var numFrames = Object.keys(this.morphTargetDictionary).length;
|
10
|
-
var name = '__default';
|
11
|
-
var startFrame = 0;
|
12
|
-
var endFrame = numFrames - 1;
|
13
|
-
var fps = numFrames / 1;
|
14
|
-
this.createAnimation(name, startFrame, endFrame, fps);
|
15
|
-
this.setAnimationWeight(name, 1);
|
16
|
-
};
|
17
|
-
|
18
|
-
MorphBlendMesh.prototype = Object.assign(Object.create(Mesh.prototype), {
|
19
|
-
constructor: MorphBlendMesh,
|
20
|
-
createAnimation: function (name, start, end, fps) {
|
21
|
-
var animation = {
|
22
|
-
start: start,
|
23
|
-
end: end,
|
24
|
-
length: end - start + 1,
|
25
|
-
fps: fps,
|
26
|
-
duration: (end - start) / fps,
|
27
|
-
lastFrame: 0,
|
28
|
-
currentFrame: 0,
|
29
|
-
active: false,
|
30
|
-
time: 0,
|
31
|
-
direction: 1,
|
32
|
-
weight: 1,
|
33
|
-
directionBackwards: false,
|
34
|
-
mirroredLoop: false
|
35
|
-
};
|
36
|
-
this.animationsMap[name] = animation;
|
37
|
-
this.animationsList.push(animation);
|
38
|
-
},
|
39
|
-
autoCreateAnimations: function (fps) {
|
40
|
-
var pattern = /([a-z]+)_?(\d+)/i;
|
41
|
-
var firstAnimation,
|
42
|
-
frameRanges = {};
|
43
|
-
var i = 0;
|
44
|
-
|
45
|
-
for (let key in this.morphTargetDictionary) {
|
46
|
-
var chunks = key.match(pattern);
|
47
|
-
|
48
|
-
if (chunks && chunks.length > 1) {
|
49
|
-
var name = chunks[1];
|
50
|
-
if (!frameRanges[name]) frameRanges[name] = {
|
51
|
-
start: Infinity,
|
52
|
-
end: -Infinity
|
53
|
-
};
|
54
|
-
var range = frameRanges[name];
|
55
|
-
if (i < range.start) range.start = i;
|
56
|
-
if (i > range.end) range.end = i;
|
57
|
-
if (!firstAnimation) firstAnimation = name;
|
58
|
-
}
|
59
|
-
|
60
|
-
i++;
|
61
|
-
}
|
62
|
-
|
63
|
-
for (let name in frameRanges) {
|
64
|
-
var range = frameRanges[name];
|
65
|
-
this.createAnimation(name, range.start, range.end, fps);
|
66
|
-
}
|
67
|
-
|
68
|
-
this.firstAnimation = firstAnimation;
|
69
|
-
},
|
70
|
-
setAnimationDirectionForward: function (name) {
|
71
|
-
var animation = this.animationsMap[name];
|
72
|
-
|
73
|
-
if (animation) {
|
74
|
-
animation.direction = 1;
|
75
|
-
animation.directionBackwards = false;
|
76
|
-
}
|
77
|
-
},
|
78
|
-
setAnimationDirectionBackward: function (name) {
|
79
|
-
var animation = this.animationsMap[name];
|
80
|
-
|
81
|
-
if (animation) {
|
82
|
-
animation.direction = -1;
|
83
|
-
animation.directionBackwards = true;
|
84
|
-
}
|
85
|
-
},
|
86
|
-
setAnimationFPS: function (name, fps) {
|
87
|
-
var animation = this.animationsMap[name];
|
88
|
-
|
89
|
-
if (animation) {
|
90
|
-
animation.fps = fps;
|
91
|
-
animation.duration = (animation.end - animation.start) / animation.fps;
|
92
|
-
}
|
93
|
-
},
|
94
|
-
setAnimationDuration: function (name, duration) {
|
95
|
-
var animation = this.animationsMap[name];
|
96
|
-
|
97
|
-
if (animation) {
|
98
|
-
animation.duration = duration;
|
99
|
-
animation.fps = (animation.end - animation.start) / animation.duration;
|
100
|
-
}
|
101
|
-
},
|
102
|
-
setAnimationWeight: function (name, weight) {
|
103
|
-
var animation = this.animationsMap[name];
|
104
|
-
|
105
|
-
if (animation) {
|
106
|
-
animation.weight = weight;
|
107
|
-
}
|
108
|
-
},
|
109
|
-
setAnimationTime: function (name, time) {
|
110
|
-
var animation = this.animationsMap[name];
|
111
|
-
|
112
|
-
if (animation) {
|
113
|
-
animation.time = time;
|
114
|
-
}
|
115
|
-
},
|
116
|
-
getAnimationTime: function (name) {
|
117
|
-
var time = 0;
|
118
|
-
var animation = this.animationsMap[name];
|
119
|
-
|
120
|
-
if (animation) {
|
121
|
-
time = animation.time;
|
122
|
-
}
|
123
|
-
|
124
|
-
return time;
|
125
|
-
},
|
126
|
-
getAnimationDuration: function (name) {
|
127
|
-
var duration = -1;
|
128
|
-
var animation = this.animationsMap[name];
|
129
|
-
|
130
|
-
if (animation) {
|
131
|
-
duration = animation.duration;
|
132
|
-
}
|
133
|
-
|
134
|
-
return duration;
|
135
|
-
},
|
136
|
-
playAnimation: function (name) {
|
137
|
-
var animation = this.animationsMap[name];
|
138
|
-
|
139
|
-
if (animation) {
|
140
|
-
animation.time = 0;
|
141
|
-
animation.active = true;
|
142
|
-
} else {
|
143
|
-
console.warn('THREE.MorphBlendMesh: animation[' + name + '] undefined in .playAnimation()');
|
144
|
-
}
|
145
|
-
},
|
146
|
-
stopAnimation: function (name) {
|
147
|
-
var animation = this.animationsMap[name];
|
148
|
-
|
149
|
-
if (animation) {
|
150
|
-
animation.active = false;
|
151
|
-
}
|
152
|
-
},
|
153
|
-
update: function (delta) {
|
154
|
-
for (let i = 0, il = this.animationsList.length; i < il; i++) {
|
155
|
-
var animation = this.animationsList[i];
|
156
|
-
if (!animation.active) continue;
|
157
|
-
var frameTime = animation.duration / animation.length;
|
158
|
-
animation.time += animation.direction * delta;
|
159
|
-
|
160
|
-
if (animation.mirroredLoop) {
|
161
|
-
if (animation.time > animation.duration || animation.time < 0) {
|
162
|
-
animation.direction *= -1;
|
163
|
-
|
164
|
-
if (animation.time > animation.duration) {
|
165
|
-
animation.time = animation.duration;
|
166
|
-
animation.directionBackwards = true;
|
167
|
-
}
|
168
|
-
|
169
|
-
if (animation.time < 0) {
|
170
|
-
animation.time = 0;
|
171
|
-
animation.directionBackwards = false;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
} else {
|
175
|
-
animation.time = animation.time % animation.duration;
|
176
|
-
if (animation.time < 0) animation.time += animation.duration;
|
177
|
-
}
|
178
|
-
|
179
|
-
var keyframe = animation.start + MathUtils.clamp(Math.floor(animation.time / frameTime), 0, animation.length - 1);
|
180
|
-
var weight = animation.weight;
|
181
|
-
|
182
|
-
if (keyframe !== animation.currentFrame) {
|
183
|
-
this.morphTargetInfluences[animation.lastFrame] = 0;
|
184
|
-
this.morphTargetInfluences[animation.currentFrame] = 1 * weight;
|
185
|
-
this.morphTargetInfluences[keyframe] = 0;
|
186
|
-
animation.lastFrame = animation.currentFrame;
|
187
|
-
animation.currentFrame = keyframe;
|
188
|
-
}
|
189
|
-
|
190
|
-
var mix = animation.time % frameTime / frameTime;
|
191
|
-
if (animation.directionBackwards) mix = 1 - mix;
|
192
|
-
|
193
|
-
if (animation.currentFrame !== animation.lastFrame) {
|
194
|
-
this.morphTargetInfluences[animation.currentFrame] = mix * weight;
|
195
|
-
this.morphTargetInfluences[animation.lastFrame] = (1 - mix) * weight;
|
196
|
-
} else {
|
197
|
-
this.morphTargetInfluences[animation.currentFrame] = weight;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
}
|
201
|
-
});
|
202
|
-
|
203
|
-
export { MorphBlendMesh };
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(require("potpack"));exports.ProgressiveLightMap=class{constructor(t,i=1024){this.renderer=t,this.res=i,this.lightMapContainers=[],this.compiled=!1,this.scene=new e.Scene,this.scene.background=null,this.tinyTarget=new e.WebGLRenderTarget(1,1),this.buffer1Active=!1,this.firstUpdate=!0,this.warned=!1;const r=/(Android|iPad|iPhone|iPod)/g.test(navigator.userAgent)?alfFloatType:e.FloatType;this.progressiveLightMap1=new e.WebGLRenderTarget(this.res,this.res,{type:r}),this.progressiveLightMap2=new e.WebGLRenderTarget(this.res,this.res,{type:r}),this.uvMat=new e.MeshPhongMaterial,this.uvMat.uniforms={},this.uvMat.onBeforeCompile=e=>{e.vertexShader="#define USE_LIGHTMAP\n"+e.vertexShader.slice(0,-1)+"\tgl_Position = vec4((uv2 - 0.5) * 2.0, 1.0, 1.0); }";const t=e.fragmentShader.indexOf("void main() {");e.fragmentShader="varying vec2 vUv2;\n"+e.fragmentShader.slice(0,t)+"\tuniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+e.fragmentShader.slice(t-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vUv2).rgb;\n\t\t\t\tgl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/averagingWindow);\n\t\t\t}",e.uniforms.previousShadowMap={value:this.progressiveLightMap1.texture},e.uniforms.averagingWindow={value:100},this.uvMat.uniforms=e.uniforms,this.uvMat.userData.shader=e,this.compiled=!0}}addObjectsToLightMap(e){this.uv_boxes=[];const t=3/this.res;for(let i=0;i<e.length;i++){const r=e[i];r.isLight?this.scene.attach(r):r.geometry.hasAttribute("uv")?(null==this.blurringPlane&&this._initializeBlurPlane(this.res,this.progressiveLightMap1),r.material.lightMap=this.progressiveLightMap2.texture,r.material.dithering=!0,r.castShadow=!0,r.receiveShadow=!0,r.renderOrder=1e3+i,this.uv_boxes.push({w:1+2*t,h:1+2*t,index:i}),this.lightMapContainers.push({basicMat:r.material,object:r}),this.compiled=!1):console.warn("All lightmap objects need UVs!")}const r=i.default(this.uv_boxes);this.uv_boxes.forEach((i=>{const s=e[i.index].geometry.getAttribute("uv").clone();for(let e=0;e<s.array.length;e+=s.itemSize)s.array[e]=(s.array[e]+i.x+t)/r.w,s.array[e+1]=(s.array[e+1]+i.y+t)/r.h;e[i.index].geometry.setAttribute("uv2",s),e[i.index].geometry.getAttribute("uv2").needsUpdate=!0}))}update(e,t=100,i=!0){if(null==this.blurringPlane)return;const r=this.renderer.getRenderTarget();this.blurringPlane.visible=i;for(let e=0;e<this.lightMapContainers.length;e++)this.lightMapContainers[e].object.oldScene=this.lightMapContainers[e].object.parent,this.scene.attach(this.lightMapContainers[e].object);this.firstUpdate&&(this.renderer.setRenderTarget(this.tinyTarget),this.renderer.render(this.scene,e),this.firstUpdate=!1);for(let e=0;e<this.lightMapContainers.length;e++)this.uvMat.uniforms.averagingWindow={value:t},this.lightMapContainers[e].object.material=this.uvMat,this.lightMapContainers[e].object.oldFrustumCulled=this.lightMapContainers[e].object.frustumCulled,this.lightMapContainers[e].object.frustumCulled=!1;const s=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,a=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1;this.renderer.setRenderTarget(s),this.uvMat.uniforms.previousShadowMap={value:a.texture},this.blurringPlane.material.uniforms.previousShadowMap={value:a.texture},this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e);for(let e=0;e<this.lightMapContainers.length;e++)this.lightMapContainers[e].object.frustumCulled=this.lightMapContainers[e].object.oldFrustumCulled,this.lightMapContainers[e].object.material=this.lightMapContainers[e].basicMat,this.lightMapContainers[e].object.oldScene.attach(this.lightMapContainers[e].object);this.renderer.setRenderTarget(r)}showDebugLightmap(t,i){0!=this.lightMapContainers.length?(null==this.labelMesh&&(this.labelMaterial=new e.MeshBasicMaterial({map:this.progressiveLightMap1.texture,side:e.DoubleSide}),this.labelPlane=new e.PlaneGeometry(100,100),this.labelMesh=new e.Mesh(this.labelPlane,this.labelMaterial),this.labelMesh.position.y=250,this.lightMapContainers[0].object.parent.add(this.labelMesh)),null!=i&&this.labelMesh.position.copy(i),this.labelMesh.visible=t):this.warned||(console.warn("Call this after adding the objects!"),this.warned=!0)}_initializeBlurPlane(t,i=null){const r=new e.MeshBasicMaterial;r.uniforms={previousShadowMap:{value:null},pixelOffset:{value:1/t},polygonOffset:!0,polygonOffsetFactor:-1,polygonOffsetUnits:3},r.onBeforeCompile=e=>{e.vertexShader="#define USE_UV\n"+e.vertexShader.slice(0,-1)+"\tgl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const s=e.fragmentShader.indexOf("void main() {");e.fragmentShader="#define USE_UV\n"+e.fragmentShader.slice(0,s)+"\tuniform sampler2D previousShadowMap;\n\tuniform float pixelOffset;\n"+e.fragmentShader.slice(s-1,-1)+"\tgl_FragColor.rgb = (\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, 0.0 )).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( 0.0 , pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( 0.0 , -pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, 0.0 )).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, -pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, -pixelOffset)).rgb)/8.0;\n\t\t}",e.uniforms.previousShadowMap={value:i.texture},e.uniforms.pixelOffset={value:.5/t},r.uniforms=e.uniforms,r.userData.shader=e,this.compiled=!0},this.blurringPlane=new e.Mesh(new e.PlaneGeometry(1,1),r),this.blurringPlane.name="Blurring Plane",this.blurringPlane.frustumCulled=!1,this.blurringPlane.renderOrder=0,this.blurringPlane.material.depthWrite=!1,this.scene.add(this.blurringPlane)}};
|