rhodonite 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION-FILE +1 -1
- package/dist/esm/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esm/foundation/core/MemoryManager.js +2 -2
- package/dist/esm/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esm/foundation/definitions/ShaderSemantics.js +2 -2
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
- package/dist/esm/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +1 -1
- package/dist/esm/foundation/helpers/materials/nodeBasedMaterialCommon.js +1 -1
- package/dist/esm/foundation/importer/DrcPointCloudImporter.js +1 -1
- package/dist/esm/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esm/foundation/importer/Gltf2Importer.js +1 -1
- package/dist/esm/foundation/importer/GltfImporter.js +1 -1
- package/dist/esm/foundation/importer/RhodoniteImportExtension.js +1 -1
- package/dist/esm/foundation/importer/Vrm0xImporter.js +1 -1
- package/dist/esm/foundation/importer/VrmImporter.js +1 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +11 -11
- package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +6 -6
- package/dist/esm/foundation/materials/core/AbstractMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esm/foundation/materials/core/Material.js +1 -1
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGL.js +2 -2
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGPU.js +2 -2
- package/dist/esm/foundation/memory/Accessor.js +6 -6
- package/dist/esm/foundation/memory/BufferView.js +1 -1
- package/dist/esm/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esm/foundation/misc/PngDecoder.js +1 -0
- package/dist/esm/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esm/foundation/renderer/RenderPass.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +2 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
- package/dist/esm/foundation/system/Engine.js +1 -1
- package/dist/esm/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esm/foundation/textures/CubeTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/webgl/MultiDraw.js +1 -1
- package/dist/esm/webgl/MultiDrawRepository.js +1 -1
- package/dist/esm/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esm/webgl/WebGLResourceRepository.js +3 -3
- package/dist/esm/webgl/WebGLStereoUtil.js +1 -1
- package/dist/esm/webgl/WebGLStrategyWebGL2.d.ts +19 -14
- package/dist/esm/webgl/WebGLStrategyWebGL2.js +67 -67
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -1
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +1 -0
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -0
- package/dist/esm/webgl/shaderity_shaders/common/iblDefinition.glsl.js +11 -5
- package/dist/esm/webgl/shaders/nodes/BlockBeginShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/BlockEndShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.js +5 -5
- package/dist/esm/webgl/shaders/nodes/RaymarchObjectIdUniform.js +3 -3
- package/dist/esm/webgl/shaders/nodes/SdApplyWorldMatrix.js +3 -3
- package/dist/esm/webgl/shaders/nodes/Texture2DShader.js +14 -14
- package/dist/esm/webgl/shaders/nodes/UniformDataShader.js +13 -13
- package/dist/esm/webgpu/GpuCullingRegistry.js +1 -1
- package/dist/esm/webgpu/GpuDeformRegistry.js +1 -1
- package/dist/esm/webgpu/WebGpuGpuTimer.js +1 -1
- package/dist/esm/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esm/webgpu/WebGpuResourceRepository.js +5 -5
- package/dist/esm/webgpu/WebGpuStrategyBasic.js +2 -2
- package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +1 -0
- package/dist/esm/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +10 -4
- package/dist/esmdev/foundation/core/MemoryManager.d.ts +19 -0
- package/dist/esmdev/foundation/core/MemoryManager.js +28 -3
- package/dist/esmdev/foundation/core/RnObject.js +37 -37
- package/dist/esmdev/foundation/definitions/Blend.js +3 -3
- package/dist/esmdev/foundation/definitions/ComponentType.js +7 -7
- package/dist/esmdev/foundation/definitions/CompositionType.js +50 -50
- package/dist/esmdev/foundation/definitions/CompressionTextureType.js +6 -6
- package/dist/esmdev/foundation/definitions/ShaderSemantics.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ShaderSemantics.js +12 -7
- package/dist/esmdev/foundation/definitions/TextureFormat.js +3 -3
- package/dist/esmdev/foundation/definitions/TextureParameter.js +3 -3
- package/dist/esmdev/foundation/definitions/VertexAttribute.js +30 -30
- package/dist/esmdev/foundation/enhanced_js_objects/Array.js +2 -2
- package/dist/esmdev/foundation/exporter/Gltf2Exporter.js +106 -106
- package/dist/esmdev/foundation/geometry/ComplexVertexAttribute.js +18 -18
- package/dist/esmdev/foundation/geometry/Frustum.js +39 -39
- package/dist/esmdev/foundation/geometry/Mesh.js +205 -205
- package/dist/esmdev/foundation/geometry/Primitive.js +124 -124
- package/dist/esmdev/foundation/geometry/SimpleVertexAttribute.js +7 -7
- package/dist/esmdev/foundation/geometry/shapes/Cylinder.js +3 -3
- package/dist/esmdev/foundation/geometry/shapes/Joint.js +33 -33
- package/dist/esmdev/foundation/gizmos/AABBGizmo.js +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 +35 -35
- package/dist/esmdev/foundation/gizmos/LightGizmo.js +23 -23
- package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +22 -22
- package/dist/esmdev/foundation/gizmos/RotationGizmo.js +197 -197
- package/dist/esmdev/foundation/gizmos/ScaleGizmo.js +129 -129
- 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 +28 -28
- package/dist/esmdev/foundation/helpers/GaussianBlurHelper.js +18 -18
- package/dist/esmdev/foundation/helpers/Shadow/PointShadowMap.js +11 -11
- package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +5 -5
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +111 -111
- package/dist/esmdev/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +10 -1
- package/dist/esmdev/foundation/helpers/materials/nodeBasedMaterialCommon.js +11 -1
- package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
- package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +27 -27
- package/dist/esmdev/foundation/importer/Gltf2Importer.d.ts +2 -1
- package/dist/esmdev/foundation/importer/Gltf2Importer.js +21 -17
- package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
- package/dist/esmdev/foundation/importer/ModelConverter.js +131 -131
- package/dist/esmdev/foundation/importer/RhodoniteImportExtension.js +6 -6
- package/dist/esmdev/foundation/importer/Vrm0xImporter.js +48 -48
- package/dist/esmdev/foundation/importer/VrmImporter.js +10 -10
- package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.js +37 -28
- package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +2 -2
- package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +145 -137
- package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +27 -19
- package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +5 -5
- package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +4 -4
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +47 -47
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +25 -25
- package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
- package/dist/esmdev/foundation/materials/core/Material.d.ts +7 -2
- package/dist/esmdev/foundation/materials/core/Material.js +113 -99
- package/dist/esmdev/foundation/materials/core/MaterialRepository.js +51 -51
- package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +38 -38
- package/dist/esmdev/foundation/materials/core/ShaderHandler.js +4 -4
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +14 -14
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/AlphaTestShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/AndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/Atan2ShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributePositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeTexcoordShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/BlockBeginShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/BlockEndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/BranchShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/ClassicShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/ConstantScalarVariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVariableShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ConstantVector2VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector3VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector4VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +19 -19
- package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/OrShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/OutColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/OutPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +8 -8
- package/dist/esmdev/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrNormalPropsShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrShaderShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/PbrSheenPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrVolumePropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/ProcessGeometryShaderNode.js +22 -22
- package/dist/esmdev/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/Random_HashPRNGShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/Texture2DShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/UniformDataShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/WireframeMaterialNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutShadingColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +15 -15
- 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 +120 -120
- package/dist/esmdev/foundation/math/AnimatedQuaternion.js +53 -53
- package/dist/esmdev/foundation/math/AnimatedScalar.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedValueEvaluationState.js +18 -18
- package/dist/esmdev/foundation/math/AnimatedVector2.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedVector3.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedVector4.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedVectorN.js +54 -54
- 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 +3 -3
- package/dist/esmdev/foundation/math/Quaternion.js +13 -13
- package/dist/esmdev/foundation/math/Transform3D.js +72 -72
- package/dist/esmdev/foundation/math/shapes/MathSphere.js +7 -7
- package/dist/esmdev/foundation/memory/Accessor.js +369 -369
- package/dist/esmdev/foundation/memory/Buffer.js +39 -39
- package/dist/esmdev/foundation/memory/BufferView.js +29 -29
- package/dist/esmdev/foundation/misc/DataUtil.js +2 -2
- package/dist/esmdev/foundation/misc/EnumIO.js +8 -8
- package/dist/esmdev/foundation/misc/Logger.js +14 -14
- package/dist/esmdev/foundation/misc/PngDecoder.d.ts +18 -0
- package/dist/esmdev/foundation/misc/PngDecoder.js +113 -0
- package/dist/esmdev/foundation/misc/RnPromise.js +14 -14
- package/dist/esmdev/foundation/misc/Time.js +23 -23
- 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 +186 -186
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +221 -221
- 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 +39 -39
- package/dist/esmdev/foundation/renderer/Expression.js +6 -6
- package/dist/esmdev/foundation/renderer/Frame.js +6 -6
- package/dist/esmdev/foundation/renderer/FrameBuffer.js +25 -25
- package/dist/esmdev/foundation/renderer/RenderPass.d.ts +7 -0
- package/dist/esmdev/foundation/renderer/RenderPass.js +94 -86
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +6 -6
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +75 -75
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +146 -146
- 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 +2 -1
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +420 -420
- package/dist/esmdev/foundation/system/Engine.js +209 -209
- 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/AbstractTexture.js +48 -48
- package/dist/esmdev/foundation/textures/CubeTexture.d.ts +11 -2
- package/dist/esmdev/foundation/textures/CubeTexture.js +47 -36
- package/dist/esmdev/foundation/textures/RenderBuffer.js +11 -11
- package/dist/esmdev/foundation/textures/RenderTargetTexture.js +24 -24
- package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.js +35 -35
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.d.ts +6 -0
- package/dist/esmdev/foundation/textures/RenderTargetTextureCube.js +25 -19
- package/dist/esmdev/foundation/textures/Sampler.js +24 -24
- package/dist/esmdev/foundation/textures/Texture.js +83 -83
- package/dist/esmdev/foundation/textures/TextureArray.js +8 -8
- package/dist/esmdev/foundation/textures/TextureDataFloat.js +26 -26
- package/dist/esmdev/foundation/textures/VideoTexture.js +24 -24
- package/dist/esmdev/version.js +2 -2
- package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
- package/dist/esmdev/webgl/MultiDraw.js +2 -2
- package/dist/esmdev/webgl/MultiDrawRepository.js +30 -30
- package/dist/esmdev/webgl/WebGLContextWrapper.js +146 -146
- package/dist/esmdev/webgl/WebGLGpuTimer.js +30 -30
- package/dist/esmdev/webgl/WebGLResourceRepository.d.ts +5 -0
- package/dist/esmdev/webgl/WebGLResourceRepository.js +368 -307
- package/dist/esmdev/webgl/WebGLStereoUtil.js +39 -39
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.d.ts +19 -14
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +294 -280
- package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +4 -4
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/iblDefinition.glsl.js +2 -2
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +4 -4
- package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +14 -14
- package/dist/esmdev/webgl/shaders/StandardShaderPart.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/BlockBeginShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/BlockEndShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +21 -21
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +23 -23
- package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +23 -23
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +24 -24
- 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/WebGpuBufferArena.js +21 -21
- package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
- package/dist/esmdev/webgpu/WebGpuGpuCulling.js +198 -198
- package/dist/esmdev/webgpu/WebGpuGpuTimer.js +51 -51
- package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +36 -36
- package/dist/esmdev/webgpu/WebGpuResourceRepository.d.ts +6 -0
- package/dist/esmdev/webgpu/WebGpuResourceRepository.js +655 -593
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +123 -123
- package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +128 -128
- package/dist/esmdev/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +2 -2
- package/dist/esmdev/xr/WebARSystem.js +69 -69
- package/dist/esmdev/xr/WebXRSystem.js +151 -151
- package/package.json +2 -1
|
@@ -16,16 +16,16 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
16
16
|
constructor(animationSamplers, activeAnimationTrackName) {
|
|
17
17
|
super(new Float32Array(4));
|
|
18
18
|
this.pc = 0;
|
|
19
|
-
this.
|
|
19
|
+
this.vt = new AnimatedValueEvaluationState();
|
|
20
20
|
this.isLoop = true;
|
|
21
|
-
this.
|
|
22
|
-
this.yt = activeAnimationTrackName;
|
|
21
|
+
this.wt = animationSamplers;
|
|
23
22
|
this.zt = activeAnimationTrackName;
|
|
24
|
-
|
|
23
|
+
this.At = activeAnimationTrackName;
|
|
24
|
+
const animationSampler = this.wt.get(this.zt);
|
|
25
25
|
if (animationSampler === void 0) {
|
|
26
26
|
throw new Error("Animation channel not found");
|
|
27
27
|
}
|
|
28
|
-
this.
|
|
28
|
+
this.yt = animationSampler;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Returns the vector components as a regular JavaScript array.
|
|
@@ -39,13 +39,13 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
39
39
|
* Drops the memoized interpolation result. Call this after mutating sampler data directly.
|
|
40
40
|
*/
|
|
41
41
|
invalidateAnimationCache() {
|
|
42
|
-
this.
|
|
42
|
+
this.vt.invalidate();
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Number of actual interpolations performed. Intended for tests and benchmarks.
|
|
46
46
|
*/
|
|
47
47
|
getEvaluationCount() {
|
|
48
|
-
return this.
|
|
48
|
+
return this.vt.evaluationCount;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Gets the internal value array without allocating a copy. Do not mutate the returned array.
|
|
@@ -57,7 +57,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
57
57
|
* Sets the time and blending ratio and evaluates the value at most once.
|
|
58
58
|
*/
|
|
59
59
|
setTimeAndBlendingRatio(time, blendingRatio) {
|
|
60
|
-
this.
|
|
60
|
+
this.Dt = time;
|
|
61
61
|
this.pc = blendingRatio;
|
|
62
62
|
this.update();
|
|
63
63
|
}
|
|
@@ -71,7 +71,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
this._v = array;
|
|
74
|
-
this.
|
|
74
|
+
this.vt.invalidate();
|
|
75
75
|
this.update();
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
@@ -80,7 +80,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
80
80
|
* @param time - The time value in seconds
|
|
81
81
|
*/
|
|
82
82
|
setTime(time) {
|
|
83
|
-
this.
|
|
83
|
+
this.Dt = time;
|
|
84
84
|
this.update();
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -88,7 +88,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
88
88
|
* This removes any previously set custom time.
|
|
89
89
|
*/
|
|
90
90
|
useGlobalTime() {
|
|
91
|
-
this.
|
|
91
|
+
this.Dt = void 0;
|
|
92
92
|
this.update();
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
@@ -155,49 +155,49 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
155
155
|
*/
|
|
156
156
|
update() {
|
|
157
157
|
var _a;
|
|
158
|
-
let time = (_a = this.
|
|
158
|
+
let time = (_a = this.Dt) != null ? _a : 0;
|
|
159
159
|
if (this.isLoop) {
|
|
160
|
-
let duration = this.
|
|
161
|
-
if (this.
|
|
160
|
+
let duration = this.yt.input[this.yt.input.length - 1];
|
|
161
|
+
if (this.xt !== void 0) {
|
|
162
162
|
duration = Math.min(
|
|
163
163
|
duration,
|
|
164
|
-
this.
|
|
164
|
+
this.xt.input[this.xt.input.length - 1]
|
|
165
165
|
);
|
|
166
166
|
}
|
|
167
167
|
time = time % duration;
|
|
168
168
|
}
|
|
169
|
-
const hasSecondSampler = this.
|
|
170
|
-
if (!this.
|
|
169
|
+
const hasSecondSampler = this.xt !== void 0;
|
|
170
|
+
if (!this.vt.shouldEvaluate(time, this.pc, hasSecondSampler)) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
if (this.
|
|
173
|
+
if (this.xt === void 0) {
|
|
174
174
|
__interpolateTo(
|
|
175
|
-
this.
|
|
175
|
+
this.yt,
|
|
176
176
|
time,
|
|
177
177
|
AnimationAttribute.Vector4.index,
|
|
178
178
|
this._v,
|
|
179
|
-
this.
|
|
179
|
+
this.vt.firstCursor
|
|
180
180
|
);
|
|
181
181
|
} else {
|
|
182
|
-
const evaluation = this.
|
|
182
|
+
const evaluation = this.vt;
|
|
183
183
|
evaluation.ensureScratch(
|
|
184
184
|
Math.max(
|
|
185
185
|
this._v.length,
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
186
|
+
this.yt.outputComponentN,
|
|
187
|
+
this.xt.outputComponentN
|
|
188
188
|
)
|
|
189
189
|
);
|
|
190
190
|
const firstValue = evaluation.scratchFirst;
|
|
191
191
|
const secondValue = evaluation.scratchSecond;
|
|
192
192
|
__interpolateTo(
|
|
193
|
-
this.
|
|
193
|
+
this.yt,
|
|
194
194
|
time,
|
|
195
195
|
AnimationAttribute.Vector4.index,
|
|
196
196
|
firstValue,
|
|
197
197
|
evaluation.firstCursor
|
|
198
198
|
);
|
|
199
199
|
__interpolateTo(
|
|
200
|
-
this.
|
|
200
|
+
this.xt,
|
|
201
201
|
time,
|
|
202
202
|
AnimationAttribute.Vector4.index,
|
|
203
203
|
secondValue,
|
|
@@ -208,7 +208,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
208
208
|
this._v[2] = firstValue[2] * (1 - this.blendingRatio) + secondValue[2] * this.blendingRatio;
|
|
209
209
|
this._v[3] = firstValue[3] * (1 - this.blendingRatio) + secondValue[3] * this.blendingRatio;
|
|
210
210
|
}
|
|
211
|
-
this.
|
|
211
|
+
this.vt.markEvaluated(time, this.pc);
|
|
212
212
|
}
|
|
213
213
|
/**
|
|
214
214
|
* Sets the first (primary) active animation track.
|
|
@@ -217,14 +217,14 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
217
217
|
*/
|
|
218
218
|
setFirstActiveAnimationTrackName(animationTrackName) {
|
|
219
219
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
220
|
-
this.
|
|
221
|
-
this.
|
|
222
|
-
const animationSampler = this.
|
|
220
|
+
this.vt.invalidate();
|
|
221
|
+
this.zt = animationTrackName;
|
|
222
|
+
const animationSampler = this.wt.get(this.zt);
|
|
223
223
|
if (animationSampler === void 0) {
|
|
224
224
|
Logger.default.info("Animation channel not found");
|
|
225
225
|
} else {
|
|
226
|
-
this.
|
|
227
|
-
this.
|
|
226
|
+
this.yt = animationSampler;
|
|
227
|
+
this.At = animationTrackName;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
@@ -234,14 +234,14 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
234
234
|
*/
|
|
235
235
|
setSecondActiveAnimationTrackName(animationTrackName) {
|
|
236
236
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
237
|
-
this.
|
|
238
|
-
this.
|
|
239
|
-
const animationSampler = this.
|
|
237
|
+
this.vt.invalidate();
|
|
238
|
+
this.Bt = animationTrackName;
|
|
239
|
+
const animationSampler = this.wt.get(this.Bt);
|
|
240
240
|
if (animationSampler === void 0) {
|
|
241
241
|
Logger.default.info("Animation channel not found");
|
|
242
242
|
} else {
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
243
|
+
this.xt = animationSampler;
|
|
244
|
+
this.Ct = animationTrackName;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
@@ -250,10 +250,10 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
250
250
|
* @returns The name of the first active animation track
|
|
251
251
|
*/
|
|
252
252
|
getFirstActiveAnimationTrackName() {
|
|
253
|
-
return this.
|
|
253
|
+
return this.zt;
|
|
254
254
|
}
|
|
255
255
|
getFirstActiveAnimationSamplerTrackName() {
|
|
256
|
-
return this.
|
|
256
|
+
return this.At;
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* Gets the name of the second (secondary) active animation track.
|
|
@@ -261,10 +261,10 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
261
261
|
* @returns The name of the second active animation track, or undefined if not set
|
|
262
262
|
*/
|
|
263
263
|
getSecondActiveAnimationTrackName() {
|
|
264
|
-
return this.
|
|
264
|
+
return this.Bt;
|
|
265
265
|
}
|
|
266
266
|
getSecondActiveAnimationSamplerTrackName() {
|
|
267
|
-
return this.
|
|
267
|
+
return this.Ct;
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* Gets the minimum start time of the specified animation track.
|
|
@@ -274,7 +274,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
274
274
|
* @throws {Error} When the specified animation track is not found
|
|
275
275
|
*/
|
|
276
276
|
getMinStartInputTime(trackName) {
|
|
277
|
-
const animationSampler = this.
|
|
277
|
+
const animationSampler = this.wt.get(trackName);
|
|
278
278
|
if (animationSampler === void 0) {
|
|
279
279
|
throw new Error("Animation channel not found");
|
|
280
280
|
}
|
|
@@ -288,7 +288,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
288
288
|
* @throws {Error} When the specified animation track is not found
|
|
289
289
|
*/
|
|
290
290
|
getMaxEndInputTime(trackName) {
|
|
291
|
-
const animationSampler = this.
|
|
291
|
+
const animationSampler = this.wt.get(trackName);
|
|
292
292
|
if (animationSampler === void 0) {
|
|
293
293
|
throw new Error("Animation channel not found");
|
|
294
294
|
}
|
|
@@ -300,7 +300,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
300
300
|
* @returns An array containing all animation track names
|
|
301
301
|
*/
|
|
302
302
|
getAllTrackNames() {
|
|
303
|
-
return Array.from(this.
|
|
303
|
+
return Array.from(this.wt.keys());
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
306
|
* Gets the animation sampler for the specified track.
|
|
@@ -310,7 +310,7 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
310
310
|
* @throws {Error} When the specified animation track is not found
|
|
311
311
|
*/
|
|
312
312
|
getAnimationSampler(trackName) {
|
|
313
|
-
const animationSampler = this.
|
|
313
|
+
const animationSampler = this.wt.get(trackName);
|
|
314
314
|
if (animationSampler === void 0) {
|
|
315
315
|
throw new Error("Animation channel not found");
|
|
316
316
|
}
|
|
@@ -323,8 +323,8 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
323
323
|
*/
|
|
324
324
|
deleteAnimationSampler(trackName) {
|
|
325
325
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
326
|
-
this.
|
|
327
|
-
this.
|
|
326
|
+
this.vt.invalidate();
|
|
327
|
+
this.wt.delete(trackName);
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
330
330
|
* Sets or adds an animation sampler for the specified track.
|
|
@@ -334,16 +334,16 @@ var AnimatedVector4 = class extends Vector4 {
|
|
|
334
334
|
*/
|
|
335
335
|
setAnimationSampler(animationTrackName, animationSampler) {
|
|
336
336
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
337
|
-
this.
|
|
338
|
-
if (animationTrackName === this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
337
|
+
this.wt.set(animationTrackName, animationSampler);
|
|
338
|
+
if (animationTrackName === this.At || animationTrackName === this.zt) {
|
|
339
|
+
this.yt = animationSampler;
|
|
340
|
+
this.At = animationTrackName;
|
|
341
341
|
}
|
|
342
|
-
if (animationTrackName === this.
|
|
343
|
-
this.
|
|
344
|
-
this.
|
|
342
|
+
if (animationTrackName === this.Ct || animationTrackName === this.Bt) {
|
|
343
|
+
this.xt = animationSampler;
|
|
344
|
+
this.Ct = animationTrackName;
|
|
345
345
|
}
|
|
346
|
-
this.
|
|
346
|
+
this.vt.invalidate();
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
349
|
export {
|
|
@@ -15,16 +15,16 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
15
15
|
constructor(animationSamplers, activeAnimationTrackName) {
|
|
16
16
|
super(new Float32Array());
|
|
17
17
|
this.pc = 0;
|
|
18
|
-
this.
|
|
18
|
+
this.vt = new AnimatedValueEvaluationState();
|
|
19
19
|
this.isLoop = true;
|
|
20
|
-
this.
|
|
21
|
-
this.yt = activeAnimationTrackName;
|
|
20
|
+
this.wt = animationSamplers;
|
|
22
21
|
this.zt = activeAnimationTrackName;
|
|
23
|
-
|
|
22
|
+
this.At = activeAnimationTrackName;
|
|
23
|
+
const animationSampler = this.wt.get(this.zt);
|
|
24
24
|
if (animationSampler === void 0) {
|
|
25
25
|
throw new Error("Animation channel not found");
|
|
26
26
|
}
|
|
27
|
-
this.
|
|
27
|
+
this.yt = animationSampler;
|
|
28
28
|
this.setFloat32Array(new Float32Array(animationSampler.outputComponentN));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -38,13 +38,13 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
38
38
|
* Drops the memoized interpolation result. Call this after mutating sampler data directly.
|
|
39
39
|
*/
|
|
40
40
|
invalidateAnimationCache() {
|
|
41
|
-
this.
|
|
41
|
+
this.vt.invalidate();
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Number of actual interpolations performed. Intended for tests and benchmarks.
|
|
45
45
|
*/
|
|
46
46
|
getEvaluationCount() {
|
|
47
|
-
return this.
|
|
47
|
+
return this.vt.evaluationCount;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* Gets the internal value array without allocating a copy. Do not mutate the returned array.
|
|
@@ -56,7 +56,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
56
56
|
* Sets the time and blending ratio and evaluates the value at most once.
|
|
57
57
|
*/
|
|
58
58
|
setTimeAndBlendingRatio(time, blendingRatio) {
|
|
59
|
-
this.
|
|
59
|
+
this.Dt = time;
|
|
60
60
|
this.pc = blendingRatio;
|
|
61
61
|
this.update();
|
|
62
62
|
}
|
|
@@ -69,7 +69,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
this._v = array;
|
|
72
|
-
this.
|
|
72
|
+
this.vt.invalidate();
|
|
73
73
|
this.update();
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -77,14 +77,14 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
77
77
|
* @param time - The time value to set for animation evaluation
|
|
78
78
|
*/
|
|
79
79
|
setTime(time) {
|
|
80
|
-
this.
|
|
80
|
+
this.Dt = time;
|
|
81
81
|
this.update();
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Switches back to using the global animation time instead of a specific time.
|
|
85
85
|
*/
|
|
86
86
|
useGlobalTime() {
|
|
87
|
-
this.
|
|
87
|
+
this.Dt = void 0;
|
|
88
88
|
this.update();
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
@@ -108,49 +108,49 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
108
108
|
*/
|
|
109
109
|
update() {
|
|
110
110
|
var _a;
|
|
111
|
-
let time = (_a = this.
|
|
111
|
+
let time = (_a = this.Dt) != null ? _a : 0;
|
|
112
112
|
if (this.isLoop) {
|
|
113
|
-
let duration = this.
|
|
114
|
-
if (this.
|
|
113
|
+
let duration = this.yt.input[this.yt.input.length - 1];
|
|
114
|
+
if (this.xt !== void 0) {
|
|
115
115
|
duration = Math.min(
|
|
116
116
|
duration,
|
|
117
|
-
this.
|
|
117
|
+
this.xt.input[this.xt.input.length - 1]
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
120
|
time = time % duration;
|
|
121
121
|
}
|
|
122
|
-
const hasSecondSampler = this.
|
|
123
|
-
if (!this.
|
|
122
|
+
const hasSecondSampler = this.xt !== void 0;
|
|
123
|
+
if (!this.vt.shouldEvaluate(time, this.pc, hasSecondSampler)) {
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
if (this.
|
|
126
|
+
if (this.xt === void 0) {
|
|
127
127
|
__interpolateTo(
|
|
128
|
-
this.
|
|
128
|
+
this.yt,
|
|
129
129
|
time,
|
|
130
130
|
AnimationAttribute.VectorN.index,
|
|
131
131
|
this._v,
|
|
132
|
-
this.
|
|
132
|
+
this.vt.firstCursor
|
|
133
133
|
);
|
|
134
134
|
} else {
|
|
135
|
-
const evaluation = this.
|
|
135
|
+
const evaluation = this.vt;
|
|
136
136
|
evaluation.ensureScratch(
|
|
137
137
|
Math.max(
|
|
138
138
|
this._v.length,
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
139
|
+
this.yt.outputComponentN,
|
|
140
|
+
this.xt.outputComponentN
|
|
141
141
|
)
|
|
142
142
|
);
|
|
143
143
|
const firstValue = evaluation.scratchFirst;
|
|
144
144
|
const secondValue = evaluation.scratchSecond;
|
|
145
145
|
__interpolateTo(
|
|
146
|
-
this.
|
|
146
|
+
this.yt,
|
|
147
147
|
time,
|
|
148
148
|
AnimationAttribute.VectorN.index,
|
|
149
149
|
firstValue,
|
|
150
150
|
evaluation.firstCursor
|
|
151
151
|
);
|
|
152
152
|
__interpolateTo(
|
|
153
|
-
this.
|
|
153
|
+
this.xt,
|
|
154
154
|
time,
|
|
155
155
|
AnimationAttribute.VectorN.index,
|
|
156
156
|
secondValue,
|
|
@@ -160,7 +160,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
160
160
|
this._v[i] = firstValue[i] * (1 - this.blendingRatio) + secondValue[i] * this.blendingRatio;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
this.
|
|
163
|
+
this.vt.markEvaluated(time, this.pc);
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Sets the first active animation track by name.
|
|
@@ -168,14 +168,14 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
168
168
|
*/
|
|
169
169
|
setFirstActiveAnimationTrackName(animationTrackName) {
|
|
170
170
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
const animationSampler = this.
|
|
171
|
+
this.vt.invalidate();
|
|
172
|
+
this.zt = animationTrackName;
|
|
173
|
+
const animationSampler = this.wt.get(this.zt);
|
|
174
174
|
if (animationSampler === void 0) {
|
|
175
175
|
Logger.default.info("Animation channel not found");
|
|
176
176
|
} else {
|
|
177
|
-
this.
|
|
178
|
-
this.
|
|
177
|
+
this.yt = animationSampler;
|
|
178
|
+
this.At = animationTrackName;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
@@ -184,14 +184,14 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
184
184
|
*/
|
|
185
185
|
setSecondActiveAnimationTrackName(animationTrackName) {
|
|
186
186
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
-
const animationSampler = this.
|
|
187
|
+
this.vt.invalidate();
|
|
188
|
+
this.Bt = animationTrackName;
|
|
189
|
+
const animationSampler = this.wt.get(this.Bt);
|
|
190
190
|
if (animationSampler === void 0) {
|
|
191
191
|
Logger.default.info("Animation channel not found");
|
|
192
192
|
} else {
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
193
|
+
this.xt = animationSampler;
|
|
194
|
+
this.Ct = animationTrackName;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
@@ -199,20 +199,20 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
199
199
|
* @returns The name of the first active animation track
|
|
200
200
|
*/
|
|
201
201
|
getFirstActiveAnimationTrackName() {
|
|
202
|
-
return this.
|
|
202
|
+
return this.zt;
|
|
203
203
|
}
|
|
204
204
|
getFirstActiveAnimationSamplerTrackName() {
|
|
205
|
-
return this.
|
|
205
|
+
return this.At;
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Gets the name of the second active animation track.
|
|
209
209
|
* @returns The name of the second active animation track, or undefined if not set
|
|
210
210
|
*/
|
|
211
211
|
getSecondActiveAnimationTrackName() {
|
|
212
|
-
return this.
|
|
212
|
+
return this.Bt;
|
|
213
213
|
}
|
|
214
214
|
getSecondActiveAnimationSamplerTrackName() {
|
|
215
|
-
return this.
|
|
215
|
+
return this.Ct;
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
218
|
* Gets the minimum start time for a specific animation track.
|
|
@@ -221,7 +221,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
221
221
|
* @throws {Error} When the animation track is not found
|
|
222
222
|
*/
|
|
223
223
|
getMinStartInputTime(trackName) {
|
|
224
|
-
const animationSampler = this.
|
|
224
|
+
const animationSampler = this.wt.get(trackName);
|
|
225
225
|
if (animationSampler === void 0) {
|
|
226
226
|
throw new Error("Animation channel not found");
|
|
227
227
|
}
|
|
@@ -234,7 +234,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
234
234
|
* @throws {Error} When the animation track is not found
|
|
235
235
|
*/
|
|
236
236
|
getMaxEndInputTime(trackName) {
|
|
237
|
-
const animationSampler = this.
|
|
237
|
+
const animationSampler = this.wt.get(trackName);
|
|
238
238
|
if (animationSampler === void 0) {
|
|
239
239
|
throw new Error("Animation channel not found");
|
|
240
240
|
}
|
|
@@ -245,7 +245,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
245
245
|
* @returns An array containing all animation track names
|
|
246
246
|
*/
|
|
247
247
|
getAllTrackNames() {
|
|
248
|
-
return Array.from(this.
|
|
248
|
+
return Array.from(this.wt.keys());
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* Gets the animation sampler for a specific track.
|
|
@@ -254,7 +254,7 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
254
254
|
* @throws {Error} When the animation track is not found
|
|
255
255
|
*/
|
|
256
256
|
getAnimationSampler(trackName) {
|
|
257
|
-
const animationSampler = this.
|
|
257
|
+
const animationSampler = this.wt.get(trackName);
|
|
258
258
|
if (animationSampler === void 0) {
|
|
259
259
|
throw new Error("Animation channel not found");
|
|
260
260
|
}
|
|
@@ -266,8 +266,8 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
266
266
|
*/
|
|
267
267
|
deleteAnimationSampler(trackName) {
|
|
268
268
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
269
|
-
this.
|
|
270
|
-
this.
|
|
269
|
+
this.vt.invalidate();
|
|
270
|
+
this.wt.delete(trackName);
|
|
271
271
|
}
|
|
272
272
|
/**
|
|
273
273
|
* Adds or updates an animation sampler for a specific track.
|
|
@@ -276,16 +276,16 @@ var AnimatedVectorN = class extends VectorN {
|
|
|
276
276
|
*/
|
|
277
277
|
setAnimationSampler(animationTrackName, animationSampler) {
|
|
278
278
|
AnimationStateRepository.markAnimationBindingChanged();
|
|
279
|
-
this.
|
|
280
|
-
if (animationTrackName === this.
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
279
|
+
this.wt.set(animationTrackName, animationSampler);
|
|
280
|
+
if (animationTrackName === this.At || animationTrackName === this.zt) {
|
|
281
|
+
this.yt = animationSampler;
|
|
282
|
+
this.At = animationTrackName;
|
|
283
283
|
}
|
|
284
|
-
if (animationTrackName === this.
|
|
285
|
-
this.
|
|
286
|
-
this.
|
|
284
|
+
if (animationTrackName === this.Ct || animationTrackName === this.Bt) {
|
|
285
|
+
this.xt = animationSampler;
|
|
286
|
+
this.Ct = animationTrackName;
|
|
287
287
|
}
|
|
288
|
-
this.
|
|
288
|
+
this.vt.invalidate();
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
export {
|
|
@@ -9,7 +9,7 @@ var _IdentityMatrix33 = class _IdentityMatrix33 extends AbstractMatrix {
|
|
|
9
9
|
*/
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
|
-
this._v = _IdentityMatrix33.
|
|
12
|
+
this._v = _IdentityMatrix33.Kt;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Returns a string representation of the identity matrix in a readable format.
|
|
@@ -267,7 +267,7 @@ var _IdentityMatrix33 = class _IdentityMatrix33 extends AbstractMatrix {
|
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
/** Shared Float32Array containing the identity matrix values [1,0,0,0,1,0,0,0,1] */
|
|
270
|
-
_IdentityMatrix33.
|
|
270
|
+
_IdentityMatrix33.Kt = new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
|
|
271
271
|
var IdentityMatrix33 = _IdentityMatrix33;
|
|
272
272
|
export {
|
|
273
273
|
IdentityMatrix33
|
|
@@ -9,7 +9,7 @@ var _IdentityMatrix44 = class _IdentityMatrix44 extends AbstractMatrix {
|
|
|
9
9
|
*/
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
|
-
this._v = _IdentityMatrix44.
|
|
12
|
+
this._v = _IdentityMatrix44.Kt;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Returns a string representation of the identity matrix in a readable format.
|
|
@@ -364,7 +364,7 @@ var _IdentityMatrix44 = class _IdentityMatrix44 extends AbstractMatrix {
|
|
|
364
364
|
* Static array representing the identity matrix values in column-major order.
|
|
365
365
|
* This is shared across all instances for memory efficiency.
|
|
366
366
|
*/
|
|
367
|
-
_IdentityMatrix44.
|
|
367
|
+
_IdentityMatrix44.Kt = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
|
|
368
368
|
var IdentityMatrix44 = _IdentityMatrix44;
|
|
369
369
|
export {
|
|
370
370
|
IdentityMatrix44
|
|
@@ -242,13 +242,13 @@ var MathClassUtil = class {
|
|
|
242
242
|
* @returns The unprojected 3D world position
|
|
243
243
|
*/
|
|
244
244
|
static unProjectTo(windowPosX, windowPosY, windowPosZ, inversePVMat44, viewportVec4, out) {
|
|
245
|
-
const input = this.
|
|
245
|
+
const input = this.qn.setComponents(
|
|
246
246
|
(windowPosX - viewportVec4.x) / viewportVec4.z * 2 - 1,
|
|
247
247
|
(windowPosY - viewportVec4.y) / viewportVec4.w * 2 - 1,
|
|
248
248
|
2 * windowPosZ - 1,
|
|
249
249
|
1
|
|
250
250
|
);
|
|
251
|
-
const outNonNormalized = inversePVMat44.multiplyVectorTo(input, this.
|
|
251
|
+
const outNonNormalized = inversePVMat44.multiplyVectorTo(input, this.rn);
|
|
252
252
|
if (outNonNormalized.w === 0) {
|
|
253
253
|
Logger.default.error("0 division occurred! The result is left unchanged.");
|
|
254
254
|
return out;
|
|
@@ -669,8 +669,8 @@ var MathClassUtil = class {
|
|
|
669
669
|
return true;
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
MathClassUtil.pn = MutableVector4.zero();
|
|
673
672
|
MathClassUtil.qn = MutableVector4.zero();
|
|
673
|
+
MathClassUtil.rn = MutableVector4.zero();
|
|
674
674
|
export {
|
|
675
675
|
MathClassUtil
|
|
676
676
|
};
|