rhodonite 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -19
- package/VERSION-FILE +1 -1
- package/dist/esm/foundation/components/BlendShape/BlendShapeComponent.d.ts +54 -0
- package/dist/esm/foundation/components/BlendShape/BlendShapeComponent.js +1 -1
- package/dist/esm/foundation/components/Camera/CameraComponent.d.ts +34 -0
- package/dist/esm/foundation/components/Camera/CameraComponent.js +1 -1
- package/dist/esm/foundation/components/Light/LightComponent.d.ts +3 -1
- package/dist/esm/foundation/components/Light/LightComponent.js +1 -1
- package/dist/esm/foundation/components/Mesh/MeshComponent.js +1 -1
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.js +1 -1
- package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.d.ts +16 -0
- package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.js +1 -1
- package/dist/esm/foundation/components/Shape/ShapeComponent.js +1 -1
- package/dist/esm/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +1 -1
- package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +1 -1
- package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +1 -1
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.d.ts +48 -0
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.js +1 -1
- package/dist/esm/foundation/components/Transform/TransformComponent.js +1 -1
- package/dist/esm/foundation/components/Trigger/TriggerComponent.js +1 -1
- package/dist/esm/foundation/components/Vrm/VrmComponent.js +1 -1
- package/dist/esm/foundation/constraints/VrmAimConstraint.js +1 -1
- package/dist/esm/foundation/constraints/VrmRollConstraint.js +1 -1
- package/dist/esm/foundation/constraints/VrmRotationConstraint.js +1 -1
- package/dist/esm/foundation/core/Component.js +1 -1
- package/dist/esm/foundation/core/ComponentRepository.js +1 -1
- package/dist/esm/foundation/core/Entity.js +1 -1
- package/dist/esm/foundation/core/EntityRepository.js +1 -1
- package/dist/esm/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esm/foundation/core/MemoryManager.js +2 -2
- package/dist/esm/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esm/foundation/definitions/ShaderSemantics.js +2 -2
- package/dist/esm/foundation/geometry/ComplexVertexAttribute.js +1 -1
- package/dist/esm/foundation/geometry/Mesh.js +1 -1
- package/dist/esm/foundation/geometry/Primitive.js +1 -1
- package/dist/esm/foundation/gizmos/AABBGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/CapsuleColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/Gizmo.d.ts +13 -0
- package/dist/esm/foundation/gizmos/Gizmo.js +1 -1
- package/dist/esm/foundation/gizmos/JointGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LightGizmo.d.ts +0 -1
- package/dist/esm/foundation/gizmos/LightGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LocatorGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/RotationGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ScaleGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ShapeGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/SphereColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/TranslationGizmo.js +1 -1
- package/dist/esm/foundation/helpers/BloomHelper.js +1 -1
- package/dist/esm/foundation/helpers/GaussianBlurHelper.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/PointShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
- package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.d.ts +25 -0
- package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.js +1 -0
- package/dist/esm/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +1 -1
- package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.d.ts +33 -0
- package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.js +1 -0
- package/dist/esm/foundation/helpers/materials/nodeBasedMaterialCommon.js +1 -1
- package/dist/esm/foundation/importer/AnimationAssigner.js +1 -1
- package/dist/esm/foundation/importer/DrcPointCloudImporter.js +1 -1
- package/dist/esm/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esm/foundation/importer/Gltf2Importer.js +1 -1
- package/dist/esm/foundation/importer/GltfImporter.js +1 -1
- package/dist/esm/foundation/importer/ModelConverter.js +1 -1
- package/dist/esm/foundation/importer/RhodoniteImportExtension.js +1 -1
- package/dist/esm/foundation/importer/Vrm0xImporter.js +1 -1
- package/dist/esm/foundation/importer/VrmImporter.js +1 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +18 -18
- package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +6 -6
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.d.ts +11 -0
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esm/foundation/materials/core/Material.js +1 -1
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGL.js +2 -2
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGPU.js +2 -2
- package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MergeVectorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_HashPRNGShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_SinHashShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SplitVectorShaderNode.js +1 -1
- package/dist/esm/foundation/math/MathClassUtil.js +1 -1
- package/dist/esm/foundation/math/Quaternion.js +1 -1
- package/dist/esm/foundation/math/Transform3D.js +1 -1
- package/dist/esm/foundation/math/shapes/MathSphere.js +1 -1
- package/dist/esm/foundation/memory/Accessor.js +6 -6
- package/dist/esm/foundation/memory/BufferView.js +1 -1
- package/dist/esm/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esm/foundation/misc/PngDecoder.js +1 -0
- package/dist/esm/foundation/misc/cache/Cache.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/CapsuleCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/SphereCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/VRMSpringBone.js +1 -1
- package/dist/esm/foundation/renderer/Frame.js +1 -1
- package/dist/esm/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esm/foundation/renderer/RenderPass.js +1 -1
- package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.d.ts +33 -0
- package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +1 -0
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +135 -0
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.js +1 -0
- package/dist/esm/foundation/renderer/pipelines/DeferredRenderPipeline.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +64 -17
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
- package/dist/esm/foundation/system/Engine.d.ts +37 -3
- package/dist/esm/foundation/system/Engine.js +1 -1
- package/dist/esm/foundation/textures/AbstractTexture.js +1 -1
- package/dist/esm/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esm/foundation/textures/CubeTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
- package/dist/esm/foundation/textures/Texture.js +1 -1
- package/dist/esm/foundation/textures/TextureDataFloat.js +1 -1
- package/dist/esm/foundation/textures/VideoTexture.js +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/webgl/MultiDrawRepository.js +1 -1
- package/dist/esm/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esm/webgl/WebGLResourceRepository.js +3 -3
- package/dist/esm/webgl/WebGLStereoUtil.js +1 -1
- package/dist/esm/webgl/WebGLStrategyWebGL2.d.ts +27 -14
- package/dist/esm/webgl/WebGLStrategyWebGL2.js +74 -55
- package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +0 -3
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -1
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +1 -0
- package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.js +35 -0
- package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +140 -0
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -0
- package/dist/esm/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.js +175 -0
- package/dist/esm/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.js +18 -0
- package/dist/esm/webgl/shaderity_shaders/common/iblDefinition.glsl.js +11 -5
- package/dist/esm/webgl/shaders/StandardShaderPart.js +3 -3
- package/dist/esm/webgl/shaders/nodes/BlockBeginShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/BlockEndShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.js +9 -9
- package/dist/esm/webgl/shaders/nodes/RaymarchObjectIdUniform.js +3 -3
- package/dist/esm/webgl/shaders/nodes/SdApplyWorldMatrix.js +3 -3
- package/dist/esm/webgl/shaders/nodes/Texture2DShader.js +14 -14
- package/dist/esm/webgl/shaders/nodes/UniformDataShader.js +13 -13
- package/dist/esm/webgpu/GpuCullingRegistry.js +1 -1
- package/dist/esm/webgpu/GpuDeformRegistry.js +1 -1
- package/dist/esm/webgpu/WebGpuGpuCulling.js +1 -1
- package/dist/esm/webgpu/WebGpuLightClusterBuilder.js +1 -1
- package/dist/esm/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esm/webgpu/WebGpuResourceRepository.js +5 -5
- package/dist/esm/webgpu/WebGpuStrategyBasic.d.ts +8 -0
- package/dist/esm/webgpu/WebGpuStrategyBasic.js +78 -59
- package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.wgsl.js +30 -0
- package/dist/esm/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.wgsl.js +133 -0
- package/dist/esm/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.wgsl.js +169 -0
- package/dist/esm/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.wgsl.js +19 -0
- package/dist/esm/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +10 -4
- package/dist/esmdev/foundation/components/BlendShape/BlendShapeComponent.d.ts +54 -0
- package/dist/esmdev/foundation/components/BlendShape/BlendShapeComponent.js +107 -1
- package/dist/esmdev/foundation/components/Camera/CameraComponent.d.ts +34 -0
- package/dist/esmdev/foundation/components/Camera/CameraComponent.js +118 -46
- package/dist/esmdev/foundation/components/CameraController/CameraControllerComponent.js +8 -8
- package/dist/esmdev/foundation/components/CharacterController/CharacterAnimationController.js +74 -74
- package/dist/esmdev/foundation/components/CharacterController/CharacterControllerComponent.js +39 -39
- package/dist/esmdev/foundation/components/Constraint/ConstraintComponent.js +4 -4
- package/dist/esmdev/foundation/components/Light/LightComponent.d.ts +3 -1
- package/dist/esmdev/foundation/components/Light/LightComponent.js +126 -121
- package/dist/esmdev/foundation/components/Mesh/MeshComponent.js +50 -50
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.js +96 -92
- package/dist/esmdev/foundation/components/Physics/PhysicsComponent.js +73 -73
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingComponent.js +54 -54
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +251 -251
- package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.d.ts +16 -0
- package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.js +375 -343
- package/dist/esmdev/foundation/components/Shape/ShapeComponent.js +31 -31
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +9 -9
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.d.ts +48 -0
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.js +337 -205
- package/dist/esmdev/foundation/components/Transform/TransformComponent.js +93 -93
- package/dist/esmdev/foundation/components/Trigger/TriggerComponent.js +61 -61
- package/dist/esmdev/foundation/components/Vrm/VrmComponent.js +44 -44
- package/dist/esmdev/foundation/constraints/VrmAimConstraint.js +11 -11
- package/dist/esmdev/foundation/constraints/VrmRollConstraint.js +16 -16
- package/dist/esmdev/foundation/constraints/VrmRotationConstraint.js +10 -10
- package/dist/esmdev/foundation/core/Component.js +32 -32
- package/dist/esmdev/foundation/core/ComponentMemoryRegistry.js +42 -42
- package/dist/esmdev/foundation/core/ComponentRepository.js +37 -37
- package/dist/esmdev/foundation/core/Config.js +9 -9
- package/dist/esmdev/foundation/core/Entity.js +9 -9
- package/dist/esmdev/foundation/core/EntityRepository.js +19 -19
- package/dist/esmdev/foundation/core/GlobalDataRepository.js +17 -17
- package/dist/esmdev/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esmdev/foundation/core/MemoryManager.js +52 -27
- package/dist/esmdev/foundation/core/RnObject.js +37 -37
- package/dist/esmdev/foundation/definitions/Blend.js +3 -3
- package/dist/esmdev/foundation/definitions/ComponentType.js +7 -7
- package/dist/esmdev/foundation/definitions/CompositionType.js +50 -50
- package/dist/esmdev/foundation/definitions/CompressionTextureType.js +6 -6
- package/dist/esmdev/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ShaderSemantics.js +12 -7
- package/dist/esmdev/foundation/definitions/TextureFormat.js +3 -3
- package/dist/esmdev/foundation/definitions/TextureParameter.js +3 -3
- package/dist/esmdev/foundation/definitions/VertexAttribute.js +30 -30
- package/dist/esmdev/foundation/enhanced_js_objects/Array.js +2 -2
- package/dist/esmdev/foundation/exporter/Gltf2Exporter.js +112 -112
- package/dist/esmdev/foundation/geometry/ComplexVertexAttribute.js +24 -24
- package/dist/esmdev/foundation/geometry/Frustum.js +41 -41
- package/dist/esmdev/foundation/geometry/Mesh.js +219 -219
- package/dist/esmdev/foundation/geometry/Primitive.js +134 -134
- package/dist/esmdev/foundation/geometry/SimpleVertexAttribute.js +7 -7
- package/dist/esmdev/foundation/geometry/shapes/Cylinder.js +3 -3
- package/dist/esmdev/foundation/geometry/shapes/Joint.js +33 -33
- package/dist/esmdev/foundation/gizmos/AABBGizmo.js +17 -20
- package/dist/esmdev/foundation/gizmos/CapsuleColliderGizmo.js +24 -26
- package/dist/esmdev/foundation/gizmos/Gizmo.d.ts +13 -0
- package/dist/esmdev/foundation/gizmos/Gizmo.js +43 -21
- package/dist/esmdev/foundation/gizmos/JointGizmo.js +38 -40
- package/dist/esmdev/foundation/gizmos/LightGizmo.d.ts +0 -1
- package/dist/esmdev/foundation/gizmos/LightGizmo.js +26 -30
- package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +26 -29
- package/dist/esmdev/foundation/gizmos/RotationGizmo.js +217 -219
- package/dist/esmdev/foundation/gizmos/ScaleGizmo.js +135 -137
- package/dist/esmdev/foundation/gizmos/ShapeGizmo.js +44 -47
- package/dist/esmdev/foundation/gizmos/SphereColliderGizmo.js +25 -27
- package/dist/esmdev/foundation/gizmos/TranslationGizmo.js +133 -135
- package/dist/esmdev/foundation/helpers/BloomHelper.js +34 -34
- package/dist/esmdev/foundation/helpers/GaussianBlurHelper.js +18 -18
- package/dist/esmdev/foundation/helpers/Shadow/PointShadowMap.js +12 -12
- package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +5 -5
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +119 -119
- package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.d.ts +25 -0
- package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.js +61 -0
- package/dist/esmdev/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +10 -1
- package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.d.ts +33 -0
- package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.js +127 -0
- package/dist/esmdev/foundation/helpers/materials/nodeBasedMaterialCommon.js +11 -1
- package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
- package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +33 -33
- package/dist/esmdev/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esmdev/foundation/importer/Gltf2Importer.js +21 -17
- package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
- package/dist/esmdev/foundation/importer/ModelConverter.js +131 -131
- package/dist/esmdev/foundation/importer/RhodoniteImportExtension.js +6 -6
- package/dist/esmdev/foundation/importer/Vrm0xImporter.js +48 -48
- package/dist/esmdev/foundation/importer/VrmImporter.js +10 -10
- package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.js +37 -28
- package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +2 -2
- package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +147 -139
- package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +28 -20
- package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +5 -5
- package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +5 -5
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.d.ts +11 -0
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +68 -53
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +26 -26
- package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
- package/dist/esmdev/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esmdev/foundation/materials/core/Material.js +132 -118
- package/dist/esmdev/foundation/materials/core/MaterialRepository.js +65 -65
- package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +38 -38
- package/dist/esmdev/foundation/materials/core/ShaderHandler.js +4 -4
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +16 -17
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +17 -18
- package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/AlphaTestShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/AndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/Atan2ShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributePositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeTexcoordShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/BlockBeginShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/BlockEndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/BranchShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/ClassicShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/ConstantScalarVariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVariableShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ConstantVector2VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector3VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector4VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +19 -19
- package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/OrShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/OutColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/OutPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +8 -8
- package/dist/esmdev/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrNormalPropsShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrShaderShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/PbrSheenPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrVolumePropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/ProcessGeometryShaderNode.js +22 -22
- package/dist/esmdev/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/Random_HashPRNGShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/Texture2DShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/UniformDataShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/WireframeMaterialNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutShadingColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistZShaderNode.js +4 -4
- package/dist/esmdev/foundation/math/AABB.js +132 -132
- package/dist/esmdev/foundation/math/AnimatedQuaternion.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedScalar.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedValueEvaluationState.js +20 -20
- package/dist/esmdev/foundation/math/AnimatedVector2.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector3.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector4.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVectorN.js +55 -55
- package/dist/esmdev/foundation/math/IdentityMatrix33.js +2 -2
- package/dist/esmdev/foundation/math/IdentityMatrix44.js +2 -2
- package/dist/esmdev/foundation/math/MathClassUtil.js +4 -4
- package/dist/esmdev/foundation/math/Quaternion.js +20 -20
- package/dist/esmdev/foundation/math/Transform3D.js +83 -83
- package/dist/esmdev/foundation/math/shapes/MathSphere.js +9 -9
- package/dist/esmdev/foundation/memory/Accessor.js +371 -371
- package/dist/esmdev/foundation/memory/Buffer.js +40 -40
- package/dist/esmdev/foundation/memory/BufferView.js +33 -33
- package/dist/esmdev/foundation/misc/DataUtil.js +2 -2
- package/dist/esmdev/foundation/misc/EnumIO.js +10 -10
- package/dist/esmdev/foundation/misc/Logger.js +14 -14
- package/dist/esmdev/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esmdev/foundation/misc/PngDecoder.js +113 -0
- package/dist/esmdev/foundation/misc/RnPromise.js +14 -14
- package/dist/esmdev/foundation/misc/Time.js +27 -27
- package/dist/esmdev/foundation/misc/WeakOption.js +14 -14
- package/dist/esmdev/foundation/misc/cache/Cache.js +2 -2
- package/dist/esmdev/foundation/misc/cache/SymbolWeakMap.js +8 -8
- package/dist/esmdev/foundation/physics/PhysicsWorldQuery.js +13 -13
- package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +202 -202
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +241 -241
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.js +3 -3
- package/dist/esmdev/foundation/physics/VRMSpring/CapsuleCollider.js +42 -42
- package/dist/esmdev/foundation/physics/VRMSpring/SphereCollider.js +27 -27
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBone.js +10 -10
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBonePhysicsStrategy.js +50 -50
- package/dist/esmdev/foundation/renderer/Expression.js +6 -6
- package/dist/esmdev/foundation/renderer/Frame.js +12 -12
- package/dist/esmdev/foundation/renderer/FrameBuffer.js +25 -25
- package/dist/esmdev/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esmdev/foundation/renderer/RenderPass.js +110 -99
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.d.ts +33 -0
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +66 -0
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +135 -0
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +275 -0
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +153 -153
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystemStub.js +3 -3
- package/dist/esmdev/foundation/renderer/pipelines/DeferredRenderPipeline.js +6 -6
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +64 -17
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +537 -430
- package/dist/esmdev/foundation/system/Engine.d.ts +37 -3
- package/dist/esmdev/foundation/system/Engine.js +266 -224
- package/dist/esmdev/foundation/system/EventPubSub.js +8 -8
- package/dist/esmdev/foundation/system/InputManager.js +56 -56
- package/dist/esmdev/foundation/system/ModuleManager.js +6 -6
- package/dist/esmdev/foundation/textures/AbstractTexture.js +50 -50
- package/dist/esmdev/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esmdev/foundation/textures/CubeTexture.js +47 -36
- package/dist/esmdev/foundation/textures/RenderBuffer.js +11 -11
- package/dist/esmdev/foundation/textures/RenderTargetTexture.js +25 -25
- package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.js +37 -37
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.js +26 -20
- package/dist/esmdev/foundation/textures/Sampler.js +24 -24
- package/dist/esmdev/foundation/textures/Texture.js +83 -83
- package/dist/esmdev/foundation/textures/TextureArray.js +8 -8
- package/dist/esmdev/foundation/textures/TextureDataFloat.js +26 -26
- package/dist/esmdev/foundation/textures/VideoTexture.js +24 -24
- package/dist/esmdev/version.js +2 -2
- package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
- package/dist/esmdev/webgl/MultiDraw.js +2 -2
- package/dist/esmdev/webgl/MultiDrawRepository.js +30 -30
- package/dist/esmdev/webgl/WebGLContextWrapper.js +164 -164
- package/dist/esmdev/webgl/WebGLGpuTimer.js +32 -32
- package/dist/esmdev/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esmdev/webgl/WebGLResourceRepository.js +375 -314
- package/dist/esmdev/webgl/WebGLStereoUtil.js +42 -42
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.d.ts +27 -14
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +350 -301
- package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +4 -4
- package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/common/iblDefinition.glsl.js +2 -2
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +4 -4
- package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +14 -14
- package/dist/esmdev/webgl/shaders/StandardShaderPart.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/BlockBeginShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/BlockEndShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +21 -21
- package/dist/esmdev/webgl/shaders/nodes/DiscardShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/EndShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +23 -23
- package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +23 -23
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +27 -27
- package/dist/esmdev/webgpu/GpuCullingRegistry.js +94 -94
- package/dist/esmdev/webgpu/GpuDeformRegistry.js +53 -53
- package/dist/esmdev/webgpu/RangeAllocator.js +16 -16
- package/dist/esmdev/webgpu/WebGpuBufferArena.js +21 -21
- package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
- package/dist/esmdev/webgpu/WebGpuGpuCulling.js +198 -198
- package/dist/esmdev/webgpu/WebGpuGpuTimer.js +52 -52
- package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +37 -37
- package/dist/esmdev/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esmdev/webgpu/WebGpuResourceRepository.js +660 -598
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.d.ts +8 -0
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +169 -132
- package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +128 -128
- package/dist/esmdev/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +2 -2
- package/dist/esmdev/xr/WebARSystem.js +69 -69
- package/dist/esmdev/xr/WebXRSystem.js +153 -153
- package/package.json +2 -1
|
@@ -68,27 +68,27 @@ var Gltf2Exporter = class {
|
|
|
68
68
|
entities: void 0,
|
|
69
69
|
type: GLTF2_EXPORT_GLB
|
|
70
70
|
}) {
|
|
71
|
-
const { collectedEntities, topLevelEntities } = this.
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
77
|
-
const { json, fileName } = this.
|
|
78
|
-
this
|
|
79
|
-
this.
|
|
80
|
-
await this.
|
|
81
|
-
await this.
|
|
82
|
-
this.
|
|
71
|
+
const { collectedEntities, topLevelEntities } = this.Zj(engine, option);
|
|
72
|
+
this.Oj.clear();
|
|
73
|
+
this.Qj.clear();
|
|
74
|
+
this.Rj.clear();
|
|
75
|
+
this.Sj.clear();
|
|
76
|
+
this.Tj.clear();
|
|
77
|
+
const { json, fileName } = this._j(filename);
|
|
78
|
+
this.$j(json, collectedEntities);
|
|
79
|
+
this.ak(json, collectedEntities, topLevelEntities);
|
|
80
|
+
await this.bk(json, collectedEntities, option);
|
|
81
|
+
await this.ck(json, option);
|
|
82
|
+
this.dk(json, collectedEntities);
|
|
83
83
|
createEffekseer(json, collectedEntities);
|
|
84
84
|
__removeUnusedAccessorsAndBufferViews(json);
|
|
85
|
-
const arraybuffer = this.
|
|
85
|
+
const arraybuffer = this.ek(json);
|
|
86
86
|
__deleteEmptyArrays(json);
|
|
87
87
|
const glbArrayBuffer = generateGlbArrayBuffer(json, arraybuffer);
|
|
88
88
|
if (option.type === GLTF2_EXPORT_GLB) {
|
|
89
|
-
this.
|
|
89
|
+
this.fk(json, fileName, glbArrayBuffer);
|
|
90
90
|
} else if (option.type === GLTF2_EXPORT_GLTF) {
|
|
91
|
-
this.
|
|
91
|
+
this.gk(json, fileName, arraybuffer);
|
|
92
92
|
}
|
|
93
93
|
return glbArrayBuffer;
|
|
94
94
|
}
|
|
@@ -102,7 +102,7 @@ var Gltf2Exporter = class {
|
|
|
102
102
|
* @param option - Export configuration options containing entity filters
|
|
103
103
|
* @returns Object containing collected entities and top-level entities
|
|
104
104
|
*/
|
|
105
|
-
static
|
|
105
|
+
static Zj(engine, option) {
|
|
106
106
|
const checkPassOrNotWithTags = (entity) => {
|
|
107
107
|
if (Is.exist(option) && Is.exist(option.excludeTags)) {
|
|
108
108
|
for (const tag of option.excludeTags) {
|
|
@@ -173,7 +173,7 @@ var Gltf2Exporter = class {
|
|
|
173
173
|
* @param filename - Target output filename for generating URIs
|
|
174
174
|
* @returns Object containing the initialized JSON structure and processed filename
|
|
175
175
|
*/
|
|
176
|
-
static
|
|
176
|
+
static _j(filename) {
|
|
177
177
|
const fileName = filename ? filename : `Rhodonite_${Date.now()}`;
|
|
178
178
|
const json = {
|
|
179
179
|
asset: {
|
|
@@ -213,7 +213,7 @@ var Gltf2Exporter = class {
|
|
|
213
213
|
* @param json - The glTF2 JSON document to populate
|
|
214
214
|
* @param entities - Array of entities to process for buffer creation
|
|
215
215
|
*/
|
|
216
|
-
static
|
|
216
|
+
static $j(json, entities) {
|
|
217
217
|
const existingUniqueRnBuffers = [];
|
|
218
218
|
const existingUniqueRnBufferViews = [];
|
|
219
219
|
const existingUniqueRnAccessors = [];
|
|
@@ -232,9 +232,9 @@ var Gltf2Exporter = class {
|
|
|
232
232
|
existingUniqueRnAccessors
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
static
|
|
235
|
+
static dk(json, entities) {
|
|
236
236
|
const animationOptions = {
|
|
237
|
-
resolveAnimationTarget: ({ channel, trackName }) => this
|
|
237
|
+
resolveAnimationTarget: ({ channel, trackName }) => this.hk(json, channel, trackName)
|
|
238
238
|
};
|
|
239
239
|
__createBufferViewsAndAccessorsOfAnimation(json, entities, animationOptions);
|
|
240
240
|
}
|
|
@@ -249,7 +249,7 @@ var Gltf2Exporter = class {
|
|
|
249
249
|
* @param entities - All entities to convert to nodes
|
|
250
250
|
* @param topLevelEntities - Root-level entities for the scene
|
|
251
251
|
*/
|
|
252
|
-
static
|
|
252
|
+
static ak(json, entities, topLevelEntities) {
|
|
253
253
|
json.nodes = [];
|
|
254
254
|
json.scenes = [{ nodes: [] }];
|
|
255
255
|
const scene = json.scenes[0];
|
|
@@ -300,7 +300,7 @@ var Gltf2Exporter = class {
|
|
|
300
300
|
node.extensions.KHR_node_visibility = {
|
|
301
301
|
visible: localVisible
|
|
302
302
|
};
|
|
303
|
-
this.
|
|
303
|
+
this.Nj(json, "KHR_node_visibility");
|
|
304
304
|
}
|
|
305
305
|
const transform = entity.getTransform();
|
|
306
306
|
const normalizedQuaternion = Quaternion.normalize(transform.localRotationInner);
|
|
@@ -370,10 +370,10 @@ var Gltf2Exporter = class {
|
|
|
370
370
|
}
|
|
371
371
|
json.cameras.push(glTF2Camera);
|
|
372
372
|
node.camera = json.cameras.length - 1;
|
|
373
|
-
this.
|
|
373
|
+
this.Rj.set(cameraComponent, node.camera);
|
|
374
374
|
}
|
|
375
|
-
this.
|
|
376
|
-
this.
|
|
375
|
+
this.ik(json, entity, node);
|
|
376
|
+
this.jk(json, entity, node);
|
|
377
377
|
}
|
|
378
378
|
for (const nodeIndex of skinnedMeshNodeIndices) {
|
|
379
379
|
const node = json.nodes[nodeIndex];
|
|
@@ -414,7 +414,7 @@ var Gltf2Exporter = class {
|
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
static
|
|
417
|
+
static ik(json, entity, node) {
|
|
418
418
|
var _a, _b;
|
|
419
419
|
const lightComponent = (_a = entity.tryToGetLight) == null ? void 0 : _a.call(entity);
|
|
420
420
|
if (Is.not.exist(lightComponent) || lightComponent.enable !== true) {
|
|
@@ -475,11 +475,11 @@ var Gltf2Exporter = class {
|
|
|
475
475
|
...(_b = gltfLight.extras) != null ? _b : {},
|
|
476
476
|
rhodonite: rhodoniteExtras
|
|
477
477
|
};
|
|
478
|
-
const lightsExtension = this.
|
|
478
|
+
const lightsExtension = this.kk(json);
|
|
479
479
|
const lightIndex = lightsExtension.lights.length;
|
|
480
480
|
lightsExtension.lights.push(gltfLight);
|
|
481
|
-
this.
|
|
482
|
-
this.
|
|
481
|
+
this.Qj.set(lightComponent, lightIndex);
|
|
482
|
+
this.Nj(json, "KHR_lights_punctual");
|
|
483
483
|
if (Is.not.exist(node.extensions)) {
|
|
484
484
|
node.extensions = {};
|
|
485
485
|
}
|
|
@@ -487,7 +487,7 @@ var Gltf2Exporter = class {
|
|
|
487
487
|
light: lightIndex
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
static
|
|
490
|
+
static kk(json) {
|
|
491
491
|
if (Is.not.exist(json.extensions)) {
|
|
492
492
|
json.extensions = {};
|
|
493
493
|
}
|
|
@@ -508,7 +508,7 @@ var Gltf2Exporter = class {
|
|
|
508
508
|
* @param entity - The entity to export
|
|
509
509
|
* @param node - The glTF node of the entity
|
|
510
510
|
*/
|
|
511
|
-
static
|
|
511
|
+
static jk(json, entity, node) {
|
|
512
512
|
var _a, _b;
|
|
513
513
|
const raymarchingComponent = (_a = entity.tryToGetRaymarching) == null ? void 0 : _a.call(entity);
|
|
514
514
|
if (Is.not.exist(raymarchingComponent)) {
|
|
@@ -523,29 +523,29 @@ var Gltf2Exporter = class {
|
|
|
523
523
|
isPickable: raymarchingComponent.isPickable,
|
|
524
524
|
castShadow: raymarchingComponent.castShadow
|
|
525
525
|
};
|
|
526
|
-
this.
|
|
526
|
+
this.Nj(json, "RHODONITE_raymarching");
|
|
527
527
|
}
|
|
528
|
-
static
|
|
528
|
+
static Nj(json, extensionName) {
|
|
529
529
|
if (json.extensionsUsed.indexOf(extensionName) === -1) {
|
|
530
530
|
json.extensionsUsed.push(extensionName);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
static
|
|
533
|
+
static Uj(rnMaterial, materialIndex) {
|
|
534
534
|
if (Is.not.exist(rnMaterial)) {
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
|
-
let indices = this.
|
|
537
|
+
let indices = this.Oj.get(rnMaterial);
|
|
538
538
|
if (Is.not.exist(indices)) {
|
|
539
539
|
indices = [];
|
|
540
|
-
this.
|
|
540
|
+
this.Oj.set(rnMaterial, indices);
|
|
541
541
|
}
|
|
542
542
|
indices.push(materialIndex);
|
|
543
543
|
}
|
|
544
|
-
static
|
|
545
|
-
let exportedPointers = this.
|
|
544
|
+
static Pj(trackName, pointer) {
|
|
545
|
+
let exportedPointers = this.Sj.get(trackName);
|
|
546
546
|
if (Is.not.exist(exportedPointers)) {
|
|
547
547
|
exportedPointers = /* @__PURE__ */ new Set();
|
|
548
|
-
this.
|
|
548
|
+
this.Sj.set(trackName, exportedPointers);
|
|
549
549
|
}
|
|
550
550
|
if (exportedPointers.has(pointer)) {
|
|
551
551
|
return false;
|
|
@@ -553,7 +553,7 @@ var Gltf2Exporter = class {
|
|
|
553
553
|
exportedPointers.add(pointer);
|
|
554
554
|
return true;
|
|
555
555
|
}
|
|
556
|
-
static
|
|
556
|
+
static hk(json, channel, trackName) {
|
|
557
557
|
const pathName = channel.target.pathName;
|
|
558
558
|
if (typeof pathName !== "string") {
|
|
559
559
|
return void 0;
|
|
@@ -563,20 +563,20 @@ var Gltf2Exporter = class {
|
|
|
563
563
|
}
|
|
564
564
|
if (pathName.startsWith("material/")) {
|
|
565
565
|
const semantic = pathName.substring("material/".length);
|
|
566
|
-
return this.
|
|
566
|
+
return this.lk(json, channel, semantic, trackName);
|
|
567
567
|
}
|
|
568
568
|
if (pathName.startsWith("light_")) {
|
|
569
|
-
return this.
|
|
569
|
+
return this.mk(json, channel, pathName, trackName);
|
|
570
570
|
}
|
|
571
571
|
if (pathName.startsWith("camera_")) {
|
|
572
|
-
return this.
|
|
572
|
+
return this.nk(json, channel, pathName, trackName);
|
|
573
573
|
}
|
|
574
574
|
if (pathName === "visibility") {
|
|
575
|
-
return this.
|
|
575
|
+
return this.ok(json, channel, trackName);
|
|
576
576
|
}
|
|
577
577
|
return void 0;
|
|
578
578
|
}
|
|
579
|
-
static
|
|
579
|
+
static ok(json, channel, trackName) {
|
|
580
580
|
var _a;
|
|
581
581
|
const nodeIndex = channel.target.entity.gltfNodeIndex;
|
|
582
582
|
if (Is.not.exist(nodeIndex)) {
|
|
@@ -594,11 +594,11 @@ var Gltf2Exporter = class {
|
|
|
594
594
|
visible: typeof localVisible === "boolean" ? localVisible : channel.target.entity.getSceneGraph().isVisible
|
|
595
595
|
};
|
|
596
596
|
const pointer = `/nodes/${nodeIndex}/extensions/KHR_node_visibility/visible`;
|
|
597
|
-
if (!this.
|
|
597
|
+
if (!this.Pj(trackName, pointer)) {
|
|
598
598
|
return null;
|
|
599
599
|
}
|
|
600
|
-
this.
|
|
601
|
-
this.
|
|
600
|
+
this.Nj(json, "KHR_animation_pointer");
|
|
601
|
+
this.Nj(json, "KHR_node_visibility");
|
|
602
602
|
return {
|
|
603
603
|
path: "pointer",
|
|
604
604
|
extensions: {
|
|
@@ -608,22 +608,22 @@ var Gltf2Exporter = class {
|
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
static
|
|
612
|
-
const indices = this.
|
|
611
|
+
static lk(json, channel, semantic, trackName) {
|
|
612
|
+
const indices = this.pk(semantic, channel.animatedValue);
|
|
613
613
|
if (indices.length === 0) {
|
|
614
|
-
this.
|
|
614
|
+
this.Vj(semantic, true);
|
|
615
615
|
return null;
|
|
616
616
|
}
|
|
617
|
-
const pointerSuffix = this.
|
|
617
|
+
const pointerSuffix = this.qk(semantic);
|
|
618
618
|
if (Is.not.exist(pointerSuffix)) {
|
|
619
|
-
this.
|
|
619
|
+
this.Vj(semantic, false);
|
|
620
620
|
return null;
|
|
621
621
|
}
|
|
622
|
-
this.
|
|
622
|
+
this.Nj(json, "KHR_animation_pointer");
|
|
623
623
|
const targets = [];
|
|
624
624
|
for (const materialIndex of indices) {
|
|
625
625
|
const pointer = `/materials/${materialIndex}${pointerSuffix}`;
|
|
626
|
-
if (!this.
|
|
626
|
+
if (!this.Pj(trackName, pointer)) {
|
|
627
627
|
continue;
|
|
628
628
|
}
|
|
629
629
|
targets.push({
|
|
@@ -637,9 +637,9 @@ var Gltf2Exporter = class {
|
|
|
637
637
|
}
|
|
638
638
|
return targets.length > 0 ? targets : null;
|
|
639
639
|
}
|
|
640
|
-
static
|
|
640
|
+
static pk(semantic, animatedValue) {
|
|
641
641
|
const indices = [];
|
|
642
|
-
for (const [rnMaterial, gltfIndices] of this.
|
|
642
|
+
for (const [rnMaterial, gltfIndices] of this.Oj.entries()) {
|
|
643
643
|
const parameter = rnMaterial.getParameter(semantic);
|
|
644
644
|
if (parameter === animatedValue) {
|
|
645
645
|
indices.push(...gltfIndices);
|
|
@@ -647,13 +647,13 @@ var Gltf2Exporter = class {
|
|
|
647
647
|
}
|
|
648
648
|
return Array.from(new Set(indices));
|
|
649
649
|
}
|
|
650
|
-
static
|
|
650
|
+
static mk(json, channel, pathName, trackName) {
|
|
651
651
|
var _a, _b;
|
|
652
652
|
const lightComponent = (_b = (_a = channel.target.entity).tryToGetLight) == null ? void 0 : _b.call(_a);
|
|
653
653
|
if (Is.not.exist(lightComponent)) {
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
const lightIndex = this.
|
|
656
|
+
const lightIndex = this.Qj.get(lightComponent);
|
|
657
657
|
if (Is.not.exist(lightIndex)) {
|
|
658
658
|
return null;
|
|
659
659
|
}
|
|
@@ -662,10 +662,10 @@ var Gltf2Exporter = class {
|
|
|
662
662
|
return null;
|
|
663
663
|
}
|
|
664
664
|
const pointer = `/extensions/KHR_lights_punctual/lights/${lightIndex}${suffix}`;
|
|
665
|
-
if (!this.
|
|
665
|
+
if (!this.Pj(trackName, pointer)) {
|
|
666
666
|
return null;
|
|
667
667
|
}
|
|
668
|
-
this.
|
|
668
|
+
this.Nj(json, "KHR_animation_pointer");
|
|
669
669
|
return {
|
|
670
670
|
path: "pointer",
|
|
671
671
|
extensions: {
|
|
@@ -675,25 +675,25 @@ var Gltf2Exporter = class {
|
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
static
|
|
678
|
+
static nk(json, channel, pathName, trackName) {
|
|
679
679
|
var _a, _b;
|
|
680
680
|
const cameraComponent = (_b = (_a = channel.target.entity).tryToGetCamera) == null ? void 0 : _b.call(_a);
|
|
681
681
|
if (Is.not.exist(cameraComponent)) {
|
|
682
682
|
return null;
|
|
683
683
|
}
|
|
684
|
-
const cameraIndex = this.
|
|
684
|
+
const cameraIndex = this.Rj.get(cameraComponent);
|
|
685
685
|
if (Is.not.exist(cameraIndex)) {
|
|
686
686
|
return null;
|
|
687
687
|
}
|
|
688
|
-
const suffix = this.
|
|
688
|
+
const suffix = this.rk(pathName, cameraComponent);
|
|
689
689
|
if (Is.not.exist(suffix)) {
|
|
690
690
|
return null;
|
|
691
691
|
}
|
|
692
692
|
const pointer = `/cameras/${cameraIndex}${suffix}`;
|
|
693
|
-
if (!this.
|
|
693
|
+
if (!this.Pj(trackName, pointer)) {
|
|
694
694
|
return null;
|
|
695
695
|
}
|
|
696
|
-
this.
|
|
696
|
+
this.Nj(json, "KHR_animation_pointer");
|
|
697
697
|
return {
|
|
698
698
|
path: "pointer",
|
|
699
699
|
extensions: {
|
|
@@ -703,7 +703,7 @@ var Gltf2Exporter = class {
|
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
static
|
|
706
|
+
static qk(semantic) {
|
|
707
707
|
const direct = MATERIAL_POINTER_SUFFIX_MAP[semantic];
|
|
708
708
|
if (Is.exist(direct)) {
|
|
709
709
|
return direct;
|
|
@@ -721,18 +721,18 @@ var Gltf2Exporter = class {
|
|
|
721
721
|
}
|
|
722
722
|
return void 0;
|
|
723
723
|
}
|
|
724
|
-
static
|
|
725
|
-
if (this.
|
|
724
|
+
static Vj(semantic, missingMaterial) {
|
|
725
|
+
if (this.Tj.has(semantic)) {
|
|
726
726
|
return;
|
|
727
727
|
}
|
|
728
|
-
this.
|
|
728
|
+
this.Tj.add(semantic);
|
|
729
729
|
if (missingMaterial) {
|
|
730
730
|
Logger.default.warn(`KHR_animation_pointer: No material parameter found for semantic "${semantic}".`);
|
|
731
731
|
} else {
|
|
732
732
|
Logger.default.warn(`KHR_animation_pointer: Unsupported material semantic "${semantic}". Animation skipped.`);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
|
-
static
|
|
735
|
+
static rk(pathName, cameraComponent) {
|
|
736
736
|
const type = cameraComponent.type;
|
|
737
737
|
switch (pathName) {
|
|
738
738
|
case "camera_znear":
|
|
@@ -761,7 +761,7 @@ var Gltf2Exporter = class {
|
|
|
761
761
|
* @param option - Export options affecting material processing
|
|
762
762
|
* @returns Promise that resolves when all materials and textures are processed
|
|
763
763
|
*/
|
|
764
|
-
static async
|
|
764
|
+
static async bk(json, entities, option) {
|
|
765
765
|
let countMesh = 0;
|
|
766
766
|
const promises = [];
|
|
767
767
|
const variantNameToIndex = /* @__PURE__ */ new Map();
|
|
@@ -772,7 +772,7 @@ var Gltf2Exporter = class {
|
|
|
772
772
|
const meshComponent = entity.tryToGetMesh();
|
|
773
773
|
if (meshComponent == null ? void 0 : meshComponent.mesh) {
|
|
774
774
|
const gltf2Mesh = json.meshes[countMesh++];
|
|
775
|
-
await this.
|
|
775
|
+
await this.sk(
|
|
776
776
|
json,
|
|
777
777
|
meshComponent.mesh,
|
|
778
778
|
gltf2Mesh,
|
|
@@ -785,19 +785,19 @@ var Gltf2Exporter = class {
|
|
|
785
785
|
}
|
|
786
786
|
return Promise.all(promises);
|
|
787
787
|
}
|
|
788
|
-
static async
|
|
788
|
+
static async sk(json, mesh, gltf2Mesh, promises, bufferIdx, option, variantNameToIndex) {
|
|
789
789
|
const primitiveCount = mesh.getPrimitiveNumber();
|
|
790
790
|
for (let j = 0; j < primitiveCount; j++) {
|
|
791
791
|
const rnPrimitive = mesh.getPrimitiveAt(j);
|
|
792
792
|
const primitive = gltf2Mesh.primitives[j];
|
|
793
793
|
const rnMaterial = rnPrimitive.material;
|
|
794
|
-
const material = await this.
|
|
794
|
+
const material = await this.Wj(json, rnMaterial, promises, bufferIdx, option);
|
|
795
795
|
const materialIndex = json.materials.length;
|
|
796
796
|
json.materials.push(material);
|
|
797
797
|
primitive.material = materialIndex;
|
|
798
|
-
this.
|
|
798
|
+
this.Uj(rnMaterial, materialIndex);
|
|
799
799
|
__pruneUnusedVertexAttributes(primitive, material);
|
|
800
|
-
await this.
|
|
800
|
+
await this.tk(
|
|
801
801
|
json,
|
|
802
802
|
rnPrimitive,
|
|
803
803
|
primitive,
|
|
@@ -809,7 +809,7 @@ var Gltf2Exporter = class {
|
|
|
809
809
|
);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
static async
|
|
812
|
+
static async tk(json, rnPrimitive, primitive, promises, bufferIdx, option, variantNameToIndex, baseMaterialIndex) {
|
|
813
813
|
var _a;
|
|
814
814
|
const variantNames = rnPrimitive.getVariantNames();
|
|
815
815
|
if (variantNames.length === 0) {
|
|
@@ -826,7 +826,7 @@ var Gltf2Exporter = class {
|
|
|
826
826
|
}
|
|
827
827
|
let materialIndex = baseMaterialIndex;
|
|
828
828
|
if (variantMaterial !== rnPrimitive.material) {
|
|
829
|
-
const gltfVariantMaterial = await this.
|
|
829
|
+
const gltfVariantMaterial = await this.Wj(
|
|
830
830
|
json,
|
|
831
831
|
variantMaterial,
|
|
832
832
|
promises,
|
|
@@ -835,9 +835,9 @@ var Gltf2Exporter = class {
|
|
|
835
835
|
);
|
|
836
836
|
materialIndex = json.materials.length;
|
|
837
837
|
json.materials.push(gltfVariantMaterial);
|
|
838
|
-
this.
|
|
838
|
+
this.Uj(variantMaterial, materialIndex);
|
|
839
839
|
}
|
|
840
|
-
const variantIndex = this.
|
|
840
|
+
const variantIndex = this.uk(json, variantName, variantNameToIndex);
|
|
841
841
|
mappings.push({
|
|
842
842
|
material: materialIndex,
|
|
843
843
|
variants: [variantIndex]
|
|
@@ -855,14 +855,14 @@ var Gltf2Exporter = class {
|
|
|
855
855
|
mappings
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
|
-
this.
|
|
858
|
+
this.Nj(json, "KHR_materials_variants");
|
|
859
859
|
}
|
|
860
|
-
static
|
|
860
|
+
static uk(json, variantName, variantNameToIndex) {
|
|
861
861
|
let variantIndex = variantNameToIndex.get(variantName);
|
|
862
862
|
if (variantIndex !== void 0) {
|
|
863
863
|
return variantIndex;
|
|
864
864
|
}
|
|
865
|
-
const materialVariantsExtension = this.
|
|
865
|
+
const materialVariantsExtension = this.vk(json);
|
|
866
866
|
variantIndex = materialVariantsExtension.variants.length;
|
|
867
867
|
materialVariantsExtension.variants.push({
|
|
868
868
|
name: variantName
|
|
@@ -870,7 +870,7 @@ var Gltf2Exporter = class {
|
|
|
870
870
|
variantNameToIndex.set(variantName, variantIndex);
|
|
871
871
|
return variantIndex;
|
|
872
872
|
}
|
|
873
|
-
static
|
|
873
|
+
static vk(json) {
|
|
874
874
|
if (Is.not.exist(json.extensions)) {
|
|
875
875
|
json.extensions = {};
|
|
876
876
|
}
|
|
@@ -882,7 +882,7 @@ var Gltf2Exporter = class {
|
|
|
882
882
|
}
|
|
883
883
|
return rootExtensions.KHR_materials_variants;
|
|
884
884
|
}
|
|
885
|
-
static async
|
|
885
|
+
static async Wj(json, rnMaterial, promises, bufferIdx, option) {
|
|
886
886
|
const material = {
|
|
887
887
|
pbrMetallicRoughness: {
|
|
888
888
|
metallicFactor: 1,
|
|
@@ -891,9 +891,9 @@ var Gltf2Exporter = class {
|
|
|
891
891
|
};
|
|
892
892
|
if (Is.exist(rnMaterial)) {
|
|
893
893
|
if (rnMaterial.isNodeBasedMaterial && rnMaterial.shaderNodeJson != null) {
|
|
894
|
-
await this.
|
|
894
|
+
await this.wk(material, rnMaterial, json, promises, bufferIdx, option);
|
|
895
895
|
} else {
|
|
896
|
-
await this.
|
|
896
|
+
await this.xk(material, rnMaterial, json, promises, bufferIdx, option);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
return material;
|
|
@@ -908,7 +908,7 @@ var Gltf2Exporter = class {
|
|
|
908
908
|
* @param bufferIdx - The buffer index for texture data
|
|
909
909
|
* @param option - Export options
|
|
910
910
|
*/
|
|
911
|
-
static async
|
|
911
|
+
static async wk(material, rnMaterial, json, promises, bufferIdx, option) {
|
|
912
912
|
var _a;
|
|
913
913
|
const EXTENSION_NAME = "RHODONITE_materials_node";
|
|
914
914
|
if (!material.extensions) {
|
|
@@ -921,7 +921,7 @@ var Gltf2Exporter = class {
|
|
|
921
921
|
if (rnMaterial.shaderNodeUniforms != null) {
|
|
922
922
|
extensionData.uniforms = { ...rnMaterial.shaderNodeUniforms };
|
|
923
923
|
}
|
|
924
|
-
const textureUniforms = await this.
|
|
924
|
+
const textureUniforms = await this.Xj(
|
|
925
925
|
rnMaterial,
|
|
926
926
|
json,
|
|
927
927
|
promises,
|
|
@@ -935,7 +935,7 @@ var Gltf2Exporter = class {
|
|
|
935
935
|
Object.assign(extensionData.uniforms, textureUniforms);
|
|
936
936
|
}
|
|
937
937
|
material.extensions[EXTENSION_NAME] = extensionData;
|
|
938
|
-
this.
|
|
938
|
+
this.Nj(json, EXTENSION_NAME);
|
|
939
939
|
}
|
|
940
940
|
/**
|
|
941
941
|
* Processes texture parameters from a node-based material and exports them to glTF format.
|
|
@@ -947,7 +947,7 @@ var Gltf2Exporter = class {
|
|
|
947
947
|
* @param option - Export options
|
|
948
948
|
* @returns Object mapping texture names to their glTF texture indices
|
|
949
949
|
*/
|
|
950
|
-
static async
|
|
950
|
+
static async Xj(rnMaterial, json, promises, bufferIdx, option, semanticFilter = () => true) {
|
|
951
951
|
const textureUniforms = {};
|
|
952
952
|
const existedImages = [];
|
|
953
953
|
const processSampler = (rnSampler) => {
|
|
@@ -1074,17 +1074,17 @@ var Gltf2Exporter = class {
|
|
|
1074
1074
|
* @param json - The output glTF JSON
|
|
1075
1075
|
* @param option - Export options, including the raymarching material to export
|
|
1076
1076
|
*/
|
|
1077
|
-
static async
|
|
1077
|
+
static async ck(json, option) {
|
|
1078
1078
|
const componentMaterials = option.raymarchingComponentMaterials;
|
|
1079
1079
|
if (componentMaterials != null && componentMaterials.length > 0) {
|
|
1080
|
-
await this.
|
|
1080
|
+
await this.yk(json, componentMaterials, option);
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
1083
|
const raymarchingMaterial = option.raymarchingMaterial;
|
|
1084
1084
|
if (raymarchingMaterial == null) {
|
|
1085
1085
|
return;
|
|
1086
1086
|
}
|
|
1087
|
-
const textures = await this.
|
|
1087
|
+
const textures = await this.Yj(json, raymarchingMaterial, option);
|
|
1088
1088
|
if (textures == null) {
|
|
1089
1089
|
return;
|
|
1090
1090
|
}
|
|
@@ -1094,7 +1094,7 @@ var Gltf2Exporter = class {
|
|
|
1094
1094
|
json.extensions.RHODONITE_raymarching_materials = {
|
|
1095
1095
|
textures
|
|
1096
1096
|
};
|
|
1097
|
-
this.
|
|
1097
|
+
this.Nj(json, "RHODONITE_raymarching_materials");
|
|
1098
1098
|
}
|
|
1099
1099
|
/**
|
|
1100
1100
|
* Exports each component's raymarching textures into its `RHODONITE_raymarching` node
|
|
@@ -1108,7 +1108,7 @@ var Gltf2Exporter = class {
|
|
|
1108
1108
|
* @param componentMaterials - The per-component materials to export
|
|
1109
1109
|
* @param option - Export options
|
|
1110
1110
|
*/
|
|
1111
|
-
static async
|
|
1111
|
+
static async yk(json, componentMaterials, option) {
|
|
1112
1112
|
var _a;
|
|
1113
1113
|
for (const { entity, material } of componentMaterials) {
|
|
1114
1114
|
const nodeIndex = entity.gltfNodeIndex;
|
|
@@ -1119,7 +1119,7 @@ var Gltf2Exporter = class {
|
|
|
1119
1119
|
if (node == null) {
|
|
1120
1120
|
continue;
|
|
1121
1121
|
}
|
|
1122
|
-
const textures = await this.
|
|
1122
|
+
const textures = await this.Yj(json, material, option);
|
|
1123
1123
|
if (textures == null) {
|
|
1124
1124
|
continue;
|
|
1125
1125
|
}
|
|
@@ -1133,7 +1133,7 @@ var Gltf2Exporter = class {
|
|
|
1133
1133
|
extensions.RHODONITE_raymarching = raymarchingExtension;
|
|
1134
1134
|
}
|
|
1135
1135
|
raymarchingExtension.textures = textures;
|
|
1136
|
-
this.
|
|
1136
|
+
this.Nj(json, "RHODONITE_raymarching");
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
/**
|
|
@@ -1148,7 +1148,7 @@ var Gltf2Exporter = class {
|
|
|
1148
1148
|
* @param option - Export options
|
|
1149
1149
|
* @returns The semantic to texture-index map, or undefined when the material has none
|
|
1150
1150
|
*/
|
|
1151
|
-
static async
|
|
1151
|
+
static async Yj(json, material, option) {
|
|
1152
1152
|
var _a, _b, _c;
|
|
1153
1153
|
const shaderNodeJson = material.shaderNodeJson;
|
|
1154
1154
|
const userTextureSemantics = /* @__PURE__ */ new Set();
|
|
@@ -1166,7 +1166,7 @@ var Gltf2Exporter = class {
|
|
|
1166
1166
|
const promises = [];
|
|
1167
1167
|
json.extras.bufferViewByteLengthAccumulatedArray.push(0);
|
|
1168
1168
|
const bufferIdx = json.extras.bufferViewByteLengthAccumulatedArray.length - 1;
|
|
1169
|
-
const textures = await this.
|
|
1169
|
+
const textures = await this.Xj(
|
|
1170
1170
|
material,
|
|
1171
1171
|
json,
|
|
1172
1172
|
promises,
|
|
@@ -1177,7 +1177,7 @@ var Gltf2Exporter = class {
|
|
|
1177
1177
|
await Promise.all(promises);
|
|
1178
1178
|
return Object.keys(textures).length > 0 ? textures : void 0;
|
|
1179
1179
|
}
|
|
1180
|
-
static async
|
|
1180
|
+
static async xk(material, rnMaterial, json, promises, bufferIdx, option) {
|
|
1181
1181
|
const existedImages = [];
|
|
1182
1182
|
const processSampler = (rnSampler) => {
|
|
1183
1183
|
const gltf2TextureSampler = {
|
|
@@ -1262,9 +1262,9 @@ var Gltf2Exporter = class {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
return json.textures.indexOf(gltf2Texture);
|
|
1264
1264
|
};
|
|
1265
|
-
this.
|
|
1265
|
+
this.zk(json, material, rnMaterial, processTexture);
|
|
1266
1266
|
}
|
|
1267
|
-
static
|
|
1267
|
+
static zk(json, material, rnMaterial, processTexture) {
|
|
1268
1268
|
const ensureExtensionUsed = (extensionName) => {
|
|
1269
1269
|
if (json.extensionsUsed.indexOf(extensionName) === -1) {
|
|
1270
1270
|
json.extensionsUsed.push(extensionName);
|
|
@@ -1476,7 +1476,7 @@ var Gltf2Exporter = class {
|
|
|
1476
1476
|
* @param json - The glTF2 JSON document containing buffer view definitions
|
|
1477
1477
|
* @returns ArrayBuffer containing the consolidated binary data
|
|
1478
1478
|
*/
|
|
1479
|
-
static
|
|
1479
|
+
static ek(json) {
|
|
1480
1480
|
if (Is.undefined(json.accessors) || Is.undefined(json.bufferViews)) {
|
|
1481
1481
|
return new ArrayBuffer(0);
|
|
1482
1482
|
}
|
|
@@ -1522,7 +1522,7 @@ var Gltf2Exporter = class {
|
|
|
1522
1522
|
* @param filename - Base filename for the download
|
|
1523
1523
|
* @param arraybuffer - Binary data buffer containing the .glb file
|
|
1524
1524
|
*/
|
|
1525
|
-
static
|
|
1525
|
+
static fk(_json, filename, arraybuffer) {
|
|
1526
1526
|
{
|
|
1527
1527
|
const a = document.createElement("a");
|
|
1528
1528
|
a.download = `${filename}.glb`;
|
|
@@ -1551,7 +1551,7 @@ var Gltf2Exporter = class {
|
|
|
1551
1551
|
* @param filename - Base filename for the downloads
|
|
1552
1552
|
* @param arraybuffer - Binary data buffer for the .bin file
|
|
1553
1553
|
*/
|
|
1554
|
-
static
|
|
1554
|
+
static gk(json, filename, arraybuffer) {
|
|
1555
1555
|
{
|
|
1556
1556
|
const a = document.createElement("a");
|
|
1557
1557
|
a.download = `${filename}.gltf`;
|
|
@@ -1571,11 +1571,11 @@ var Gltf2Exporter = class {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
1573
|
};
|
|
1574
|
-
Gltf2Exporter.
|
|
1575
|
-
Gltf2Exporter.
|
|
1576
|
-
Gltf2Exporter.
|
|
1577
|
-
Gltf2Exporter.
|
|
1578
|
-
Gltf2Exporter.
|
|
1574
|
+
Gltf2Exporter.Oj = /* @__PURE__ */ new Map();
|
|
1575
|
+
Gltf2Exporter.Qj = /* @__PURE__ */ new Map();
|
|
1576
|
+
Gltf2Exporter.Rj = /* @__PURE__ */ new Map();
|
|
1577
|
+
Gltf2Exporter.Sj = /* @__PURE__ */ new Map();
|
|
1578
|
+
Gltf2Exporter.Tj = /* @__PURE__ */ new Set();
|
|
1579
1579
|
var MATERIAL_POINTER_SUFFIX_MAP = {
|
|
1580
1580
|
baseColorFactor: "/pbrMetallicRoughness/baseColorFactor",
|
|
1581
1581
|
metallicFactor: "/pbrMetallicRoughness/metallicFactor",
|