three-stdlib 2.22.5 → 2.22.7
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,455 +0,0 @@
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* @webxr-input-profiles/motion-controllers 1.0.0 https://github.com/immersive-web/webxr-input-profiles
|
5
|
-
*/
|
6
|
-
const MotionControllerConstants = {
|
7
|
-
Handedness: Object.freeze({
|
8
|
-
NONE: 'none',
|
9
|
-
LEFT: 'left',
|
10
|
-
RIGHT: 'right'
|
11
|
-
}),
|
12
|
-
ComponentState: Object.freeze({
|
13
|
-
DEFAULT: 'default',
|
14
|
-
TOUCHED: 'touched',
|
15
|
-
PRESSED: 'pressed'
|
16
|
-
}),
|
17
|
-
ComponentProperty: Object.freeze({
|
18
|
-
BUTTON: 'button',
|
19
|
-
X_AXIS: 'xAxis',
|
20
|
-
Y_AXIS: 'yAxis',
|
21
|
-
STATE: 'state'
|
22
|
-
}),
|
23
|
-
ComponentType: Object.freeze({
|
24
|
-
TRIGGER: 'trigger',
|
25
|
-
SQUEEZE: 'squeeze',
|
26
|
-
TOUCHPAD: 'touchpad',
|
27
|
-
THUMBSTICK: 'thumbstick',
|
28
|
-
BUTTON: 'button'
|
29
|
-
}),
|
30
|
-
ButtonTouchThreshold: 0.05,
|
31
|
-
AxisTouchThreshold: 0.1,
|
32
|
-
VisualResponseProperty: Object.freeze({
|
33
|
-
TRANSFORM: 'transform',
|
34
|
-
VISIBILITY: 'visibility'
|
35
|
-
})
|
36
|
-
};
|
37
|
-
/**
|
38
|
-
* @description Static helper function to fetch a JSON file and turn it into a JS object
|
39
|
-
* @param {string} path - Path to JSON file to be fetched
|
40
|
-
*/
|
41
|
-
|
42
|
-
async function fetchJsonFile(path) {
|
43
|
-
const response = await fetch(path);
|
44
|
-
|
45
|
-
if (!response.ok) {
|
46
|
-
throw new Error(response.statusText);
|
47
|
-
} else {
|
48
|
-
return response.json();
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
async function fetchProfilesList(basePath) {
|
53
|
-
if (!basePath) {
|
54
|
-
throw new Error('No basePath supplied');
|
55
|
-
}
|
56
|
-
|
57
|
-
const profileListFileName = 'profilesList.json';
|
58
|
-
const profilesList = await fetchJsonFile(`${basePath}/${profileListFileName}`);
|
59
|
-
return profilesList;
|
60
|
-
}
|
61
|
-
|
62
|
-
async function fetchProfile(xrInputSource, basePath, defaultProfile = null, getAssetPath = true) {
|
63
|
-
if (!xrInputSource) {
|
64
|
-
throw new Error('No xrInputSource supplied');
|
65
|
-
}
|
66
|
-
|
67
|
-
if (!basePath) {
|
68
|
-
throw new Error('No basePath supplied');
|
69
|
-
} // Get the list of profiles
|
70
|
-
|
71
|
-
|
72
|
-
const supportedProfilesList = await fetchProfilesList(basePath); // Find the relative path to the first requested profile that is recognized
|
73
|
-
|
74
|
-
let match = undefined;
|
75
|
-
xrInputSource.profiles.some(profileId => {
|
76
|
-
const supportedProfile = supportedProfilesList[profileId];
|
77
|
-
|
78
|
-
if (supportedProfile) {
|
79
|
-
match = {
|
80
|
-
profileId,
|
81
|
-
profilePath: `${basePath}/${supportedProfile.path}`,
|
82
|
-
deprecated: !!supportedProfile.deprecated
|
83
|
-
};
|
84
|
-
}
|
85
|
-
|
86
|
-
return !!match;
|
87
|
-
});
|
88
|
-
|
89
|
-
if (!match) {
|
90
|
-
if (!defaultProfile) {
|
91
|
-
throw new Error('No matching profile name found');
|
92
|
-
}
|
93
|
-
|
94
|
-
const supportedProfile = supportedProfilesList[defaultProfile];
|
95
|
-
|
96
|
-
if (!supportedProfile) {
|
97
|
-
throw new Error(`No matching profile name found and default profile "${defaultProfile}" missing.`);
|
98
|
-
}
|
99
|
-
|
100
|
-
match = {
|
101
|
-
profileId: defaultProfile,
|
102
|
-
profilePath: `${basePath}/${supportedProfile.path}`,
|
103
|
-
deprecated: !!supportedProfile.deprecated
|
104
|
-
};
|
105
|
-
}
|
106
|
-
|
107
|
-
const profile = await fetchJsonFile(match.profilePath);
|
108
|
-
let assetPath = undefined;
|
109
|
-
|
110
|
-
if (getAssetPath) {
|
111
|
-
let layout;
|
112
|
-
|
113
|
-
if (xrInputSource.handedness === 'any') {
|
114
|
-
layout = profile.layouts[Object.keys(profile.layouts)[0]];
|
115
|
-
} else {
|
116
|
-
layout = profile.layouts[xrInputSource.handedness];
|
117
|
-
}
|
118
|
-
|
119
|
-
if (!layout) {
|
120
|
-
throw new Error(`No matching handedness, ${xrInputSource.handedness}, in profile ${match.profileId}`);
|
121
|
-
}
|
122
|
-
|
123
|
-
if (layout.assetPath) {
|
124
|
-
assetPath = match.profilePath.replace('profile.json', layout.assetPath);
|
125
|
-
}
|
126
|
-
}
|
127
|
-
|
128
|
-
return {
|
129
|
-
profile,
|
130
|
-
assetPath
|
131
|
-
};
|
132
|
-
}
|
133
|
-
/** @constant {Object} */
|
134
|
-
|
135
|
-
|
136
|
-
const defaultComponentValues = {
|
137
|
-
xAxis: 0,
|
138
|
-
yAxis: 0,
|
139
|
-
button: 0,
|
140
|
-
state: MotionControllerConstants.ComponentState.DEFAULT
|
141
|
-
};
|
142
|
-
/**
|
143
|
-
* @description Converts an X, Y coordinate from the range -1 to 1 (as reported by the Gamepad
|
144
|
-
* API) to the range 0 to 1 (for interpolation). Also caps the X, Y values to be bounded within
|
145
|
-
* a circle. This ensures that thumbsticks are not animated outside the bounds of their physical
|
146
|
-
* range of motion and touchpads do not report touch locations off their physical bounds.
|
147
|
-
* @param {number | undefined} x The original x coordinate in the range -1 to 1
|
148
|
-
* @param {number | undefined} y The original y coordinate in the range -1 to 1
|
149
|
-
*/
|
150
|
-
|
151
|
-
function normalizeAxes(x = 0, y = 0) {
|
152
|
-
let xAxis = x;
|
153
|
-
let yAxis = y; // Determine if the point is outside the bounds of the circle
|
154
|
-
// and, if so, place it on the edge of the circle
|
155
|
-
|
156
|
-
const hypotenuse = Math.sqrt(x * x + y * y);
|
157
|
-
|
158
|
-
if (hypotenuse > 1) {
|
159
|
-
const theta = Math.atan2(y, x);
|
160
|
-
xAxis = Math.cos(theta);
|
161
|
-
yAxis = Math.sin(theta);
|
162
|
-
} // Scale and move the circle so values are in the interpolation range. The circle's origin moves
|
163
|
-
// from (0, 0) to (0.5, 0.5). The circle's radius scales from 1 to be 0.5.
|
164
|
-
|
165
|
-
|
166
|
-
const result = {
|
167
|
-
normalizedXAxis: xAxis * 0.5 + 0.5,
|
168
|
-
normalizedYAxis: yAxis * 0.5 + 0.5
|
169
|
-
};
|
170
|
-
return result;
|
171
|
-
}
|
172
|
-
/**
|
173
|
-
* Contains the description of how the 3D model should visually respond to a specific user input.
|
174
|
-
* This is accomplished by initializing the object with the name of a node in the 3D model and
|
175
|
-
* property that need to be modified in response to user input, the name of the nodes representing
|
176
|
-
* the allowable range of motion, and the name of the input which triggers the change. In response
|
177
|
-
* to the named input changing, this object computes the appropriate weighting to use for
|
178
|
-
* interpolating between the range of motion nodes.
|
179
|
-
*/
|
180
|
-
|
181
|
-
|
182
|
-
class VisualResponse {
|
183
|
-
constructor(visualResponseDescription) {
|
184
|
-
_defineProperty(this, "value", void 0);
|
185
|
-
|
186
|
-
_defineProperty(this, "componentProperty", void 0);
|
187
|
-
|
188
|
-
_defineProperty(this, "states", void 0);
|
189
|
-
|
190
|
-
_defineProperty(this, "valueNodeName", void 0);
|
191
|
-
|
192
|
-
_defineProperty(this, "valueNodeProperty", void 0);
|
193
|
-
|
194
|
-
_defineProperty(this, "minNodeName", void 0);
|
195
|
-
|
196
|
-
_defineProperty(this, "maxNodeName", void 0);
|
197
|
-
|
198
|
-
_defineProperty(this, "valueNode", void 0);
|
199
|
-
|
200
|
-
_defineProperty(this, "minNode", void 0);
|
201
|
-
|
202
|
-
_defineProperty(this, "maxNode", void 0);
|
203
|
-
|
204
|
-
this.componentProperty = visualResponseDescription.componentProperty;
|
205
|
-
this.states = visualResponseDescription.states;
|
206
|
-
this.valueNodeName = visualResponseDescription.valueNodeName;
|
207
|
-
this.valueNodeProperty = visualResponseDescription.valueNodeProperty;
|
208
|
-
|
209
|
-
if (this.valueNodeProperty === MotionControllerConstants.VisualResponseProperty.TRANSFORM) {
|
210
|
-
this.minNodeName = visualResponseDescription.minNodeName;
|
211
|
-
this.maxNodeName = visualResponseDescription.maxNodeName;
|
212
|
-
} // Initializes the response's current value based on default data
|
213
|
-
|
214
|
-
|
215
|
-
this.value = 0;
|
216
|
-
this.updateFromComponent(defaultComponentValues);
|
217
|
-
}
|
218
|
-
/**
|
219
|
-
* Computes the visual response's interpolation weight based on component state
|
220
|
-
* @param {Object} componentValues - The component from which to update
|
221
|
-
* @param {number | undefined} xAxis - The reported X axis value of the component
|
222
|
-
* @param {number | undefined} yAxis - The reported Y axis value of the component
|
223
|
-
* @param {number | undefined} button - The reported value of the component's button
|
224
|
-
* @param {string} state - The component's active state
|
225
|
-
*/
|
226
|
-
|
227
|
-
|
228
|
-
updateFromComponent({
|
229
|
-
xAxis,
|
230
|
-
yAxis,
|
231
|
-
button,
|
232
|
-
state
|
233
|
-
}) {
|
234
|
-
const {
|
235
|
-
normalizedXAxis,
|
236
|
-
normalizedYAxis
|
237
|
-
} = normalizeAxes(xAxis, yAxis);
|
238
|
-
|
239
|
-
switch (this.componentProperty) {
|
240
|
-
case MotionControllerConstants.ComponentProperty.X_AXIS:
|
241
|
-
this.value = this.states.includes(state) ? normalizedXAxis : 0.5;
|
242
|
-
break;
|
243
|
-
|
244
|
-
case MotionControllerConstants.ComponentProperty.Y_AXIS:
|
245
|
-
this.value = this.states.includes(state) ? normalizedYAxis : 0.5;
|
246
|
-
break;
|
247
|
-
|
248
|
-
case MotionControllerConstants.ComponentProperty.BUTTON:
|
249
|
-
this.value = this.states.includes(state) && button ? button : 0;
|
250
|
-
break;
|
251
|
-
|
252
|
-
case MotionControllerConstants.ComponentProperty.STATE:
|
253
|
-
if (this.valueNodeProperty === MotionControllerConstants.VisualResponseProperty.VISIBILITY) {
|
254
|
-
this.value = this.states.includes(state);
|
255
|
-
} else {
|
256
|
-
this.value = this.states.includes(state) ? 1.0 : 0.0;
|
257
|
-
}
|
258
|
-
|
259
|
-
break;
|
260
|
-
|
261
|
-
default:
|
262
|
-
throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`);
|
263
|
-
}
|
264
|
-
}
|
265
|
-
|
266
|
-
}
|
267
|
-
|
268
|
-
class Component {
|
269
|
-
/**
|
270
|
-
* @param {string} componentId - Id of the component
|
271
|
-
* @param {InputProfileComponent} componentDescription - Description of the component to be created
|
272
|
-
*/
|
273
|
-
constructor(componentId, componentDescription) {
|
274
|
-
_defineProperty(this, "id", void 0);
|
275
|
-
|
276
|
-
_defineProperty(this, "values", void 0);
|
277
|
-
|
278
|
-
_defineProperty(this, "type", void 0);
|
279
|
-
|
280
|
-
_defineProperty(this, "gamepadIndices", void 0);
|
281
|
-
|
282
|
-
_defineProperty(this, "rootNodeName", void 0);
|
283
|
-
|
284
|
-
_defineProperty(this, "visualResponses", void 0);
|
285
|
-
|
286
|
-
_defineProperty(this, "touchPointNodeName", void 0);
|
287
|
-
|
288
|
-
_defineProperty(this, "touchPointNode", void 0);
|
289
|
-
|
290
|
-
if (!componentId || !componentDescription || !componentDescription.visualResponses || !componentDescription.gamepadIndices || Object.keys(componentDescription.gamepadIndices).length === 0) {
|
291
|
-
throw new Error('Invalid arguments supplied');
|
292
|
-
}
|
293
|
-
|
294
|
-
this.id = componentId;
|
295
|
-
this.type = componentDescription.type;
|
296
|
-
this.rootNodeName = componentDescription.rootNodeName;
|
297
|
-
this.touchPointNodeName = componentDescription.touchPointNodeName; // Build all the visual responses for this component
|
298
|
-
|
299
|
-
this.visualResponses = {};
|
300
|
-
Object.keys(componentDescription.visualResponses).forEach(responseName => {
|
301
|
-
const visualResponse = new VisualResponse(componentDescription.visualResponses[responseName]);
|
302
|
-
this.visualResponses[responseName] = visualResponse;
|
303
|
-
}); // Set default values
|
304
|
-
|
305
|
-
this.gamepadIndices = Object.assign({}, componentDescription.gamepadIndices);
|
306
|
-
this.values = {
|
307
|
-
state: MotionControllerConstants.ComponentState.DEFAULT,
|
308
|
-
button: this.gamepadIndices.button !== undefined ? 0 : undefined,
|
309
|
-
xAxis: this.gamepadIndices.xAxis !== undefined ? 0 : undefined,
|
310
|
-
yAxis: this.gamepadIndices.yAxis !== undefined ? 0 : undefined
|
311
|
-
};
|
312
|
-
}
|
313
|
-
|
314
|
-
get data() {
|
315
|
-
const data = {
|
316
|
-
id: this.id,
|
317
|
-
...this.values
|
318
|
-
};
|
319
|
-
return data;
|
320
|
-
}
|
321
|
-
/**
|
322
|
-
* @description Poll for updated data based on current gamepad state
|
323
|
-
* @param {Object} gamepad - The gamepad object from which the component data should be polled
|
324
|
-
*/
|
325
|
-
|
326
|
-
|
327
|
-
updateFromGamepad(gamepad) {
|
328
|
-
// Set the state to default before processing other data sources
|
329
|
-
this.values.state = MotionControllerConstants.ComponentState.DEFAULT; // Get and normalize button
|
330
|
-
|
331
|
-
if (this.gamepadIndices.button !== undefined && gamepad.buttons.length > this.gamepadIndices.button) {
|
332
|
-
const gamepadButton = gamepad.buttons[this.gamepadIndices.button];
|
333
|
-
this.values.button = gamepadButton.value;
|
334
|
-
this.values.button = this.values.button < 0 ? 0 : this.values.button;
|
335
|
-
this.values.button = this.values.button > 1 ? 1 : this.values.button; // Set the state based on the button
|
336
|
-
|
337
|
-
if (gamepadButton.pressed || this.values.button === 1) {
|
338
|
-
this.values.state = MotionControllerConstants.ComponentState.PRESSED;
|
339
|
-
} else if (gamepadButton.touched || this.values.button > MotionControllerConstants.ButtonTouchThreshold) {
|
340
|
-
this.values.state = MotionControllerConstants.ComponentState.TOUCHED;
|
341
|
-
}
|
342
|
-
} // Get and normalize x axis value
|
343
|
-
|
344
|
-
|
345
|
-
if (this.gamepadIndices.xAxis !== undefined && gamepad.axes.length > this.gamepadIndices.xAxis) {
|
346
|
-
this.values.xAxis = gamepad.axes[this.gamepadIndices.xAxis];
|
347
|
-
this.values.xAxis = this.values.xAxis < -1 ? -1 : this.values.xAxis;
|
348
|
-
this.values.xAxis = this.values.xAxis > 1 ? 1 : this.values.xAxis; // If the state is still default, check if the xAxis makes it touched
|
349
|
-
|
350
|
-
if (this.values.state === MotionControllerConstants.ComponentState.DEFAULT && Math.abs(this.values.xAxis) > MotionControllerConstants.AxisTouchThreshold) {
|
351
|
-
this.values.state = MotionControllerConstants.ComponentState.TOUCHED;
|
352
|
-
}
|
353
|
-
} // Get and normalize Y axis value
|
354
|
-
|
355
|
-
|
356
|
-
if (this.gamepadIndices.yAxis !== undefined && gamepad.axes.length > this.gamepadIndices.yAxis) {
|
357
|
-
this.values.yAxis = gamepad.axes[this.gamepadIndices.yAxis];
|
358
|
-
this.values.yAxis = this.values.yAxis < -1 ? -1 : this.values.yAxis;
|
359
|
-
this.values.yAxis = this.values.yAxis > 1 ? 1 : this.values.yAxis; // If the state is still default, check if the yAxis makes it touched
|
360
|
-
|
361
|
-
if (this.values.state === MotionControllerConstants.ComponentState.DEFAULT && Math.abs(this.values.yAxis) > MotionControllerConstants.AxisTouchThreshold) {
|
362
|
-
this.values.state = MotionControllerConstants.ComponentState.TOUCHED;
|
363
|
-
}
|
364
|
-
} // Update the visual response weights based on the current component data
|
365
|
-
|
366
|
-
|
367
|
-
Object.values(this.visualResponses).forEach(visualResponse => {
|
368
|
-
visualResponse.updateFromComponent(this.values);
|
369
|
-
});
|
370
|
-
}
|
371
|
-
|
372
|
-
}
|
373
|
-
/**
|
374
|
-
* @description Builds a motion controller with components and visual responses based on the
|
375
|
-
* supplied profile description. Data is polled from the xrInputSource's gamepad.
|
376
|
-
* @author Nell Waliczek / https://github.com/NellWaliczek
|
377
|
-
*/
|
378
|
-
|
379
|
-
|
380
|
-
class MotionController {
|
381
|
-
/**
|
382
|
-
* @param {XRInputSource} xrInputSource - The XRInputSource to build the MotionController around
|
383
|
-
* @param {Profile} profile - The best matched profile description for the supplied xrInputSource
|
384
|
-
* @param {string} assetUrl
|
385
|
-
*/
|
386
|
-
constructor(xrInputSource, profile, assetUrl) {
|
387
|
-
_defineProperty(this, "xrInputSource", void 0);
|
388
|
-
|
389
|
-
_defineProperty(this, "assetUrl", void 0);
|
390
|
-
|
391
|
-
_defineProperty(this, "layoutDescription", void 0);
|
392
|
-
|
393
|
-
_defineProperty(this, "id", void 0);
|
394
|
-
|
395
|
-
_defineProperty(this, "components", void 0);
|
396
|
-
|
397
|
-
if (!xrInputSource) {
|
398
|
-
throw new Error('No xrInputSource supplied');
|
399
|
-
}
|
400
|
-
|
401
|
-
if (!profile) {
|
402
|
-
throw new Error('No profile supplied');
|
403
|
-
}
|
404
|
-
|
405
|
-
if (!profile.layouts[xrInputSource.handedness]) {
|
406
|
-
throw new Error('No layout for ' + xrInputSource.handedness + ' handedness');
|
407
|
-
}
|
408
|
-
|
409
|
-
this.xrInputSource = xrInputSource;
|
410
|
-
this.assetUrl = assetUrl;
|
411
|
-
this.id = profile.profileId; // Build child components as described in the profile description
|
412
|
-
|
413
|
-
this.layoutDescription = profile.layouts[xrInputSource.handedness];
|
414
|
-
this.components = {};
|
415
|
-
Object.keys(this.layoutDescription.components).forEach(componentId => {
|
416
|
-
const componentDescription = this.layoutDescription.components[componentId];
|
417
|
-
this.components[componentId] = new Component(componentId, componentDescription);
|
418
|
-
}); // Initialize components based on current gamepad state
|
419
|
-
|
420
|
-
this.updateFromGamepad();
|
421
|
-
}
|
422
|
-
|
423
|
-
get gripSpace() {
|
424
|
-
return this.xrInputSource.gripSpace;
|
425
|
-
}
|
426
|
-
|
427
|
-
get targetRaySpace() {
|
428
|
-
return this.xrInputSource.targetRaySpace;
|
429
|
-
}
|
430
|
-
/**
|
431
|
-
* @description Returns a subset of component data for simplified debugging
|
432
|
-
*/
|
433
|
-
|
434
|
-
|
435
|
-
get data() {
|
436
|
-
const data = [];
|
437
|
-
Object.values(this.components).forEach(component => {
|
438
|
-
data.push(component.data);
|
439
|
-
});
|
440
|
-
return data;
|
441
|
-
}
|
442
|
-
/**
|
443
|
-
* @description Poll for updated data based on current gamepad state
|
444
|
-
*/
|
445
|
-
|
446
|
-
|
447
|
-
updateFromGamepad() {
|
448
|
-
Object.values(this.components).forEach(component => {
|
449
|
-
component.updateFromGamepad(this.xrInputSource.gamepad);
|
450
|
-
});
|
451
|
-
}
|
452
|
-
|
453
|
-
}
|
454
|
-
|
455
|
-
export { MotionController, MotionControllerConstants, fetchProfile, fetchProfilesList };
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),r={fromCubeTexture:function(r){var t,a,o,c=0,n=new e.Vector3,s=new e.Vector3,i=new e.Color,l=[0,0,0,0,0,0,0,0,0],h=new e.SphericalHarmonics3,g=h.coefficients;for(let t=0;t<6;t++){var b=r.image[t],f=b.width,w=b.height,v=document.createElement("canvas");v.width=f,v.height=w;var d=v.getContext("2d");d.drawImage(b,0,0,f,w);var u=d.getImageData(0,0,f,w),S=u.data,m=u.width,p=2/m;for(let h=0,b=S.length;h<b;h+=4){i.setRGB(S[h]/255,S[h+1]/255,S[h+2]/255),"colorSpace"in r?"srgb"===r.colorSpace&&i.convertSRGBToLinear():3001===r.encoding&&i.convertSRGBToLinear();var x=h/4,k=(x%m+.5)*p-1,y=1-(Math.floor(x/m)+.5)*p;switch(t){case 0:n.set(-1,y,-k);break;case 1:n.set(1,y,k);break;case 2:n.set(-k,1,-y);break;case 3:n.set(-k,-1,y);break;case 4:n.set(-k,y,1);break;case 5:n.set(k,y,-1)}a=n.lengthSq(),c+=o=4/(Math.sqrt(a)*a),s.copy(n).normalize(),e.SphericalHarmonics3.getBasisAt(s,l);for(let e=0;e<9;e++)g[e].x+=l[e]*i.r*o,g[e].y+=l[e]*i.g*o,g[e].z+=l[e]*i.b*o}}t=4*Math.PI/c;for(let e=0;e<9;e++)g[e].x*=t,g[e].y*=t,g[e].z*=t;return new e.LightProbe(h)},fromCubeRenderTarget:function(r,t){var a,o,c,n=0,s=new e.Vector3,i=new e.Vector3,l=new e.Color,h=[0,0,0,0,0,0,0,0,0],g=new e.SphericalHarmonics3,b=g.coefficients;for(let a=0;a<6;a++){var f=t.width,w=new Uint8Array(f*f*4);r.readRenderTargetPixels(t,0,0,f,f,w,a);var v=2/f;for(let r=0,g=w.length;r<g;r+=4){l.setRGB(w[r]/255,w[r+1]/255,w[r+2]/255),"colorSpace"in t.texture?"srgb"===t.texture.colorSpace&&l.convertSRGBToLinear():3001===t.texture.encoding&&l.convertSRGBToLinear();var d=r/4,u=(d%f+.5)*v-1,S=1-(Math.floor(d/f)+.5)*v;switch(a){case 0:s.set(1,S,-u);break;case 1:s.set(-1,S,u);break;case 2:s.set(u,1,-S);break;case 3:s.set(u,-1,S);break;case 4:s.set(u,S,1);break;case 5:s.set(-u,S,-1)}o=s.lengthSq(),n+=c=4/(Math.sqrt(o)*o),i.copy(s).normalize(),e.SphericalHarmonics3.getBasisAt(i,h);for(let e=0;e<9;e++)b[e].x+=h[e]*l.r*c,b[e].y+=h[e]*l.g*c,b[e].z+=h[e]*l.b*c}}a=4*Math.PI/n;for(let e=0;e<9;e++)b[e].x*=a,b[e].y*=a,b[e].z*=a;return new e.LightProbe(g)}};exports.LightProbeGenerator=r;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { CubeTexture, LightProbe, WebGLRenderer, WebGLCubeRenderTarget } from 'three';
|
2
|
-
|
3
|
-
export namespace LightProbeGenerator {
|
4
|
-
function fromCubeTexture(cubeTexture: CubeTexture): LightProbe;
|
5
|
-
function fromCubeRenderTarget(renderer: WebGLRenderer, cubeRenderTarget: WebGLCubeRenderTarget): LightProbe;
|
6
|
-
}
|
@@ -1,200 +0,0 @@
|
|
1
|
-
import { Vector3, Color, SphericalHarmonics3, LightProbe } from 'three';
|
2
|
-
|
3
|
-
var LightProbeGenerator = {
|
4
|
-
// https://www.ppsloan.org/publications/StupidSH36.pdf
|
5
|
-
fromCubeTexture: function (cubeTexture) {
|
6
|
-
var norm,
|
7
|
-
lengthSq,
|
8
|
-
weight,
|
9
|
-
totalWeight = 0;
|
10
|
-
var coord = new Vector3();
|
11
|
-
var dir = new Vector3();
|
12
|
-
var color = new Color();
|
13
|
-
var shBasis = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
14
|
-
var sh = new SphericalHarmonics3();
|
15
|
-
var shCoefficients = sh.coefficients;
|
16
|
-
|
17
|
-
for (let faceIndex = 0; faceIndex < 6; faceIndex++) {
|
18
|
-
var image = cubeTexture.image[faceIndex];
|
19
|
-
var width = image.width;
|
20
|
-
var height = image.height;
|
21
|
-
var canvas = document.createElement('canvas');
|
22
|
-
canvas.width = width;
|
23
|
-
canvas.height = height;
|
24
|
-
var context = canvas.getContext('2d');
|
25
|
-
context.drawImage(image, 0, 0, width, height);
|
26
|
-
var imageData = context.getImageData(0, 0, width, height);
|
27
|
-
var data = imageData.data;
|
28
|
-
var imageWidth = imageData.width; // assumed to be square
|
29
|
-
|
30
|
-
var pixelSize = 2 / imageWidth;
|
31
|
-
|
32
|
-
for (let i = 0, il = data.length; i < il; i += 4) {
|
33
|
-
// RGBA assumed
|
34
|
-
// pixel color
|
35
|
-
color.setRGB(data[i] / 255, data[i + 1] / 255, data[i + 2] / 255); // convert to linear color space
|
36
|
-
|
37
|
-
if ('colorSpace' in cubeTexture) {
|
38
|
-
if (cubeTexture.colorSpace === 'srgb') {
|
39
|
-
color.convertSRGBToLinear();
|
40
|
-
}
|
41
|
-
} else if (cubeTexture.encoding === 3001) {
|
42
|
-
// sRGBEncoding
|
43
|
-
color.convertSRGBToLinear();
|
44
|
-
} // pixel coordinate on unit cube
|
45
|
-
|
46
|
-
|
47
|
-
var pixelIndex = i / 4;
|
48
|
-
var col = -1 + (pixelIndex % imageWidth + 0.5) * pixelSize;
|
49
|
-
var row = 1 - (Math.floor(pixelIndex / imageWidth) + 0.5) * pixelSize;
|
50
|
-
|
51
|
-
switch (faceIndex) {
|
52
|
-
case 0:
|
53
|
-
coord.set(-1, row, -col);
|
54
|
-
break;
|
55
|
-
|
56
|
-
case 1:
|
57
|
-
coord.set(1, row, col);
|
58
|
-
break;
|
59
|
-
|
60
|
-
case 2:
|
61
|
-
coord.set(-col, 1, -row);
|
62
|
-
break;
|
63
|
-
|
64
|
-
case 3:
|
65
|
-
coord.set(-col, -1, row);
|
66
|
-
break;
|
67
|
-
|
68
|
-
case 4:
|
69
|
-
coord.set(-col, row, 1);
|
70
|
-
break;
|
71
|
-
|
72
|
-
case 5:
|
73
|
-
coord.set(col, row, -1);
|
74
|
-
break;
|
75
|
-
} // weight assigned to this pixel
|
76
|
-
|
77
|
-
|
78
|
-
lengthSq = coord.lengthSq();
|
79
|
-
weight = 4 / (Math.sqrt(lengthSq) * lengthSq);
|
80
|
-
totalWeight += weight; // direction vector to this pixel
|
81
|
-
|
82
|
-
dir.copy(coord).normalize(); // evaluate SH basis functions in direction dir
|
83
|
-
|
84
|
-
SphericalHarmonics3.getBasisAt(dir, shBasis); // accummuulate
|
85
|
-
|
86
|
-
for (let j = 0; j < 9; j++) {
|
87
|
-
shCoefficients[j].x += shBasis[j] * color.r * weight;
|
88
|
-
shCoefficients[j].y += shBasis[j] * color.g * weight;
|
89
|
-
shCoefficients[j].z += shBasis[j] * color.b * weight;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
} // normalize
|
93
|
-
|
94
|
-
|
95
|
-
norm = 4 * Math.PI / totalWeight;
|
96
|
-
|
97
|
-
for (let j = 0; j < 9; j++) {
|
98
|
-
shCoefficients[j].x *= norm;
|
99
|
-
shCoefficients[j].y *= norm;
|
100
|
-
shCoefficients[j].z *= norm;
|
101
|
-
}
|
102
|
-
|
103
|
-
return new LightProbe(sh);
|
104
|
-
},
|
105
|
-
fromCubeRenderTarget: function (renderer, cubeRenderTarget) {
|
106
|
-
// The renderTarget must be set to RGBA in order to make readRenderTargetPixels works
|
107
|
-
var norm,
|
108
|
-
lengthSq,
|
109
|
-
weight,
|
110
|
-
totalWeight = 0;
|
111
|
-
var coord = new Vector3();
|
112
|
-
var dir = new Vector3();
|
113
|
-
var color = new Color();
|
114
|
-
var shBasis = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
115
|
-
var sh = new SphericalHarmonics3();
|
116
|
-
var shCoefficients = sh.coefficients;
|
117
|
-
|
118
|
-
for (let faceIndex = 0; faceIndex < 6; faceIndex++) {
|
119
|
-
var imageWidth = cubeRenderTarget.width; // assumed to be square
|
120
|
-
|
121
|
-
var data = new Uint8Array(imageWidth * imageWidth * 4);
|
122
|
-
renderer.readRenderTargetPixels(cubeRenderTarget, 0, 0, imageWidth, imageWidth, data, faceIndex);
|
123
|
-
var pixelSize = 2 / imageWidth;
|
124
|
-
|
125
|
-
for (let i = 0, il = data.length; i < il; i += 4) {
|
126
|
-
// RGBA assumed
|
127
|
-
// pixel color
|
128
|
-
color.setRGB(data[i] / 255, data[i + 1] / 255, data[i + 2] / 255); // convert to linear color space
|
129
|
-
|
130
|
-
if ('colorSpace' in cubeRenderTarget.texture) {
|
131
|
-
if (cubeRenderTarget.texture.colorSpace === 'srgb') {
|
132
|
-
color.convertSRGBToLinear();
|
133
|
-
}
|
134
|
-
} else if (cubeRenderTarget.texture.encoding === 3001) {
|
135
|
-
// sRGBEncoding
|
136
|
-
color.convertSRGBToLinear();
|
137
|
-
} // pixel coordinate on unit cube
|
138
|
-
|
139
|
-
|
140
|
-
var pixelIndex = i / 4;
|
141
|
-
var col = -1 + (pixelIndex % imageWidth + 0.5) * pixelSize;
|
142
|
-
var row = 1 - (Math.floor(pixelIndex / imageWidth) + 0.5) * pixelSize;
|
143
|
-
|
144
|
-
switch (faceIndex) {
|
145
|
-
case 0:
|
146
|
-
coord.set(1, row, -col);
|
147
|
-
break;
|
148
|
-
|
149
|
-
case 1:
|
150
|
-
coord.set(-1, row, col);
|
151
|
-
break;
|
152
|
-
|
153
|
-
case 2:
|
154
|
-
coord.set(col, 1, -row);
|
155
|
-
break;
|
156
|
-
|
157
|
-
case 3:
|
158
|
-
coord.set(col, -1, row);
|
159
|
-
break;
|
160
|
-
|
161
|
-
case 4:
|
162
|
-
coord.set(col, row, 1);
|
163
|
-
break;
|
164
|
-
|
165
|
-
case 5:
|
166
|
-
coord.set(-col, row, -1);
|
167
|
-
break;
|
168
|
-
} // weight assigned to this pixel
|
169
|
-
|
170
|
-
|
171
|
-
lengthSq = coord.lengthSq();
|
172
|
-
weight = 4 / (Math.sqrt(lengthSq) * lengthSq);
|
173
|
-
totalWeight += weight; // direction vector to this pixel
|
174
|
-
|
175
|
-
dir.copy(coord).normalize(); // evaluate SH basis functions in direction dir
|
176
|
-
|
177
|
-
SphericalHarmonics3.getBasisAt(dir, shBasis); // accummuulate
|
178
|
-
|
179
|
-
for (let j = 0; j < 9; j++) {
|
180
|
-
shCoefficients[j].x += shBasis[j] * color.r * weight;
|
181
|
-
shCoefficients[j].y += shBasis[j] * color.g * weight;
|
182
|
-
shCoefficients[j].z += shBasis[j] * color.b * weight;
|
183
|
-
}
|
184
|
-
}
|
185
|
-
} // normalize
|
186
|
-
|
187
|
-
|
188
|
-
norm = 4 * Math.PI / totalWeight;
|
189
|
-
|
190
|
-
for (let j = 0; j < 9; j++) {
|
191
|
-
shCoefficients[j].x *= norm;
|
192
|
-
shCoefficients[j].y *= norm;
|
193
|
-
shCoefficients[j].z *= norm;
|
194
|
-
}
|
195
|
-
|
196
|
-
return new LightProbe(sh);
|
197
|
-
}
|
198
|
-
};
|
199
|
-
|
200
|
-
export { LightProbeGenerator };
|