rhodonite 0.27.0 → 0.27.1
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/components/Light/LightComponent.d.ts +14 -0
- package/dist/esm/foundation/components/Light/LightComponent.js +1 -1
- package/dist/esm/foundation/components/Mesh/MeshComponent.js +1 -1
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +28 -0
- package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.js +1 -1
- package/dist/esm/foundation/components/Physics/PhysicsComponent.js +1 -1
- package/dist/esm/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +1 -1
- package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.js +1 -1
- package/dist/esm/foundation/components/Shape/ShapeComponent.js +1 -1
- package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +1 -1
- package/dist/esm/foundation/components/Skeletal/SkeletalComponent.js +1 -1
- package/dist/esm/foundation/components/Transform/TransformComponent.js +1 -1
- package/dist/esm/foundation/constraints/VrmRollConstraint.js +1 -1
- package/dist/esm/foundation/core/Component.js +1 -1
- package/dist/esm/foundation/core/Config.d.ts +15 -0
- package/dist/esm/foundation/core/Config.js +1 -1
- package/dist/esm/foundation/core/GlobalDataRepository.js +1 -1
- package/dist/esm/foundation/definitions/ShaderSemantics.js +1 -1
- package/dist/esm/foundation/definitions/ShaderSemanticsInfo.d.ts +1 -0
- package/dist/esm/foundation/definitions/ShaderSemanticsInfo.js +1 -1
- package/dist/esm/foundation/definitions/VertexAttribute.js +1 -1
- package/dist/esm/foundation/exporter/Gltf2Exporter.d.ts +6 -0
- package/dist/esm/foundation/exporter/Gltf2Exporter.js +1 -1
- package/dist/esm/foundation/geometry/Frustum.js +1 -1
- package/dist/esm/foundation/geometry/Mesh.d.ts +15 -0
- package/dist/esm/foundation/geometry/Mesh.js +1 -1
- package/dist/esm/foundation/geometry/Primitive.js +1 -1
- package/dist/esm/foundation/geometry/shapes/Cylinder.js +1 -1
- package/dist/esm/foundation/geometry/shapes/Joint.js +1 -1
- package/dist/esm/foundation/gizmos/AABBGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/CapsuleColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/Gizmo.js +1 -1
- package/dist/esm/foundation/gizmos/JointGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LightGizmo.d.ts +108 -10
- package/dist/esm/foundation/gizmos/LightGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/LocatorGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/RotationGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ScaleGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/ShapeGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/SphereColliderGizmo.js +1 -1
- package/dist/esm/foundation/gizmos/TranslationGizmo.js +1 -1
- package/dist/esm/foundation/helpers/BloomHelper.js +1 -1
- package/dist/esm/foundation/helpers/GaussianBlurHelper.js +1 -1
- package/dist/esm/foundation/helpers/MaterialHelper.d.ts +2 -0
- package/dist/esm/foundation/helpers/MaterialHelper.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/PointShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowMap.js +1 -1
- package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
- package/dist/esm/foundation/helpers/materials/createClassicUberMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.d.ts +21 -0
- package/dist/esm/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.js +1 -0
- package/dist/esm/foundation/helpers/materials/createGaussianBlurForEncodedDepthMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createGaussianBlurMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +1 -1
- package/dist/esm/foundation/helpers/materials/createPbrUberMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.js +1 -1
- package/dist/esm/foundation/helpers/materials/index.d.ts +1 -0
- package/dist/esm/foundation/helpers/materials/index.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.js +1 -1
- package/dist/esm/foundation/importer/GltfImporter.js +1 -1
- package/dist/esm/foundation/importer/ModelConverter.d.ts +19 -0
- package/dist/esm/foundation/importer/ModelConverter.js +1 -1
- package/dist/esm/foundation/importer/RhodoniteImportExtension.js +1 -1
- package/dist/esm/foundation/importer/Vrm0xImporter.js +1 -1
- package/dist/esm/foundation/importer/VrmImporter.js +1 -1
- package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/DepthEncodeMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/EntityUIDOutputMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/FurnaceTestMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +18 -18
- package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +6 -6
- package/dist/esm/foundation/materials/contents/MatCapMaterialContent.js +1 -1
- package/dist/esm/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +1 -1
- 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.js +1 -1
- package/dist/esm/foundation/materials/core/AbstractShaderNode.js +2 -2
- 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 +4 -4
- package/dist/esm/foundation/materials/core/ShaderHandler.js +3 -3
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGL.js +2 -2
- package/dist/esm/foundation/materials/core/ShaderityUtilityWebGPU.js +2 -2
- package/dist/esm/foundation/materials/nodes/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/AlphaTestShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AndShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Atan2ShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributePositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeTexcoordShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BlockBeginShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BlockEndShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/BranchShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CalcBitangentShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ClampShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ClassicShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ConstantVariableShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/CosShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/DotProductShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/EqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/FlatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterOrEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/GreaterThanShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LengthShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/LessOrEqualShaderNode.js +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.js +1 -1
- package/dist/esm/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NormalizeShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/NotEqualShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/OrShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrNormalPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrShaderShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrSheenPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PbrVolumePropsShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ProcessGeometryShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_HashPRNGShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/Random_SinHashShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/RemapShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SinShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/SmoothStepShaderNode.js +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.js +1 -1
- package/dist/esm/foundation/materials/nodes/Texture2DShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/TransformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/UniformDataShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/WireframeMaterialNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendXYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendXZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendYXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendYZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendZXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/BendZYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistXShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistYShaderNode.js +1 -1
- package/dist/esm/foundation/materials/nodes/raymarching/TwistZShaderNode.js +1 -1
- package/dist/esm/foundation/math/IdentityMatrix33.js +2 -2
- package/dist/esm/foundation/math/IdentityMatrix44.js +2 -2
- package/dist/esm/foundation/math/MathClassUtil.js +1 -1
- package/dist/esm/foundation/math/Quaternion.js +1 -1
- package/dist/esm/foundation/math/Transform3D.js +1 -1
- package/dist/esm/foundation/memory/Accessor.js +6 -6
- package/dist/esm/foundation/memory/Buffer.js +3 -3
- package/dist/esm/foundation/memory/BufferView.js +1 -1
- package/dist/esm/foundation/misc/Logger.js +1 -1
- package/dist/esm/foundation/misc/Time.js +1 -1
- package/dist/esm/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +1 -1
- package/dist/esm/foundation/physics/Rapier/RapierPhysicsStrategy.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/CapsuleCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/SphereCollider.js +1 -1
- package/dist/esm/foundation/physics/VRMSpring/VRMSpringBone.js +1 -1
- package/dist/esm/foundation/renderer/Frame.js +1 -1
- package/dist/esm/foundation/renderer/FrameBuffer.js +1 -1
- package/dist/esm/foundation/renderer/RenderPass.js +1 -1
- package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +1 -1
- package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.js +1 -1
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystem.d.ts +12 -0
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystem.js +1 -1
- package/dist/esm/foundation/renderer/lightCluster/LightClusterSystemStub.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/DeferredRenderPipeline.js +1 -1
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +82 -9
- package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
- package/dist/esm/foundation/system/Engine.d.ts +2 -16
- package/dist/esm/foundation/system/Engine.js +1 -1
- package/dist/esm/foundation/system/EngineState.d.ts +6 -0
- package/dist/esm/foundation/system/GpuDriverWorkarounds.d.ts +50 -0
- package/dist/esm/foundation/system/GpuDriverWorkarounds.js +1 -0
- package/dist/esm/foundation/system/ModuleManager.js +1 -1
- package/dist/esm/foundation/system/index.d.ts +1 -0
- package/dist/esm/foundation/system/index.js +1 -1
- package/dist/esm/foundation/textures/AbstractTexture.js +1 -1
- package/dist/esm/foundation/textures/CubeTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
- package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
- package/dist/esm/foundation/textures/Texture.js +1 -1
- package/dist/esm/foundation/textures/TextureDataFloat.js +1 -1
- package/dist/esm/foundation/textures/VideoTexture.js +1 -1
- package/dist/esm/types/glTF2.d.ts +9 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/webgl/InstanceSidTable.js +1 -1
- package/dist/esm/webgl/MultiDraw.js +1 -1
- package/dist/esm/webgl/MultiDrawRepository.js +1 -1
- package/dist/esm/webgl/WebGLResourceRepository.js +4 -4
- package/dist/esm/webgl/WebGLStereoUtil.js +1 -1
- package/dist/esm/webgl/WebGLStrategyWebGL2.js +48 -48
- package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +17 -8
- package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/ColorGradingUsingLUTsShader/ColorGradingUsingLUTsShader.vert.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/DepthEncodeSingleShader/DepthEncodeSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/DepthMomentEncodeShader/DepthMomentEncodeShader.vert.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/DetectHighLuminanceAndCorrectShader/DetectHighLuminanceAndCorrectShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/EntityUIDOutputSingleShader/EntityUIDOutputSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.js +84 -0
- package/dist/esm/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.js +34 -0
- package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +7 -7
- package/dist/esm/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.vert.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +8 -5
- package/dist/esm/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.vert.glsl.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +43 -40
- package/dist/esm/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.glsl.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/MatCapShader/MatCapShader.vert.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.glsl.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.glsl.js +4 -4
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +124 -112
- package/dist/esm/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.vert.js +6 -6
- package/dist/esm/webgl/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.js +5 -5
- package/dist/esm/webgl/shaderity_shaders/ShadowMapDecodeClassicSingleShader/ShadowMapDecodeClassicSingleShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/SummedAreaTableShader/SummedAreaTableShader.frag.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.js +1 -1
- package/dist/esm/webgl/shaderity_shaders/VarianceShadowMapDecodeClassicShader/VarianceShadowMapDecodeClassicShader.vert.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/common/iblDefinition.glsl.js +54 -1
- package/dist/esm/webgl/shaderity_shaders/common/morphVariables.glsl.js +2 -2
- package/dist/esm/webgl/shaderity_shaders/common/opticalDefinition.glsl.js +4 -1
- package/dist/esm/webgl/shaderity_shaders/common/prerequisites.glsl.js +3 -3
- package/dist/esm/webgl/shaderity_shaders/nodes/ClassicShader.glsl.js +10 -1
- package/dist/esm/webgl/shaderity_shaders/nodes/PbrShader.glsl.js +12 -0
- package/dist/esm/webgl/shaders/RaymarchingShaderPart.js +23 -11
- package/dist/esm/webgl/shaders/nodes/DiscardShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/EndShader.js +1 -1
- package/dist/esm/webgl/shaders/nodes/SdApplyTransform.js +5 -5
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.js +1 -1
- 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/WebGpuBufferArena.js +1 -1
- package/dist/esm/webgpu/WebGpuGpuTimer.js +1 -1
- package/dist/esm/webgpu/WebGpuLightClusterBuilder.js +1 -1
- package/dist/esm/webgpu/WebGpuResourceRepository.js +3 -3
- package/dist/esm/webgpu/WebGpuStrategyBasic.d.ts +1 -0
- package/dist/esm/webgpu/WebGpuStrategyBasic.js +54 -54
- package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +15 -8
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.wgsl.js +84 -0
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.wgsl.js +19 -0
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +6 -6
- package/dist/esm/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +5 -5
- package/dist/esm/webgpu/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.wgsl.js +9 -6
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.wgsl.js +44 -41
- package/dist/esm/webgpu/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.wgsl.js +2 -2
- package/dist/esm/webgpu/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.wgsl.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.wgsl.js +2 -2
- package/dist/esm/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.wgsl.js +3 -3
- package/dist/esm/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +125 -114
- package/dist/esm/webgpu/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.wgsl.js +5 -5
- package/dist/esm/webgpu/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.wgsl.js +1 -1
- package/dist/esm/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +55 -1
- package/dist/esm/webgpu/shaderity_shaders/common/opticalDefinition.wgsl.js +4 -1
- package/dist/esm/webgpu/shaderity_shaders/nodes/ClassicShader.wgsl.js +7 -0
- package/dist/esm/webgpu/shaderity_shaders/nodes/PbrShader.wgsl.js +13 -2
- package/dist/esmdev/foundation/components/Light/LightComponent.d.ts +14 -0
- package/dist/esmdev/foundation/components/Light/LightComponent.js +38 -11
- package/dist/esmdev/foundation/components/Mesh/MeshComponent.js +47 -44
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.d.ts +28 -0
- package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.js +142 -92
- package/dist/esmdev/foundation/components/Physics/PhysicsComponent.js +65 -65
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingComponent.js +54 -54
- package/dist/esmdev/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +250 -250
- package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.js +335 -335
- package/dist/esmdev/foundation/components/Shape/ShapeComponent.js +31 -31
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +5 -5
- package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +9 -9
- package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.js +222 -222
- package/dist/esmdev/foundation/components/Transform/TransformComponent.js +66 -66
- package/dist/esmdev/foundation/components/Trigger/TriggerComponent.js +61 -61
- package/dist/esmdev/foundation/components/Vrm/VrmComponent.js +44 -44
- package/dist/esmdev/foundation/constraints/VrmAimConstraint.js +11 -11
- package/dist/esmdev/foundation/constraints/VrmRollConstraint.js +16 -16
- package/dist/esmdev/foundation/constraints/VrmRotationConstraint.js +10 -10
- package/dist/esmdev/foundation/core/Component.js +32 -32
- package/dist/esmdev/foundation/core/ComponentMemoryRegistry.js +41 -41
- package/dist/esmdev/foundation/core/ComponentRepository.js +37 -37
- package/dist/esmdev/foundation/core/Config.d.ts +15 -0
- package/dist/esmdev/foundation/core/Config.js +27 -10
- package/dist/esmdev/foundation/core/Entity.js +9 -9
- package/dist/esmdev/foundation/core/EntityRepository.js +19 -19
- package/dist/esmdev/foundation/core/GlobalDataRepository.js +31 -18
- package/dist/esmdev/foundation/core/MemoryManager.js +27 -27
- package/dist/esmdev/foundation/core/RnObject.js +36 -36
- 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.js +6 -6
- package/dist/esmdev/foundation/definitions/ShaderSemanticsInfo.d.ts +1 -0
- package/dist/esmdev/foundation/definitions/ShaderSemanticsInfo.js +1 -1
- 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.d.ts +6 -0
- package/dist/esmdev/foundation/exporter/Gltf2Exporter.js +140 -110
- package/dist/esmdev/foundation/geometry/ComplexVertexAttribute.js +24 -24
- package/dist/esmdev/foundation/geometry/Frustum.js +40 -40
- package/dist/esmdev/foundation/geometry/Mesh.d.ts +15 -0
- package/dist/esmdev/foundation/geometry/Mesh.js +249 -219
- package/dist/esmdev/foundation/geometry/Primitive.js +141 -135
- 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 +16 -16
- 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.d.ts +108 -10
- package/dist/esmdev/foundation/gizmos/LightGizmo.js +248 -49
- package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +25 -25
- package/dist/esmdev/foundation/gizmos/RotationGizmo.js +210 -210
- 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 +42 -38
- package/dist/esmdev/foundation/helpers/GaussianBlurHelper.js +18 -18
- package/dist/esmdev/foundation/helpers/MaterialHelper.d.ts +2 -0
- package/dist/esmdev/foundation/helpers/MaterialHelper.js +3 -1
- package/dist/esmdev/foundation/helpers/Shadow/PointShadowMap.js +12 -12
- package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +5 -5
- package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +119 -119
- package/dist/esmdev/foundation/helpers/materials/createClassicUberMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.d.ts +21 -0
- package/dist/esmdev/foundation/helpers/materials/createEnvConstantScreenSpaceMaterial.js +32 -0
- package/dist/esmdev/foundation/helpers/materials/createGaussianBlurForEncodedDepthMaterial.js +12 -4
- package/dist/esmdev/foundation/helpers/materials/createGaussianBlurMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.js +7 -3
- package/dist/esmdev/foundation/helpers/materials/createNodeBasedRaymarchingMaterials.js +41 -18
- package/dist/esmdev/foundation/helpers/materials/createPbrUberMaterial.js +13 -5
- package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.js +22 -8
- package/dist/esmdev/foundation/helpers/materials/index.d.ts +1 -0
- package/dist/esmdev/foundation/helpers/materials/index.js +3 -1
- package/dist/esmdev/foundation/helpers/materials/nodeBasedMaterialCommon.js +24 -12
- package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
- package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +33 -33
- package/dist/esmdev/foundation/importer/Gltf2Importer.js +14 -14
- package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
- package/dist/esmdev/foundation/importer/ModelConverter.d.ts +19 -0
- package/dist/esmdev/foundation/importer/ModelConverter.js +183 -132
- 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 +27 -27
- package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +15 -9
- package/dist/esmdev/foundation/materials/contents/DetectHighLuminanceMaterialContent.js +3 -2
- package/dist/esmdev/foundation/materials/contents/EntityUIDOutputMaterialContent.js +5 -3
- package/dist/esmdev/foundation/materials/contents/FurnaceTestMaterialContent.js +16 -8
- package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +197 -170
- package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +19 -19
- package/dist/esmdev/foundation/materials/contents/MatCapMaterialContent.js +7 -4
- package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +33 -19
- package/dist/esmdev/foundation/materials/contents/SynthesizeHdrMaterialContent.js +3 -1
- package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +41 -24
- package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +51 -51
- package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +26 -26
- package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
- package/dist/esmdev/foundation/materials/core/Material.js +116 -116
- package/dist/esmdev/foundation/materials/core/MaterialRepository.js +65 -65
- package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +38 -38
- package/dist/esmdev/foundation/materials/core/ShaderHandler.js +4 -4
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +26 -20
- package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +29 -23
- package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/AlphaTestShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/AndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/Atan2ShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributePositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/AttributeTexcoordShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/BlockBeginShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/BlockEndShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/BranchShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/ClassicShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/ConstantScalarVariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVariableShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ConstantVector2VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector3VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/ConstantVector4VariableShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +19 -19
- package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +18 -18
- package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/OrShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/OutColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/OutPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +7 -7
- package/dist/esmdev/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +8 -8
- package/dist/esmdev/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrNormalPropsShaderNode.js +11 -11
- package/dist/esmdev/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrShaderShaderNode.js +21 -21
- package/dist/esmdev/foundation/materials/nodes/PbrSheenPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/PbrVolumePropsShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/ProcessGeometryShaderNode.js +22 -22
- package/dist/esmdev/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/Random_HashPRNGShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +12 -12
- package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +15 -15
- package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +17 -17
- package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +14 -14
- package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +13 -13
- package/dist/esmdev/foundation/materials/nodes/Texture2DShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/TimeShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +10 -10
- package/dist/esmdev/foundation/materials/nodes/UniformDataShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/WireframeMaterialNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendXZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/BendZYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +6 -6
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutShadingColorShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +16 -16
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +2 -2
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +9 -9
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +5 -5
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +3 -3
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistXShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistYShaderNode.js +4 -4
- package/dist/esmdev/foundation/materials/nodes/raymarching/TwistZShaderNode.js +4 -4
- package/dist/esmdev/foundation/math/AABB.js +132 -132
- package/dist/esmdev/foundation/math/AnimatedQuaternion.js +54 -54
- package/dist/esmdev/foundation/math/AnimatedScalar.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedValueEvaluationState.js +20 -20
- package/dist/esmdev/foundation/math/AnimatedVector2.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector3.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVector4.js +55 -55
- package/dist/esmdev/foundation/math/AnimatedVectorN.js +55 -55
- package/dist/esmdev/foundation/math/IdentityMatrix33.js +2 -2
- package/dist/esmdev/foundation/math/IdentityMatrix44.js +2 -2
- package/dist/esmdev/foundation/math/MathClassUtil.js +4 -4
- package/dist/esmdev/foundation/math/Quaternion.js +20 -20
- package/dist/esmdev/foundation/math/Transform3D.js +74 -74
- 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 +40 -40
- package/dist/esmdev/foundation/memory/BufferView.js +33 -33
- package/dist/esmdev/foundation/misc/DataUtil.js +2 -2
- package/dist/esmdev/foundation/misc/EnumIO.js +10 -10
- package/dist/esmdev/foundation/misc/Logger.js +14 -14
- package/dist/esmdev/foundation/misc/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 +193 -193
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +241 -241
- package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.js +3 -3
- package/dist/esmdev/foundation/physics/VRMSpring/CapsuleCollider.js +42 -42
- package/dist/esmdev/foundation/physics/VRMSpring/SphereCollider.js +27 -27
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBone.js +10 -10
- package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBonePhysicsStrategy.js +55 -55
- package/dist/esmdev/foundation/renderer/Expression.js +6 -6
- package/dist/esmdev/foundation/renderer/Frame.js +12 -12
- package/dist/esmdev/foundation/renderer/FrameBuffer.js +25 -25
- package/dist/esmdev/foundation/renderer/RenderPass.js +101 -101
- package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +10 -10
- package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +78 -78
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.d.ts +12 -0
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +193 -155
- package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystemStub.js +3 -3
- package/dist/esmdev/foundation/renderer/pipelines/DeferredRenderPipeline.js +6 -6
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +82 -9
- package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +582 -458
- package/dist/esmdev/foundation/system/Engine.d.ts +2 -16
- package/dist/esmdev/foundation/system/Engine.js +239 -238
- package/dist/esmdev/foundation/system/EngineState.d.ts +6 -0
- package/dist/esmdev/foundation/system/EngineState.js +1 -1
- package/dist/esmdev/foundation/system/EventPubSub.js +8 -8
- package/dist/esmdev/foundation/system/GpuDriverWorkarounds.d.ts +50 -0
- package/dist/esmdev/foundation/system/GpuDriverWorkarounds.js +93 -0
- package/dist/esmdev/foundation/system/InputManager.js +56 -56
- package/dist/esmdev/foundation/system/ModuleManager.js +6 -6
- package/dist/esmdev/foundation/system/index.d.ts +1 -0
- package/dist/esmdev/foundation/system/index.js +2 -1
- package/dist/esmdev/foundation/textures/AbstractTexture.js +49 -49
- package/dist/esmdev/foundation/textures/CubeTexture.js +32 -32
- 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.js +18 -18
- 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/types/glTF2.d.ts +9 -0
- package/dist/esmdev/types/glTF2.js +1 -1
- package/dist/esmdev/version.js +2 -2
- package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
- package/dist/esmdev/webgl/MultiDraw.js +2 -2
- package/dist/esmdev/webgl/MultiDrawRepository.js +30 -30
- package/dist/esmdev/webgl/WebGLContextWrapper.js +164 -164
- package/dist/esmdev/webgl/WebGLGpuTimer.js +32 -32
- package/dist/esmdev/webgl/WebGLResourceRepository.js +315 -311
- package/dist/esmdev/webgl/WebGLStereoUtil.js +42 -42
- package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +270 -263
- package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +4 -4
- package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ColorGradingUsingLUTsShader/ColorGradingUsingLUTsShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DepthEncodeSingleShader/DepthEncodeSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DepthMomentEncodeShader/DepthMomentEncodeShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/DetectHighLuminanceAndCorrectShader/DetectHighLuminanceAndCorrectShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EntityUIDOutputSingleShader/EntityUIDOutputSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.js +12 -0
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/FlatSingleShader/FlatSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon0xSingleShader/MToon0xSingleShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MToon1SingleShader/MToon1SingleShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MatCapShader/MatCapShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PbrSingleShader/PbrSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ShadowMapDecodeClassicSingleShader/ShadowMapDecodeClassicSingleShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/SummedAreaTableShader/SummedAreaTableShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/VarianceShadowMapDecodeClassicShader/VarianceShadowMapDecodeClassicShader.vert.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/iblDefinition.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/morphVariables.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/opticalDefinition.glsl.js +5 -2
- package/dist/esmdev/webgl/shaderity_shaders/common/prerequisites.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/nodes/ClassicShader.glsl.js +2 -2
- package/dist/esmdev/webgl/shaderity_shaders/nodes/PbrShader.glsl.js +2 -2
- package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +25 -13
- package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +14 -14
- package/dist/esmdev/webgl/shaders/StandardShaderPart.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/BlockBeginShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/BlockEndShader.js +10 -10
- package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +21 -21
- package/dist/esmdev/webgl/shaders/nodes/DiscardShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/EndShader.js +3 -3
- package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +12 -12
- package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +9 -9
- package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +8 -8
- package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +23 -23
- package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +23 -23
- package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +27 -27
- package/dist/esmdev/webgpu/GpuCullingRegistry.js +94 -94
- package/dist/esmdev/webgpu/GpuDeformRegistry.js +53 -53
- package/dist/esmdev/webgpu/RangeAllocator.js +16 -16
- package/dist/esmdev/webgpu/WebGpuBufferArena.js +21 -21
- package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
- package/dist/esmdev/webgpu/WebGpuGpuCulling.js +198 -198
- package/dist/esmdev/webgpu/WebGpuGpuTimer.js +52 -52
- package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +37 -37
- package/dist/esmdev/webgpu/WebGpuResourceRepository.js +604 -604
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.d.ts +1 -0
- package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +129 -125
- package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +128 -128
- package/dist/esmdev/webgpu/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.frag.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantScreenSpaceShader/EnvConstantScreenSpaceShader.vert.wgsl.js +12 -0
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/EnvConstantSingleShader/EnvConstantSingleShader.vert.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/FlatSingleShader/FlatSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/GammaCorrectionShader/GammaCorrectionShader.frag.js +2 -2
- 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/MToon1SingleShader/MToon1SingleShader.vert.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PanoramaToCubeShader/PanoramaToCubeShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ParaboloidDepthMomentEncodeShader/ParaboloidDepthMomentEncodeShader.vert.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PbrSingleShader/PbrSingleShader.frag.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/PrefilterIBLShader/PrefilterIBLShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/ToneMappingShader/ToneMappingShader.frag.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/common/iblDefinition.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/common/opticalDefinition.wgsl.js +5 -2
- package/dist/esmdev/webgpu/shaderity_shaders/nodes/ClassicShader.wgsl.js +2 -2
- package/dist/esmdev/webgpu/shaderity_shaders/nodes/PbrShader.wgsl.js +2 -2
- package/dist/esmdev/xr/WebARSystem.js +69 -69
- package/dist/esmdev/xr/WebXRSystem.js +153 -153
- package/package.json +1 -1
|
@@ -13,23 +13,23 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(engine) {
|
|
15
15
|
super();
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this
|
|
21
|
-
this.
|
|
16
|
+
this.qm = 0;
|
|
17
|
+
this.Ly = 0;
|
|
18
|
+
this.KC = 0;
|
|
19
|
+
this.LC = 1;
|
|
20
|
+
this.MC = TextureFormat.RGBA8;
|
|
21
|
+
this.NC = PixelFormat.RGBA;
|
|
22
22
|
this.Gc = ComponentType.UnsignedByte;
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
23
|
+
this.GC = false;
|
|
24
|
+
this.DC = false;
|
|
25
|
+
this.FC = false;
|
|
26
|
+
this.IC = false;
|
|
27
|
+
this.Xu = "untitled";
|
|
28
28
|
this._textureResourceUid = -1;
|
|
29
29
|
this._samplerResourceUid = -1;
|
|
30
30
|
this._textureViewResourceUid = -1;
|
|
31
31
|
this._textureViewAsRenderTargetResourceUid = -1;
|
|
32
|
-
this.
|
|
32
|
+
this.EC = ++_AbstractTexture.HC;
|
|
33
33
|
this.c = engine;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -38,7 +38,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
38
38
|
* @returns The unique texture UID
|
|
39
39
|
*/
|
|
40
40
|
get textureUID() {
|
|
41
|
-
return this.
|
|
41
|
+
return this.EC;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Gets the width of the texture in pixels.
|
|
@@ -46,7 +46,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
46
46
|
* @returns The texture width
|
|
47
47
|
*/
|
|
48
48
|
get width() {
|
|
49
|
-
return this.
|
|
49
|
+
return this.qm;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Calculates the width of the texture at a specific mip level.
|
|
@@ -55,7 +55,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
55
55
|
* @returns The width at the specified mip level (minimum 1 pixel)
|
|
56
56
|
*/
|
|
57
57
|
getWidthAtMipLevel(mipLevel) {
|
|
58
|
-
return Math.max(1, Math.floor(this.
|
|
58
|
+
return Math.max(1, Math.floor(this.qm / 2 ** mipLevel));
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Calculates the height of the texture at a specific mip level.
|
|
@@ -64,7 +64,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
64
64
|
* @returns The height at the specified mip level (minimum 1 pixel)
|
|
65
65
|
*/
|
|
66
66
|
getHeightAtMipLevel(mipLevel) {
|
|
67
|
-
return Math.max(1, Math.floor(this.
|
|
67
|
+
return Math.max(1, Math.floor(this.Ly / 2 ** mipLevel));
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Sets the width of the texture in pixels.
|
|
@@ -72,7 +72,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
72
72
|
* @param val - The new width value
|
|
73
73
|
*/
|
|
74
74
|
set width(val) {
|
|
75
|
-
this.
|
|
75
|
+
this.qm = val;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Gets the height of the texture in pixels.
|
|
@@ -80,7 +80,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
80
80
|
* @returns The texture height
|
|
81
81
|
*/
|
|
82
82
|
get height() {
|
|
83
|
-
return this.
|
|
83
|
+
return this.Ly;
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* Sets the height of the texture in pixels.
|
|
@@ -88,7 +88,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
88
88
|
* @param val - The new height value
|
|
89
89
|
*/
|
|
90
90
|
set height(val) {
|
|
91
|
-
this.
|
|
91
|
+
this.Ly = val;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Checks if the texture is ready for use.
|
|
@@ -96,7 +96,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
96
96
|
* @returns True if the texture is ready, false otherwise
|
|
97
97
|
*/
|
|
98
98
|
get isTextureReady() {
|
|
99
|
-
return this.
|
|
99
|
+
return this.FC;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Checks if the texture has started loading.
|
|
@@ -104,7 +104,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
104
104
|
* @returns True if loading has started, false otherwise
|
|
105
105
|
*/
|
|
106
106
|
get startedToLoad() {
|
|
107
|
-
return this.
|
|
107
|
+
return this.IC;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Checks whether this texture is marked as a dummy (placeholder) texture.
|
|
@@ -112,7 +112,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
112
112
|
* @returns True if the texture is marked as dummy, false otherwise
|
|
113
113
|
*/
|
|
114
114
|
get isDummyTexture() {
|
|
115
|
-
return this.
|
|
115
|
+
return this.DC;
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Marks this texture as a dummy (placeholder) texture.
|
|
@@ -120,7 +120,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
120
120
|
* @param isDummy - Whether to mark the texture as dummy (default: true)
|
|
121
121
|
*/
|
|
122
122
|
markAsDummyTexture(isDummy = true) {
|
|
123
|
-
this.
|
|
123
|
+
this.DC = isDummy;
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Gets the HTML image element associated with this texture.
|
|
@@ -128,7 +128,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
128
128
|
* @returns The HTML image element or undefined if not available
|
|
129
129
|
*/
|
|
130
130
|
get htmlImageElement() {
|
|
131
|
-
return this.
|
|
131
|
+
return this.AC;
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* Gets or creates an HTML canvas element with the texture content.
|
|
@@ -139,13 +139,13 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
139
139
|
get htmlCanvasElement() {
|
|
140
140
|
const canvas = document.createElement("canvas");
|
|
141
141
|
const ctx = canvas == null ? void 0 : canvas.getContext("2d");
|
|
142
|
-
this.
|
|
143
|
-
if (Is.exist(ctx) && Is.exist(this.
|
|
144
|
-
canvas.width = this.
|
|
145
|
-
canvas.height = this.
|
|
146
|
-
ctx.drawImage(this.
|
|
142
|
+
this.BC = canvas;
|
|
143
|
+
if (Is.exist(ctx) && Is.exist(this.AC)) {
|
|
144
|
+
canvas.width = this.AC.width;
|
|
145
|
+
canvas.height = this.AC.height;
|
|
146
|
+
ctx.drawImage(this.AC, 0, 0, this.AC.width, this.AC.height);
|
|
147
147
|
}
|
|
148
|
-
return this.
|
|
148
|
+
return this.BC;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
151
|
* Gets the URI/URL of the texture source.
|
|
@@ -153,7 +153,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
153
153
|
* @returns The texture URI or undefined if not set
|
|
154
154
|
*/
|
|
155
155
|
get uri() {
|
|
156
|
-
return this.
|
|
156
|
+
return this.JC;
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Sets the name of the texture.
|
|
@@ -161,7 +161,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
161
161
|
* @param name - The new texture name
|
|
162
162
|
*/
|
|
163
163
|
set name(name) {
|
|
164
|
-
this.
|
|
164
|
+
this.Xu = name;
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Gets the name of the texture.
|
|
@@ -169,7 +169,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
169
169
|
* @returns The texture name
|
|
170
170
|
*/
|
|
171
171
|
get name() {
|
|
172
|
-
return this.
|
|
172
|
+
return this.Xu;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* Retrieves image data from a rectangular region of the texture.
|
|
@@ -182,10 +182,10 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
182
182
|
* @returns ImageData object containing the pixel data
|
|
183
183
|
*/
|
|
184
184
|
getImageData(x, y, width, height) {
|
|
185
|
-
if (this.
|
|
185
|
+
if (this.CC === void 0) {
|
|
186
186
|
this.createInternalCanvasContext();
|
|
187
187
|
}
|
|
188
|
-
return this.
|
|
188
|
+
return this.CC.getImageData(x, y, width, height);
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Gets a single pixel value at the specified coordinates as a specific type.
|
|
@@ -232,7 +232,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
232
232
|
for (let i = 0; i < numberOfComponents; i++) {
|
|
233
233
|
data[i] = value.at(i);
|
|
234
234
|
}
|
|
235
|
-
this.
|
|
235
|
+
this.CC.putImageData(pixel, x, y);
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
* Sets a specific channel value for a pixel at the given coordinates.
|
|
@@ -247,7 +247,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
247
247
|
const pixel = this.getImageData(x, y, 1, 1);
|
|
248
248
|
const data = pixel.data;
|
|
249
249
|
data[channelIdx] = value;
|
|
250
|
-
this.
|
|
250
|
+
this.CC.putImageData(pixel, x, y);
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Checks if the texture contains transparent pixels.
|
|
@@ -255,7 +255,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
255
255
|
* @returns True if the texture has transparency, false otherwise
|
|
256
256
|
*/
|
|
257
257
|
get isTransparent() {
|
|
258
|
-
return this.
|
|
258
|
+
return this.GC;
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Creates an internal canvas context for pixel manipulation operations.
|
|
@@ -263,15 +263,15 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
263
263
|
*/
|
|
264
264
|
createInternalCanvasContext() {
|
|
265
265
|
let canvas;
|
|
266
|
-
if (this.
|
|
267
|
-
canvas = this.
|
|
266
|
+
if (this.BC != null) {
|
|
267
|
+
canvas = this.BC;
|
|
268
268
|
} else {
|
|
269
269
|
canvas = document.createElement("canvas");
|
|
270
270
|
canvas.width = this.width;
|
|
271
271
|
canvas.height = this.height;
|
|
272
272
|
}
|
|
273
|
-
this.
|
|
274
|
-
this.
|
|
273
|
+
this.BC = canvas;
|
|
274
|
+
this.CC = canvas.getContext("2d");
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* Converts the texture data to a TextureDataFloat object with the specified number of channels.
|
|
@@ -302,7 +302,7 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
302
302
|
* or undefined if the texture is not ready or reading fails
|
|
303
303
|
*/
|
|
304
304
|
async getTexturePixelDataFromGPU() {
|
|
305
|
-
if (!this.
|
|
305
|
+
if (!this.FC || this._textureResourceUid < 0 || this.qm <= 0 || this.Ly <= 0) {
|
|
306
306
|
return void 0;
|
|
307
307
|
}
|
|
308
308
|
try {
|
|
@@ -311,8 +311,8 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
311
311
|
this._textureResourceUid,
|
|
312
312
|
0,
|
|
313
313
|
0,
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
314
|
+
this.qm,
|
|
315
|
+
this.Ly
|
|
316
316
|
);
|
|
317
317
|
return pixels;
|
|
318
318
|
} catch (e) {
|
|
@@ -334,19 +334,19 @@ var _AbstractTexture = class _AbstractTexture extends RnObject {
|
|
|
334
334
|
return void 0;
|
|
335
335
|
}
|
|
336
336
|
const canvas = document.createElement("canvas");
|
|
337
|
-
canvas.width = this.
|
|
338
|
-
canvas.height = this.
|
|
337
|
+
canvas.width = this.qm;
|
|
338
|
+
canvas.height = this.Ly;
|
|
339
339
|
const ctx = canvas.getContext("2d");
|
|
340
340
|
if (!ctx) {
|
|
341
341
|
return void 0;
|
|
342
342
|
}
|
|
343
|
-
const imageData = new ImageData(new Uint8ClampedArray(pixels), this.
|
|
343
|
+
const imageData = new ImageData(new Uint8ClampedArray(pixels), this.qm, this.Ly);
|
|
344
344
|
ctx.putImageData(imageData, 0, 0);
|
|
345
345
|
return canvas;
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
_AbstractTexture.InvalidTextureUid = -1;
|
|
349
|
-
_AbstractTexture.
|
|
349
|
+
_AbstractTexture.HC = _AbstractTexture.InvalidTextureUid;
|
|
350
350
|
var AbstractTexture = _AbstractTexture;
|
|
351
351
|
export {
|
|
352
352
|
AbstractTexture
|
|
@@ -27,7 +27,7 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
27
27
|
* @param uniqueName - A unique name for the texture used in logging
|
|
28
28
|
* @private
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
PC(textureResourceUid, uniqueName) {
|
|
31
31
|
this._textureResourceUid = textureResourceUid;
|
|
32
32
|
_CubeTexture.managedRegistry.register(this, { textureResourceUid, engine: this.c, uniqueName }, this);
|
|
33
33
|
}
|
|
@@ -59,7 +59,7 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
59
59
|
hdriFormat,
|
|
60
60
|
iblMipLevelSkip = 0
|
|
61
61
|
}) {
|
|
62
|
-
this.
|
|
62
|
+
this.IC = true;
|
|
63
63
|
this.mipmapLevelNumber = mipmapLevelNumber;
|
|
64
64
|
this.hdriFormat = hdriFormat;
|
|
65
65
|
this.iblMipLevelSkip = iblMipLevelSkip;
|
|
@@ -71,17 +71,17 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
71
71
|
isNamePosNeg,
|
|
72
72
|
hdriFormat
|
|
73
73
|
);
|
|
74
|
-
this.
|
|
74
|
+
this.PC(cubeTextureUid, this.uniqueName);
|
|
75
75
|
this._recommendedTextureSampler = sampler;
|
|
76
76
|
this._samplerResourceUid = sampler._samplerResourceUid;
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
77
|
+
this.qm = width;
|
|
78
|
+
this.Ly = height;
|
|
79
79
|
if (this.c.engineState.currentProcessApproach === ProcessApproach.WebGPU) {
|
|
80
80
|
this._textureViewResourceUid = cgApiResourceRepository.createTextureViewCube(
|
|
81
81
|
this._textureResourceUid
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
this.
|
|
84
|
+
this.FC = true;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Loads cube texture from Basis compressed texture data.
|
|
@@ -112,7 +112,7 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
112
112
|
wrapS = TextureParameter.Repeat,
|
|
113
113
|
wrapT = TextureParameter.Repeat
|
|
114
114
|
} = {}) {
|
|
115
|
-
this.
|
|
115
|
+
this.IC = true;
|
|
116
116
|
if (typeof BASIS === "undefined") {
|
|
117
117
|
Logger.default.error("Failed to call BASIS() function. Please check to import basis_transcoder.js.");
|
|
118
118
|
}
|
|
@@ -134,10 +134,10 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
134
134
|
wrapS,
|
|
135
135
|
wrapT
|
|
136
136
|
});
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
137
|
+
this.PC(resourceHandle, this.uniqueName);
|
|
138
|
+
this.qm = width;
|
|
139
|
+
this.Ly = height;
|
|
140
|
+
this.FC = true;
|
|
141
141
|
basisFile.close();
|
|
142
142
|
basisFile.delete();
|
|
143
143
|
});
|
|
@@ -183,15 +183,15 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
183
183
|
1,
|
|
184
184
|
1
|
|
185
185
|
);
|
|
186
|
-
this.
|
|
186
|
+
this.PC(resourceUid, this.uniqueName);
|
|
187
187
|
this._recommendedTextureSampler = sampler;
|
|
188
188
|
this._samplerResourceUid = sampler._samplerResourceUid;
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
189
|
+
this.qm = 1;
|
|
190
|
+
this.Ly = 1;
|
|
191
191
|
if (this.c.engineState.currentProcessApproach === ProcessApproach.WebGPU) {
|
|
192
192
|
this._textureViewResourceUid = cgApiResourceRepository.createTextureViewCube(this._textureResourceUid);
|
|
193
193
|
}
|
|
194
|
-
this.
|
|
194
|
+
this.FC = true;
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* Generates a cube texture from typed arrays containing raw image data.
|
|
@@ -227,11 +227,11 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
227
227
|
baseLevelHeight
|
|
228
228
|
);
|
|
229
229
|
this._recommendedTextureSampler = sampler;
|
|
230
|
-
this.
|
|
231
|
-
this.
|
|
232
|
-
this.
|
|
233
|
-
this.
|
|
234
|
-
this.
|
|
230
|
+
this.PC(resourceId, this.uniqueName);
|
|
231
|
+
this.qm = baseLevelWidth;
|
|
232
|
+
this.Ly = baseLevelHeight;
|
|
233
|
+
this.FC = true;
|
|
234
|
+
this.IC = true;
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Imports an existing WebGL texture directly into this CubeTexture instance.
|
|
@@ -249,13 +249,13 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
249
249
|
* ```
|
|
250
250
|
*/
|
|
251
251
|
importWebGLTextureDirectly(webGLTexture, width = 0, height = 0) {
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
252
|
+
this.qm = width;
|
|
253
|
+
this.Ly = height;
|
|
254
254
|
const webGLResourceRepository = this.c.webglResourceRepository;
|
|
255
255
|
const texture = webGLResourceRepository.setWebGLTextureDirectly(webGLTexture);
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
256
|
+
this.PC(texture, this.uniqueName);
|
|
257
|
+
this.IC = true;
|
|
258
|
+
this.FC = true;
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Deletes the internal texture resource from the graphics API.
|
|
@@ -265,7 +265,7 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
265
265
|
* @param textureResourceUid - The unique identifier of the texture resource to delete
|
|
266
266
|
* @private
|
|
267
267
|
*/
|
|
268
|
-
static
|
|
268
|
+
static QC(engine, textureResourceUid) {
|
|
269
269
|
const cgApiResourceRepository = engine.cgApiResourceRepository;
|
|
270
270
|
cgApiResourceRepository.deleteTexture(textureResourceUid);
|
|
271
271
|
}
|
|
@@ -275,14 +275,14 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
275
275
|
* After calling this method, the texture cannot be used for rendering until reloaded.
|
|
276
276
|
*/
|
|
277
277
|
destroy3DAPIResources() {
|
|
278
|
-
_CubeTexture.
|
|
278
|
+
_CubeTexture.QC(this.c, this._textureResourceUid);
|
|
279
279
|
this._textureResourceUid = CGAPIResourceRepository.InvalidCGAPIResourceUid;
|
|
280
280
|
this._samplerResourceUid = CGAPIResourceRepository.InvalidCGAPIResourceUid;
|
|
281
281
|
if (this._recommendedTextureSampler) {
|
|
282
282
|
this._recommendedTextureSampler.destroy();
|
|
283
283
|
}
|
|
284
|
-
this.
|
|
285
|
-
this.
|
|
284
|
+
this.FC = false;
|
|
285
|
+
this.IC = false;
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
288
|
* Implements the Disposable interface for automatic resource cleanup.
|
|
@@ -320,8 +320,8 @@ var _CubeTexture = class _CubeTexture extends AbstractTexture {
|
|
|
320
320
|
const cgApiResourceRepository = this.c.cgApiResourceRepository;
|
|
321
321
|
const data = await cgApiResourceRepository.getCubeTexturePixelData(
|
|
322
322
|
this._textureResourceUid,
|
|
323
|
-
this.
|
|
324
|
-
this.
|
|
323
|
+
this.qm,
|
|
324
|
+
this.Ly,
|
|
325
325
|
faceIndex
|
|
326
326
|
);
|
|
327
327
|
return data;
|
|
@@ -410,7 +410,7 @@ _CubeTexture.managedRegistry = new FinalizationRegistry((texObj) => {
|
|
|
410
410
|
Logger.default.info(
|
|
411
411
|
`WebGL/WebGPU cube texture "${texObj.uniqueName}" was automatically released along with GC. But explicit release is recommended.`
|
|
412
412
|
);
|
|
413
|
-
_CubeTexture.
|
|
413
|
+
_CubeTexture.QC(texObj.engine, texObj.textureResourceUid);
|
|
414
414
|
});
|
|
415
415
|
var CubeTexture = _CubeTexture;
|
|
416
416
|
export {
|
|
@@ -11,7 +11,7 @@ var RenderBuffer = class extends RnObject {
|
|
|
11
11
|
/** The height of the render buffer in pixels */
|
|
12
12
|
this.height = 0;
|
|
13
13
|
/** The internal texture format of the render buffer */
|
|
14
|
-
this
|
|
14
|
+
this.MC = TextureFormat.Depth24;
|
|
15
15
|
/** The unique identifier for the texture resource in the graphics API */
|
|
16
16
|
this._textureResourceUid = -1;
|
|
17
17
|
/** The unique identifier for the texture view resource */
|
|
@@ -19,9 +19,9 @@ var RenderBuffer = class extends RnObject {
|
|
|
19
19
|
/** The unique identifier for the texture view used as a render target */
|
|
20
20
|
this._textureViewAsRenderTargetResourceUid = -1;
|
|
21
21
|
/** Flag indicating whether MSAA (Multi-Sample Anti-Aliasing) is enabled */
|
|
22
|
-
this.
|
|
22
|
+
this.TC = false;
|
|
23
23
|
/** The number of samples used for MSAA */
|
|
24
|
-
this.
|
|
24
|
+
this.RC = 4;
|
|
25
25
|
this.c = engine;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -29,21 +29,21 @@ var RenderBuffer = class extends RnObject {
|
|
|
29
29
|
* @param fbo - The frame buffer object to associate with this render buffer
|
|
30
30
|
*/
|
|
31
31
|
set _fbo(fbo) {
|
|
32
|
-
this.
|
|
32
|
+
this.SC = fbo;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Gets the associated frame buffer object.
|
|
36
36
|
* @returns The frame buffer object or undefined if not set
|
|
37
37
|
*/
|
|
38
38
|
get fbo() {
|
|
39
|
-
return this.
|
|
39
|
+
return this.SC;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Gets the MSAA sample count for this render buffer.
|
|
43
43
|
* @returns The number of samples used for multi-sample anti-aliasing
|
|
44
44
|
*/
|
|
45
45
|
get sampleCount() {
|
|
46
|
-
return this.
|
|
46
|
+
return this.RC;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Creates and initializes the render buffer with the specified parameters.
|
|
@@ -56,12 +56,12 @@ var RenderBuffer = class extends RnObject {
|
|
|
56
56
|
* @param options.isMSAA - Whether to enable multi-sample anti-aliasing (default: false)
|
|
57
57
|
* @param options.sampleCountMSAA - The number of MSAA samples (default: current sample count)
|
|
58
58
|
*/
|
|
59
|
-
create(width, height, internalFormat, { isMSAA = false, sampleCountMSAA = this.
|
|
59
|
+
create(width, height, internalFormat, { isMSAA = false, sampleCountMSAA = this.RC } = {}) {
|
|
60
60
|
this.width = width;
|
|
61
61
|
this.height = height;
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this
|
|
62
|
+
this.TC = isMSAA;
|
|
63
|
+
this.RC = sampleCountMSAA;
|
|
64
|
+
this.MC = internalFormat;
|
|
65
65
|
const cgApiResourceRepository = this.c.cgApiResourceRepository;
|
|
66
66
|
this._textureResourceUid = cgApiResourceRepository.createRenderBuffer(
|
|
67
67
|
width,
|
|
@@ -94,7 +94,7 @@ var RenderBuffer = class extends RnObject {
|
|
|
94
94
|
*/
|
|
95
95
|
resize(width, height) {
|
|
96
96
|
this.destroy3DAPIResources();
|
|
97
|
-
this.create(width, height, this
|
|
97
|
+
this.create(width, height, this.MC, { isMSAA: this.TC });
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* Destroys all GPU resources associated with this render buffer.
|
|
@@ -20,14 +20,14 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
20
20
|
mipLevelCount,
|
|
21
21
|
format: internalFormat
|
|
22
22
|
}) {
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
23
|
+
this.qm = width;
|
|
24
|
+
this.Ly = height;
|
|
25
|
+
this.LC = mipLevelCount != null ? mipLevelCount : Math.floor(Math.log2(Math.max(width, height))) + 1;
|
|
26
26
|
const { format, type } = TextureFormat.getPixelFormatAndComponentTypeFromTextureFormat(internalFormat);
|
|
27
|
-
this
|
|
28
|
-
this.
|
|
27
|
+
this.MC = internalFormat;
|
|
28
|
+
this.NC = format;
|
|
29
29
|
this.Gc = type;
|
|
30
|
-
this.
|
|
30
|
+
this.UC();
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Sets the framebuffer object associated with this render target texture.
|
|
@@ -35,7 +35,7 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
35
35
|
* @param fbo - The FrameBuffer object to associate with this texture
|
|
36
36
|
*/
|
|
37
37
|
set _fbo(fbo) {
|
|
38
|
-
this.
|
|
38
|
+
this.SC = fbo;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Gets the framebuffer object associated with this render target texture.
|
|
@@ -43,7 +43,7 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
43
43
|
* @returns The associated FrameBuffer object, or undefined if not set
|
|
44
44
|
*/
|
|
45
45
|
get fbo() {
|
|
46
|
-
return this.
|
|
46
|
+
return this.SC;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Creates the underlying 3D API resources for the render target texture.
|
|
@@ -51,13 +51,13 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
51
51
|
*
|
|
52
52
|
* @private
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
UC() {
|
|
55
55
|
const cgApiResourceRepository = this.c.cgApiResourceRepository;
|
|
56
56
|
const texture = cgApiResourceRepository.createRenderTargetTexture({
|
|
57
|
-
width: this.
|
|
58
|
-
height: this.
|
|
59
|
-
mipLevelCount: this.
|
|
60
|
-
format: this
|
|
57
|
+
width: this.qm,
|
|
58
|
+
height: this.Ly,
|
|
59
|
+
mipLevelCount: this.LC,
|
|
60
|
+
format: this.MC
|
|
61
61
|
});
|
|
62
62
|
this._textureResourceUid = texture;
|
|
63
63
|
if (this.c.engineState.currentProcessApproach === ProcessApproach.WebGPU) {
|
|
@@ -76,9 +76,9 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
76
76
|
*/
|
|
77
77
|
resize(width, height) {
|
|
78
78
|
this.destroy3DAPIResources();
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
79
|
+
this.qm = width;
|
|
80
|
+
this.Ly = height;
|
|
81
|
+
this.UC();
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Destroys all 3D API resources associated with this render target texture.
|
|
@@ -102,10 +102,10 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
102
102
|
const cgApiResourceRepository = this.c.cgApiResourceRepository;
|
|
103
103
|
const data = cgApiResourceRepository.getTexturePixelData(
|
|
104
104
|
this._textureResourceUid,
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
105
|
+
this.qm,
|
|
106
|
+
this.Ly,
|
|
107
|
+
this.SC.framebufferUID,
|
|
108
|
+
this.SC.whichColorAttachment(this)
|
|
109
109
|
);
|
|
110
110
|
return data;
|
|
111
111
|
}
|
|
@@ -117,8 +117,8 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
117
117
|
async downloadTexturePixelData() {
|
|
118
118
|
const data = await this.getTexturePixelData();
|
|
119
119
|
const canvas = document.createElement("canvas");
|
|
120
|
-
canvas.width = this.
|
|
121
|
-
canvas.height = this.
|
|
120
|
+
canvas.width = this.qm;
|
|
121
|
+
canvas.height = this.Ly;
|
|
122
122
|
const ctx = canvas.getContext("2d");
|
|
123
123
|
if (!(data.buffer instanceof ArrayBuffer)) {
|
|
124
124
|
throw new Error("SharedArrayBuffer is not supported when downloading texture pixel data.");
|
|
@@ -128,8 +128,8 @@ var RenderTargetTexture = class extends AbstractTexture {
|
|
|
128
128
|
data.byteOffset,
|
|
129
129
|
data.byteLength / Uint8ClampedArray.BYTES_PER_ELEMENT
|
|
130
130
|
);
|
|
131
|
-
const imageData = new ImageData(pixelData, this.
|
|
132
|
-
ctx.putImageData(imageData, this.
|
|
131
|
+
const imageData = new ImageData(pixelData, this.qm, this.Ly);
|
|
132
|
+
ctx.putImageData(imageData, this.qm, this.Ly);
|
|
133
133
|
const dataUri = canvas.toDataURL("image/png");
|
|
134
134
|
const a = document.createElement("a");
|
|
135
135
|
const e = document.createEvent("MouseEvent");
|