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
package/loaders/TGALoader.cjs.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three");class r extends e.DataTextureLoader{constructor(e){super(e)}parse(r){const t=0,o=1,a=2,i=3,s=9,c=10,n=11,l=48,d=4,p=0,h=1,f=2,_=3;r.length<19&&console.error("THREE.TGALoader: Not enough data to contain header.");let u=0;const g=new Uint8Array(r),m={id_length:g[u++],colormap_type:g[u++],image_type:g[u++],colormap_index:g[u++]|g[u++]<<8,colormap_length:g[u++]|g[u++]<<8,colormap_size:g[u++],origin:[g[u++]|g[u++]<<8,g[u++]|g[u++]<<8],width:g[u++]|g[u++]<<8,height:g[u++]|g[u++]<<8,pixel_size:g[u++],flags:g[u++]};!function(e){switch(e.image_type){case o:case s:(e.colormap_length>256||24!==e.colormap_size||1!==e.colormap_type)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case a:case i:case c:case n:e.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case t:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',e.image_type)}(e.width<=0||e.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size&&console.error('THREE.TGALoader: Invalid pixel size "%s".',e.pixel_size)}(m),m.id_length+u>r.length&&console.error("THREE.TGALoader: No data."),u+=m.id_length;let w=!1,T=!1,E=!1;switch(m.image_type){case s:w=!0,T=!0;break;case o:T=!0;break;case c:w=!0;break;case a:break;case n:w=!0,E=!0;break;case i:E=!0}const b=new Uint8Array(m.width*m.height*4),y=function(e,r,t,o,a){let i,s;const c=t.pixel_size>>3,n=t.width*t.height*c;if(r&&(s=a.subarray(o,o+=t.colormap_length*(t.colormap_size>>3))),e){let e,r,t;i=new Uint8Array(n);let s=0;const l=new Uint8Array(c);for(;s<n;)if(e=a[o++],r=1+(127&e),128&e){for(t=0;t<c;++t)l[t]=a[o++];for(t=0;t<r;++t)i.set(l,s+t*c);s+=c*r}else{for(r*=c,t=0;t<r;++t)i[s+t]=a[o++];s+=r}}else i=a.subarray(o,o+=r?t.width*t.height:n);return{pixel_data:i,palettes:s}}(w,T,m,u,g);return function(e,r,t,o,a){let i,s,c,n,u,g;switch((m.flags&l)>>d){default:case f:i=0,c=1,u=r,s=0,n=1,g=t;break;case p:i=0,c=1,u=r,s=t-1,n=-1,g=-1;break;case _:i=r-1,c=-1,u=-1,s=0,n=1,g=t;break;case h:i=r-1,c=-1,u=-1,s=t-1,n=-1,g=-1}if(E)switch(m.pixel_size){case 8:!function(e,r,t,o,a,i,s,c){let n,l,d,p=0;const h=m.width;for(d=r;d!==o;d+=t)for(l=a;l!==s;l+=i,p++)n=c[p],e[4*(l+h*d)+0]=n,e[4*(l+h*d)+1]=n,e[4*(l+h*d)+2]=n,e[4*(l+h*d)+3]=255}(e,s,n,g,i,c,u,o);break;case 16:!function(e,r,t,o,a,i,s,c){let n,l,d=0;const p=m.width;for(l=r;l!==o;l+=t)for(n=a;n!==s;n+=i,d+=2)e[4*(n+p*l)+0]=c[d+0],e[4*(n+p*l)+1]=c[d+0],e[4*(n+p*l)+2]=c[d+0],e[4*(n+p*l)+3]=c[d+1]}(e,s,n,g,i,c,u,o);break;default:console.error("THREE.TGALoader: Format not supported.")}else switch(m.pixel_size){case 8:!function(e,r,t,o,a,i,s,c,n){const l=n;let d,p,h,f=0;const _=m.width;for(h=r;h!==o;h+=t)for(p=a;p!==s;p+=i,f++)d=c[f],e[4*(p+_*h)+3]=255,e[4*(p+_*h)+2]=l[3*d+0],e[4*(p+_*h)+1]=l[3*d+1],e[4*(p+_*h)+0]=l[3*d+2]}(e,s,n,g,i,c,u,o,a);break;case 16:!function(e,r,t,o,a,i,s,c){let n,l,d,p=0;const h=m.width;for(d=r;d!==o;d+=t)for(l=a;l!==s;l+=i,p+=2)n=c[p+0]+(c[p+1]<<8),e[4*(l+h*d)+0]=(31744&n)>>7,e[4*(l+h*d)+1]=(992&n)>>2,e[4*(l+h*d)+2]=(31&n)>>3,e[4*(l+h*d)+3]=32768&n?0:255}(e,s,n,g,i,c,u,o);break;case 24:!function(e,r,t,o,a,i,s,c){let n,l,d=0;const p=m.width;for(l=r;l!==o;l+=t)for(n=a;n!==s;n+=i,d+=3)e[4*(n+p*l)+3]=255,e[4*(n+p*l)+2]=c[d+0],e[4*(n+p*l)+1]=c[d+1],e[4*(n+p*l)+0]=c[d+2]}(e,s,n,g,i,c,u,o);break;case 32:!function(e,r,t,o,a,i,s,c){let n,l,d=0;const p=m.width;for(l=r;l!==o;l+=t)for(n=a;n!==s;n+=i,d+=4)e[4*(n+p*l)+2]=c[d+0],e[4*(n+p*l)+1]=c[d+1],e[4*(n+p*l)+0]=c[d+2],e[4*(n+p*l)+3]=c[d+3]}(e,s,n,g,i,c,u,o);break;default:console.error("THREE.TGALoader: Format not supported.")}}(b,m.width,m.height,y.pixel_data,y.palettes),{data:b,width:m.width,height:m.height,flipY:!0,generateMipmaps:!0,minFilter:e.LinearMipmapLinearFilter}}}exports.TGALoader=r;
|
package/loaders/TGALoader.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import { DataTexture, DataTextureLoader, LoadingManager } from 'three';
|
2
|
-
|
3
|
-
export class TGALoader extends DataTextureLoader {
|
4
|
-
constructor(manager?: LoadingManager);
|
5
|
-
|
6
|
-
load(
|
7
|
-
url: string,
|
8
|
-
onLoad?: (texture: DataTexture, texData: object) => void,
|
9
|
-
onProgress?: (event: ProgressEvent) => void,
|
10
|
-
onError?: (event: ErrorEvent) => void,
|
11
|
-
): DataTexture;
|
12
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<DataTexture>;
|
13
|
-
parse(data: ArrayBuffer): DataTexture;
|
14
|
-
}
|
package/loaders/TGALoader.js
DELETED
@@ -1,396 +0,0 @@
|
|
1
|
-
import { DataTextureLoader, LinearMipmapLinearFilter } from 'three';
|
2
|
-
|
3
|
-
class TGALoader extends DataTextureLoader {
|
4
|
-
constructor(manager) {
|
5
|
-
super(manager);
|
6
|
-
}
|
7
|
-
|
8
|
-
parse(buffer) {
|
9
|
-
// reference from vthibault, https://github.com/vthibault/roBrowser/blob/master/src/Loaders/Targa.js
|
10
|
-
function tgaCheckHeader(header) {
|
11
|
-
switch (header.image_type) {
|
12
|
-
// check indexed type
|
13
|
-
case TGA_TYPE_INDEXED:
|
14
|
-
case TGA_TYPE_RLE_INDEXED:
|
15
|
-
if (header.colormap_length > 256 || header.colormap_size !== 24 || header.colormap_type !== 1) {
|
16
|
-
console.error('THREE.TGALoader: Invalid type colormap data for indexed type.');
|
17
|
-
}
|
18
|
-
|
19
|
-
break;
|
20
|
-
// check colormap type
|
21
|
-
|
22
|
-
case TGA_TYPE_RGB:
|
23
|
-
case TGA_TYPE_GREY:
|
24
|
-
case TGA_TYPE_RLE_RGB:
|
25
|
-
case TGA_TYPE_RLE_GREY:
|
26
|
-
if (header.colormap_type) {
|
27
|
-
console.error('THREE.TGALoader: Invalid type colormap data for colormap type.');
|
28
|
-
}
|
29
|
-
|
30
|
-
break;
|
31
|
-
// What the need of a file without data ?
|
32
|
-
|
33
|
-
case TGA_TYPE_NO_DATA:
|
34
|
-
console.error('THREE.TGALoader: No data.');
|
35
|
-
// Invalid type ?
|
36
|
-
|
37
|
-
default:
|
38
|
-
console.error('THREE.TGALoader: Invalid type "%s".', header.image_type);
|
39
|
-
} // check image width and height
|
40
|
-
|
41
|
-
|
42
|
-
if (header.width <= 0 || header.height <= 0) {
|
43
|
-
console.error('THREE.TGALoader: Invalid image size.');
|
44
|
-
} // check image pixel size
|
45
|
-
|
46
|
-
|
47
|
-
if (header.pixel_size !== 8 && header.pixel_size !== 16 && header.pixel_size !== 24 && header.pixel_size !== 32) {
|
48
|
-
console.error('THREE.TGALoader: Invalid pixel size "%s".', header.pixel_size);
|
49
|
-
}
|
50
|
-
} // parse tga image buffer
|
51
|
-
|
52
|
-
|
53
|
-
function tgaParse(use_rle, use_pal, header, offset, data) {
|
54
|
-
let pixel_data, palettes;
|
55
|
-
const pixel_size = header.pixel_size >> 3;
|
56
|
-
const pixel_total = header.width * header.height * pixel_size; // read palettes
|
57
|
-
|
58
|
-
if (use_pal) {
|
59
|
-
palettes = data.subarray(offset, offset += header.colormap_length * (header.colormap_size >> 3));
|
60
|
-
} // read RLE
|
61
|
-
|
62
|
-
|
63
|
-
if (use_rle) {
|
64
|
-
pixel_data = new Uint8Array(pixel_total);
|
65
|
-
let c, count, i;
|
66
|
-
let shift = 0;
|
67
|
-
const pixels = new Uint8Array(pixel_size);
|
68
|
-
|
69
|
-
while (shift < pixel_total) {
|
70
|
-
c = data[offset++];
|
71
|
-
count = (c & 0x7f) + 1; // RLE pixels
|
72
|
-
|
73
|
-
if (c & 0x80) {
|
74
|
-
// bind pixel tmp array
|
75
|
-
for (i = 0; i < pixel_size; ++i) {
|
76
|
-
pixels[i] = data[offset++];
|
77
|
-
} // copy pixel array
|
78
|
-
|
79
|
-
|
80
|
-
for (i = 0; i < count; ++i) {
|
81
|
-
pixel_data.set(pixels, shift + i * pixel_size);
|
82
|
-
}
|
83
|
-
|
84
|
-
shift += pixel_size * count;
|
85
|
-
} else {
|
86
|
-
// raw pixels
|
87
|
-
count *= pixel_size;
|
88
|
-
|
89
|
-
for (i = 0; i < count; ++i) {
|
90
|
-
pixel_data[shift + i] = data[offset++];
|
91
|
-
}
|
92
|
-
|
93
|
-
shift += count;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
} else {
|
97
|
-
// raw pixels
|
98
|
-
pixel_data = data.subarray(offset, offset += use_pal ? header.width * header.height : pixel_total);
|
99
|
-
}
|
100
|
-
|
101
|
-
return {
|
102
|
-
pixel_data: pixel_data,
|
103
|
-
palettes: palettes
|
104
|
-
};
|
105
|
-
}
|
106
|
-
|
107
|
-
function tgaGetImageData8bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image, palettes) {
|
108
|
-
const colormap = palettes;
|
109
|
-
let color,
|
110
|
-
i = 0,
|
111
|
-
x,
|
112
|
-
y;
|
113
|
-
const width = header.width;
|
114
|
-
|
115
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
116
|
-
for (x = x_start; x !== x_end; x += x_step, i++) {
|
117
|
-
color = image[i];
|
118
|
-
imageData[(x + width * y) * 4 + 3] = 255;
|
119
|
-
imageData[(x + width * y) * 4 + 2] = colormap[color * 3 + 0];
|
120
|
-
imageData[(x + width * y) * 4 + 1] = colormap[color * 3 + 1];
|
121
|
-
imageData[(x + width * y) * 4 + 0] = colormap[color * 3 + 2];
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
return imageData;
|
126
|
-
}
|
127
|
-
|
128
|
-
function tgaGetImageData16bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image) {
|
129
|
-
let color,
|
130
|
-
i = 0,
|
131
|
-
x,
|
132
|
-
y;
|
133
|
-
const width = header.width;
|
134
|
-
|
135
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
136
|
-
for (x = x_start; x !== x_end; x += x_step, i += 2) {
|
137
|
-
color = image[i + 0] + (image[i + 1] << 8); // Inversed ?
|
138
|
-
|
139
|
-
imageData[(x + width * y) * 4 + 0] = (color & 0x7c00) >> 7;
|
140
|
-
imageData[(x + width * y) * 4 + 1] = (color & 0x03e0) >> 2;
|
141
|
-
imageData[(x + width * y) * 4 + 2] = (color & 0x001f) >> 3;
|
142
|
-
imageData[(x + width * y) * 4 + 3] = color & 0x8000 ? 0 : 255;
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
return imageData;
|
147
|
-
}
|
148
|
-
|
149
|
-
function tgaGetImageData24bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image) {
|
150
|
-
let i = 0,
|
151
|
-
x,
|
152
|
-
y;
|
153
|
-
const width = header.width;
|
154
|
-
|
155
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
156
|
-
for (x = x_start; x !== x_end; x += x_step, i += 3) {
|
157
|
-
imageData[(x + width * y) * 4 + 3] = 255;
|
158
|
-
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
159
|
-
imageData[(x + width * y) * 4 + 1] = image[i + 1];
|
160
|
-
imageData[(x + width * y) * 4 + 0] = image[i + 2];
|
161
|
-
}
|
162
|
-
}
|
163
|
-
|
164
|
-
return imageData;
|
165
|
-
}
|
166
|
-
|
167
|
-
function tgaGetImageData32bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image) {
|
168
|
-
let i = 0,
|
169
|
-
x,
|
170
|
-
y;
|
171
|
-
const width = header.width;
|
172
|
-
|
173
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
174
|
-
for (x = x_start; x !== x_end; x += x_step, i += 4) {
|
175
|
-
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
176
|
-
imageData[(x + width * y) * 4 + 1] = image[i + 1];
|
177
|
-
imageData[(x + width * y) * 4 + 0] = image[i + 2];
|
178
|
-
imageData[(x + width * y) * 4 + 3] = image[i + 3];
|
179
|
-
}
|
180
|
-
}
|
181
|
-
|
182
|
-
return imageData;
|
183
|
-
}
|
184
|
-
|
185
|
-
function tgaGetImageDataGrey8bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image) {
|
186
|
-
let color,
|
187
|
-
i = 0,
|
188
|
-
x,
|
189
|
-
y;
|
190
|
-
const width = header.width;
|
191
|
-
|
192
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
193
|
-
for (x = x_start; x !== x_end; x += x_step, i++) {
|
194
|
-
color = image[i];
|
195
|
-
imageData[(x + width * y) * 4 + 0] = color;
|
196
|
-
imageData[(x + width * y) * 4 + 1] = color;
|
197
|
-
imageData[(x + width * y) * 4 + 2] = color;
|
198
|
-
imageData[(x + width * y) * 4 + 3] = 255;
|
199
|
-
}
|
200
|
-
}
|
201
|
-
|
202
|
-
return imageData;
|
203
|
-
}
|
204
|
-
|
205
|
-
function tgaGetImageDataGrey16bits(imageData, y_start, y_step, y_end, x_start, x_step, x_end, image) {
|
206
|
-
let i = 0,
|
207
|
-
x,
|
208
|
-
y;
|
209
|
-
const width = header.width;
|
210
|
-
|
211
|
-
for (y = y_start; y !== y_end; y += y_step) {
|
212
|
-
for (x = x_start; x !== x_end; x += x_step, i += 2) {
|
213
|
-
imageData[(x + width * y) * 4 + 0] = image[i + 0];
|
214
|
-
imageData[(x + width * y) * 4 + 1] = image[i + 0];
|
215
|
-
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
216
|
-
imageData[(x + width * y) * 4 + 3] = image[i + 1];
|
217
|
-
}
|
218
|
-
}
|
219
|
-
|
220
|
-
return imageData;
|
221
|
-
}
|
222
|
-
|
223
|
-
function getTgaRGBA(data, width, height, image, palette) {
|
224
|
-
let x_start, y_start, x_step, y_step, x_end, y_end;
|
225
|
-
|
226
|
-
switch ((header.flags & TGA_ORIGIN_MASK) >> TGA_ORIGIN_SHIFT) {
|
227
|
-
default:
|
228
|
-
case TGA_ORIGIN_UL:
|
229
|
-
x_start = 0;
|
230
|
-
x_step = 1;
|
231
|
-
x_end = width;
|
232
|
-
y_start = 0;
|
233
|
-
y_step = 1;
|
234
|
-
y_end = height;
|
235
|
-
break;
|
236
|
-
|
237
|
-
case TGA_ORIGIN_BL:
|
238
|
-
x_start = 0;
|
239
|
-
x_step = 1;
|
240
|
-
x_end = width;
|
241
|
-
y_start = height - 1;
|
242
|
-
y_step = -1;
|
243
|
-
y_end = -1;
|
244
|
-
break;
|
245
|
-
|
246
|
-
case TGA_ORIGIN_UR:
|
247
|
-
x_start = width - 1;
|
248
|
-
x_step = -1;
|
249
|
-
x_end = -1;
|
250
|
-
y_start = 0;
|
251
|
-
y_step = 1;
|
252
|
-
y_end = height;
|
253
|
-
break;
|
254
|
-
|
255
|
-
case TGA_ORIGIN_BR:
|
256
|
-
x_start = width - 1;
|
257
|
-
x_step = -1;
|
258
|
-
x_end = -1;
|
259
|
-
y_start = height - 1;
|
260
|
-
y_step = -1;
|
261
|
-
y_end = -1;
|
262
|
-
break;
|
263
|
-
}
|
264
|
-
|
265
|
-
if (use_grey) {
|
266
|
-
switch (header.pixel_size) {
|
267
|
-
case 8:
|
268
|
-
tgaGetImageDataGrey8bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image);
|
269
|
-
break;
|
270
|
-
|
271
|
-
case 16:
|
272
|
-
tgaGetImageDataGrey16bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image);
|
273
|
-
break;
|
274
|
-
|
275
|
-
default:
|
276
|
-
console.error('THREE.TGALoader: Format not supported.');
|
277
|
-
break;
|
278
|
-
}
|
279
|
-
} else {
|
280
|
-
switch (header.pixel_size) {
|
281
|
-
case 8:
|
282
|
-
tgaGetImageData8bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image, palette);
|
283
|
-
break;
|
284
|
-
|
285
|
-
case 16:
|
286
|
-
tgaGetImageData16bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image);
|
287
|
-
break;
|
288
|
-
|
289
|
-
case 24:
|
290
|
-
tgaGetImageData24bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image);
|
291
|
-
break;
|
292
|
-
|
293
|
-
case 32:
|
294
|
-
tgaGetImageData32bits(data, y_start, y_step, y_end, x_start, x_step, x_end, image);
|
295
|
-
break;
|
296
|
-
|
297
|
-
default:
|
298
|
-
console.error('THREE.TGALoader: Format not supported.');
|
299
|
-
break;
|
300
|
-
}
|
301
|
-
} // Load image data according to specific method
|
302
|
-
// let func = 'tgaGetImageData' + (use_grey ? 'Grey' : '') + (header.pixel_size) + 'bits';
|
303
|
-
// func(data, y_start, y_step, y_end, x_start, x_step, x_end, width, image, palette );
|
304
|
-
|
305
|
-
|
306
|
-
return data;
|
307
|
-
} // TGA constants
|
308
|
-
|
309
|
-
|
310
|
-
const TGA_TYPE_NO_DATA = 0,
|
311
|
-
TGA_TYPE_INDEXED = 1,
|
312
|
-
TGA_TYPE_RGB = 2,
|
313
|
-
TGA_TYPE_GREY = 3,
|
314
|
-
TGA_TYPE_RLE_INDEXED = 9,
|
315
|
-
TGA_TYPE_RLE_RGB = 10,
|
316
|
-
TGA_TYPE_RLE_GREY = 11,
|
317
|
-
TGA_ORIGIN_MASK = 0x30,
|
318
|
-
TGA_ORIGIN_SHIFT = 0x04,
|
319
|
-
TGA_ORIGIN_BL = 0x00,
|
320
|
-
TGA_ORIGIN_BR = 0x01,
|
321
|
-
TGA_ORIGIN_UL = 0x02,
|
322
|
-
TGA_ORIGIN_UR = 0x03;
|
323
|
-
if (buffer.length < 19) console.error('THREE.TGALoader: Not enough data to contain header.');
|
324
|
-
let offset = 0;
|
325
|
-
const content = new Uint8Array(buffer),
|
326
|
-
header = {
|
327
|
-
id_length: content[offset++],
|
328
|
-
colormap_type: content[offset++],
|
329
|
-
image_type: content[offset++],
|
330
|
-
colormap_index: content[offset++] | content[offset++] << 8,
|
331
|
-
colormap_length: content[offset++] | content[offset++] << 8,
|
332
|
-
colormap_size: content[offset++],
|
333
|
-
origin: [content[offset++] | content[offset++] << 8, content[offset++] | content[offset++] << 8],
|
334
|
-
width: content[offset++] | content[offset++] << 8,
|
335
|
-
height: content[offset++] | content[offset++] << 8,
|
336
|
-
pixel_size: content[offset++],
|
337
|
-
flags: content[offset++]
|
338
|
-
}; // check tga if it is valid format
|
339
|
-
|
340
|
-
tgaCheckHeader(header);
|
341
|
-
|
342
|
-
if (header.id_length + offset > buffer.length) {
|
343
|
-
console.error('THREE.TGALoader: No data.');
|
344
|
-
} // skip the needn't data
|
345
|
-
|
346
|
-
|
347
|
-
offset += header.id_length; // get targa information about RLE compression and palette
|
348
|
-
|
349
|
-
let use_rle = false,
|
350
|
-
use_pal = false,
|
351
|
-
use_grey = false;
|
352
|
-
|
353
|
-
switch (header.image_type) {
|
354
|
-
case TGA_TYPE_RLE_INDEXED:
|
355
|
-
use_rle = true;
|
356
|
-
use_pal = true;
|
357
|
-
break;
|
358
|
-
|
359
|
-
case TGA_TYPE_INDEXED:
|
360
|
-
use_pal = true;
|
361
|
-
break;
|
362
|
-
|
363
|
-
case TGA_TYPE_RLE_RGB:
|
364
|
-
use_rle = true;
|
365
|
-
break;
|
366
|
-
|
367
|
-
case TGA_TYPE_RGB:
|
368
|
-
break;
|
369
|
-
|
370
|
-
case TGA_TYPE_RLE_GREY:
|
371
|
-
use_rle = true;
|
372
|
-
use_grey = true;
|
373
|
-
break;
|
374
|
-
|
375
|
-
case TGA_TYPE_GREY:
|
376
|
-
use_grey = true;
|
377
|
-
break;
|
378
|
-
} //
|
379
|
-
|
380
|
-
|
381
|
-
const imageData = new Uint8Array(header.width * header.height * 4);
|
382
|
-
const result = tgaParse(use_rle, use_pal, header, offset, content);
|
383
|
-
getTgaRGBA(imageData, header.width, header.height, result.pixel_data, result.palettes);
|
384
|
-
return {
|
385
|
-
data: imageData,
|
386
|
-
width: header.width,
|
387
|
-
height: header.height,
|
388
|
-
flipY: true,
|
389
|
-
generateMipmaps: true,
|
390
|
-
minFilter: LinearMipmapLinearFilter
|
391
|
-
};
|
392
|
-
}
|
393
|
-
|
394
|
-
}
|
395
|
-
|
396
|
-
export { TGALoader };
|
package/loaders/TTFLoader.cjs.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),t=require("opentype.js");class o extends e.Loader{constructor(e){super(e),this.reversed=!1}load(o,n,s,r){const a=this,i=new e.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(o,(function(e){try{n(t.parse(e))}catch(e){r?r(e):console.error(e),a.manager.itemError(o)}}),s,r)}parse(e){function o(e){const t=[];let o;e.forEach((function(e){"m"===e.type.toLowerCase()?(o=[e],t.push(o)):"z"!==e.type.toLowerCase()&&o.push(e)}));const n=[];return t.forEach((function(e){const t={type:"m",x:e[e.length-1].x,y:e[e.length-1].y};n.push(t);for(let t=e.length-1;t>0;t--){const o=e[t],s={type:o.type};void 0!==o.x2&&void 0!==o.y2?(s.x1=o.x2,s.y1=o.y2,s.x2=o.x1,s.y2=o.y1):void 0!==o.x1&&void 0!==o.y1&&(s.x1=o.x1,s.y1=o.y1),s.x=e[t-1].x,s.y=e[t-1].y,n.push(s)}})),n}return function(e,t){const n=Math.round,s={},r=1e5/(72*(e.unitsPerEm||2048)),a=e.encoding.cmap.glyphIndexMap,i=Object.keys(a);for(let d=0;d<i.length;d++){const h=i[d],y=e.glyphs.glyphs[a[h]];if(void 0!==h){const e={ha:n(y.advanceWidth*r),x_min:n(y.xMin*r),x_max:n(y.xMax*r),o:""};t&&(y.path.commands=o(y.path.commands)),y.path.commands.forEach((function(t){"c"===t.type.toLowerCase()&&(t.type="b"),e.o+=t.type.toLowerCase()+" ",void 0!==t.x&&void 0!==t.y&&(e.o+=n(t.x*r)+" "+n(t.y*r)+" "),void 0!==t.x1&&void 0!==t.y1&&(e.o+=n(t.x1*r)+" "+n(t.y1*r)+" "),void 0!==t.x2&&void 0!==t.y2&&(e.o+=n(t.x2*r)+" "+n(t.y2*r)+" ")})),s[String.fromCodePoint(y.unicode)]=e}}return{glyphs:s,familyName:e.getEnglishName("fullName"),ascender:n(e.ascender*r),descender:n(e.descender*r),underlinePosition:e.tables.post.underlinePosition,underlineThickness:e.tables.post.underlineThickness,boundingBox:{xMin:e.tables.head.xMin,xMax:e.tables.head.xMax,yMin:e.tables.head.yMin,yMax:e.tables.head.yMax},resolution:1e3,original_font_information:e.tables.name}}(t.parse(e),this.reversed)}}exports.TTFLoader=o;
|
package/loaders/TTFLoader.d.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Loader, LoadingManager } from 'three';
|
2
|
-
|
3
|
-
export class TTFLoader extends Loader {
|
4
|
-
constructor(manager?: LoadingManager);
|
5
|
-
reversed: boolean;
|
6
|
-
|
7
|
-
load(
|
8
|
-
url: string,
|
9
|
-
onLoad: (json: object) => void,
|
10
|
-
onProgress?: (event: ProgressEvent) => void,
|
11
|
-
onError?: (event: ErrorEvent) => void,
|
12
|
-
): void;
|
13
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<object>;
|
14
|
-
parse(arraybuffer: ArrayBuffer): object;
|
15
|
-
}
|
package/loaders/TTFLoader.js
DELETED
@@ -1,152 +0,0 @@
|
|
1
|
-
import { Loader, FileLoader } from 'three';
|
2
|
-
import { parse } from 'opentype.js';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Requires opentype.js to be included in the project.
|
6
|
-
* Loads TTF files and converts them into typeface JSON that can be used directly
|
7
|
-
* to create THREE.Font objects.
|
8
|
-
*/
|
9
|
-
|
10
|
-
class TTFLoader extends Loader {
|
11
|
-
constructor(manager) {
|
12
|
-
super(manager);
|
13
|
-
this.reversed = false;
|
14
|
-
}
|
15
|
-
|
16
|
-
load(url, onLoad, onProgress, onError) {
|
17
|
-
const scope = this;
|
18
|
-
const loader = new FileLoader(this.manager);
|
19
|
-
loader.setPath(this.path);
|
20
|
-
loader.setResponseType('arraybuffer');
|
21
|
-
loader.setRequestHeader(this.requestHeader);
|
22
|
-
loader.setWithCredentials(this.withCredentials);
|
23
|
-
loader.load(url, function (buffer) {
|
24
|
-
try {
|
25
|
-
onLoad(parse(buffer));
|
26
|
-
} catch (e) {
|
27
|
-
if (onError) {
|
28
|
-
onError(e);
|
29
|
-
} else {
|
30
|
-
console.error(e);
|
31
|
-
}
|
32
|
-
|
33
|
-
scope.manager.itemError(url);
|
34
|
-
}
|
35
|
-
}, onProgress, onError);
|
36
|
-
}
|
37
|
-
|
38
|
-
parse(arraybuffer) {
|
39
|
-
function convert(font, reversed) {
|
40
|
-
const round = Math.round;
|
41
|
-
const glyphs = {};
|
42
|
-
const scale = 100000 / ((font.unitsPerEm || 2048) * 72);
|
43
|
-
const glyphIndexMap = font.encoding.cmap.glyphIndexMap;
|
44
|
-
const unicodes = Object.keys(glyphIndexMap);
|
45
|
-
|
46
|
-
for (let i = 0; i < unicodes.length; i++) {
|
47
|
-
const unicode = unicodes[i];
|
48
|
-
const glyph = font.glyphs.glyphs[glyphIndexMap[unicode]];
|
49
|
-
|
50
|
-
if (unicode !== undefined) {
|
51
|
-
const token = {
|
52
|
-
ha: round(glyph.advanceWidth * scale),
|
53
|
-
x_min: round(glyph.xMin * scale),
|
54
|
-
x_max: round(glyph.xMax * scale),
|
55
|
-
o: ''
|
56
|
-
};
|
57
|
-
|
58
|
-
if (reversed) {
|
59
|
-
glyph.path.commands = reverseCommands(glyph.path.commands);
|
60
|
-
}
|
61
|
-
|
62
|
-
glyph.path.commands.forEach(function (command) {
|
63
|
-
if (command.type.toLowerCase() === 'c') {
|
64
|
-
command.type = 'b';
|
65
|
-
}
|
66
|
-
|
67
|
-
token.o += command.type.toLowerCase() + ' ';
|
68
|
-
|
69
|
-
if (command.x !== undefined && command.y !== undefined) {
|
70
|
-
token.o += round(command.x * scale) + ' ' + round(command.y * scale) + ' ';
|
71
|
-
}
|
72
|
-
|
73
|
-
if (command.x1 !== undefined && command.y1 !== undefined) {
|
74
|
-
token.o += round(command.x1 * scale) + ' ' + round(command.y1 * scale) + ' ';
|
75
|
-
}
|
76
|
-
|
77
|
-
if (command.x2 !== undefined && command.y2 !== undefined) {
|
78
|
-
token.o += round(command.x2 * scale) + ' ' + round(command.y2 * scale) + ' ';
|
79
|
-
}
|
80
|
-
});
|
81
|
-
glyphs[String.fromCodePoint(glyph.unicode)] = token;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
|
85
|
-
return {
|
86
|
-
glyphs: glyphs,
|
87
|
-
familyName: font.getEnglishName('fullName'),
|
88
|
-
ascender: round(font.ascender * scale),
|
89
|
-
descender: round(font.descender * scale),
|
90
|
-
underlinePosition: font.tables.post.underlinePosition,
|
91
|
-
underlineThickness: font.tables.post.underlineThickness,
|
92
|
-
boundingBox: {
|
93
|
-
xMin: font.tables.head.xMin,
|
94
|
-
xMax: font.tables.head.xMax,
|
95
|
-
yMin: font.tables.head.yMin,
|
96
|
-
yMax: font.tables.head.yMax
|
97
|
-
},
|
98
|
-
resolution: 1000,
|
99
|
-
original_font_information: font.tables.name
|
100
|
-
};
|
101
|
-
}
|
102
|
-
|
103
|
-
function reverseCommands(commands) {
|
104
|
-
const paths = [];
|
105
|
-
let path;
|
106
|
-
commands.forEach(function (c) {
|
107
|
-
if (c.type.toLowerCase() === 'm') {
|
108
|
-
path = [c];
|
109
|
-
paths.push(path);
|
110
|
-
} else if (c.type.toLowerCase() !== 'z') {
|
111
|
-
path.push(c);
|
112
|
-
}
|
113
|
-
});
|
114
|
-
const reversed = [];
|
115
|
-
paths.forEach(function (p) {
|
116
|
-
const result = {
|
117
|
-
type: 'm',
|
118
|
-
x: p[p.length - 1].x,
|
119
|
-
y: p[p.length - 1].y
|
120
|
-
};
|
121
|
-
reversed.push(result);
|
122
|
-
|
123
|
-
for (let i = p.length - 1; i > 0; i--) {
|
124
|
-
const command = p[i];
|
125
|
-
const result = {
|
126
|
-
type: command.type
|
127
|
-
};
|
128
|
-
|
129
|
-
if (command.x2 !== undefined && command.y2 !== undefined) {
|
130
|
-
result.x1 = command.x2;
|
131
|
-
result.y1 = command.y2;
|
132
|
-
result.x2 = command.x1;
|
133
|
-
result.y2 = command.y1;
|
134
|
-
} else if (command.x1 !== undefined && command.y1 !== undefined) {
|
135
|
-
result.x1 = command.x1;
|
136
|
-
result.y1 = command.y1;
|
137
|
-
}
|
138
|
-
|
139
|
-
result.x = p[i - 1].x;
|
140
|
-
result.y = p[i - 1].y;
|
141
|
-
reversed.push(result);
|
142
|
-
}
|
143
|
-
});
|
144
|
-
return reversed;
|
145
|
-
}
|
146
|
-
|
147
|
-
return convert(parse(arraybuffer), this.reversed); // eslint-disable-line no-undef
|
148
|
-
}
|
149
|
-
|
150
|
-
}
|
151
|
-
|
152
|
-
export { TTFLoader };
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("three"),e=require("fflate");class a extends t.Loader{load(e,a,r,n){const o=this,c=new t.FileLoader(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setWithCredentials(this.withCredentials),c.load(e,(function(t){try{a(o.parse(t))}catch(t){n?n(t):console.error(t),o.manager.itemError(e)}}),r,n)}parse(a){const n=new t.Group,o=e.unzipSync(new Uint8Array(a.slice(16))),i=JSON.parse(e.strFromU8(o["metadata.json"])),d=new DataView(o["data.sketch"].buffer),l=d.getInt32(16,!0),f={};let b=20;for(let t=0;t<l;t++){const t=d.getInt32(b,!0),e=[d.getFloat32(b+4,!0),d.getFloat32(b+8,!0),d.getFloat32(b+12,!0),d.getFloat32(b+16,!0)],a=d.getFloat32(b+20,!0),r=d.getUint32(b+24,!0),n=d.getUint32(b+28,!0);let o=0,c=0;for(let t=0;t<4;t++){const e=1<<t;(r&e)>0&&(o+=4),(n&e)>0&&(c+=4)}b=b+28+o+4;const i=d.getInt32(b,!0),l=new Float32Array(3*i),s=new Float32Array(4*i);b+=4;for(let t=0,e=0;t<l.length;t+=3,e+=4)l[t+0]=d.getFloat32(b+0,!0),l[t+1]=d.getFloat32(b+4,!0),l[t+2]=d.getFloat32(b+8,!0),s[e+0]=d.getFloat32(b+12,!0),s[e+1]=d.getFloat32(b+16,!0),s[e+2]=d.getFloat32(b+20,!0),s[e+3]=d.getFloat32(b+24,!0),b=b+28+c;t in f==!1&&(f[t]=[]),f[t].push([l,s,a,e])}for(const e in f){const a=new r(f[e]),o=c(i.BrushIndex[e]);n.add(new t.Mesh(a,o))}return n}}class r extends t.BufferGeometry{constructor(e){super();const a=[],r=[],n=[],o=new t.Vector3,c=new t.Vector3,i=new t.Quaternion,d=new t.Quaternion,l=new t.Vector3,f=new t.Vector3,b=new t.Vector3,s=new t.Vector3;for(const t in e){const p=e[t],u=p[0],h=p[1],g=p[2],v=p[3];c.fromArray(u,0),d.fromArray(h,0);for(let t=3,e=4,p=u.length;t<p;t+=3,e+=4){o.fromArray(u,t),i.fromArray(h,e),l.set(-g,0,0),l.applyQuaternion(i),l.add(o),f.set(g,0,0),f.applyQuaternion(i),f.add(o),b.set(g,0,0),b.applyQuaternion(d),b.add(c),s.set(-g,0,0),s.applyQuaternion(d),s.add(c),a.push(l.x,l.y,-l.z),a.push(f.x,f.y,-f.z),a.push(s.x,s.y,-s.z),a.push(f.x,f.y,-f.z),a.push(b.x,b.y,-b.z),a.push(s.x,s.y,-s.z),c.copy(o),d.copy(i),r.push(...v),r.push(...v),r.push(...v),r.push(...v),r.push(...v),r.push(...v);const m=t/p,S=(t-3)/p;n.push(m,0),n.push(m,1),n.push(S,0),n.push(m,1),n.push(S,1),n.push(S,0)}}this.setAttribute("position",new t.BufferAttribute(new Float32Array(a),3)),this.setAttribute("color",new t.BufferAttribute(new Float32Array(r),4)),this.setAttribute("uv",new t.BufferAttribute(new Float32Array(n),2))}}const n={"89d104cd-d012-426b-b5b3-bbaee63ac43c":"Bubbles","700f3aa8-9a7c-2384-8b8a-ea028905dd8c":"CelVinyl","0f0ff7b2-a677-45eb-a7d6-0cd7206f4816":"ChromaticWave","1161af82-50cf-47db-9706-0c3576d43c43":"CoarseBristles","79168f10-6961-464a-8be1-57ed364c5600":"CoarseBristlesSingleSided","1caa6d7d-f015-3f54-3a4b-8b5354d39f81":"Comet","c8313697-2563-47fc-832e-290f4c04b901":"DiamondHull","4391aaaa-df73-4396-9e33-31e4e4930b27":"Disco","d1d991f2-e7a0-4cf1-b328-f57e915e6260":"DotMarker","6a1cf9f9-032c-45ec-9b1d-a6680bee30f7":"Dots","0d3889f3-3ede-470c-8af4-f44813306126":"DoubleTaperedFlat","0d3889f3-3ede-470c-8af4-de4813306126":"DoubleTaperedMarker","d0262945-853c-4481-9cbd-88586bed93cb":"DuctTape","3ca16e2f-bdcd-4da2-8631-dcef342f40f1":"DuctTapeSingleSided","f6e85de3-6dcc-4e7f-87fd-cee8c3d25d51":"Electricity","02ffb866-7fb2-4d15-b761-1012cefb1360":"Embers","cb92b597-94ca-4255-b017-0e3f42f12f9e":"Fire","2d35bcf0-e4d8-452c-97b1-3311be063130":"Flat","55303bc4-c749-4a72-98d9-d23e68e76e18":"FlatDeprecated","280c0a7a-aad8-416c-a7d2-df63d129ca70":"FlatSingleSided","cf019139-d41c-4eb0-a1d0-5cf54b0a42f3":"Highlighter","6a1cf9f9-032c-45ec-9b6e-a6680bee32e9":"HyperGrid","dce872c2-7b49-4684-b59b-c45387949c5c":"Hypercolor","e8ef32b1-baa8-460a-9c2c-9cf8506794f5":"HypercolorSingleSided","2f212815-f4d3-c1a4-681a-feeaf9c6dc37":"Icing","f5c336cf-5108-4b40-ade9-c687504385ab":"Ink","c0012095-3ffd-4040-8ee1-fc180d346eaa":"InkSingleSided","4a76a27a-44d8-4bfe-9a8c-713749a499b0":"Leaves","ea19de07-d0c0-4484-9198-18489a3c1487":"LeavesSingleSided","2241cd32-8ba2-48a5-9ee7-2caef7e9ed62":"Light","4391aaaa-df81-4396-9e33-31e4e4930b27":"LightWire","d381e0f5-3def-4a0d-8853-31e9200bcbda":"Lofted","429ed64a-4e97-4466-84d3-145a861ef684":"Marker","79348357-432d-4746-8e29-0e25c112e3aa":"MatteHull","b2ffef01-eaaa-4ab5-aa64-95a2c4f5dbc6":"NeonPulse","f72ec0e7-a844-4e38-82e3-140c44772699":"OilPaint","c515dad7-4393-4681-81ad-162ef052241b":"OilPaintSingleSided","f1114e2e-eb8d-4fde-915a-6e653b54e9f5":"Paper","759f1ebd-20cd-4720-8d41-234e0da63716":"PaperSingleSided","e0abbc80-0f80-e854-4970-8924a0863dcc":"Petal","c33714d1-b2f9-412e-bd50-1884c9d46336":"Plasma","ad1ad437-76e2-450d-a23a-e17f8310b960":"Rainbow","faaa4d44-fcfb-4177-96be-753ac0421ba3":"ShinyHull","70d79cca-b159-4f35-990c-f02193947fe8":"Smoke","d902ed8b-d0d1-476c-a8de-878a79e3a34c":"Snow","accb32f5-4509-454f-93f8-1df3fd31df1b":"SoftHighlighter","cf7f0059-7aeb-53a4-2b67-c83d863a9ffa":"Spikes","8dc4a70c-d558-4efd-a5ed-d4e860f40dc3":"Splatter","7a1c8107-50c5-4b70-9a39-421576d6617e":"SplatterSingleSided","0eb4db27-3f82-408d-b5a1-19ebd7d5b711":"Stars","44bb800a-fbc3-4592-8426-94ecb05ddec3":"Streamers","0077f88c-d93a-42f3-b59b-b31c50cdb414":"Taffy","b468c1fb-f254-41ed-8ec9-57030bc5660c":"TaperedFlat","c8ccb53d-ae13-45ef-8afb-b730d81394eb":"TaperedFlatSingleSided","d90c6ad8-af0f-4b54-b422-e0f92abe1b3c":"TaperedMarker","1a26b8c0-8a07-4f8a-9fac-d2ef36e0cad0":"TaperedMarker_Flat","75b32cf0-fdd6-4d89-a64b-e2a00b247b0f":"ThickPaint","fdf0326a-c0d1-4fed-b101-9db0ff6d071f":"ThickPaintSingleSided","4391385a-df73-4396-9e33-31e4e4930b27":"Toon","a8fea537-da7c-4d4b-817f-24f074725d6d":"UnlitHull","d229d335-c334-495a-a801-660ac8a87360":"VelvetInk","10201aa3-ebc2-42d8-84b7-2e63f6eeb8ab":"Waveform","b67c0e81-ce6d-40a8-aeb0-ef036b081aa3":"WetPaint","dea67637-cd1a-27e4-c9b1-52f4bbcb84e5":"WetPaintSingleSided","5347acf0-a8e2-47b6-8346-30c70719d763":"WigglyGraphite","e814fef1-97fd-7194-4a2f-50c2bb918be2":"WigglyGraphiteSingleSided","4391385a-cf83-4396-9e33-31e4e4930b27":"Wire"},o={BloomColor:"\n\t\t\tvec3 BloomColor(vec3 color, float gain) {\n\t\t\t\t// Guarantee that there's at least a little bit of all 3 channels.\n\t\t\t\t// This makes fully-saturated strokes (which only have 2 non-zero\n\t\t\t\t// color channels) eventually clip to white rather than to a secondary.\n\t\t\t\tfloat cmin = length(color.rgb) * .05;\n\t\t\t\tcolor.rgb = max(color.rgb, vec3(cmin, cmin, cmin));\n\t\t\t\t// If we try to remove this pow() from .a, it brightens up\n\t\t\t\t// pressure-sensitive strokes; looks better as-is.\n\t\t\t\tcolor = pow(color, vec3(2.2));\n\t\t\t\tcolor.rgb *= 2. * exp(gain * 10.);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t",LinearToSrgb:"\n\t\t\tvec3 LinearToSrgb(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 linearColor = color.rgb;\n\t\t\t\tvec3 S1 = sqrt(linearColor);\n\t\t\t\tvec3 S2 = sqrt(S1);\n\t\t\t\tvec3 S3 = sqrt(S2);\n\t\t\t\tcolor.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * linearColor;\n\t\t\t\treturn color;\n\t\t\t}\n\t\t",hsv:"\n\t\t\t// uniform sampler2D lookupTex;\n\t\t\tvec4 lookup(vec4 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 lookup(vec3 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 hsv2rgb( vec3 hsv ) {\n\t\t\t\tvec3 rgb = clamp( abs(mod(hsv.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );\n\t\t\t\treturn hsv.z * mix( vec3(1.0), rgb, hsv.y);\n\t\t\t}\n\n\t\t\tvec3 rgb2hsv( vec3 rgb ) {\n\t\t\t\tvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\t\t\t\tvec4 p = mix(vec4(rgb.bg, K.wz), vec4(rgb.gb, K.xy), step(rgb.b, rgb.g));\n\t\t\t\tvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n\t\t\t\tfloat d = q.x - min(q.w, q.y);\n\t\t\t\tfloat e = 1.0e-10;\n\n\t\t\t\treturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n\t\t\t}\n\t\t",SrgbToLinear:"\n\t\t\tvec3 SrgbToLinear(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 sRGB = color.rgb;\n\t\t\t\tcolor.rgb = sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t"};function c(e){switch(n[e]){case"Light":return new t.RawShaderMaterial({uniforms:{mainTex:{value:(new t.TextureLoader).setPath("./textures/tiltbrush/").loader.load("Light.webp")},alphaTest:{value:.067},emission_gain:{value:.45},alpha:{value:1}},vertexShader:`\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tattribute vec2 uv;\n\t\t\tattribute vec4 color;\n\t\t\tattribute vec3 position;\n\n\t\t\tuniform mat4 modelMatrix;\n\t\t\tuniform mat4 modelViewMatrix;\n\t\t\tuniform mat4 projectionMatrix;\n\t\t\tuniform mat4 viewMatrix;\n\t\t\tuniform mat3 normalMatrix;\n\t\t\tuniform vec3 cameraPosition;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t${o.LinearToSrgb}\n\t\t\t${o.hsv}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tvColor = lookup(color.rgb);\n\n\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t}\n\t\t`,fragmentShader:`\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tuniform float emission_gain;\n\n\t\t\tuniform sampler2D mainTex;\n\t\t\tuniform float alphaTest;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t${o.BloomColor}\n\t\t\t${o.SrgbToLinear}\n\n\t\t\tvoid main(){\n\t\t\t\tvec4 col = texture2D(mainTex, vUv);\n\t\t\t\tvec3 color = vColor;\n\t\t\t\tcolor = BloomColor(color, emission_gain);\n\t\t\t\tcolor = color * col.rgb;\n\t\t\t\tcolor = color * col.a;\n\t\t\t\tcolor = SrgbToLinear(color);\n\t\t\t\tgl_FragColor = vec4(color, 1.0);\n\t\t\t}\n\t\t`,side:2,transparent:!0,depthFunc:2,depthWrite:!0,depthTest:!1,blending:5,blendDst:201,blendDstAlpha:201,blendEquation:100,blendEquationAlpha:100,blendSrc:201,blendSrcAlpha:201});default:return new t.MeshBasicMaterial({vertexColors:!0,side:t.DoubleSide})}}exports.TiltLoader=a;
|
package/loaders/TiltLoader.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import { Loader, LoadingManager, Group } from 'three';
|
2
|
-
|
3
|
-
export class TiltLoader extends Loader {
|
4
|
-
constructor(manager?: LoadingManager);
|
5
|
-
|
6
|
-
load(
|
7
|
-
url: string,
|
8
|
-
onLoad: (object: Group) => void,
|
9
|
-
onProgress?: (event: ProgressEvent) => void,
|
10
|
-
onError?: (event: ErrorEvent) => void,
|
11
|
-
): void;
|
12
|
-
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Group>;
|
13
|
-
parse(data: ArrayBuffer): Group;
|
14
|
-
}
|