rhodonite 0.27.1 → 0.28.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 +10 -10
- package/VERSION-FILE +1 -1
- package/dist/esm/effekseer/EffekseerComponent.js +3 -3
- package/dist/esm/foundation/components/Camera/CameraComponent.js +1 -1
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +5 -5
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.js +1 -1
- package/dist/esm/foundation/core/GlobalDataRepository.d.ts +3 -3
- package/dist/esm/foundation/core/GlobalDataRepository.js +1 -1
- package/dist/esm/foundation/definitions/RenderBackend.d.ts +21 -0
- package/dist/esm/foundation/definitions/RenderBackend.js +1 -0
- package/dist/esm/foundation/definitions/index.d.ts +1 -1
- package/dist/esm/foundation/definitions/index.js +1 -1
- package/dist/esm/foundation/geometry/Mesh.d.ts +18 -68
- package/dist/esm/foundation/geometry/Mesh.js +1 -1
- package/dist/esm/foundation/geometry/Primitive.d.ts +1 -1
- package/dist/esm/foundation/geometry/Primitive.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/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/ShadowCasterFilter.d.ts +8 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowCasterFilter.js +1 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowDirectionalAutoFit.d.ts +28 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowDirectionalAutoFit.js +1 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowSpotLightZNear.d.ts +8 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowSpotLightZNear.js +1 -0
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.d.ts +1 -29
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
- package/dist/esm/foundation/helpers/materials/nodeBasedMaterialCommon.js +1 -1
- package/dist/esm/foundation/materials/contents/ColorGradingUsingLUTsMaterialContent.d.ts +0 -20
- package/dist/esm/foundation/materials/contents/ColorGradingUsingLUTsMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.d.ts +3 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/DetectHighLuminanceMaterialContent.d.ts +0 -16
- package/dist/esm/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/EntityUIDOutputMaterialContent.d.ts +0 -17
- package/dist/esm/foundation/materials/contents/EntityUIDOutputMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/FurnaceTestMaterialContent.d.ts +0 -21
- package/dist/esm/foundation/materials/contents/FurnaceTestMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +4 -4
- package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +3 -3
- package/dist/esm/foundation/materials/contents/MatCapMaterialContent.d.ts +0 -16
- package/dist/esm/foundation/materials/contents/MatCapMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/SynthesizeHdrMaterialContent.d.ts +0 -23
- package/dist/esm/foundation/materials/contents/SynthesizeHdrMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.d.ts +6 -61
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/AbstractShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/core/AbstractShaderNode.js +2 -2
- package/dist/esm/foundation/materials/core/Material.d.ts +7 -114
- package/dist/esm/foundation/materials/core/Material.js +1 -1
- package/dist/esm/foundation/materials/core/MaterialRepository.js +1 -1
- package/dist/esm/foundation/materials/core/ShaderGraphResolver.js +6 -6
- package/dist/esm/foundation/materials/core/ShaderNodeFactories.d.ts +23 -0
- package/dist/esm/foundation/materials/core/ShaderNodeFactories.js +1 -0
- package/dist/esm/foundation/materials/core/ShaderProgramDefinitions.d.ts +41 -0
- package/dist/esm/foundation/materials/core/ShaderProgramDefinitions.js +23 -0
- package/dist/esm/foundation/materials/nodes/AbsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AcosShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AddShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Atan2ShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BranchShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ClampShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/ClampShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CosShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/CosShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/DotProductShaderNode.d.ts +2 -2
- package/dist/esm/foundation/materials/nodes/DotProductShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/EqualShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/EqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterOrEqualShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterOrEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterThanShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterThanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LengthShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/LengthShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LessOrEqualShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/LessOrEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LessThanShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/LessThanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MergeVectorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MinShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/MultiplyShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/MultiplyShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NormalizeShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/NormalizeShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NotEqualShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/NotEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PremultipliedAlphaShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_HashPRNGShaderNode.js +2 -2
- package/dist/esm/foundation/materials/nodes/Random_SinHashShaderNode.js +2 -2
- package/dist/esm/foundation/materials/nodes/RemapShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/RemapShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SinShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/SinShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SmoothStepShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/SmoothStepShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SplitVectorShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/SplitVectorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/StepShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TanShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/TanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TransformShaderNode.d.ts +1 -1
- package/dist/esm/foundation/materials/nodes/TransformShaderNode.js +1 -1
- package/dist/esm/foundation/math/MathClassUtil.js +1 -1
- package/dist/esm/foundation/math/MathUtil.d.ts +11 -0
- package/dist/esm/foundation/math/MathUtil.js +1 -1
- package/dist/esm/foundation/math/Transform3D.js +1 -1
- package/dist/esm/foundation/memory/Accessor.js +1 -1
- package/dist/esm/foundation/memory/Buffer.js +3 -3
- package/dist/esm/foundation/renderer/CGAPIResourceRepository.d.ts +74 -4
- package/dist/esm/foundation/renderer/CGAPIResourceRepository.js +1 -1
- package/dist/esm/foundation/renderer/FrameBuffer.js +1 -1
- package/dist/esm/foundation/renderer/FrameRenderer.d.ts +42 -0
- package/dist/esm/foundation/renderer/FrameRenderer.js +0 -0
- package/dist/esm/foundation/renderer/RenderPass.js +1 -1
- package/dist/esm/foundation/renderer/ShaderPropertyLayout.d.ts +77 -0
- package/dist/esm/foundation/renderer/ShaderPropertyLayout.js +1 -0
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +9 -3
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.js +1 -1
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystem.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +4 -171
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/RaymarchingRenderer.d.ts +263 -0
- package/dist/esm/foundation/renderer/pipelines/RaymarchingRenderer.js +1 -0
- package/dist/esm/foundation/system/Engine.d.ts +17 -28
- package/dist/esm/foundation/system/Engine.js +1 -1
- package/dist/esm/foundation/system/EngineState.d.ts +3 -3
- package/dist/esm/foundation/system/EngineState.js +1 -1
- package/dist/esm/foundation/textures/AbstractReadableRenderTargetTexture.d.ts +39 -0
- package/dist/esm/foundation/textures/AbstractReadableRenderTargetTexture.js +1 -0
- package/dist/esm/foundation/textures/AbstractRenderTargetTexture.d.ts +60 -0
- package/dist/esm/foundation/textures/AbstractRenderTargetTexture.js +1 -0
- package/dist/esm/foundation/textures/AbstractTexture.js +1 -1
- package/dist/esm/foundation/textures/CubeTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderBuffer.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture.d.ts +5 -67
- package/dist/esm/foundation/textures/RenderTargetTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.d.ts +5 -71
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTextureCube.d.ts +8 -50
- package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
- package/dist/esm/foundation/textures/Texture.d.ts +19 -1
- package/dist/esm/foundation/textures/Texture.js +1 -1
- package/dist/esm/foundation/textures/TextureArray.js +1 -1
- package/dist/esm/foundation/textures/TextureDataFloat.js +1 -1
- package/dist/esm/foundation/textures/VideoTexture.d.ts +11 -0
- package/dist/esm/foundation/textures/VideoTexture.js +1 -1
- package/dist/esm/foundation/textures/decodeBasisImage.d.ts +14 -0
- package/dist/esm/foundation/textures/decodeBasisImage.js +1 -0
- package/dist/esm/foundation/textures/index.d.ts +2 -0
- package/dist/esm/foundation/textures/index.js +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/webgl/ComponentDataAccessorGLSL.d.ts +9 -0
- package/dist/esm/webgl/ComponentDataAccessorGLSL.js +27 -0
- package/dist/esm/webgl/MultiDraw.d.ts +1 -1
- package/dist/esm/webgl/MultiDraw.js +1 -1
- package/dist/esm/webgl/MultiDrawRepository.js +1 -1
- package/dist/esm/webgl/ShaderPropertyAccessorGLSL.d.ts +11 -0
- package/dist/esm/webgl/ShaderPropertyAccessorGLSL.js +29 -0
- package/dist/esm/webgl/WebGLCompressedTextures.d.ts +48 -0
- package/dist/esm/webgl/WebGLCompressedTextures.js +1 -0
- package/dist/esm/webgl/WebGLContextWrapper.d.ts +9 -52
- package/dist/esm/webgl/WebGLContextWrapper.js +1 -1
- package/dist/esm/webgl/WebGLCubeTextureFileLoader.d.ts +38 -0
- package/dist/esm/webgl/WebGLCubeTextureFileLoader.js +1 -0
- package/dist/esm/webgl/WebGLCubeTextures.d.ts +92 -0
- package/dist/esm/webgl/WebGLCubeTextures.js +42 -0
- package/dist/esm/webgl/WebGLDataTexture.d.ts +108 -0
- package/dist/esm/webgl/WebGLDataTexture.js +1 -0
- package/dist/esm/webgl/WebGLDrawState.d.ts +84 -0
- package/dist/esm/webgl/WebGLDrawState.js +1 -0
- package/dist/esm/webgl/WebGLExternalState.d.ts +43 -0
- package/dist/esm/webgl/WebGLExternalState.js +1 -0
- package/dist/esm/webgl/WebGLFrameRenderer.d.ts +32 -0
- package/dist/esm/webgl/WebGLFrameRenderer.js +1 -0
- package/dist/esm/webgl/WebGLFramebuffers.d.ts +142 -0
- package/dist/esm/webgl/WebGLFramebuffers.js +1 -0
- package/dist/esm/webgl/WebGLGpuTimer.js +1 -1
- package/dist/esm/webgl/WebGLMaterialParameters.d.ts +47 -0
- package/dist/esm/webgl/WebGLMaterialParameters.js +1 -0
- package/dist/esm/webgl/WebGLMeshResources.d.ts +115 -0
- package/dist/esm/webgl/WebGLMeshResources.js +1 -0
- package/dist/esm/webgl/WebGLMorphUniformBuffers.d.ts +66 -0
- package/dist/esm/webgl/WebGLMorphUniformBuffers.js +57 -0
- package/dist/esm/webgl/WebGLResourceRepository.d.ts +100 -178
- package/dist/esm/webgl/WebGLResourceRepository.js +1 -55
- package/dist/esm/webgl/WebGLSamplers.d.ts +78 -0
- package/dist/esm/webgl/WebGLSamplers.js +1 -0
- package/dist/esm/webgl/WebGLShaderProgramBuilder.d.ts +40 -0
- package/dist/esm/webgl/WebGLShaderProgramBuilder.js +15 -0
- package/dist/esm/webgl/WebGLShaderPrograms.d.ts +88 -0
- package/dist/esm/webgl/WebGLShaderPrograms.js +14 -0
- package/dist/esm/webgl/WebGLStereoUtil.d.ts +0 -27
- package/dist/esm/webgl/WebGLStereoUtil.js +3 -3
- package/dist/esm/webgl/WebGLStrategyDataUploader.d.ts +152 -0
- package/dist/esm/webgl/WebGLStrategyDataUploader.js +1 -0
- package/dist/esm/webgl/WebGLStrategyMeshBatchRenderer.d.ts +40 -0
- package/dist/esm/webgl/WebGLStrategyMeshBatchRenderer.js +1 -0
- package/dist/esm/webgl/WebGLStrategyMeshDrawer.d.ts +92 -0
- package/dist/esm/webgl/WebGLStrategyMeshDrawer.js +1 -0
- package/dist/esm/webgl/WebGLStrategyWebGL2.d.ts +7 -360
- package/dist/esm/webgl/WebGLStrategyWebGL2.js +1 -146
- package/dist/esm/webgl/WebGLTextureUnitState.d.ts +79 -0
- package/dist/esm/webgl/WebGLTextureUnitState.js +1 -0
- package/dist/esm/webgl/WebGLTextureUploads.d.ts +106 -0
- package/dist/esm/webgl/WebGLTextureUploads.js +1 -0
- package/dist/esm/webgl/WebGLTextures.d.ts +316 -0
- package/dist/esm/webgl/WebGLTextures.js +1 -0
- package/dist/esm/webgl/WebGLUniformBuffers.d.ts +35 -0
- package/dist/esm/webgl/WebGLUniformBuffers.js +1 -0
- package/dist/esm/webgl/WebGLUniforms.d.ts +117 -0
- package/dist/esm/webgl/WebGLUniforms.js +1 -0
- package/dist/esm/webgl/WebGLVertexBuffers.d.ts +172 -0
- package/dist/esm/webgl/WebGLVertexBuffers.js +1 -0
- package/dist/esm/webgl/debug/BufferLayoutDecoder.d.ts +4 -4
- package/dist/esm/webgl/debug/BufferLayoutDecoder.js +1 -1
- package/dist/esm/webgl/debug/ShaderParameterDebugger.js +1 -1
- package/dist/esm/webgl/debug/types.d.ts +2 -2
- package/dist/esm/webgl/getRenderingStrategy.d.ts +2 -2
- package/dist/esm/webgl/getRenderingStrategy.js +1 -1
- package/dist/esm/webgl/main.d.ts +4 -17
- package/dist/esm/webgl/main.js +1 -1
- package/dist/esm/webgl/readColorAttachmentAsRgba8.d.ts +36 -0
- package/dist/esm/webgl/readColorAttachmentAsRgba8.js +1 -0
- package/dist/esm/webgl/shaders/RaymarchingShaderPart.d.ts +2 -2
- package/dist/esm/webgl/shaders/RaymarchingShaderPart.js +9 -9
- package/dist/esm/webgl/shaders/RaymarchingShadowShaderPart.js +9 -9
- package/dist/esm/webgl/shaders/StandardShaderPart.d.ts +3 -3
- package/dist/esm/webgl/shaders/StandardShaderPart.js +16 -16
- package/dist/esm/webgl/shaders/glslCommonChunks.d.ts +2 -2
- 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.d.ts +2 -2
- package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.js +7 -7
- package/dist/esm/webgl/shaders/nodes/DiscardShader.d.ts +1 -1
- package/dist/esm/webgl/shaders/nodes/DiscardShader.js +3 -3
- package/dist/esm/webgl/shaders/nodes/EndShader.d.ts +2 -2
- package/dist/esm/webgl/shaders/nodes/EndShader.js +3 -3
- package/dist/esm/webgl/shaders/nodes/OutDistance.d.ts +1 -1
- package/dist/esm/webgl/shaders/nodes/OutDistance.js +1 -1
- package/dist/esm/webgl/shaders/nodes/OutUnion.js +1 -1
- package/dist/esm/webgl/shaders/nodes/RaymarchObjectIdUniform.js +3 -3
- package/dist/esm/webgl/shaders/nodes/SdApplyTransform.js +1 -1
- package/dist/esm/webgl/shaders/nodes/SdApplyWorldMatrix.d.ts +1 -1
- package/dist/esm/webgl/shaders/nodes/SdApplyWorldMatrix.js +3 -3
- package/dist/esm/webgl/shaders/nodes/Texture2DShader.js +18 -18
- package/dist/esm/webgl/shaders/nodes/UniformDataShader.js +14 -14
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.d.ts +1 -1
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.js +1 -1
- package/dist/esm/webgpu/AttributeReader.d.ts +18 -0
- package/dist/esm/webgpu/AttributeReader.js +1 -0
- package/dist/esm/webgpu/GpuCullingRegistry.js +1 -1
- package/dist/esm/webgpu/GpuDeformRegistry.js +1 -1
- package/dist/esm/webgpu/RangeAllocator.js +1 -1
- package/dist/esm/webgpu/ShaderPropertyAccessorWGSL.d.ts +11 -0
- package/dist/esm/webgpu/ShaderPropertyAccessorWGSL.js +24 -0
- package/dist/esm/webgpu/WebGpuBindGroups.d.ts +131 -0
- package/dist/esm/webgpu/WebGpuBindGroups.js +1 -0
- package/dist/esm/webgpu/WebGpuBufferArena.js +1 -1
- package/dist/esm/webgpu/WebGpuCompressedTextures.d.ts +38 -0
- package/dist/esm/webgpu/WebGpuCompressedTextures.js +1 -0
- package/dist/esm/webgpu/WebGpuCubeTextureShaders.d.ts +1 -0
- package/dist/esm/webgpu/WebGpuCubeTextureShaders.js +60 -0
- package/dist/esm/webgpu/WebGpuCubeTextures.d.ts +72 -0
- package/dist/esm/webgpu/WebGpuCubeTextures.js +1 -0
- package/dist/esm/webgpu/WebGpuDraw.d.ts +63 -0
- package/dist/esm/webgpu/WebGpuDraw.js +1 -0
- package/dist/esm/webgpu/WebGpuDrawParameters.d.ts +61 -0
- package/dist/esm/webgpu/WebGpuDrawParameters.js +1 -0
- package/dist/esm/webgpu/WebGpuExternalRenderPass.d.ts +44 -0
- package/dist/esm/webgpu/WebGpuExternalRenderPass.js +1 -0
- package/dist/esm/webgpu/WebGpuFrame.d.ts +55 -0
- package/dist/esm/webgpu/WebGpuFrame.js +1 -0
- package/dist/esm/webgpu/WebGpuFrameRenderer.d.ts +25 -0
- package/dist/esm/webgpu/WebGpuFrameRenderer.js +1 -0
- package/dist/esm/webgpu/WebGpuGpuCulling.js +1 -236
- package/dist/esm/webgpu/WebGpuGpuCullingShaders.d.ts +34 -0
- package/dist/esm/webgpu/WebGpuGpuCullingShaders.js +236 -0
- package/dist/esm/webgpu/WebGpuGpuTimer.js +1 -1
- package/dist/esm/webgpu/WebGpuLightClusterBuilder.js +1 -153
- package/dist/esm/webgpu/WebGpuLightClusterShaders.d.ts +14 -0
- package/dist/esm/webgpu/WebGpuLightClusterShaders.js +153 -0
- package/dist/esm/webgpu/WebGpuMipmapGenerator.d.ts +54 -0
- package/dist/esm/webgpu/WebGpuMipmapGenerator.js +1 -0
- package/dist/esm/webgpu/WebGpuMipmapShaders.d.ts +1 -0
- package/dist/esm/webgpu/WebGpuMipmapShaders.js +26 -0
- package/dist/esm/webgpu/WebGpuRenderBundles.d.ts +117 -0
- package/dist/esm/webgpu/WebGpuRenderBundles.js +1 -0
- package/dist/esm/webgpu/WebGpuRenderPassEncoders.d.ts +140 -0
- package/dist/esm/webgpu/WebGpuRenderPassEncoders.js +1 -0
- package/dist/esm/webgpu/WebGpuRenderPipelines.d.ts +75 -0
- package/dist/esm/webgpu/WebGpuRenderPipelines.js +3 -0
- package/dist/esm/webgpu/WebGpuRenderTargetTextures.d.ts +78 -0
- package/dist/esm/webgpu/WebGpuRenderTargetTextures.js +1 -0
- package/dist/esm/webgpu/WebGpuResourceRepository.d.ts +52 -322
- package/dist/esm/webgpu/WebGpuResourceRepository.js +1 -116
- package/dist/esm/webgpu/WebGpuSamplers.d.ts +45 -0
- package/dist/esm/webgpu/WebGpuSamplers.js +1 -0
- package/dist/esm/webgpu/WebGpuShaderProgramBuilder.d.ts +25 -0
- package/dist/esm/webgpu/WebGpuShaderProgramBuilder.js +9 -0
- package/dist/esm/webgpu/WebGpuStorageBuffers.d.ts +77 -0
- package/dist/esm/webgpu/WebGpuStorageBuffers.js +1 -0
- package/dist/esm/webgpu/WebGpuStrategyBasic.d.ts +1 -73
- package/dist/esm/webgpu/WebGpuStrategyBasic.js +1 -139
- package/dist/esm/webgpu/WebGpuStrategyStorage.d.ts +62 -0
- package/dist/esm/webgpu/WebGpuStrategyStorage.js +1 -0
- package/dist/esm/webgpu/WebGpuTextureReadback.d.ts +111 -0
- package/dist/esm/webgpu/WebGpuTextureReadback.js +1 -0
- package/dist/esm/webgpu/WebGpuTextureReadbackShaders.d.ts +4 -0
- package/dist/esm/webgpu/WebGpuTextureReadbackShaders.js +26 -0
- package/dist/esm/webgpu/WebGpuTextureUploads.d.ts +109 -0
- package/dist/esm/webgpu/WebGpuTextureUploads.js +1 -0
- package/dist/esm/webgpu/WebGpuTextures.d.ts +196 -0
- package/dist/esm/webgpu/WebGpuTextures.js +1 -0
- package/dist/esm/webgpu/WebGpuVertexBuffers.d.ts +142 -0
- package/dist/esm/webgpu/WebGpuVertexBuffers.js +1 -0
- package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -124
- package/dist/esm/webgpu/WebGpuVertexDeformerShaders.d.ts +7 -0
- package/dist/esm/webgpu/WebGpuVertexDeformerShaders.js +124 -0
- package/dist/esm/webgpu/WebGpuVertexShaderDefinitions.d.ts +16 -0
- package/dist/esm/webgpu/WebGpuVertexShaderDefinitions.js +84 -0
- package/dist/esm/webgpu/assertArrayBufferView.d.ts +9 -0
- package/dist/esm/webgpu/assertArrayBufferView.js +1 -0
- package/dist/esm/webgpu/main.d.ts +2 -16
- package/dist/esm/webgpu/main.js +1 -1
- package/dist/esm/webgpu/padCompressedRowsForUpload.d.ts +20 -0
- package/dist/esm/webgpu/padCompressedRowsForUpload.js +1 -0
- package/dist/esm/webgpu/removeRowPadding.d.ts +21 -0
- package/dist/esm/webgpu/removeRowPadding.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/common/processGeometry.wgsl.js +1 -1
- package/dist/esm/webgpu/wgslCommonChunks.d.ts +2 -2
- package/dist/esm/xr/WebARSystem.js +1 -1
- package/dist/esm/xr/WebXRSystem.d.ts +0 -4
- package/dist/esm/xr/WebXRSystem.js +1 -1
- package/dist/esmdev/effekseer/EffekseerComponent.js +3 -3
- package/dist/esmdev/foundation/components/Camera/CameraComponent.js +4 -4
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +5 -5
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.js +11 -11
- package/dist/esmdev/foundation/core/GlobalDataRepository.d.ts +3 -3
- package/dist/esmdev/foundation/core/GlobalDataRepository.js +3 -3
- package/dist/esmdev/foundation/definitions/RenderBackend.d.ts +21 -0
- package/dist/esmdev/foundation/definitions/RenderBackend.js +60 -0
- package/dist/esmdev/foundation/definitions/index.d.ts +1 -1
- package/dist/esmdev/foundation/definitions/index.js +2 -2
- package/dist/esmdev/foundation/geometry/Mesh.d.ts +18 -68
- package/dist/esmdev/foundation/geometry/Mesh.js +159 -383
- package/dist/esmdev/foundation/geometry/Primitive.d.ts +1 -1
- package/dist/esmdev/foundation/geometry/Primitive.js +123 -123
- package/dist/esmdev/foundation/geometry/SimpleVertexAttribute.js +5 -5
- 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 +12 -12
- package/dist/esmdev/foundation/gizmos/CapsuleColliderGizmo.js +23 -23
- package/dist/esmdev/foundation/gizmos/Gizmo.js +23 -23
- package/dist/esmdev/foundation/gizmos/JointGizmo.js +37 -37
- package/dist/esmdev/foundation/gizmos/LightGizmo.js +69 -69
- package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +22 -22
- package/dist/esmdev/foundation/gizmos/RotationGizmo.js +212 -212
- package/dist/esmdev/foundation/gizmos/ScaleGizmo.js +130 -130
- package/dist/esmdev/foundation/gizmos/ShapeGizmo.js +43 -43
- package/dist/esmdev/foundation/gizmos/SphereColliderGizmo.js +24 -24
- package/dist/esmdev/foundation/gizmos/TranslationGizmo.js +129 -129
- 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/ShadowCasterFilter.d.ts +8 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowCasterFilter.js +17 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowDirectionalAutoFit.d.ts +28 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowDirectionalAutoFit.js +126 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +3 -3
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSpotLightZNear.d.ts +8 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSpotLightZNear.js +87 -0
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.d.ts +1 -29
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +76 -285
- package/dist/esmdev/foundation/helpers/materials/nodeBasedMaterialCommon.js +3 -3
- package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
- package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +30 -30
- package/dist/esmdev/foundation/importer/Gltf2Importer.js +14 -14
- package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
- package/dist/esmdev/foundation/importer/ModelConverter.js +137 -137
- 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/ColorGradingUsingLUTsMaterialContent.d.ts +0 -20
- package/dist/esmdev/foundation/materials/contents/ColorGradingUsingLUTsMaterialContent.js +1 -33
- package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.d.ts +3 -1
- package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.js +31 -30
- package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +2 -2
- package/dist/esmdev/foundation/materials/contents/DetectHighLuminanceMaterialContent.d.ts +0 -16
- package/dist/esmdev/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +3 -19
- package/dist/esmdev/foundation/materials/contents/EntityUIDOutputMaterialContent.d.ts +0 -17
- package/dist/esmdev/foundation/materials/contents/EntityUIDOutputMaterialContent.js +1 -17
- package/dist/esmdev/foundation/materials/contents/FurnaceTestMaterialContent.d.ts +0 -21
- package/dist/esmdev/foundation/materials/contents/FurnaceTestMaterialContent.js +1 -21
- package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +142 -143
- package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +21 -22
- package/dist/esmdev/foundation/materials/contents/MatCapMaterialContent.d.ts +0 -16
- package/dist/esmdev/foundation/materials/contents/MatCapMaterialContent.js +1 -17
- package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +7 -8
- package/dist/esmdev/foundation/materials/contents/SynthesizeHdrMaterialContent.d.ts +0 -23
- package/dist/esmdev/foundation/materials/contents/SynthesizeHdrMaterialContent.js +3 -29
- package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +7 -8
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.d.ts +6 -61
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +61 -153
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +31 -31
- package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
- package/dist/esmdev/foundation/materials/core/Material.d.ts +7 -114
- package/dist/esmdev/foundation/materials/core/Material.js +100 -348
- package/dist/esmdev/foundation/materials/core/MaterialRepository.js +55 -55
- package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +46 -1399
- package/dist/esmdev/foundation/materials/core/ShaderNodeFactories.d.ts +23 -0
- package/dist/esmdev/foundation/materials/core/ShaderNodeFactories.js +609 -0
- package/dist/esmdev/foundation/materials/core/ShaderProgramDefinitions.d.ts +41 -0
- package/dist/esmdev/foundation/materials/core/ShaderProgramDefinitions.js +95 -0
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +14 -14
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +21 -21
- 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 +18 -18
- 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 +18 -18
- package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +19 -19
- 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.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.d.ts +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +23 -23
- package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +25 -25
- package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +14 -14
- 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.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +8 -8
- 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 +15 -15
- package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +19 -19
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +22 -22
- package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +17 -17
- 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.d.ts +1 -1
- package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +14 -14
- 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/MathUtil.d.ts +11 -0
- package/dist/esmdev/foundation/math/MathUtil.js +5 -1
- package/dist/esmdev/foundation/math/Quaternion.js +14 -14
- package/dist/esmdev/foundation/math/Transform3D.js +74 -74
- package/dist/esmdev/foundation/math/shapes/MathSphere.js +7 -7
- package/dist/esmdev/foundation/memory/Accessor.js +359 -359
- package/dist/esmdev/foundation/memory/Buffer.js +34 -34
- package/dist/esmdev/foundation/memory/BufferView.js +26 -26
- 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/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 +10 -10
- package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +190 -190
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +225 -225
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.js +3 -3
- package/dist/esmdev/foundation/physics/VRMSpring/CapsuleCollider.js +36 -36
- package/dist/esmdev/foundation/physics/VRMSpring/SphereCollider.js +26 -26
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBone.js +6 -6
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBonePhysicsStrategy.js +56 -56
- package/dist/esmdev/foundation/renderer/CGAPIResourceRepository.d.ts +74 -4
- package/dist/esmdev/foundation/renderer/CGAPIResourceRepository.js +4 -4
- package/dist/esmdev/foundation/renderer/Expression.js +6 -6
- package/dist/esmdev/foundation/renderer/Frame.js +7 -7
- package/dist/esmdev/foundation/renderer/FrameBuffer.js +28 -28
- package/dist/esmdev/foundation/renderer/FrameRenderer.d.ts +42 -0
- package/dist/esmdev/foundation/renderer/FrameRenderer.js +1 -0
- package/dist/esmdev/foundation/renderer/RenderPass.js +94 -94
- package/dist/esmdev/foundation/renderer/ShaderPropertyLayout.d.ts +77 -0
- package/dist/esmdev/foundation/renderer/ShaderPropertyLayout.js +61 -0
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +6 -6
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +9 -3
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +97 -83
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +162 -162
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystemStub.js +3 -3
- package/dist/esmdev/foundation/renderer/pipelines/DeferredRenderPipeline.js +4 -4
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +4 -171
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +335 -1127
- package/dist/esmdev/foundation/renderer/pipelines/RaymarchingRenderer.d.ts +263 -0
- package/dist/esmdev/foundation/renderer/pipelines/RaymarchingRenderer.js +858 -0
- package/dist/esmdev/foundation/system/Engine.d.ts +17 -28
- package/dist/esmdev/foundation/system/Engine.js +207 -574
- package/dist/esmdev/foundation/system/EngineState.d.ts +3 -3
- package/dist/esmdev/foundation/system/EngineState.js +4 -4
- 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 +3 -3
- package/dist/esmdev/foundation/textures/AbstractReadableRenderTargetTexture.d.ts +39 -0
- package/dist/esmdev/foundation/textures/AbstractReadableRenderTargetTexture.js +88 -0
- package/dist/esmdev/foundation/textures/AbstractRenderTargetTexture.d.ts +60 -0
- package/dist/esmdev/foundation/textures/AbstractRenderTargetTexture.js +59 -0
- package/dist/esmdev/foundation/textures/AbstractTexture.js +49 -49
- package/dist/esmdev/foundation/textures/CubeTexture.js +35 -42
- package/dist/esmdev/foundation/textures/RenderBuffer.js +16 -17
- package/dist/esmdev/foundation/textures/RenderTargetTexture.d.ts +5 -67
- package/dist/esmdev/foundation/textures/RenderTargetTexture.js +18 -140
- package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.d.ts +5 -71
- package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.js +34 -177
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.d.ts +8 -50
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.js +31 -88
- package/dist/esmdev/foundation/textures/Sampler.js +24 -24
- package/dist/esmdev/foundation/textures/Texture.d.ts +19 -1
- package/dist/esmdev/foundation/textures/Texture.js +133 -146
- package/dist/esmdev/foundation/textures/TextureArray.js +13 -16
- package/dist/esmdev/foundation/textures/TextureDataFloat.js +26 -26
- package/dist/esmdev/foundation/textures/VideoTexture.d.ts +11 -0
- package/dist/esmdev/foundation/textures/VideoTexture.js +47 -46
- package/dist/esmdev/foundation/textures/decodeBasisImage.d.ts +14 -0
- package/dist/esmdev/foundation/textures/decodeBasisImage.js +14 -0
- package/dist/esmdev/foundation/textures/index.d.ts +2 -0
- package/dist/esmdev/foundation/textures/index.js +3 -1
- package/dist/esmdev/version.js +2 -2
- package/dist/esmdev/webgl/ComponentDataAccessorGLSL.d.ts +9 -0
- package/dist/esmdev/webgl/ComponentDataAccessorGLSL.js +146 -0
- package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
- package/dist/esmdev/webgl/MultiDraw.d.ts +1 -1
- package/dist/esmdev/webgl/MultiDraw.js +4 -4
- package/dist/esmdev/webgl/MultiDrawRepository.js +34 -34
- package/dist/esmdev/webgl/ShaderPropertyAccessorGLSL.d.ts +11 -0
- package/dist/esmdev/webgl/ShaderPropertyAccessorGLSL.js +142 -0
- package/dist/esmdev/webgl/WebGLCompressedTextures.d.ts +48 -0
- package/dist/esmdev/webgl/WebGLCompressedTextures.js +105 -0
- package/dist/esmdev/webgl/WebGLContextWrapper.d.ts +9 -52
- package/dist/esmdev/webgl/WebGLContextWrapper.js +128 -230
- package/dist/esmdev/webgl/WebGLCubeTextureFileLoader.d.ts +38 -0
- package/dist/esmdev/webgl/WebGLCubeTextureFileLoader.js +178 -0
- package/dist/esmdev/webgl/WebGLCubeTextures.d.ts +92 -0
- package/dist/esmdev/webgl/WebGLCubeTextures.js +358 -0
- package/dist/esmdev/webgl/WebGLDataTexture.d.ts +108 -0
- package/dist/esmdev/webgl/WebGLDataTexture.js +337 -0
- package/dist/esmdev/webgl/WebGLDrawState.d.ts +84 -0
- package/dist/esmdev/webgl/WebGLDrawState.js +164 -0
- package/dist/esmdev/webgl/WebGLExternalState.d.ts +43 -0
- package/dist/esmdev/webgl/WebGLExternalState.js +70 -0
- package/dist/esmdev/webgl/WebGLFrameRenderer.d.ts +32 -0
- package/dist/esmdev/webgl/WebGLFrameRenderer.js +155 -0
- package/dist/esmdev/webgl/WebGLFramebuffers.d.ts +142 -0
- package/dist/esmdev/webgl/WebGLFramebuffers.js +245 -0
- package/dist/esmdev/webgl/WebGLGpuTimer.js +30 -30
- package/dist/esmdev/webgl/WebGLMaterialParameters.d.ts +47 -0
- package/dist/esmdev/webgl/WebGLMaterialParameters.js +81 -0
- package/dist/esmdev/webgl/WebGLMeshResources.d.ts +115 -0
- package/dist/esmdev/webgl/WebGLMeshResources.js +303 -0
- package/dist/esmdev/webgl/WebGLMorphUniformBuffers.d.ts +66 -0
- package/dist/esmdev/webgl/WebGLMorphUniformBuffers.js +272 -0
- package/dist/esmdev/webgl/WebGLResourceRepository.d.ts +100 -178
- package/dist/esmdev/webgl/WebGLResourceRepository.js +345 -2596
- package/dist/esmdev/webgl/WebGLSamplers.d.ts +78 -0
- package/dist/esmdev/webgl/WebGLSamplers.js +143 -0
- package/dist/esmdev/webgl/WebGLShaderProgramBuilder.d.ts +40 -0
- package/dist/esmdev/webgl/WebGLShaderProgramBuilder.js +208 -0
- package/dist/esmdev/webgl/WebGLShaderPrograms.d.ts +88 -0
- package/dist/esmdev/webgl/WebGLShaderPrograms.js +240 -0
- package/dist/esmdev/webgl/WebGLStereoUtil.d.ts +0 -27
- package/dist/esmdev/webgl/WebGLStereoUtil.js +33 -112
- package/dist/esmdev/webgl/WebGLStrategyDataUploader.d.ts +152 -0
- package/dist/esmdev/webgl/WebGLStrategyDataUploader.js +370 -0
- package/dist/esmdev/webgl/WebGLStrategyMeshBatchRenderer.d.ts +40 -0
- package/dist/esmdev/webgl/WebGLStrategyMeshBatchRenderer.js +213 -0
- package/dist/esmdev/webgl/WebGLStrategyMeshDrawer.d.ts +92 -0
- package/dist/esmdev/webgl/WebGLStrategyMeshDrawer.js +300 -0
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.d.ts +7 -360
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +75 -1863
- package/dist/esmdev/webgl/WebGLTextureUnitState.d.ts +79 -0
- package/dist/esmdev/webgl/WebGLTextureUnitState.js +149 -0
- package/dist/esmdev/webgl/WebGLTextureUploads.d.ts +106 -0
- package/dist/esmdev/webgl/WebGLTextureUploads.js +168 -0
- package/dist/esmdev/webgl/WebGLTextures.d.ts +316 -0
- package/dist/esmdev/webgl/WebGLTextures.js +577 -0
- package/dist/esmdev/webgl/WebGLUniformBuffers.d.ts +35 -0
- package/dist/esmdev/webgl/WebGLUniformBuffers.js +89 -0
- package/dist/esmdev/webgl/WebGLUniforms.d.ts +117 -0
- package/dist/esmdev/webgl/WebGLUniforms.js +283 -0
- package/dist/esmdev/webgl/WebGLVertexBuffers.d.ts +172 -0
- package/dist/esmdev/webgl/WebGLVertexBuffers.js +391 -0
- package/dist/esmdev/webgl/debug/BufferLayoutDecoder.d.ts +4 -4
- package/dist/esmdev/webgl/debug/BufferLayoutDecoder.js +52 -59
- package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +17 -17
- package/dist/esmdev/webgl/debug/types.d.ts +2 -2
- package/dist/esmdev/webgl/getRenderingStrategy.d.ts +2 -2
- package/dist/esmdev/webgl/getRenderingStrategy.js +5 -5
- package/dist/esmdev/webgl/main.d.ts +4 -17
- package/dist/esmdev/webgl/main.js +5 -3
- package/dist/esmdev/webgl/readColorAttachmentAsRgba8.d.ts +36 -0
- package/dist/esmdev/webgl/readColorAttachmentAsRgba8.js +47 -0
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.d.ts +2 -2
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +15 -15
- package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +17 -17
- package/dist/esmdev/webgl/shaders/StandardShaderPart.d.ts +3 -3
- package/dist/esmdev/webgl/shaders/StandardShaderPart.js +15 -15
- package/dist/esmdev/webgl/shaders/glslCommonChunks.d.ts +2 -2
- package/dist/esmdev/webgl/shaders/glslCommonChunks.js +1 -1
- 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.d.ts +2 -2
- package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +27 -27
- package/dist/esmdev/webgl/shaders/nodes/DiscardShader.d.ts +1 -1
- package/dist/esmdev/webgl/shaders/nodes/DiscardShader.js +5 -5
- package/dist/esmdev/webgl/shaders/nodes/EndShader.d.ts +2 -2
- package/dist/esmdev/webgl/shaders/nodes/EndShader.js +6 -6
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.d.ts +1 -1
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +17 -17
- package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +11 -11
- package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.d.ts +1 -1
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +13 -13
- package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +27 -27
- package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +27 -27
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.d.ts +1 -1
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +33 -27
- package/dist/esmdev/webgpu/AttributeReader.d.ts +18 -0
- package/dist/esmdev/webgpu/AttributeReader.js +57 -0
- package/dist/esmdev/webgpu/GpuCullingRegistry.js +91 -91
- package/dist/esmdev/webgpu/GpuDeformRegistry.js +53 -53
- package/dist/esmdev/webgpu/RangeAllocator.js +16 -16
- package/dist/esmdev/webgpu/ShaderPropertyAccessorWGSL.d.ts +11 -0
- package/dist/esmdev/webgpu/ShaderPropertyAccessorWGSL.js +131 -0
- package/dist/esmdev/webgpu/WebGpuBindGroups.d.ts +131 -0
- package/dist/esmdev/webgpu/WebGpuBindGroups.js +377 -0
- package/dist/esmdev/webgpu/WebGpuBufferArena.js +21 -21
- package/dist/esmdev/webgpu/WebGpuCompressedTextures.d.ts +38 -0
- package/dist/esmdev/webgpu/WebGpuCompressedTextures.js +155 -0
- package/dist/esmdev/webgpu/WebGpuCubeTextureShaders.d.ts +1 -0
- package/dist/esmdev/webgpu/WebGpuCubeTextureShaders.js +68 -0
- package/dist/esmdev/webgpu/WebGpuCubeTextures.d.ts +72 -0
- package/dist/esmdev/webgpu/WebGpuCubeTextures.js +340 -0
- package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
- package/dist/esmdev/webgpu/WebGpuDraw.d.ts +63 -0
- package/dist/esmdev/webgpu/WebGpuDraw.js +133 -0
- package/dist/esmdev/webgpu/WebGpuDrawParameters.d.ts +61 -0
- package/dist/esmdev/webgpu/WebGpuDrawParameters.js +120 -0
- package/dist/esmdev/webgpu/WebGpuExternalRenderPass.d.ts +44 -0
- package/dist/esmdev/webgpu/WebGpuExternalRenderPass.js +115 -0
- package/dist/esmdev/webgpu/WebGpuFrame.d.ts +55 -0
- package/dist/esmdev/webgpu/WebGpuFrame.js +89 -0
- package/dist/esmdev/webgpu/WebGpuFrameRenderer.d.ts +25 -0
- package/dist/esmdev/webgpu/WebGpuFrameRenderer.js +248 -0
- package/dist/esmdev/webgpu/WebGpuGpuCulling.js +200 -454
- package/dist/esmdev/webgpu/WebGpuGpuCullingShaders.d.ts +34 -0
- package/dist/esmdev/webgpu/WebGpuGpuCullingShaders.js +264 -0
- package/dist/esmdev/webgpu/WebGpuGpuTimer.js +52 -52
- package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +39 -194
- package/dist/esmdev/webgpu/WebGpuLightClusterShaders.d.ts +14 -0
- package/dist/esmdev/webgpu/WebGpuLightClusterShaders.js +161 -0
- package/dist/esmdev/webgpu/WebGpuMipmapGenerator.d.ts +54 -0
- package/dist/esmdev/webgpu/WebGpuMipmapGenerator.js +187 -0
- package/dist/esmdev/webgpu/WebGpuMipmapShaders.d.ts +1 -0
- package/dist/esmdev/webgpu/WebGpuMipmapShaders.js +34 -0
- package/dist/esmdev/webgpu/WebGpuRenderBundles.d.ts +117 -0
- package/dist/esmdev/webgpu/WebGpuRenderBundles.js +299 -0
- package/dist/esmdev/webgpu/WebGpuRenderPassEncoders.d.ts +140 -0
- package/dist/esmdev/webgpu/WebGpuRenderPassEncoders.js +611 -0
- package/dist/esmdev/webgpu/WebGpuRenderPipelines.d.ts +75 -0
- package/dist/esmdev/webgpu/WebGpuRenderPipelines.js +249 -0
- package/dist/esmdev/webgpu/WebGpuRenderTargetTextures.d.ts +78 -0
- package/dist/esmdev/webgpu/WebGpuRenderTargetTextures.js +108 -0
- package/dist/esmdev/webgpu/WebGpuResourceRepository.d.ts +52 -322
- package/dist/esmdev/webgpu/WebGpuResourceRepository.js +332 -3127
- package/dist/esmdev/webgpu/WebGpuSamplers.d.ts +45 -0
- package/dist/esmdev/webgpu/WebGpuSamplers.js +58 -0
- package/dist/esmdev/webgpu/WebGpuShaderProgramBuilder.d.ts +25 -0
- package/dist/esmdev/webgpu/WebGpuShaderProgramBuilder.js +108 -0
- package/dist/esmdev/webgpu/WebGpuStorageBuffers.d.ts +77 -0
- package/dist/esmdev/webgpu/WebGpuStorageBuffers.js +191 -0
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.d.ts +1 -73
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +58 -780
- package/dist/esmdev/webgpu/WebGpuStrategyStorage.d.ts +62 -0
- package/dist/esmdev/webgpu/WebGpuStrategyStorage.js +267 -0
- package/dist/esmdev/webgpu/WebGpuTextureReadback.d.ts +111 -0
- package/dist/esmdev/webgpu/WebGpuTextureReadback.js +188 -0
- package/dist/esmdev/webgpu/WebGpuTextureReadbackShaders.d.ts +4 -0
- package/dist/esmdev/webgpu/WebGpuTextureReadbackShaders.js +34 -0
- package/dist/esmdev/webgpu/WebGpuTextureUploads.d.ts +109 -0
- package/dist/esmdev/webgpu/WebGpuTextureUploads.js +197 -0
- package/dist/esmdev/webgpu/WebGpuTextures.d.ts +196 -0
- package/dist/esmdev/webgpu/WebGpuTextures.js +344 -0
- package/dist/esmdev/webgpu/WebGpuVertexBuffers.d.ts +142 -0
- package/dist/esmdev/webgpu/WebGpuVertexBuffers.js +281 -0
- package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +106 -284
- package/dist/esmdev/webgpu/WebGpuVertexDeformerShaders.d.ts +7 -0
- package/dist/esmdev/webgpu/WebGpuVertexDeformerShaders.js +134 -0
- package/dist/esmdev/webgpu/WebGpuVertexShaderDefinitions.d.ts +16 -0
- package/dist/esmdev/webgpu/WebGpuVertexShaderDefinitions.js +216 -0
- package/dist/esmdev/webgpu/assertArrayBufferView.d.ts +9 -0
- package/dist/esmdev/webgpu/assertArrayBufferView.js +10 -0
- package/dist/esmdev/webgpu/main.d.ts +2 -16
- package/dist/esmdev/webgpu/main.js +3 -3
- package/dist/esmdev/webgpu/padCompressedRowsForUpload.d.ts +20 -0
- package/dist/esmdev/webgpu/padCompressedRowsForUpload.js +20 -0
- package/dist/esmdev/webgpu/removeRowPadding.d.ts +21 -0
- package/dist/esmdev/webgpu/removeRowPadding.js +23 -0
- package/dist/esmdev/webgpu/shaderity_shaders/common/processGeometry.wgsl.js +2 -2
- package/dist/esmdev/webgpu/wgslCommonChunks.d.ts +2 -2
- package/dist/esmdev/webgpu/wgslCommonChunks.js +1 -1
- package/dist/esmdev/xr/WebARSystem.js +65 -65
- package/dist/esmdev/xr/WebXRSystem.d.ts +0 -4
- package/dist/esmdev/xr/WebXRSystem.js +155 -160
- package/package.json +1 -1
- package/dist/esm/foundation/definitions/ProcessApproach.d.ts +0 -21
- package/dist/esm/foundation/definitions/ProcessApproach.js +0 -1
- package/dist/esm/foundation/materials/core/ShaderHandler.d.ts +0 -125
- package/dist/esm/foundation/materials/core/ShaderHandler.js +0 -48
- package/dist/esmdev/foundation/definitions/ProcessApproach.d.ts +0 -21
- package/dist/esmdev/foundation/definitions/ProcessApproach.js +0 -60
- package/dist/esmdev/foundation/materials/core/ShaderHandler.d.ts +0 -125
- package/dist/esmdev/foundation/materials/core/ShaderHandler.js +0 -416
|
@@ -66,7 +66,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
66
66
|
* @param gltfModel - The glTF model data
|
|
67
67
|
* @returns A scene graph entity configured as a group
|
|
68
68
|
*/
|
|
69
|
-
static
|
|
69
|
+
static tq(engine, gltfModel) {
|
|
70
70
|
const entity = createGroupEntity(engine);
|
|
71
71
|
this.addTags(entity, gltfModel);
|
|
72
72
|
return entity;
|
|
@@ -92,7 +92,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
92
92
|
* @param gltfModel - The glTF model data
|
|
93
93
|
* @returns A mesh entity with appropriate tags
|
|
94
94
|
*/
|
|
95
|
-
static
|
|
95
|
+
static Iq(engine, gltfModel) {
|
|
96
96
|
const entity = createMeshEntity(engine);
|
|
97
97
|
this.addTags(entity, gltfModel);
|
|
98
98
|
return entity;
|
|
@@ -103,7 +103,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
103
103
|
* @param gltfModel - The glTF model data
|
|
104
104
|
* @returns A camera entity with appropriate tags
|
|
105
105
|
*/
|
|
106
|
-
static
|
|
106
|
+
static Jq(engine, gltfModel) {
|
|
107
107
|
const entity = createCameraEntity(engine, true);
|
|
108
108
|
this.addTags(entity, gltfModel);
|
|
109
109
|
return entity;
|
|
@@ -114,7 +114,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
114
114
|
* @param gltfModel - The glTF model data
|
|
115
115
|
* @returns A light entity with appropriate tags
|
|
116
116
|
*/
|
|
117
|
-
static
|
|
117
|
+
static xq(engine, gltfModel) {
|
|
118
118
|
const entity = createLightEntity(engine);
|
|
119
119
|
this.addTags(entity, gltfModel);
|
|
120
120
|
return entity;
|
|
@@ -126,7 +126,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
126
126
|
* @param rnSamplers - Array of Rhodonite samplers
|
|
127
127
|
* @returns Array of configured Rhodonite materials
|
|
128
128
|
*/
|
|
129
|
-
static
|
|
129
|
+
static yq(engine, gltfModel, rnTextures, rnSamplers) {
|
|
130
130
|
const rnMaterials = [];
|
|
131
131
|
if (gltfModel.materials != null) {
|
|
132
132
|
for (const material of gltfModel.materials) {
|
|
@@ -143,7 +143,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
143
143
|
* @param gltfModel - The glTF model data to inspect
|
|
144
144
|
* @internal
|
|
145
145
|
*/
|
|
146
|
-
static async
|
|
146
|
+
static async Kq(gltfModel) {
|
|
147
147
|
var _a;
|
|
148
148
|
const materials = (_a = gltfModel.materials) != null ? _a : [];
|
|
149
149
|
const needsMToon1 = materials.some((material) => {
|
|
@@ -204,7 +204,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
204
204
|
* @param gltfModel - The glTF model data to inspect
|
|
205
205
|
* @internal
|
|
206
206
|
*/
|
|
207
|
-
static async
|
|
207
|
+
static async Lq(engine, gltfModel) {
|
|
208
208
|
var _a;
|
|
209
209
|
const materials = (_a = gltfModel.materials) != null ? _a : [];
|
|
210
210
|
const usesSheen = materials.some((material) => {
|
|
@@ -225,7 +225,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
225
225
|
* @param gltfModel - The glTF model data
|
|
226
226
|
* @returns Promise resolving to array of Rhodonite textures
|
|
227
227
|
*/
|
|
228
|
-
static async
|
|
228
|
+
static async Mq(engine, gltfModel) {
|
|
229
229
|
const rnTextures = [];
|
|
230
230
|
if (gltfModel.images != null) {
|
|
231
231
|
for (const image of gltfModel.images) {
|
|
@@ -241,7 +241,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
241
241
|
* @param gltfModel - The glTF model data
|
|
242
242
|
* @returns Array of Rhodonite samplers
|
|
243
243
|
*/
|
|
244
|
-
static
|
|
244
|
+
static Nq(engine, gltfModel) {
|
|
245
245
|
const rnSamplers = [];
|
|
246
246
|
if (gltfModel.samplers != null) {
|
|
247
247
|
for (const sampler of gltfModel.samplers) {
|
|
@@ -258,12 +258,12 @@ var ModelConverter = class _ModelConverter {
|
|
|
258
258
|
*/
|
|
259
259
|
static convertToRhodoniteObjectSimple(engine, gltfModel) {
|
|
260
260
|
gltfModel.asset.extras.rnMeshesAtGltMeshIdx = [];
|
|
261
|
-
const rnBuffers = this.
|
|
261
|
+
const rnBuffers = this.zq(gltfModel);
|
|
262
262
|
gltfModel.asset.extras.rnMaterials = {};
|
|
263
263
|
const rnTextures = [];
|
|
264
264
|
const rnSamplers = [];
|
|
265
|
-
const rnMaterials = this.
|
|
266
|
-
const { rnEntities, rnEntitiesByNames } = this.
|
|
265
|
+
const rnMaterials = this.yq(engine, gltfModel, rnTextures, rnSamplers);
|
|
266
|
+
const { rnEntities, rnEntitiesByNames } = this.Aq(
|
|
267
267
|
engine,
|
|
268
268
|
gltfModel,
|
|
269
269
|
rnBuffers,
|
|
@@ -273,12 +273,12 @@ var ModelConverter = class _ModelConverter {
|
|
|
273
273
|
);
|
|
274
274
|
gltfModel.asset.extras.rnEntities = rnEntities;
|
|
275
275
|
this._setupTransform(gltfModel, rnEntities);
|
|
276
|
-
const rootGroup = this.
|
|
276
|
+
const rootGroup = this.tq(engine, gltfModel);
|
|
277
277
|
this._setupAnimation(engine, gltfModel, rnEntities, rnBuffers, rootGroup, rnMaterials);
|
|
278
278
|
this._setupSkeleton(engine, gltfModel, rnEntities, rnBuffers);
|
|
279
279
|
this._setupHierarchy(gltfModel, rnEntities);
|
|
280
280
|
setupKhrStaticColliders(gltfModel, rnEntities);
|
|
281
|
-
this.
|
|
281
|
+
this.Bq(gltfModel, rnEntities);
|
|
282
282
|
if (gltfModel.scenes[0].nodes) {
|
|
283
283
|
for (const nodesIndex of gltfModel.scenes[0].nodes) {
|
|
284
284
|
const sg = rnEntities[nodesIndex].getSceneGraph();
|
|
@@ -300,16 +300,16 @@ var ModelConverter = class _ModelConverter {
|
|
|
300
300
|
static async convertToRhodoniteObject(engine, gltfModel) {
|
|
301
301
|
var _a, _b;
|
|
302
302
|
gltfModel.asset.extras.rnMeshesAtGltMeshIdx = [];
|
|
303
|
-
const rnBuffers = this.
|
|
303
|
+
const rnBuffers = this.zq(gltfModel);
|
|
304
304
|
gltfModel.asset.extras.rnMaterials = {};
|
|
305
|
-
const rnTextures = await this.
|
|
306
|
-
const rnSamplers = this.
|
|
307
|
-
await this.
|
|
305
|
+
const rnTextures = await this.Mq(engine, gltfModel);
|
|
306
|
+
const rnSamplers = this.Nq(engine, gltfModel);
|
|
307
|
+
await this.Kq(gltfModel);
|
|
308
308
|
await RhodoniteImportExtension.preloadNodeBasedMaterialSupport(gltfModel);
|
|
309
309
|
await this.preloadRaymarchingSupport(gltfModel);
|
|
310
|
-
await this.
|
|
311
|
-
const rnMaterials = this.
|
|
312
|
-
const { rnEntities, rnEntitiesByNames } = this.
|
|
310
|
+
await this.Lq(engine, gltfModel);
|
|
311
|
+
const rnMaterials = this.yq(engine, gltfModel, rnTextures, rnSamplers);
|
|
312
|
+
const { rnEntities, rnEntitiesByNames } = this.Aq(
|
|
313
313
|
engine,
|
|
314
314
|
gltfModel,
|
|
315
315
|
rnBuffers,
|
|
@@ -319,13 +319,13 @@ var ModelConverter = class _ModelConverter {
|
|
|
319
319
|
);
|
|
320
320
|
gltfModel.asset.extras.rnEntities = rnEntities;
|
|
321
321
|
this._setupTransform(gltfModel, rnEntities);
|
|
322
|
-
const rootGroup = this.
|
|
322
|
+
const rootGroup = this.tq(engine, gltfModel);
|
|
323
323
|
this._setupAnimation(engine, gltfModel, rnEntities, rnBuffers, rootGroup, rnMaterials);
|
|
324
324
|
this._setupSkeleton(engine, gltfModel, rnEntities, rnBuffers);
|
|
325
325
|
this._setupHierarchy(gltfModel, rnEntities);
|
|
326
326
|
await preloadKhrPhysicsSupport(gltfModel);
|
|
327
327
|
setupKhrStaticColliders(gltfModel, rnEntities);
|
|
328
|
-
this.
|
|
328
|
+
this.Bq(gltfModel, rnEntities);
|
|
329
329
|
rootGroup.tryToSetUniqueName("FileRoot", true);
|
|
330
330
|
rootGroup.tryToSetTag({ tag: "ObjectType", value: "top" });
|
|
331
331
|
if (gltfModel.scenes[0].nodes) {
|
|
@@ -367,7 +367,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
367
367
|
* @param gltfModel - The glTF model containing buffer data
|
|
368
368
|
* @returns Array of Rhodonite Buffer objects
|
|
369
369
|
*/
|
|
370
|
-
static
|
|
370
|
+
static zq(gltfModel) {
|
|
371
371
|
var _a;
|
|
372
372
|
const rnBuffers = [];
|
|
373
373
|
for (const buffer of (_a = gltfModel.buffers) != null ? _a : []) {
|
|
@@ -437,21 +437,21 @@ var ModelConverter = class _ModelConverter {
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
static
|
|
440
|
+
static Bq(gltfModel, rnEntities) {
|
|
441
441
|
var _a, _b, _c;
|
|
442
442
|
const visitedNodeIndices = /* @__PURE__ */ new Set();
|
|
443
443
|
const sceneRootNodeIndices = (_c = (_b = (_a = gltfModel.scenes) == null ? void 0 : _a[0]) == null ? void 0 : _b.nodes) != null ? _c : [];
|
|
444
444
|
for (const nodeIndex of sceneRootNodeIndices) {
|
|
445
|
-
this.
|
|
445
|
+
this.uq(gltfModel, rnEntities, nodeIndex, true, visitedNodeIndices);
|
|
446
446
|
}
|
|
447
447
|
for (const nodeIndexString in gltfModel.nodes) {
|
|
448
448
|
const nodeIndex = Number.parseInt(nodeIndexString, 10);
|
|
449
449
|
if (!visitedNodeIndices.has(nodeIndex)) {
|
|
450
|
-
this.
|
|
450
|
+
this.uq(gltfModel, rnEntities, nodeIndex, true, visitedNodeIndices);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
static
|
|
454
|
+
static uq(gltfModel, rnEntities, nodeIndex, parentVisible, visitedNodeIndices) {
|
|
455
455
|
var _a, _b;
|
|
456
456
|
if (visitedNodeIndices.has(nodeIndex)) {
|
|
457
457
|
return;
|
|
@@ -462,14 +462,14 @@ var ModelConverter = class _ModelConverter {
|
|
|
462
462
|
if (Is.not.exist(node) || Is.not.exist(entity)) {
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
const localVisible = this.
|
|
465
|
+
const localVisible = this.Oq(node);
|
|
466
466
|
entity.tryToSetTag({ tag: TagKhrNodeVisibilityVisible, value: localVisible });
|
|
467
467
|
if (Is.exist((_a = node.extensions) == null ? void 0 : _a.KHR_node_visibility)) {
|
|
468
468
|
entity.tryToSetTag({ tag: TagKhrNodeVisibilityEnabled, value: true });
|
|
469
469
|
}
|
|
470
470
|
entity.getSceneGraph().isVisible = parentVisible && localVisible;
|
|
471
471
|
for (const childNodeIndex of (_b = node.children) != null ? _b : []) {
|
|
472
|
-
this.
|
|
472
|
+
this.uq(
|
|
473
473
|
gltfModel,
|
|
474
474
|
rnEntities,
|
|
475
475
|
childNodeIndex,
|
|
@@ -478,7 +478,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
static
|
|
481
|
+
static Oq(node) {
|
|
482
482
|
var _a, _b;
|
|
483
483
|
const extension = (_a = node.extensions) == null ? void 0 : _a.KHR_node_visibility;
|
|
484
484
|
return (_b = extension == null ? void 0 : extension.visible) != null ? _b : true;
|
|
@@ -522,7 +522,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
522
522
|
animationAttributeType = channel.target.path;
|
|
523
523
|
}
|
|
524
524
|
if (channel.target.path === "pointer") {
|
|
525
|
-
_ModelConverter.
|
|
525
|
+
_ModelConverter.Pq(
|
|
526
526
|
rnEntities,
|
|
527
527
|
channel,
|
|
528
528
|
samplerObject,
|
|
@@ -535,7 +535,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
535
535
|
gltfModel
|
|
536
536
|
);
|
|
537
537
|
} else {
|
|
538
|
-
_ModelConverter
|
|
538
|
+
_ModelConverter.Qq(
|
|
539
539
|
rnEntities,
|
|
540
540
|
channel,
|
|
541
541
|
samplerObject,
|
|
@@ -563,14 +563,14 @@ var ModelConverter = class _ModelConverter {
|
|
|
563
563
|
* @param rnMaterials - Array of Rhodonite materials
|
|
564
564
|
* @param gltfModel - The glTF model data
|
|
565
565
|
*/
|
|
566
|
-
static
|
|
566
|
+
static Pq(rnEntities, channel, samplerObject, animation, animInputArray, animOutputArray, interpolation, animationAttributeType, rnMaterials, gltfModel) {
|
|
567
567
|
const pointer = channel.target.extensions.KHR_animation_pointer.pointer;
|
|
568
568
|
const matchNodes = pointer.match(/^\/nodes\/([0-9]+)\//);
|
|
569
569
|
const matchMaterials = pointer.match(/^\/materials\/([0-9]+)\//);
|
|
570
570
|
const matchLights = pointer.match(/^\/extensions\/KHR_lights_punctual\/lights\/([0-9]+)\//);
|
|
571
571
|
const matchCameras = pointer.match(/^\/cameras\/([0-9]+)\//);
|
|
572
572
|
if (matchMaterials) {
|
|
573
|
-
_ModelConverter.
|
|
573
|
+
_ModelConverter.Rq(
|
|
574
574
|
matchMaterials,
|
|
575
575
|
rnMaterials,
|
|
576
576
|
pointer,
|
|
@@ -582,7 +582,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
582
582
|
animationAttributeType
|
|
583
583
|
);
|
|
584
584
|
} else if (matchNodes) {
|
|
585
|
-
_ModelConverter.
|
|
585
|
+
_ModelConverter.Sq(
|
|
586
586
|
matchNodes,
|
|
587
587
|
rnEntities,
|
|
588
588
|
pointer,
|
|
@@ -594,7 +594,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
594
594
|
animationAttributeType
|
|
595
595
|
);
|
|
596
596
|
} else if (matchLights) {
|
|
597
|
-
_ModelConverter.
|
|
597
|
+
_ModelConverter.Tq(
|
|
598
598
|
matchLights,
|
|
599
599
|
rnEntities,
|
|
600
600
|
pointer,
|
|
@@ -607,7 +607,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
607
607
|
gltfModel
|
|
608
608
|
);
|
|
609
609
|
} else if (matchCameras) {
|
|
610
|
-
_ModelConverter.
|
|
610
|
+
_ModelConverter.Uq(
|
|
611
611
|
matchCameras,
|
|
612
612
|
rnEntities,
|
|
613
613
|
pointer,
|
|
@@ -636,7 +636,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
636
636
|
* @param animationAttributeType - Type of animation attribute
|
|
637
637
|
* @param gltfModel - The glTF model data
|
|
638
638
|
*/
|
|
639
|
-
static
|
|
639
|
+
static Uq(match, rnEntities, pointer, samplerObject, animation, animInputArray, animOutputArray, interpolation, _animationAttributeType, gltfModel) {
|
|
640
640
|
const cameraIndex = Number.parseInt(match[1], 10);
|
|
641
641
|
const nodes = gltfModel.nodes;
|
|
642
642
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -701,7 +701,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
701
701
|
* @param animationAttributeType - Type of animation attribute
|
|
702
702
|
* @param gltfModel - The glTF model data
|
|
703
703
|
*/
|
|
704
|
-
static
|
|
704
|
+
static Tq(match, rnEntities, pointer, samplerObject, animation, animInputArray, animOutputArray, interpolation, _animationAttributeType, gltfModel) {
|
|
705
705
|
var _a;
|
|
706
706
|
const lightIndex = Number.parseInt(match[1], 10);
|
|
707
707
|
const nodes = gltfModel.nodes;
|
|
@@ -769,7 +769,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
769
769
|
* @param interpolation - Interpolation method
|
|
770
770
|
* @param animationAttributeType - Type of animation attribute
|
|
771
771
|
*/
|
|
772
|
-
static
|
|
772
|
+
static Sq(match, rnEntities, pointer, samplerObject, animation, animInputArray, animOutputArray, interpolation, _animationAttributeType) {
|
|
773
773
|
const nodeIndex = Number.parseInt(match[1], 10);
|
|
774
774
|
const rnEntity = rnEntities[nodeIndex];
|
|
775
775
|
if (Is.not.exist(rnEntity)) {
|
|
@@ -837,7 +837,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
837
837
|
* @param interpolation - Interpolation method
|
|
838
838
|
* @param animationAttributeType - Type of animation attribute
|
|
839
839
|
*/
|
|
840
|
-
static
|
|
840
|
+
static Rq(match, rnMaterials, pointer, samplerObject, animation, animInputArray, animOutputArray, interpolation, _animationAttributeType) {
|
|
841
841
|
const materialIndex = Number.parseInt(match[1], 10);
|
|
842
842
|
const material = rnMaterials[materialIndex];
|
|
843
843
|
if (Is.not.exist(material)) {
|
|
@@ -907,7 +907,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
907
907
|
* @param interpolation - Interpolation method
|
|
908
908
|
* @param animationAttributeType - Type of animation attribute
|
|
909
909
|
*/
|
|
910
|
-
static
|
|
910
|
+
static Qq(rnEntities, channel, samplerObject, animation, animInputArray, animOutputArray, interpolation, animationAttributeType) {
|
|
911
911
|
const rnEntity = rnEntities[channel.target.node];
|
|
912
912
|
if (Is.exist(rnEntity)) {
|
|
913
913
|
let animationComponent = rnEntity.tryToGetAnimation();
|
|
@@ -963,7 +963,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
963
963
|
const newRnEntity = engine.entityRepository.addComponentToEntity(SkeletalComponent, rnEntity);
|
|
964
964
|
skeletalComponent = newRnEntity.getSkeletal();
|
|
965
965
|
const inverseBindMatAccessor = node.skinObject.inverseBindMatricesObject;
|
|
966
|
-
const rnAccessorOfInverseBindMat = Is.exist(inverseBindMatAccessor) ? this.
|
|
966
|
+
const rnAccessorOfInverseBindMat = Is.exist(inverseBindMatAccessor) ? this.pq(engine, inverseBindMatAccessor, rnBuffers) : void 0;
|
|
967
967
|
if (forcedBoneDataType != null) {
|
|
968
968
|
skeletalComponent.setBoneDataType(forcedBoneDataType);
|
|
969
969
|
} else {
|
|
@@ -987,7 +987,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
987
987
|
}
|
|
988
988
|
const joints = node.skinObject.joints.map((i) => rnEntities[i].getSceneGraph());
|
|
989
989
|
skeletalComponent.setJoints(joints);
|
|
990
|
-
const skeletonRoot = Is.exist(node.skinObject.skeleton) ? rnEntities[node.skinObject.skeleton].getSceneGraph() : this.
|
|
990
|
+
const skeletonRoot = Is.exist(node.skinObject.skeleton) ? rnEntities[node.skinObject.skeleton].getSceneGraph() : this.Vq(joints);
|
|
991
991
|
skeletalComponent.topOfJointsHierarchy = skeletonRoot != null ? skeletonRoot : joints[0];
|
|
992
992
|
if (skeletonRoot != null) {
|
|
993
993
|
skeletonRoot.isRootJoint = true;
|
|
@@ -1003,7 +1003,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1003
1003
|
* glTF's `skin.skeleton` is optional; when it is omitted, the common root of the
|
|
1004
1004
|
* joints is the root of the skin's joint hierarchy.
|
|
1005
1005
|
*/
|
|
1006
|
-
static
|
|
1006
|
+
static Vq(joints) {
|
|
1007
1007
|
if (joints.length === 0) {
|
|
1008
1008
|
return void 0;
|
|
1009
1009
|
}
|
|
@@ -1039,7 +1039,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1039
1039
|
* glTF requires implementations to calculate normals when they are absent; without
|
|
1040
1040
|
* them lit materials receive a zero normal and shade incorrectly (black or NaN).
|
|
1041
1041
|
*/
|
|
1042
|
-
static
|
|
1042
|
+
static Wq(engine, primitive, indicesAccessor) {
|
|
1043
1043
|
if (Is.exist(primitive.getAttribute(VertexAttribute.Normal.XYZ))) {
|
|
1044
1044
|
return;
|
|
1045
1045
|
}
|
|
@@ -1129,7 +1129,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1129
1129
|
* @param rnSamplers - Array of Rhodonite samplers
|
|
1130
1130
|
* @returns Object containing arrays of entities and entities by name
|
|
1131
1131
|
*/
|
|
1132
|
-
static
|
|
1132
|
+
static Aq(engine, gltfModel, rnBuffers, rnMaterials, rnTextures, rnSamplers) {
|
|
1133
1133
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1134
1134
|
const rnEntities = [];
|
|
1135
1135
|
const rnEntitiesByNames = /* @__PURE__ */ new Map();
|
|
@@ -1138,7 +1138,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1138
1138
|
let entity;
|
|
1139
1139
|
if (node.mesh != null) {
|
|
1140
1140
|
const meshIdx = node.mesh;
|
|
1141
|
-
const meshEntity = this.
|
|
1141
|
+
const meshEntity = this.Xq(
|
|
1142
1142
|
engine,
|
|
1143
1143
|
node.meshObject,
|
|
1144
1144
|
meshIdx,
|
|
@@ -1157,22 +1157,22 @@ var ModelConverter = class _ModelConverter {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
entity = meshEntity;
|
|
1159
1159
|
} else if (node.cameraObject != null) {
|
|
1160
|
-
const cameraEntity = this.
|
|
1160
|
+
const cameraEntity = this.Yq(engine, node.cameraObject, gltfModel);
|
|
1161
1161
|
let entityWithOptionalLight = cameraEntity;
|
|
1162
1162
|
if (((_b = node.extensions) == null ? void 0 : _b.KHR_lights_punctual) != null) {
|
|
1163
1163
|
const lightEntity = engine.entityRepository.addComponentToEntity(
|
|
1164
1164
|
LightComponent,
|
|
1165
1165
|
cameraEntity
|
|
1166
1166
|
);
|
|
1167
|
-
this.
|
|
1167
|
+
this.Cq(lightEntity.getLight(), node.extensions.KHR_lights_punctual.light);
|
|
1168
1168
|
lightEntity.getCamera().isSyncToLight = true;
|
|
1169
1169
|
entityWithOptionalLight = lightEntity;
|
|
1170
|
-
} else if (this.
|
|
1170
|
+
} else if (this.qq(node) != null) {
|
|
1171
1171
|
const lightEntity = engine.entityRepository.addComponentToEntity(
|
|
1172
1172
|
LightComponent,
|
|
1173
1173
|
cameraEntity
|
|
1174
1174
|
);
|
|
1175
|
-
this.
|
|
1175
|
+
this.Dq(lightEntity.getLight(), this.qq(node));
|
|
1176
1176
|
lightEntity.getCamera().isSyncToLight = true;
|
|
1177
1177
|
entityWithOptionalLight = lightEntity;
|
|
1178
1178
|
}
|
|
@@ -1181,16 +1181,16 @@ var ModelConverter = class _ModelConverter {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
entity = entityWithOptionalLight;
|
|
1183
1183
|
} else if ((_c = node.extensions) == null ? void 0 : _c.KHR_lights_punctual) {
|
|
1184
|
-
const lightEntity = this.
|
|
1184
|
+
const lightEntity = this.Zq(engine, node.extensions.KHR_lights_punctual.light, gltfModel);
|
|
1185
1185
|
entity = lightEntity;
|
|
1186
|
-
} else if (this.
|
|
1187
|
-
const lightEntity = this.
|
|
1186
|
+
} else if (this.qq(node) != null) {
|
|
1187
|
+
const lightEntity = this._q(engine, this.qq(node), gltfModel);
|
|
1188
1188
|
if (node.name) {
|
|
1189
1189
|
lightEntity.tryToSetUniqueName(node.name, true);
|
|
1190
1190
|
}
|
|
1191
1191
|
entity = lightEntity;
|
|
1192
1192
|
} else {
|
|
1193
|
-
const group = this.
|
|
1193
|
+
const group = this.tq(engine, gltfModel);
|
|
1194
1194
|
if (node.name) {
|
|
1195
1195
|
group.tryToSetUniqueName(node.name, true);
|
|
1196
1196
|
}
|
|
@@ -1223,7 +1223,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1223
1223
|
entity = raymarchingEntity;
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
if (this
|
|
1226
|
+
if (this.$q(node, gltfModel)) {
|
|
1227
1227
|
let weights = [];
|
|
1228
1228
|
if (node.weights) {
|
|
1229
1229
|
weights = node.weights;
|
|
@@ -1259,7 +1259,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1259
1259
|
* @param gltfModel - The glTF model data
|
|
1260
1260
|
* @returns True if the node supports morphing
|
|
1261
1261
|
*/
|
|
1262
|
-
static
|
|
1262
|
+
static $q(node, gltfModel) {
|
|
1263
1263
|
var _a, _b, _c;
|
|
1264
1264
|
const argument = (_b = (_a = gltfModel.asset.extras) == null ? void 0 : _a.rnLoaderOptions) == null ? void 0 : _b.defaultMaterialHelperArgumentArray[0];
|
|
1265
1265
|
if ((argument == null ? void 0 : argument.isMorphing) === false) {
|
|
@@ -1273,10 +1273,10 @@ var ModelConverter = class _ModelConverter {
|
|
|
1273
1273
|
* @param gltfModel - The glTF model data
|
|
1274
1274
|
* @returns Configured light entity
|
|
1275
1275
|
*/
|
|
1276
|
-
static
|
|
1277
|
-
const lightEntity = this.
|
|
1276
|
+
static Zq(engine, light, gltfModel) {
|
|
1277
|
+
const lightEntity = this.xq(engine, gltfModel);
|
|
1278
1278
|
const lightComponent = lightEntity.getComponent(LightComponent);
|
|
1279
|
-
this.
|
|
1279
|
+
this.Cq(lightComponent, light);
|
|
1280
1280
|
if (lightComponent.castShadow) {
|
|
1281
1281
|
attachLightShadowCamera(engine, lightEntity);
|
|
1282
1282
|
}
|
|
@@ -1287,7 +1287,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1287
1287
|
* KHR_lights_punctual has no ambient light type, so ambient lights are stored there.
|
|
1288
1288
|
* @param node - The glTF node
|
|
1289
1289
|
*/
|
|
1290
|
-
static
|
|
1290
|
+
static qq(node) {
|
|
1291
1291
|
var _a;
|
|
1292
1292
|
const rhodoniteExtras = (_a = node.extras) == null ? void 0 : _a.rhodonite;
|
|
1293
1293
|
const ambientLight = rhodoniteExtras == null ? void 0 : rhodoniteExtras.ambientLight;
|
|
@@ -1302,10 +1302,10 @@ var ModelConverter = class _ModelConverter {
|
|
|
1302
1302
|
* @param ambientLight - The ambient light data stored by Gltf2Exporter
|
|
1303
1303
|
* @param gltfModel - The glTF model
|
|
1304
1304
|
*/
|
|
1305
|
-
static
|
|
1306
|
-
const lightEntity = this.
|
|
1305
|
+
static _q(engine, ambientLight, gltfModel) {
|
|
1306
|
+
const lightEntity = this.xq(engine, gltfModel);
|
|
1307
1307
|
const lightComponent = lightEntity.getComponent(LightComponent);
|
|
1308
|
-
this.
|
|
1308
|
+
this.Dq(lightComponent, ambientLight);
|
|
1309
1309
|
return lightEntity;
|
|
1310
1310
|
}
|
|
1311
1311
|
/**
|
|
@@ -1313,7 +1313,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1313
1313
|
* @param lightComponent - The component to configure
|
|
1314
1314
|
* @param ambientLight - The ambient light data
|
|
1315
1315
|
*/
|
|
1316
|
-
static
|
|
1316
|
+
static Dq(lightComponent, ambientLight) {
|
|
1317
1317
|
lightComponent.type = LightType.Ambient;
|
|
1318
1318
|
const color = ambientLight.color;
|
|
1319
1319
|
lightComponent.color = Array.isArray(color) && color.length >= 3 && color.every((c) => Number.isFinite(c)) ? Vector3.fromCopyArray3([color[0], color[1], color[2]]) : Vector3.fromCopyArray3([1, 1, 1]);
|
|
@@ -1325,7 +1325,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1325
1325
|
* @param lightComponent - The component to configure
|
|
1326
1326
|
* @param light - The glTF light data
|
|
1327
1327
|
*/
|
|
1328
|
-
static
|
|
1328
|
+
static Cq(lightComponent, light) {
|
|
1329
1329
|
var _a, _b, _c;
|
|
1330
1330
|
if (light.name != null) {
|
|
1331
1331
|
lightComponent.tryToSetUniqueName(light.name, true);
|
|
@@ -1371,8 +1371,8 @@ var ModelConverter = class _ModelConverter {
|
|
|
1371
1371
|
* @param gltfModel - The glTF model data
|
|
1372
1372
|
* @returns Configured camera entity
|
|
1373
1373
|
*/
|
|
1374
|
-
static
|
|
1375
|
-
const cameraEntity = this.
|
|
1374
|
+
static Yq(engine, camera, gltfModel) {
|
|
1375
|
+
const cameraEntity = this.Jq(engine, gltfModel);
|
|
1376
1376
|
const cameraComponent = cameraEntity.getCamera();
|
|
1377
1377
|
cameraComponent.direction = Vector3.fromCopyArray([0, 0, -1]);
|
|
1378
1378
|
if (gltfModel.asset && gltfModel.asset.LastSaved_ApplicationVendor) {
|
|
@@ -1422,9 +1422,9 @@ var ModelConverter = class _ModelConverter {
|
|
|
1422
1422
|
* @param rnSamplers - Array of Rhodonite samplers
|
|
1423
1423
|
* @returns Configured mesh entity
|
|
1424
1424
|
*/
|
|
1425
|
-
static
|
|
1425
|
+
static Xq(engine, mesh, meshIndex, rnBuffers, gltfModel, rnMaterials, rnTextures, rnSamplers) {
|
|
1426
1426
|
var _a, _b, _c, _d, _e;
|
|
1427
|
-
const meshEntity = this.
|
|
1427
|
+
const meshEntity = this.Iq(engine, gltfModel);
|
|
1428
1428
|
const existingRnMesh = (_a = gltfModel.asset.extras.rnMeshesAtGltMeshIdx[meshIndex]) == null ? void 0 : _a.deref();
|
|
1429
1429
|
let rnPrimitiveMode = PrimitiveMode.Triangles;
|
|
1430
1430
|
const meshComponent = meshEntity.getMesh();
|
|
@@ -1471,13 +1471,13 @@ var ModelConverter = class _ModelConverter {
|
|
|
1471
1471
|
let indicesRnAccessor;
|
|
1472
1472
|
const map = /* @__PURE__ */ new Map();
|
|
1473
1473
|
if ((_e = primitive.extensions) == null ? void 0 : _e.KHR_draco_mesh_compression) {
|
|
1474
|
-
indicesRnAccessor = this.
|
|
1474
|
+
indicesRnAccessor = this.Np(engine, primitive, rnBuffers, gltfModel, map);
|
|
1475
1475
|
if (Is.not.exist(indicesRnAccessor)) {
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
1478
|
} else {
|
|
1479
1479
|
if (Is.exist(primitive.indices)) {
|
|
1480
|
-
indicesRnAccessor = this.
|
|
1480
|
+
indicesRnAccessor = this.pq(engine, primitive.indicesObject, rnBuffers);
|
|
1481
1481
|
}
|
|
1482
1482
|
const rnBufferViewMap = /* @__PURE__ */ new Map();
|
|
1483
1483
|
for (const attributeName in primitive.attributesObjects) {
|
|
@@ -1487,7 +1487,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1487
1487
|
if (Is.exist(rnm2attribute.bufferView)) {
|
|
1488
1488
|
rnBufferView = rnBufferViewMap.get(rnm2attribute.bufferView);
|
|
1489
1489
|
if (Is.not.exist(rnBufferView)) {
|
|
1490
|
-
rnBufferView = this.
|
|
1490
|
+
rnBufferView = this.rq(rnm2attribute.bufferViewObject, rnBuffer);
|
|
1491
1491
|
rnBufferViewMap.set(rnm2attribute.bufferView, rnBufferView);
|
|
1492
1492
|
}
|
|
1493
1493
|
} else {
|
|
@@ -1496,7 +1496,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1496
1496
|
byteStride: 0
|
|
1497
1497
|
}).unwrapForce();
|
|
1498
1498
|
}
|
|
1499
|
-
const attributeRnAccessor = this.
|
|
1499
|
+
const attributeRnAccessor = this.sq(engine, rnm2attribute, rnBufferView);
|
|
1500
1500
|
const joinedString = VertexAttribute.toVertexAttributeSemanticJoinedStringAsGltfStyle(
|
|
1501
1501
|
VertexAttribute.fromString(attributeName)
|
|
1502
1502
|
);
|
|
@@ -1504,7 +1504,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
1506
|
rnPrimitive.setData(map, rnPrimitiveMode, rnMaterial, indicesRnAccessor);
|
|
1507
|
-
this.
|
|
1507
|
+
this.Wq(engine, rnPrimitive, indicesRnAccessor);
|
|
1508
1508
|
if (primitive.targets != null) {
|
|
1509
1509
|
const targets = [];
|
|
1510
1510
|
for (let i2 = 0; i2 < primitive.targetsObjects.length; i2++) {
|
|
@@ -1512,8 +1512,8 @@ var ModelConverter = class _ModelConverter {
|
|
|
1512
1512
|
const targetMap = /* @__PURE__ */ new Map();
|
|
1513
1513
|
for (const attributeName in target) {
|
|
1514
1514
|
const attributeAccessor = target[attributeName];
|
|
1515
|
-
const attributeRnAccessor = this.
|
|
1516
|
-
const attributeRnAccessorInGPUVertexData = this.
|
|
1515
|
+
const attributeRnAccessor = this.pq(engine, attributeAccessor, rnBuffers);
|
|
1516
|
+
const attributeRnAccessorInGPUVertexData = this.ar(
|
|
1517
1517
|
engine,
|
|
1518
1518
|
attributeRnAccessor
|
|
1519
1519
|
);
|
|
@@ -1586,7 +1586,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1586
1586
|
* @param rnLoaderOptions - Loader options
|
|
1587
1587
|
* @returns Configured material or undefined if not VRM 1.0
|
|
1588
1588
|
*/
|
|
1589
|
-
static
|
|
1589
|
+
static br(engine, gltfModel, materialJson, rnLoaderOptions) {
|
|
1590
1590
|
var _a;
|
|
1591
1591
|
const VRMProperties = gltfModel.extensions.VRM;
|
|
1592
1592
|
const VRMC_materials_mtoon = (_a = materialJson.extensions) == null ? void 0 : _a.VRMC_materials_mtoon;
|
|
@@ -1602,13 +1602,13 @@ var ModelConverter = class _ModelConverter {
|
|
|
1602
1602
|
const additionalName = defaultMaterialHelperArgument.additionalName;
|
|
1603
1603
|
const isMorphing = true;
|
|
1604
1604
|
const isSkinning = true;
|
|
1605
|
-
const isLighting = this.
|
|
1605
|
+
const isLighting = this.vq(gltfModel, materialJson);
|
|
1606
1606
|
const useTangentAttribute = true;
|
|
1607
1607
|
const textures = defaultMaterialHelperArgument.textures;
|
|
1608
1608
|
const samplers = defaultMaterialHelperArgument.samplers;
|
|
1609
1609
|
const debugMode = defaultMaterialHelperArgument.debugMode;
|
|
1610
1610
|
const maxInstancesNumber = defaultMaterialHelperArgument.maxInstancesNumber;
|
|
1611
|
-
const makeOutputSrgb = this.
|
|
1611
|
+
const makeOutputSrgb = this.wq(gltfModel);
|
|
1612
1612
|
let renderPassOutline;
|
|
1613
1613
|
if (Is.exist(VRMProperties == null ? void 0 : VRMProperties.rnExtension)) {
|
|
1614
1614
|
const rnExtension = VRMProperties.rnExtension;
|
|
@@ -1754,7 +1754,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1754
1754
|
* @param rnLoaderOptions - Loader options
|
|
1755
1755
|
* @returns Configured material or undefined if not VRM 0.x
|
|
1756
1756
|
*/
|
|
1757
|
-
static
|
|
1757
|
+
static cr(engine, gltfModel, materialJson, rnLoaderOptions) {
|
|
1758
1758
|
const VRMProperties = gltfModel.extensions.VRM;
|
|
1759
1759
|
const materialProperties = materialJson.extras.vrm0xMaterialProperty;
|
|
1760
1760
|
const shaderName = materialProperties.shader;
|
|
@@ -1770,13 +1770,13 @@ var ModelConverter = class _ModelConverter {
|
|
|
1770
1770
|
const additionalName = defaultMaterialHelperArgument.additionalName;
|
|
1771
1771
|
const isMorphing = true;
|
|
1772
1772
|
const isSkinning = true;
|
|
1773
|
-
const isLighting = this.
|
|
1773
|
+
const isLighting = this.vq(gltfModel, materialJson);
|
|
1774
1774
|
const useTangentAttribute = true;
|
|
1775
1775
|
const textures = defaultMaterialHelperArgument.textures;
|
|
1776
1776
|
const samplers = defaultMaterialHelperArgument.samplers;
|
|
1777
1777
|
const debugMode = defaultMaterialHelperArgument.debugMode;
|
|
1778
1778
|
const maxInstancesNumber = defaultMaterialHelperArgument.maxInstancesNumber;
|
|
1779
|
-
const makeOutputSrgb = this.
|
|
1779
|
+
const makeOutputSrgb = this.wq(gltfModel);
|
|
1780
1780
|
let renderPassOutline;
|
|
1781
1781
|
if (Is.exist(VRMProperties == null ? void 0 : VRMProperties.rnExtension)) {
|
|
1782
1782
|
const rnExtension = VRMProperties.rnExtension;
|
|
@@ -1835,7 +1835,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1835
1835
|
* @param materialJson - The material JSON data (optional)
|
|
1836
1836
|
* @returns Generated material
|
|
1837
1837
|
*/
|
|
1838
|
-
static
|
|
1838
|
+
static dr(engine, gltfModel, rnTextures, rnSamplers, materialJson) {
|
|
1839
1839
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
1840
1840
|
const isTranslucent = Is.exist((_a = materialJson == null ? void 0 : materialJson.extensions) == null ? void 0 : _a.KHR_materials_transmission);
|
|
1841
1841
|
if (((_b = gltfModel.asset.extras) == null ? void 0 : _b.rnLoaderOptions) != null) {
|
|
@@ -1846,8 +1846,8 @@ var ModelConverter = class _ModelConverter {
|
|
|
1846
1846
|
return loaderExtension.generateMaterial(materialJson);
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
if (rnLoaderOptions2.
|
|
1850
|
-
const material2 = this.
|
|
1849
|
+
if (rnLoaderOptions2.dq) {
|
|
1850
|
+
const material2 = this.cr(engine, gltfModel, materialJson, rnLoaderOptions2);
|
|
1851
1851
|
if (Is.exist(material2)) {
|
|
1852
1852
|
material2.isTranslucent = isTranslucent;
|
|
1853
1853
|
return material2;
|
|
@@ -1865,7 +1865,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
const isMorphing = true;
|
|
1867
1867
|
const isSkinning = true;
|
|
1868
|
-
const isLighting = this.
|
|
1868
|
+
const isLighting = this.vq(gltfModel, materialJson);
|
|
1869
1869
|
const additionalName = "";
|
|
1870
1870
|
const rnLoaderOptions = (_i = (_h = gltfModel.asset.extras) == null ? void 0 : _h.rnLoaderOptions) != null ? _i : {};
|
|
1871
1871
|
const useNormalTexture = (materialJson == null ? void 0 : materialJson.normalTexture) != null;
|
|
@@ -1894,7 +1894,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1894
1894
|
if (Is.exist(materialJson)) {
|
|
1895
1895
|
if (((_t = materialJson.extensions) == null ? void 0 : _t.VRMC_materials_mtoon) != null) {
|
|
1896
1896
|
const rnLoaderOptions2 = gltfModel.asset.extras.rnLoaderOptions;
|
|
1897
|
-
const material2 = this.
|
|
1897
|
+
const material2 = this.br(engine, gltfModel, materialJson, rnLoaderOptions2);
|
|
1898
1898
|
if (Is.exist(material2)) {
|
|
1899
1899
|
material2.isTranslucent = isTranslucent;
|
|
1900
1900
|
return material2;
|
|
@@ -1920,7 +1920,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1920
1920
|
}
|
|
1921
1921
|
if (Number.parseFloat((_u = gltfModel.asset) == null ? void 0 : _u.version) >= 2) {
|
|
1922
1922
|
const material2 = createPbrUberMaterial(engine, pbrUberMaterialOptions);
|
|
1923
|
-
const makeOutputSrgb = this.
|
|
1923
|
+
const makeOutputSrgb = this.wq(gltfModel);
|
|
1924
1924
|
if (Is.exist(makeOutputSrgb)) {
|
|
1925
1925
|
material2.setParameter("makeOutputSrgb", makeOutputSrgb);
|
|
1926
1926
|
}
|
|
@@ -1942,7 +1942,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1942
1942
|
* @param materialJson - The material JSON data (optional)
|
|
1943
1943
|
* @returns True if lighting should be enabled
|
|
1944
1944
|
*/
|
|
1945
|
-
static
|
|
1945
|
+
static vq(gltfModel, materialJson) {
|
|
1946
1946
|
var _a, _b, _c, _d;
|
|
1947
1947
|
const argument = (_c = (_b = (_a = gltfModel == null ? void 0 : gltfModel.asset) == null ? void 0 : _a.extras) == null ? void 0 : _b.rnLoaderOptions) == null ? void 0 : _c.defaultMaterialHelperArgumentArray[0];
|
|
1948
1948
|
if ((argument == null ? void 0 : argument.isLighting) != null) {
|
|
@@ -1956,7 +1956,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1956
1956
|
* @param primitive - The glTF primitive data
|
|
1957
1957
|
* @returns True if tangent attributes should be used
|
|
1958
1958
|
*/
|
|
1959
|
-
static
|
|
1959
|
+
static gr(gltfModel, primitive) {
|
|
1960
1960
|
var _a, _b, _c;
|
|
1961
1961
|
const tangentCalculationMode = (_c = (_b = (_a = gltfModel == null ? void 0 : gltfModel.asset) == null ? void 0 : _a.extras) == null ? void 0 : _b.rnLoaderOptions) == null ? void 0 : _c.tangentCalculationMode;
|
|
1962
1962
|
switch (tangentCalculationMode) {
|
|
@@ -1979,7 +1979,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
return false;
|
|
1981
1981
|
}
|
|
1982
|
-
static
|
|
1982
|
+
static hr(gltfModel) {
|
|
1983
1983
|
var _a, _b, _c, _d, _e, _f;
|
|
1984
1984
|
const argument = (_c = (_b = (_a = gltfModel == null ? void 0 : gltfModel.asset) == null ? void 0 : _a.extras) == null ? void 0 : _b.rnLoaderOptions) == null ? void 0 : _c.defaultMaterialHelperArgumentArray[0];
|
|
1985
1985
|
if ((argument == null ? void 0 : argument.useNormalTexture) === false) {
|
|
@@ -1987,14 +1987,14 @@ var ModelConverter = class _ModelConverter {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
return ((_f = (_e = (_d = gltfModel == null ? void 0 : gltfModel.asset) == null ? void 0 : _d.extras) == null ? void 0 : _e.rnLoaderOptions) == null ? void 0 : _f.tangentCalculationMode) !== 0;
|
|
1989
1989
|
}
|
|
1990
|
-
static
|
|
1990
|
+
static wq(gltfModel) {
|
|
1991
1991
|
var _a, _b, _c;
|
|
1992
1992
|
const argument = (_c = (_b = (_a = gltfModel == null ? void 0 : gltfModel.asset) == null ? void 0 : _a.extras) == null ? void 0 : _b.rnLoaderOptions) == null ? void 0 : _c.defaultMaterialHelperArgumentArray[0];
|
|
1993
1993
|
return argument == null ? void 0 : argument.makeOutputSrgb;
|
|
1994
1994
|
}
|
|
1995
1995
|
static Bk(engine, gltfModel, rnTextures, rnSamplers, materialJson) {
|
|
1996
1996
|
var _a;
|
|
1997
|
-
const material = this.
|
|
1997
|
+
const material = this.dr(
|
|
1998
1998
|
engine,
|
|
1999
1999
|
gltfModel,
|
|
2000
2000
|
rnTextures,
|
|
@@ -2076,7 +2076,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
if (alphaMode != null) {
|
|
2078
2078
|
material.alphaMode = AlphaMode.fromGlTFString(alphaMode);
|
|
2079
|
-
if (material.alphaMode === AlphaMode.Mask && !((_e = (_d = gltfModel.asset.extras) == null ? void 0 : _d.rnLoaderOptions) == null ? void 0 : _e.
|
|
2079
|
+
if (material.alphaMode === AlphaMode.Mask && !((_e = (_d = gltfModel.asset.extras) == null ? void 0 : _d.rnLoaderOptions) == null ? void 0 : _e.dq)) {
|
|
2080
2080
|
material.setParameter("alphaCutoff", Scalar.fromCopyNumber((_f = materialJson.alphaCutoff) != null ? _f : 0.5));
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
@@ -2163,7 +2163,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2163
2163
|
static getRaymarchingMaterialTextureAssignments(gltfModel) {
|
|
2164
2164
|
var _a;
|
|
2165
2165
|
const extension = (_a = gltfModel.extensions) == null ? void 0 : _a.RHODONITE_raymarching_materials;
|
|
2166
|
-
return this.
|
|
2166
|
+
return this.Eq(gltfModel, extension == null ? void 0 : extension.textures);
|
|
2167
2167
|
}
|
|
2168
2168
|
/**
|
|
2169
2169
|
* Parses the per-component texture assignments stored in the `RHODONITE_raymarching` node
|
|
@@ -2182,7 +2182,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2182
2182
|
const nodes = (_a = gltfModel.nodes) != null ? _a : [];
|
|
2183
2183
|
for (let nodeIndex = 0; nodeIndex < nodes.length; nodeIndex++) {
|
|
2184
2184
|
const extension = (_b = nodes[nodeIndex].extensions) == null ? void 0 : _b.RHODONITE_raymarching;
|
|
2185
|
-
for (const assignment of this.
|
|
2185
|
+
for (const assignment of this.Eq(gltfModel, extension == null ? void 0 : extension.textures)) {
|
|
2186
2186
|
result.push({ nodeIndex, ...assignment });
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
@@ -2194,7 +2194,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2194
2194
|
* @param gltfModel - The imported glTF model
|
|
2195
2195
|
* @param textures - The extension's texture map
|
|
2196
2196
|
*/
|
|
2197
|
-
static
|
|
2197
|
+
static Eq(gltfModel, textures) {
|
|
2198
2198
|
var _a, _b, _c;
|
|
2199
2199
|
if (textures == null || typeof textures !== "object") {
|
|
2200
2200
|
return [];
|
|
@@ -2233,7 +2233,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2233
2233
|
const result = /* @__PURE__ */ new Map();
|
|
2234
2234
|
const assignments = this.getRaymarchingMaterialTextureAssignments(gltfModel);
|
|
2235
2235
|
for (const { semantic, textureIndex, samplerIndex } of assignments) {
|
|
2236
|
-
const created = await this.
|
|
2236
|
+
const created = await this.Fq(engine, gltfModel, textureIndex, samplerIndex);
|
|
2237
2237
|
if (created != null) {
|
|
2238
2238
|
result.set(semantic, created);
|
|
2239
2239
|
}
|
|
@@ -2256,7 +2256,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2256
2256
|
const result = /* @__PURE__ */ new Map();
|
|
2257
2257
|
const assignments = this.getRaymarchingComponentTextureAssignments(gltfModel);
|
|
2258
2258
|
for (const { nodeIndex, semantic, textureIndex, samplerIndex } of assignments) {
|
|
2259
|
-
const created = await this.
|
|
2259
|
+
const created = await this.Fq(engine, gltfModel, textureIndex, samplerIndex);
|
|
2260
2260
|
if (created == null) {
|
|
2261
2261
|
continue;
|
|
2262
2262
|
}
|
|
@@ -2278,7 +2278,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2278
2278
|
* @param samplerIndex - The glTF sampler index of the texture
|
|
2279
2279
|
* @returns The created texture and sampler, or null when creation fails
|
|
2280
2280
|
*/
|
|
2281
|
-
static async
|
|
2281
|
+
static async Fq(engine, gltfModel, textureIndex, samplerIndex) {
|
|
2282
2282
|
var _a;
|
|
2283
2283
|
try {
|
|
2284
2284
|
const gltfTexture = gltfModel.textures[textureIndex];
|
|
@@ -2296,13 +2296,13 @@ var ModelConverter = class _ModelConverter {
|
|
|
2296
2296
|
return null;
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
2299
|
-
static
|
|
2299
|
+
static ir(textureOption) {
|
|
2300
2300
|
if (textureOption.wrapS !== TextureParameter.ClampToEdge || textureOption.wrapT !== TextureParameter.ClampToEdge || textureOption.minFilter !== TextureParameter.Linear && textureOption.minFilter !== TextureParameter.Nearest) {
|
|
2301
2301
|
return true;
|
|
2302
2302
|
}
|
|
2303
2303
|
return false;
|
|
2304
2304
|
}
|
|
2305
|
-
static
|
|
2305
|
+
static jr(image) {
|
|
2306
2306
|
const width = image.width;
|
|
2307
2307
|
const height = image.height;
|
|
2308
2308
|
if ((width & width - 1) === 0 && (height & height - 1) === 0) {
|
|
@@ -2310,7 +2310,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2310
2310
|
}
|
|
2311
2311
|
return false;
|
|
2312
2312
|
}
|
|
2313
|
-
static
|
|
2313
|
+
static kr(materialJson, _materialTypeName) {
|
|
2314
2314
|
if (materialJson == null) return false;
|
|
2315
2315
|
return true;
|
|
2316
2316
|
}
|
|
@@ -2321,7 +2321,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2321
2321
|
}
|
|
2322
2322
|
return false;
|
|
2323
2323
|
}
|
|
2324
|
-
static
|
|
2324
|
+
static oq(typedArrayClass, uint8Array, byteOffset, length) {
|
|
2325
2325
|
return new typedArrayClass(uint8Array.buffer, byteOffset + uint8Array.byteOffset, length);
|
|
2326
2326
|
}
|
|
2327
2327
|
static _checkBytesPerComponent(accessor) {
|
|
@@ -2429,8 +2429,8 @@ var ModelConverter = class _ModelConverter {
|
|
|
2429
2429
|
const byteLength = componentBytes * componentN * accessor.count;
|
|
2430
2430
|
if (Is.exist(rnBuffers)) {
|
|
2431
2431
|
const rnBuffer = rnBuffers[accessor.bufferViewObject.buffer];
|
|
2432
|
-
const rnBufferView = this.
|
|
2433
|
-
const rnAccessor = this.
|
|
2432
|
+
const rnBufferView = this.rq(bufferView, rnBuffer);
|
|
2433
|
+
const rnAccessor = this.sq(engine, accessor, rnBufferView);
|
|
2434
2434
|
uint8Array = rnAccessor.getUint8Array();
|
|
2435
2435
|
byteOffsetFromBuffer = 0;
|
|
2436
2436
|
}
|
|
@@ -2439,7 +2439,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2439
2439
|
if (_ModelConverter._isSystemLittleEndian()) {
|
|
2440
2440
|
let typedDataArray = new Float32Array();
|
|
2441
2441
|
if (dataViewMethod === "getFloat32") {
|
|
2442
|
-
typedDataArray = this.
|
|
2442
|
+
typedDataArray = this.oq(
|
|
2443
2443
|
Float32Array,
|
|
2444
2444
|
uint8Array,
|
|
2445
2445
|
byteOffsetFromBuffer,
|
|
@@ -2458,35 +2458,35 @@ var ModelConverter = class _ModelConverter {
|
|
|
2458
2458
|
byteLength / componentBytes
|
|
2459
2459
|
);
|
|
2460
2460
|
} else if (dataViewMethod === "getInt16") {
|
|
2461
|
-
typedDataArray = this.
|
|
2461
|
+
typedDataArray = this.oq(
|
|
2462
2462
|
Int16Array,
|
|
2463
2463
|
uint8Array,
|
|
2464
2464
|
byteOffsetFromBuffer,
|
|
2465
2465
|
byteLength / componentBytes
|
|
2466
2466
|
);
|
|
2467
2467
|
} else if (dataViewMethod === "getUint16") {
|
|
2468
|
-
typedDataArray = this.
|
|
2468
|
+
typedDataArray = this.oq(
|
|
2469
2469
|
Uint16Array,
|
|
2470
2470
|
uint8Array,
|
|
2471
2471
|
byteOffsetFromBuffer,
|
|
2472
2472
|
byteLength / componentBytes
|
|
2473
2473
|
);
|
|
2474
2474
|
} else if (dataViewMethod === "getInt32") {
|
|
2475
|
-
typedDataArray = this.
|
|
2475
|
+
typedDataArray = this.oq(
|
|
2476
2476
|
Int32Array,
|
|
2477
2477
|
uint8Array,
|
|
2478
2478
|
byteOffsetFromBuffer,
|
|
2479
2479
|
byteLength / componentBytes
|
|
2480
2480
|
);
|
|
2481
2481
|
} else if (dataViewMethod === "getUint32") {
|
|
2482
|
-
typedDataArray = this.
|
|
2482
|
+
typedDataArray = this.oq(
|
|
2483
2483
|
Uint32Array,
|
|
2484
2484
|
uint8Array,
|
|
2485
2485
|
byteOffsetFromBuffer,
|
|
2486
2486
|
byteLength / componentBytes
|
|
2487
2487
|
);
|
|
2488
2488
|
}
|
|
2489
|
-
float32Array = this.
|
|
2489
|
+
float32Array = this.Gq(dataViewMethod, typedDataArray);
|
|
2490
2490
|
} else {
|
|
2491
2491
|
const dataView = new DataView(uint8Array.buffer, byteOffsetFromBuffer + uint8Array.byteOffset, byteLength);
|
|
2492
2492
|
const byteDelta = componentBytes * componentN;
|
|
@@ -2517,7 +2517,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2517
2517
|
break;
|
|
2518
2518
|
}
|
|
2519
2519
|
}
|
|
2520
|
-
float32Array = this.
|
|
2520
|
+
float32Array = this.Gq(dataViewMethod, numberArray);
|
|
2521
2521
|
}
|
|
2522
2522
|
accessor.extras.typedDataArray = float32Array;
|
|
2523
2523
|
return float32Array;
|
|
@@ -2529,7 +2529,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2529
2529
|
* @param numberArray
|
|
2530
2530
|
* @returns
|
|
2531
2531
|
*/
|
|
2532
|
-
static
|
|
2532
|
+
static Gq(dataViewMethod, numberArray) {
|
|
2533
2533
|
if (dataViewMethod === "getInt8") {
|
|
2534
2534
|
return DataUtil.normalizedInt8ArrayToFloat32Array(numberArray);
|
|
2535
2535
|
}
|
|
@@ -2556,7 +2556,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2556
2556
|
Logger.default.error("Not considered");
|
|
2557
2557
|
return new Float32Array();
|
|
2558
2558
|
}
|
|
2559
|
-
static
|
|
2559
|
+
static lr(meshComponent) {
|
|
2560
2560
|
const primitiveNumber = meshComponent.mesh.getPrimitiveNumber();
|
|
2561
2561
|
let offsetSum = 0;
|
|
2562
2562
|
for (let i = 0; i < primitiveNumber; i++) {
|
|
@@ -2579,7 +2579,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2579
2579
|
* @param rnBuffer
|
|
2580
2580
|
* @returns
|
|
2581
2581
|
*/
|
|
2582
|
-
static
|
|
2582
|
+
static sq(engine, accessor, rnBufferView) {
|
|
2583
2583
|
var _a;
|
|
2584
2584
|
let rnAccessor;
|
|
2585
2585
|
if (rnBufferView != null) {
|
|
@@ -2623,17 +2623,17 @@ var ModelConverter = class _ModelConverter {
|
|
|
2623
2623
|
* @param rnBuffer
|
|
2624
2624
|
* @returns
|
|
2625
2625
|
*/
|
|
2626
|
-
static
|
|
2626
|
+
static pq(engine, accessor, rnBuffers) {
|
|
2627
2627
|
const gltfBufferView = accessor.bufferViewObject;
|
|
2628
2628
|
let rnBufferView;
|
|
2629
2629
|
if (gltfBufferView != null) {
|
|
2630
2630
|
const rnBuffer = rnBuffers[gltfBufferView.buffer];
|
|
2631
|
-
rnBufferView = this.
|
|
2631
|
+
rnBufferView = this.rq(gltfBufferView, rnBuffer);
|
|
2632
2632
|
}
|
|
2633
|
-
const rnAccessor = this.
|
|
2633
|
+
const rnAccessor = this.sq(engine, accessor, rnBufferView);
|
|
2634
2634
|
return rnAccessor;
|
|
2635
2635
|
}
|
|
2636
|
-
static
|
|
2636
|
+
static ar(engine, srcRnAccessor) {
|
|
2637
2637
|
const byteSize = srcRnAccessor.elementCount * 3 * 4;
|
|
2638
2638
|
const dstRnBuffer = engine.memoryManager.createBufferOnDemand(BufferUse.GPUVertexData, byteSize, 16);
|
|
2639
2639
|
const dstRnBufferView = dstRnBuffer.takeBufferView({
|
|
@@ -2651,15 +2651,15 @@ var ModelConverter = class _ModelConverter {
|
|
|
2651
2651
|
dstRnAccessor.copyBuffer(srcRnAccessor);
|
|
2652
2652
|
return dstRnAccessor;
|
|
2653
2653
|
}
|
|
2654
|
-
static
|
|
2654
|
+
static Hq(engine, accessor, compositionNum, rnBuffer) {
|
|
2655
2655
|
const rnBufferView = rnBuffer.takeBufferView({
|
|
2656
2656
|
byteLengthToNeed: accessor.count * compositionNum * 4,
|
|
2657
2657
|
byteStride: 0
|
|
2658
2658
|
}).unwrapForce();
|
|
2659
|
-
const rnAccessor = this.
|
|
2659
|
+
const rnAccessor = this.sq(engine, accessor, rnBufferView);
|
|
2660
2660
|
return rnAccessor;
|
|
2661
2661
|
}
|
|
2662
|
-
static
|
|
2662
|
+
static rq(rnm2bufferView, rnBuffer) {
|
|
2663
2663
|
var _a, _b;
|
|
2664
2664
|
const rnBufferView = rnBuffer.takeBufferViewWithByteOffset({
|
|
2665
2665
|
byteLengthToNeed: rnm2bufferView.byteLength,
|
|
@@ -2668,7 +2668,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2668
2668
|
}).unwrapForce();
|
|
2669
2669
|
return rnBufferView;
|
|
2670
2670
|
}
|
|
2671
|
-
static
|
|
2671
|
+
static Op(draco, decoder, arrayBuffer) {
|
|
2672
2672
|
const buffer = new draco.DecoderBuffer();
|
|
2673
2673
|
buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);
|
|
2674
2674
|
const geometryType = decoder.GetEncodedGeometryType(buffer);
|
|
@@ -2696,7 +2696,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2696
2696
|
draco.destroy(buffer);
|
|
2697
2697
|
return dracoGeometry;
|
|
2698
2698
|
}
|
|
2699
|
-
static
|
|
2699
|
+
static er(draco, decoder, dracoGeometry, triangleStripDrawMode) {
|
|
2700
2700
|
const geometryType = dracoGeometry.geometryType;
|
|
2701
2701
|
if (geometryType !== draco.TRIANGULAR_MESH) {
|
|
2702
2702
|
return void 0;
|
|
@@ -2726,28 +2726,28 @@ var ModelConverter = class _ModelConverter {
|
|
|
2726
2726
|
}
|
|
2727
2727
|
return indices;
|
|
2728
2728
|
}
|
|
2729
|
-
static
|
|
2729
|
+
static Np(engine, primitive, rnBuffers, gltfModel, map) {
|
|
2730
2730
|
var _a, _b;
|
|
2731
2731
|
const bufferView = gltfModel.bufferViews[(_a = primitive.extensions) == null ? void 0 : _a.KHR_draco_mesh_compression.bufferView];
|
|
2732
|
-
const rnBufferView = this.
|
|
2732
|
+
const rnBufferView = this.rq(bufferView, rnBuffers[bufferView.buffer]);
|
|
2733
2733
|
const arraybufferOfBufferView = new Uint8Array(rnBufferView.getUint8Array()).buffer;
|
|
2734
2734
|
const draco = new DracoDecoderModule();
|
|
2735
2735
|
const decoder = new draco.Decoder();
|
|
2736
|
-
const dracoGeometry = this.
|
|
2736
|
+
const dracoGeometry = this.Op(draco, decoder, arraybufferOfBufferView);
|
|
2737
2737
|
if (dracoGeometry == null) {
|
|
2738
2738
|
draco.destroy(dracoGeometry);
|
|
2739
2739
|
draco.destroy(decoder);
|
|
2740
2740
|
return void 0;
|
|
2741
2741
|
}
|
|
2742
2742
|
const numPoints = dracoGeometry.num_points();
|
|
2743
|
-
const rnBufferForDraco = this.
|
|
2743
|
+
const rnBufferForDraco = this.fr(primitive, numPoints);
|
|
2744
2744
|
const primitiveMode = PrimitiveMode.from(primitive.mode);
|
|
2745
2745
|
let isTriangleStrip = false;
|
|
2746
2746
|
if (primitiveMode === PrimitiveMode.TriangleStrip) {
|
|
2747
2747
|
isTriangleStrip = true;
|
|
2748
2748
|
}
|
|
2749
|
-
const indices = this.
|
|
2750
|
-
const indicesRnAccessor = this.
|
|
2749
|
+
const indices = this.er(draco, decoder, dracoGeometry, isTriangleStrip);
|
|
2750
|
+
const indicesRnAccessor = this.Hq(
|
|
2751
2751
|
engine,
|
|
2752
2752
|
primitive.indicesObject,
|
|
2753
2753
|
1,
|
|
@@ -2761,10 +2761,10 @@ var ModelConverter = class _ModelConverter {
|
|
|
2761
2761
|
const attributeGltf2Accessor = primitive.attributesObjects[attributeName];
|
|
2762
2762
|
let attributeRnAccessor;
|
|
2763
2763
|
if (Is.not.exist(dracoAttributeId)) {
|
|
2764
|
-
attributeRnAccessor = this.
|
|
2764
|
+
attributeRnAccessor = this.pq(engine, attributeGltf2Accessor, rnBuffers);
|
|
2765
2765
|
} else {
|
|
2766
2766
|
const compositionNum = CompositionType.fromString(attributeGltf2Accessor.type).getNumberOfComponents();
|
|
2767
|
-
attributeRnAccessor = this.
|
|
2767
|
+
attributeRnAccessor = this.Hq(
|
|
2768
2768
|
engine,
|
|
2769
2769
|
attributeGltf2Accessor,
|
|
2770
2770
|
compositionNum,
|
|
@@ -2839,7 +2839,7 @@ var ModelConverter = class _ModelConverter {
|
|
|
2839
2839
|
rnMaterial.setParameter(textureTransformRotationShaderSemantic, rotation);
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
|
-
static
|
|
2842
|
+
static fr(primitive, numPoints) {
|
|
2843
2843
|
var _a;
|
|
2844
2844
|
let byteLengthOfBufferForDraco = 0;
|
|
2845
2845
|
if (Is.exist(primitive.indices)) {
|