rhodonite 0.25.0 → 0.26.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.
Files changed (469) hide show
  1. package/README.md +93 -19
  2. package/VERSION-FILE +1 -1
  3. package/dist/esm/foundation/components/BlendShape/BlendShapeComponent.d.ts +54 -0
  4. package/dist/esm/foundation/components/BlendShape/BlendShapeComponent.js +1 -1
  5. package/dist/esm/foundation/components/Camera/CameraComponent.d.ts +34 -0
  6. package/dist/esm/foundation/components/Camera/CameraComponent.js +1 -1
  7. package/dist/esm/foundation/components/Light/LightComponent.d.ts +3 -1
  8. package/dist/esm/foundation/components/Light/LightComponent.js +1 -1
  9. package/dist/esm/foundation/components/Mesh/MeshComponent.js +1 -1
  10. package/dist/esm/foundation/components/MeshRenderer/MeshRendererComponent.js +1 -1
  11. package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.d.ts +16 -0
  12. package/dist/esm/foundation/components/SceneGraph/SceneGraphComponent.js +1 -1
  13. package/dist/esm/foundation/components/Shape/ShapeComponent.js +1 -1
  14. package/dist/esm/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +1 -1
  15. package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +1 -1
  16. package/dist/esm/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +1 -1
  17. package/dist/esm/foundation/components/Skeletal/SkeletalComponent.d.ts +48 -0
  18. package/dist/esm/foundation/components/Skeletal/SkeletalComponent.js +1 -1
  19. package/dist/esm/foundation/components/Transform/TransformComponent.js +1 -1
  20. package/dist/esm/foundation/components/Trigger/TriggerComponent.js +1 -1
  21. package/dist/esm/foundation/components/Vrm/VrmComponent.js +1 -1
  22. package/dist/esm/foundation/constraints/VrmAimConstraint.js +1 -1
  23. package/dist/esm/foundation/constraints/VrmRollConstraint.js +1 -1
  24. package/dist/esm/foundation/constraints/VrmRotationConstraint.js +1 -1
  25. package/dist/esm/foundation/core/Component.js +1 -1
  26. package/dist/esm/foundation/core/ComponentRepository.js +1 -1
  27. package/dist/esm/foundation/core/Entity.js +1 -1
  28. package/dist/esm/foundation/core/EntityRepository.js +1 -1
  29. package/dist/esm/foundation/geometry/ComplexVertexAttribute.js +1 -1
  30. package/dist/esm/foundation/geometry/Mesh.js +1 -1
  31. package/dist/esm/foundation/geometry/Primitive.js +1 -1
  32. package/dist/esm/foundation/gizmos/AABBGizmo.js +1 -1
  33. package/dist/esm/foundation/gizmos/CapsuleColliderGizmo.js +1 -1
  34. package/dist/esm/foundation/gizmos/Gizmo.d.ts +13 -0
  35. package/dist/esm/foundation/gizmos/Gizmo.js +1 -1
  36. package/dist/esm/foundation/gizmos/JointGizmo.js +1 -1
  37. package/dist/esm/foundation/gizmos/LightGizmo.d.ts +0 -1
  38. package/dist/esm/foundation/gizmos/LightGizmo.js +1 -1
  39. package/dist/esm/foundation/gizmos/LocatorGizmo.js +1 -1
  40. package/dist/esm/foundation/gizmos/RotationGizmo.js +1 -1
  41. package/dist/esm/foundation/gizmos/ScaleGizmo.js +1 -1
  42. package/dist/esm/foundation/gizmos/ShapeGizmo.js +1 -1
  43. package/dist/esm/foundation/gizmos/SphereColliderGizmo.js +1 -1
  44. package/dist/esm/foundation/gizmos/TranslationGizmo.js +1 -1
  45. package/dist/esm/foundation/helpers/BloomHelper.js +1 -1
  46. package/dist/esm/foundation/helpers/GaussianBlurHelper.js +1 -1
  47. package/dist/esm/foundation/helpers/Shadow/PointShadowMap.js +1 -1
  48. package/dist/esm/foundation/helpers/Shadow/ShadowMap.js +1 -1
  49. package/dist/esm/foundation/helpers/Shadow/ShadowSystem.js +1 -1
  50. package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.d.ts +25 -0
  51. package/dist/esm/foundation/helpers/materials/createMotionVectorMaterial.js +1 -0
  52. package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.d.ts +33 -0
  53. package/dist/esm/foundation/helpers/materials/createTemporalAAResolveMaterial.js +1 -0
  54. package/dist/esm/foundation/importer/AnimationAssigner.js +1 -1
  55. package/dist/esm/foundation/importer/DrcPointCloudImporter.js +1 -1
  56. package/dist/esm/foundation/importer/Gltf2Importer.js +1 -1
  57. package/dist/esm/foundation/importer/GltfImporter.js +1 -1
  58. package/dist/esm/foundation/importer/ModelConverter.js +1 -1
  59. package/dist/esm/foundation/importer/RhodoniteImportExtension.js +1 -1
  60. package/dist/esm/foundation/importer/Vrm0xImporter.js +1 -1
  61. package/dist/esm/foundation/importer/VrmImporter.js +1 -1
  62. package/dist/esm/foundation/materials/contents/CustomMaterialContent.js +1 -1
  63. package/dist/esm/foundation/materials/contents/MToon0xMaterialContent.js +18 -18
  64. package/dist/esm/foundation/materials/contents/MToon1MaterialContent.js +6 -6
  65. package/dist/esm/foundation/materials/core/AbstractMaterialContent.d.ts +11 -0
  66. package/dist/esm/foundation/materials/core/AbstractMaterialContent.js +1 -1
  67. package/dist/esm/foundation/materials/core/ShaderityUtilityWebGL.js +2 -2
  68. package/dist/esm/foundation/materials/core/ShaderityUtilityWebGPU.js +2 -2
  69. package/dist/esm/foundation/materials/nodes/CastToFloatShaderNode.js +1 -1
  70. package/dist/esm/foundation/materials/nodes/MergeVectorShaderNode.js +1 -1
  71. package/dist/esm/foundation/materials/nodes/Random_HashPRNGShaderNode.js +1 -1
  72. package/dist/esm/foundation/materials/nodes/Random_SinHashShaderNode.js +1 -1
  73. package/dist/esm/foundation/materials/nodes/SplitVectorShaderNode.js +1 -1
  74. package/dist/esm/foundation/math/MathClassUtil.js +1 -1
  75. package/dist/esm/foundation/math/Quaternion.js +1 -1
  76. package/dist/esm/foundation/math/Transform3D.js +1 -1
  77. package/dist/esm/foundation/math/shapes/MathSphere.js +1 -1
  78. package/dist/esm/foundation/memory/Accessor.js +6 -6
  79. package/dist/esm/foundation/memory/BufferView.js +1 -1
  80. package/dist/esm/foundation/misc/cache/Cache.js +1 -1
  81. package/dist/esm/foundation/physics/VRMSpring/CapsuleCollider.js +1 -1
  82. package/dist/esm/foundation/physics/VRMSpring/SphereCollider.js +1 -1
  83. package/dist/esm/foundation/physics/VRMSpring/VRMSpringBone.js +1 -1
  84. package/dist/esm/foundation/renderer/Frame.js +1 -1
  85. package/dist/esm/foundation/renderer/RenderPass.js +1 -1
  86. package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.d.ts +33 -0
  87. package/dist/esm/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +1 -0
  88. package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +135 -0
  89. package/dist/esm/foundation/renderer/TemporalAA/TemporalAASystem.js +1 -0
  90. package/dist/esm/foundation/renderer/pipelines/DeferredRenderPipeline.js +1 -1
  91. package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +62 -16
  92. package/dist/esm/foundation/renderer/pipelines/ForwardRenderPipeline.js +1 -1
  93. package/dist/esm/foundation/system/Engine.d.ts +37 -3
  94. package/dist/esm/foundation/system/Engine.js +1 -1
  95. package/dist/esm/foundation/textures/AbstractTexture.js +1 -1
  96. package/dist/esm/foundation/textures/CubeTexture.js +1 -1
  97. package/dist/esm/foundation/textures/RenderTargetTexture.js +1 -1
  98. package/dist/esm/foundation/textures/RenderTargetTexture2DArray.js +1 -1
  99. package/dist/esm/foundation/textures/RenderTargetTextureCube.js +1 -1
  100. package/dist/esm/foundation/textures/Texture.js +1 -1
  101. package/dist/esm/foundation/textures/TextureDataFloat.js +1 -1
  102. package/dist/esm/foundation/textures/VideoTexture.js +1 -1
  103. package/dist/esm/version.js +1 -1
  104. package/dist/esm/webgl/MultiDraw.js +1 -1
  105. package/dist/esm/webgl/MultiDrawRepository.js +1 -1
  106. package/dist/esm/webgl/WebGLStereoUtil.js +1 -1
  107. package/dist/esm/webgl/WebGLStrategyWebGL2.d.ts +8 -0
  108. package/dist/esm/webgl/WebGLStrategyWebGL2.js +47 -28
  109. package/dist/esm/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +0 -3
  110. package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.js +35 -0
  111. package/dist/esm/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +140 -0
  112. package/dist/esm/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.js +175 -0
  113. package/dist/esm/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.js +18 -0
  114. package/dist/esm/webgl/shaders/StandardShaderPart.js +3 -3
  115. package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.js +5 -5
  116. package/dist/esm/webgl/shaders/nodes/UniformDataShader.js +9 -9
  117. package/dist/esm/webgpu/GpuCullingRegistry.js +1 -1
  118. package/dist/esm/webgpu/GpuDeformRegistry.js +1 -1
  119. package/dist/esm/webgpu/WebGpuGpuCulling.js +1 -1
  120. package/dist/esm/webgpu/WebGpuGpuTimer.js +1 -1
  121. package/dist/esm/webgpu/WebGpuLightClusterBuilder.js +1 -1
  122. package/dist/esm/webgpu/WebGpuResourceRepository.js +3 -3
  123. package/dist/esm/webgpu/WebGpuStrategyBasic.d.ts +8 -0
  124. package/dist/esm/webgpu/WebGpuStrategyBasic.js +78 -59
  125. package/dist/esm/webgpu/WebGpuVertexDeformer.js +1 -1
  126. package/dist/esm/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.wgsl.js +30 -0
  127. package/dist/esm/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.wgsl.js +133 -0
  128. package/dist/esm/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.wgsl.js +169 -0
  129. package/dist/esm/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.wgsl.js +19 -0
  130. package/dist/esmdev/foundation/components/BlendShape/BlendShapeComponent.d.ts +54 -0
  131. package/dist/esmdev/foundation/components/BlendShape/BlendShapeComponent.js +107 -1
  132. package/dist/esmdev/foundation/components/Camera/CameraComponent.d.ts +34 -0
  133. package/dist/esmdev/foundation/components/Camera/CameraComponent.js +118 -46
  134. package/dist/esmdev/foundation/components/CameraController/CameraControllerComponent.js +8 -8
  135. package/dist/esmdev/foundation/components/CharacterController/CharacterAnimationController.js +74 -74
  136. package/dist/esmdev/foundation/components/CharacterController/CharacterControllerComponent.js +39 -39
  137. package/dist/esmdev/foundation/components/Constraint/ConstraintComponent.js +4 -4
  138. package/dist/esmdev/foundation/components/Light/LightComponent.d.ts +3 -1
  139. package/dist/esmdev/foundation/components/Light/LightComponent.js +126 -121
  140. package/dist/esmdev/foundation/components/Mesh/MeshComponent.js +50 -50
  141. package/dist/esmdev/foundation/components/MeshRenderer/MeshRendererComponent.js +96 -92
  142. package/dist/esmdev/foundation/components/Physics/PhysicsComponent.js +73 -73
  143. package/dist/esmdev/foundation/components/Raymarching/RaymarchingComponent.js +54 -54
  144. package/dist/esmdev/foundation/components/Raymarching/RaymarchingSdfEvaluator.js +251 -251
  145. package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.d.ts +16 -0
  146. package/dist/esmdev/foundation/components/SceneGraph/SceneGraphComponent.js +375 -343
  147. package/dist/esmdev/foundation/components/Shape/ShapeComponent.js +31 -31
  148. package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/AbsoluteAnimation.js +5 -5
  149. package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetarget.js +5 -5
  150. package/dist/esmdev/foundation/components/Skeletal/AnimationRetarget/GlobalRetargetReverse.js +9 -9
  151. package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.d.ts +48 -0
  152. package/dist/esmdev/foundation/components/Skeletal/SkeletalComponent.js +337 -205
  153. package/dist/esmdev/foundation/components/Transform/TransformComponent.js +93 -93
  154. package/dist/esmdev/foundation/components/Trigger/TriggerComponent.js +61 -61
  155. package/dist/esmdev/foundation/components/Vrm/VrmComponent.js +44 -44
  156. package/dist/esmdev/foundation/constraints/VrmAimConstraint.js +11 -11
  157. package/dist/esmdev/foundation/constraints/VrmRollConstraint.js +16 -16
  158. package/dist/esmdev/foundation/constraints/VrmRotationConstraint.js +10 -10
  159. package/dist/esmdev/foundation/core/Component.js +32 -32
  160. package/dist/esmdev/foundation/core/ComponentMemoryRegistry.js +42 -42
  161. package/dist/esmdev/foundation/core/ComponentRepository.js +37 -37
  162. package/dist/esmdev/foundation/core/Config.js +9 -9
  163. package/dist/esmdev/foundation/core/Entity.js +9 -9
  164. package/dist/esmdev/foundation/core/EntityRepository.js +19 -19
  165. package/dist/esmdev/foundation/core/GlobalDataRepository.js +17 -17
  166. package/dist/esmdev/foundation/core/MemoryManager.js +25 -25
  167. package/dist/esmdev/foundation/core/RnObject.js +37 -37
  168. package/dist/esmdev/foundation/definitions/Blend.js +3 -3
  169. package/dist/esmdev/foundation/definitions/ComponentType.js +7 -7
  170. package/dist/esmdev/foundation/definitions/CompositionType.js +50 -50
  171. package/dist/esmdev/foundation/definitions/CompressionTextureType.js +6 -6
  172. package/dist/esmdev/foundation/definitions/ShaderSemantics.js +6 -6
  173. package/dist/esmdev/foundation/definitions/TextureFormat.js +3 -3
  174. package/dist/esmdev/foundation/definitions/TextureParameter.js +3 -3
  175. package/dist/esmdev/foundation/definitions/VertexAttribute.js +30 -30
  176. package/dist/esmdev/foundation/enhanced_js_objects/Array.js +2 -2
  177. package/dist/esmdev/foundation/exporter/Gltf2Exporter.js +112 -112
  178. package/dist/esmdev/foundation/geometry/ComplexVertexAttribute.js +24 -24
  179. package/dist/esmdev/foundation/geometry/Frustum.js +41 -41
  180. package/dist/esmdev/foundation/geometry/Mesh.js +218 -218
  181. package/dist/esmdev/foundation/geometry/Primitive.js +133 -133
  182. package/dist/esmdev/foundation/geometry/SimpleVertexAttribute.js +7 -7
  183. package/dist/esmdev/foundation/geometry/shapes/Cylinder.js +3 -3
  184. package/dist/esmdev/foundation/geometry/shapes/Joint.js +33 -33
  185. package/dist/esmdev/foundation/gizmos/AABBGizmo.js +17 -20
  186. package/dist/esmdev/foundation/gizmos/CapsuleColliderGizmo.js +24 -26
  187. package/dist/esmdev/foundation/gizmos/Gizmo.d.ts +13 -0
  188. package/dist/esmdev/foundation/gizmos/Gizmo.js +43 -21
  189. package/dist/esmdev/foundation/gizmos/JointGizmo.js +38 -40
  190. package/dist/esmdev/foundation/gizmos/LightGizmo.d.ts +0 -1
  191. package/dist/esmdev/foundation/gizmos/LightGizmo.js +26 -30
  192. package/dist/esmdev/foundation/gizmos/LocatorGizmo.js +26 -29
  193. package/dist/esmdev/foundation/gizmos/RotationGizmo.js +217 -219
  194. package/dist/esmdev/foundation/gizmos/ScaleGizmo.js +135 -137
  195. package/dist/esmdev/foundation/gizmos/ShapeGizmo.js +44 -47
  196. package/dist/esmdev/foundation/gizmos/SphereColliderGizmo.js +25 -27
  197. package/dist/esmdev/foundation/gizmos/TranslationGizmo.js +132 -134
  198. package/dist/esmdev/foundation/helpers/BloomHelper.js +34 -34
  199. package/dist/esmdev/foundation/helpers/GaussianBlurHelper.js +18 -18
  200. package/dist/esmdev/foundation/helpers/Shadow/PointShadowMap.js +12 -12
  201. package/dist/esmdev/foundation/helpers/Shadow/ShadowMap.js +5 -5
  202. package/dist/esmdev/foundation/helpers/Shadow/ShadowSystem.js +119 -119
  203. package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.d.ts +25 -0
  204. package/dist/esmdev/foundation/helpers/materials/createMotionVectorMaterial.js +61 -0
  205. package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.d.ts +33 -0
  206. package/dist/esmdev/foundation/helpers/materials/createTemporalAAResolveMaterial.js +127 -0
  207. package/dist/esmdev/foundation/importer/AnimationAssigner.js +44 -44
  208. package/dist/esmdev/foundation/importer/DrcPointCloudImporter.js +33 -33
  209. package/dist/esmdev/foundation/importer/Gltf2Importer.js +14 -14
  210. package/dist/esmdev/foundation/importer/GltfImporter.js +22 -22
  211. package/dist/esmdev/foundation/importer/ModelConverter.js +131 -131
  212. package/dist/esmdev/foundation/importer/RhodoniteImportExtension.js +6 -6
  213. package/dist/esmdev/foundation/importer/Vrm0xImporter.js +48 -48
  214. package/dist/esmdev/foundation/importer/VrmImporter.js +10 -10
  215. package/dist/esmdev/foundation/materials/contents/CustomMaterialContent.js +27 -27
  216. package/dist/esmdev/foundation/materials/contents/DepthEncodeMaterialContent.js +2 -2
  217. package/dist/esmdev/foundation/materials/contents/MToon0xMaterialContent.js +138 -138
  218. package/dist/esmdev/foundation/materials/contents/MToon1MaterialContent.js +19 -19
  219. package/dist/esmdev/foundation/materials/contents/ShadowMapDecodeClassicMaterialContent.js +5 -5
  220. package/dist/esmdev/foundation/materials/contents/VarianceShadowMapDecodeClassicMaterialContent.js +5 -5
  221. package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.d.ts +11 -0
  222. package/dist/esmdev/foundation/materials/core/AbstractMaterialContent.js +68 -53
  223. package/dist/esmdev/foundation/materials/core/AbstractShaderNode.js +26 -26
  224. package/dist/esmdev/foundation/materials/core/DummyTextures.js +3 -3
  225. package/dist/esmdev/foundation/materials/core/Material.js +115 -115
  226. package/dist/esmdev/foundation/materials/core/MaterialRepository.js +65 -65
  227. package/dist/esmdev/foundation/materials/core/ShaderGraphResolver.js +38 -38
  228. package/dist/esmdev/foundation/materials/core/ShaderHandler.js +4 -4
  229. package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGL.js +16 -17
  230. package/dist/esmdev/foundation/materials/core/ShaderityUtilityWebGPU.js +17 -18
  231. package/dist/esmdev/foundation/materials/nodes/AbsShaderNode.js +13 -13
  232. package/dist/esmdev/foundation/materials/nodes/AcosShaderNode.js +13 -13
  233. package/dist/esmdev/foundation/materials/nodes/AddShaderNode.js +18 -18
  234. package/dist/esmdev/foundation/materials/nodes/AlphaTestShaderNode.js +5 -5
  235. package/dist/esmdev/foundation/materials/nodes/AndShaderNode.js +6 -6
  236. package/dist/esmdev/foundation/materials/nodes/Atan2ShaderNode.js +15 -15
  237. package/dist/esmdev/foundation/materials/nodes/AttributeColorShaderNode.js +1 -1
  238. package/dist/esmdev/foundation/materials/nodes/AttributeInstanceIdsShaderNode.js +1 -1
  239. package/dist/esmdev/foundation/materials/nodes/AttributeJointShaderNode.js +1 -1
  240. package/dist/esmdev/foundation/materials/nodes/AttributeNormalShaderNode.js +1 -1
  241. package/dist/esmdev/foundation/materials/nodes/AttributePositionShaderNode.js +2 -2
  242. package/dist/esmdev/foundation/materials/nodes/AttributeTangentShaderNode.js +1 -1
  243. package/dist/esmdev/foundation/materials/nodes/AttributeTexcoordShaderNode.js +2 -2
  244. package/dist/esmdev/foundation/materials/nodes/AttributeWeightShaderNode.js +1 -1
  245. package/dist/esmdev/foundation/materials/nodes/BlockBeginShaderNode.js +11 -11
  246. package/dist/esmdev/foundation/materials/nodes/BlockEndShaderNode.js +6 -6
  247. package/dist/esmdev/foundation/materials/nodes/BranchShaderNode.js +15 -15
  248. package/dist/esmdev/foundation/materials/nodes/CalcBitangentShaderNode.js +7 -7
  249. package/dist/esmdev/foundation/materials/nodes/CastToFloatShaderNode.js +13 -13
  250. package/dist/esmdev/foundation/materials/nodes/ClampShaderNode.js +15 -15
  251. package/dist/esmdev/foundation/materials/nodes/ClassicShaderNode.js +11 -11
  252. package/dist/esmdev/foundation/materials/nodes/ConstantScalarVariableShaderNode.js +1 -1
  253. package/dist/esmdev/foundation/materials/nodes/ConstantVariableShaderNode.js +5 -5
  254. package/dist/esmdev/foundation/materials/nodes/ConstantVector2VariableShaderNode.js +1 -1
  255. package/dist/esmdev/foundation/materials/nodes/ConstantVector3VariableShaderNode.js +1 -1
  256. package/dist/esmdev/foundation/materials/nodes/ConstantVector4VariableShaderNode.js +1 -1
  257. package/dist/esmdev/foundation/materials/nodes/CosShaderNode.js +13 -13
  258. package/dist/esmdev/foundation/materials/nodes/DiscardShaderNode.js +2 -2
  259. package/dist/esmdev/foundation/materials/nodes/DotProductShaderNode.js +10 -10
  260. package/dist/esmdev/foundation/materials/nodes/EqualShaderNode.js +10 -10
  261. package/dist/esmdev/foundation/materials/nodes/FlatShaderNode.js +5 -5
  262. package/dist/esmdev/foundation/materials/nodes/GreaterOrEqualShaderNode.js +10 -10
  263. package/dist/esmdev/foundation/materials/nodes/GreaterShaderNode.js +3 -3
  264. package/dist/esmdev/foundation/materials/nodes/GreaterThanShaderNode.js +10 -10
  265. package/dist/esmdev/foundation/materials/nodes/LengthShaderNode.js +13 -13
  266. package/dist/esmdev/foundation/materials/nodes/LessOrEqualShaderNode.js +10 -10
  267. package/dist/esmdev/foundation/materials/nodes/LessThanShaderNode.js +10 -10
  268. package/dist/esmdev/foundation/materials/nodes/MergeVectorShaderNode.js +19 -19
  269. package/dist/esmdev/foundation/materials/nodes/MinShaderNode.js +18 -18
  270. package/dist/esmdev/foundation/materials/nodes/MultiplyShaderNode.js +21 -21
  271. package/dist/esmdev/foundation/materials/nodes/NormalMatrixShaderNode.js +1 -1
  272. package/dist/esmdev/foundation/materials/nodes/NormalizeShaderNode.js +9 -9
  273. package/dist/esmdev/foundation/materials/nodes/NotEqualShaderNode.js +10 -10
  274. package/dist/esmdev/foundation/materials/nodes/OrShaderNode.js +6 -6
  275. package/dist/esmdev/foundation/materials/nodes/OutColorShaderNode.js +2 -2
  276. package/dist/esmdev/foundation/materials/nodes/OutPositionShaderNode.js +2 -2
  277. package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyPropsShaderNode.js +5 -5
  278. package/dist/esmdev/foundation/materials/nodes/PbrAnisotropyRotationShaderNode.js +3 -3
  279. package/dist/esmdev/foundation/materials/nodes/PbrBaseColorPropsShaderNode.js +5 -5
  280. package/dist/esmdev/foundation/materials/nodes/PbrClearcoatPropsShaderNode.js +7 -7
  281. package/dist/esmdev/foundation/materials/nodes/PbrDiffuseTransmissionPropsShaderNode.js +6 -6
  282. package/dist/esmdev/foundation/materials/nodes/PbrEmissivePropsShaderNode.js +5 -5
  283. package/dist/esmdev/foundation/materials/nodes/PbrIridescencePropsShaderNode.js +8 -8
  284. package/dist/esmdev/foundation/materials/nodes/PbrMetallicRoughnessPropsShaderNode.js +6 -6
  285. package/dist/esmdev/foundation/materials/nodes/PbrNormalPropsShaderNode.js +11 -11
  286. package/dist/esmdev/foundation/materials/nodes/PbrOcclusionPropsShaderNode.js +4 -4
  287. package/dist/esmdev/foundation/materials/nodes/PbrShaderShaderNode.js +21 -21
  288. package/dist/esmdev/foundation/materials/nodes/PbrSheenPropsShaderNode.js +6 -6
  289. package/dist/esmdev/foundation/materials/nodes/PbrSpecularPropsShaderNode.js +6 -6
  290. package/dist/esmdev/foundation/materials/nodes/PbrTransmissionPropsShaderNode.js +4 -4
  291. package/dist/esmdev/foundation/materials/nodes/PbrVolumePropsShaderNode.js +6 -6
  292. package/dist/esmdev/foundation/materials/nodes/PremultipliedAlphaShaderNode.js +4 -4
  293. package/dist/esmdev/foundation/materials/nodes/ProcessGeometryShaderNode.js +22 -22
  294. package/dist/esmdev/foundation/materials/nodes/ProjectionMatrixShaderNode.js +1 -1
  295. package/dist/esmdev/foundation/materials/nodes/Random_HashPRNGShaderNode.js +12 -12
  296. package/dist/esmdev/foundation/materials/nodes/Random_SinHashShaderNode.js +12 -12
  297. package/dist/esmdev/foundation/materials/nodes/RemapShaderNode.js +17 -17
  298. package/dist/esmdev/foundation/materials/nodes/SinShaderNode.js +13 -13
  299. package/dist/esmdev/foundation/materials/nodes/SmoothStepShaderNode.js +15 -15
  300. package/dist/esmdev/foundation/materials/nodes/SplitVectorShaderNode.js +17 -17
  301. package/dist/esmdev/foundation/materials/nodes/StepShaderNode.js +14 -14
  302. package/dist/esmdev/foundation/materials/nodes/TanShaderNode.js +13 -13
  303. package/dist/esmdev/foundation/materials/nodes/Texture2DShaderNode.js +16 -16
  304. package/dist/esmdev/foundation/materials/nodes/TimeShaderNode.js +1 -1
  305. package/dist/esmdev/foundation/materials/nodes/TransformShaderNode.js +10 -10
  306. package/dist/esmdev/foundation/materials/nodes/UniformDataShaderNode.js +5 -5
  307. package/dist/esmdev/foundation/materials/nodes/ViewMatrixShaderNode.js +1 -1
  308. package/dist/esmdev/foundation/materials/nodes/WireframeMaterialNode.js +3 -3
  309. package/dist/esmdev/foundation/materials/nodes/WorldMatrixShaderNode.js +1 -1
  310. package/dist/esmdev/foundation/materials/nodes/raymarching/BendXYShaderNode.js +4 -4
  311. package/dist/esmdev/foundation/materials/nodes/raymarching/BendXZShaderNode.js +4 -4
  312. package/dist/esmdev/foundation/materials/nodes/raymarching/BendYXShaderNode.js +4 -4
  313. package/dist/esmdev/foundation/materials/nodes/raymarching/BendYZShaderNode.js +4 -4
  314. package/dist/esmdev/foundation/materials/nodes/raymarching/BendZXShaderNode.js +4 -4
  315. package/dist/esmdev/foundation/materials/nodes/raymarching/BendZYShaderNode.js +4 -4
  316. package/dist/esmdev/foundation/materials/nodes/raymarching/InitialPositionShaderNode.js +1 -1
  317. package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothIntersectionShaderNode.js +5 -5
  318. package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothSubtractionShaderNode.js +5 -5
  319. package/dist/esmdev/foundation/materials/nodes/raymarching/OpSmoothUnionShaderNode.js +5 -5
  320. package/dist/esmdev/foundation/materials/nodes/raymarching/OpSubtractionShaderNode.js +6 -6
  321. package/dist/esmdev/foundation/materials/nodes/raymarching/OpUnionShaderNode.js +6 -6
  322. package/dist/esmdev/foundation/materials/nodes/raymarching/OutDistanceShaderNode.js +16 -16
  323. package/dist/esmdev/foundation/materials/nodes/raymarching/OutShadingColorShaderNode.js +2 -2
  324. package/dist/esmdev/foundation/materials/nodes/raymarching/OutUnionShaderNode.js +16 -16
  325. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchCameraPositionShaderNode.js +2 -2
  326. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitDistanceShaderNode.js +2 -2
  327. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitNormalShaderNode.js +2 -2
  328. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchHitPositionShaderNode.js +2 -2
  329. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdShaderNode.js +2 -2
  330. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchObjectIdUniformShaderNode.js +4 -4
  331. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchRayDirectionShaderNode.js +2 -2
  332. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchTBNShaderNode.js +2 -2
  333. package/dist/esmdev/foundation/materials/nodes/raymarching/RaymarchViewDirectionShaderNode.js +2 -2
  334. package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyTransformShaderNode.js +9 -9
  335. package/dist/esmdev/foundation/materials/nodes/raymarching/SdApplyWorldMatrixShaderNode.js +5 -5
  336. package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarXShaderNode.js +3 -3
  337. package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarYShaderNode.js +3 -3
  338. package/dist/esmdev/foundation/materials/nodes/raymarching/SdBarZShaderNode.js +3 -3
  339. package/dist/esmdev/foundation/materials/nodes/raymarching/SdBoxShaderNode.js +3 -3
  340. package/dist/esmdev/foundation/materials/nodes/raymarching/SdCapsuleShaderNode.js +5 -5
  341. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatShaderNode.js +4 -4
  342. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXShaderNode.js +4 -4
  343. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatXYShaderNode.js +4 -4
  344. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYShaderNode.js +4 -4
  345. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatYZShaderNode.js +4 -4
  346. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZShaderNode.js +4 -4
  347. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRepeatZXShaderNode.js +4 -4
  348. package/dist/esmdev/foundation/materials/nodes/raymarching/SdRoundBoxShaderNode.js +4 -4
  349. package/dist/esmdev/foundation/materials/nodes/raymarching/SdSphereShaderNode.js +3 -3
  350. package/dist/esmdev/foundation/materials/nodes/raymarching/SdTorusShaderNode.js +4 -4
  351. package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeXShaderNode.js +3 -3
  352. package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeYShaderNode.js +3 -3
  353. package/dist/esmdev/foundation/materials/nodes/raymarching/SdTubeZShaderNode.js +3 -3
  354. package/dist/esmdev/foundation/materials/nodes/raymarching/TwistXShaderNode.js +4 -4
  355. package/dist/esmdev/foundation/materials/nodes/raymarching/TwistYShaderNode.js +4 -4
  356. package/dist/esmdev/foundation/materials/nodes/raymarching/TwistZShaderNode.js +4 -4
  357. package/dist/esmdev/foundation/math/AABB.js +132 -132
  358. package/dist/esmdev/foundation/math/AnimatedQuaternion.js +54 -54
  359. package/dist/esmdev/foundation/math/AnimatedScalar.js +55 -55
  360. package/dist/esmdev/foundation/math/AnimatedValueEvaluationState.js +20 -20
  361. package/dist/esmdev/foundation/math/AnimatedVector2.js +55 -55
  362. package/dist/esmdev/foundation/math/AnimatedVector3.js +55 -55
  363. package/dist/esmdev/foundation/math/AnimatedVector4.js +55 -55
  364. package/dist/esmdev/foundation/math/AnimatedVectorN.js +55 -55
  365. package/dist/esmdev/foundation/math/IdentityMatrix33.js +2 -2
  366. package/dist/esmdev/foundation/math/IdentityMatrix44.js +2 -2
  367. package/dist/esmdev/foundation/math/MathClassUtil.js +4 -4
  368. package/dist/esmdev/foundation/math/Quaternion.js +20 -20
  369. package/dist/esmdev/foundation/math/Transform3D.js +83 -83
  370. package/dist/esmdev/foundation/math/shapes/MathSphere.js +9 -9
  371. package/dist/esmdev/foundation/memory/Accessor.js +370 -370
  372. package/dist/esmdev/foundation/memory/Buffer.js +40 -40
  373. package/dist/esmdev/foundation/memory/BufferView.js +33 -33
  374. package/dist/esmdev/foundation/misc/DataUtil.js +2 -2
  375. package/dist/esmdev/foundation/misc/EnumIO.js +10 -10
  376. package/dist/esmdev/foundation/misc/Logger.js +14 -14
  377. package/dist/esmdev/foundation/misc/RnPromise.js +14 -14
  378. package/dist/esmdev/foundation/misc/Time.js +27 -27
  379. package/dist/esmdev/foundation/misc/WeakOption.js +14 -14
  380. package/dist/esmdev/foundation/misc/cache/Cache.js +2 -2
  381. package/dist/esmdev/foundation/misc/cache/SymbolWeakMap.js +8 -8
  382. package/dist/esmdev/foundation/physics/PhysicsWorldQuery.js +13 -13
  383. package/dist/esmdev/foundation/physics/Rapier/RapierCharacterControllerStrategy.js +203 -203
  384. package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsStrategy.js +241 -241
  385. package/dist/esmdev/foundation/physics/Rapier/RapierPhysicsWorldQueryStrategy.js +3 -3
  386. package/dist/esmdev/foundation/physics/VRMSpring/CapsuleCollider.js +42 -42
  387. package/dist/esmdev/foundation/physics/VRMSpring/SphereCollider.js +27 -27
  388. package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBone.js +10 -10
  389. package/dist/esmdev/foundation/physics/VRMSpring/VRMSpringBonePhysicsStrategy.js +51 -51
  390. package/dist/esmdev/foundation/renderer/Expression.js +6 -6
  391. package/dist/esmdev/foundation/renderer/Frame.js +12 -12
  392. package/dist/esmdev/foundation/renderer/FrameBuffer.js +25 -25
  393. package/dist/esmdev/foundation/renderer/RenderPass.js +102 -99
  394. package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.d.ts +33 -0
  395. package/dist/esmdev/foundation/renderer/TemporalAA/PreviousFrameDataTracker.js +66 -0
  396. package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.d.ts +135 -0
  397. package/dist/esmdev/foundation/renderer/TemporalAA/TemporalAASystem.js +275 -0
  398. package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystem.js +153 -153
  399. package/dist/esmdev/foundation/renderer/lightCluster/LightClusterSystemStub.js +3 -3
  400. package/dist/esmdev/foundation/renderer/pipelines/DeferredRenderPipeline.js +6 -6
  401. package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.d.ts +62 -16
  402. package/dist/esmdev/foundation/renderer/pipelines/ForwardRenderPipeline.js +535 -428
  403. package/dist/esmdev/foundation/system/Engine.d.ts +37 -3
  404. package/dist/esmdev/foundation/system/Engine.js +266 -224
  405. package/dist/esmdev/foundation/system/EventPubSub.js +8 -8
  406. package/dist/esmdev/foundation/system/InputManager.js +56 -56
  407. package/dist/esmdev/foundation/system/ModuleManager.js +6 -6
  408. package/dist/esmdev/foundation/textures/AbstractTexture.js +50 -50
  409. package/dist/esmdev/foundation/textures/CubeTexture.js +32 -32
  410. package/dist/esmdev/foundation/textures/RenderBuffer.js +11 -11
  411. package/dist/esmdev/foundation/textures/RenderTargetTexture.js +25 -25
  412. package/dist/esmdev/foundation/textures/RenderTargetTexture2DArray.js +37 -37
  413. package/dist/esmdev/foundation/textures/RenderTargetTextureCube.js +19 -19
  414. package/dist/esmdev/foundation/textures/Sampler.js +24 -24
  415. package/dist/esmdev/foundation/textures/Texture.js +83 -83
  416. package/dist/esmdev/foundation/textures/TextureArray.js +8 -8
  417. package/dist/esmdev/foundation/textures/TextureDataFloat.js +26 -26
  418. package/dist/esmdev/foundation/textures/VideoTexture.js +24 -24
  419. package/dist/esmdev/version.js +2 -2
  420. package/dist/esmdev/webgl/InstanceSidTable.js +62 -62
  421. package/dist/esmdev/webgl/MultiDraw.js +2 -2
  422. package/dist/esmdev/webgl/MultiDrawRepository.js +30 -30
  423. package/dist/esmdev/webgl/WebGLContextWrapper.js +164 -164
  424. package/dist/esmdev/webgl/WebGLGpuTimer.js +32 -32
  425. package/dist/esmdev/webgl/WebGLResourceRepository.js +306 -306
  426. package/dist/esmdev/webgl/WebGLStereoUtil.js +42 -42
  427. package/dist/esmdev/webgl/WebGLStrategyWebGL2.d.ts +8 -0
  428. package/dist/esmdev/webgl/WebGLStrategyWebGL2.js +296 -261
  429. package/dist/esmdev/webgl/debug/ShaderParameterDebugger.js +4 -4
  430. package/dist/esmdev/webgl/shaderity_shaders/ClassicSingleShader/ClassicSingleShader.vert.js +2 -2
  431. package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.js +12 -0
  432. package/dist/esmdev/webgl/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.js +12 -0
  433. package/dist/esmdev/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.js +12 -0
  434. package/dist/esmdev/webgl/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.js +12 -0
  435. package/dist/esmdev/webgl/shaders/RaymarchingShaderPart.js +4 -4
  436. package/dist/esmdev/webgl/shaders/RaymarchingShadowShaderPart.js +14 -14
  437. package/dist/esmdev/webgl/shaders/StandardShaderPart.js +3 -3
  438. package/dist/esmdev/webgl/shaders/nodes/BlockBeginShader.js +10 -10
  439. package/dist/esmdev/webgl/shaders/nodes/BlockEndShader.js +10 -10
  440. package/dist/esmdev/webgl/shaders/nodes/ConstantVariableShader.js +21 -21
  441. package/dist/esmdev/webgl/shaders/nodes/DiscardShader.js +3 -3
  442. package/dist/esmdev/webgl/shaders/nodes/EndShader.js +3 -3
  443. package/dist/esmdev/webgl/shaders/nodes/OutDistance.js +12 -12
  444. package/dist/esmdev/webgl/shaders/nodes/OutUnion.js +9 -9
  445. package/dist/esmdev/webgl/shaders/nodes/RaymarchObjectIdUniform.js +8 -8
  446. package/dist/esmdev/webgl/shaders/nodes/SdApplyTransform.js +9 -9
  447. package/dist/esmdev/webgl/shaders/nodes/SdApplyWorldMatrix.js +8 -8
  448. package/dist/esmdev/webgl/shaders/nodes/Texture2DShader.js +23 -23
  449. package/dist/esmdev/webgl/shaders/nodes/UniformDataShader.js +23 -23
  450. package/dist/esmdev/webgl/textureLoader/KTX2TextureLoader.js +27 -27
  451. package/dist/esmdev/webgpu/GpuCullingRegistry.js +94 -94
  452. package/dist/esmdev/webgpu/GpuDeformRegistry.js +53 -53
  453. package/dist/esmdev/webgpu/RangeAllocator.js +16 -16
  454. package/dist/esmdev/webgpu/WebGpuBufferArena.js +21 -21
  455. package/dist/esmdev/webgpu/WebGpuDeviceWrapper.js +7 -7
  456. package/dist/esmdev/webgpu/WebGpuGpuCulling.js +198 -198
  457. package/dist/esmdev/webgpu/WebGpuGpuTimer.js +52 -52
  458. package/dist/esmdev/webgpu/WebGpuLightClusterBuilder.js +37 -37
  459. package/dist/esmdev/webgpu/WebGpuResourceRepository.js +597 -597
  460. package/dist/esmdev/webgpu/WebGpuStrategyBasic.d.ts +8 -0
  461. package/dist/esmdev/webgpu/WebGpuStrategyBasic.js +170 -133
  462. package/dist/esmdev/webgpu/WebGpuVertexDeformer.js +128 -128
  463. package/dist/esmdev/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.frag.wgsl.js +12 -0
  464. package/dist/esmdev/webgpu/shaderity_shaders/MotionVectorShader/MotionVectorShader.vert.wgsl.js +12 -0
  465. package/dist/esmdev/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.frag.wgsl.js +12 -0
  466. package/dist/esmdev/webgpu/shaderity_shaders/TemporalAAResolveShader/TemporalAAResolveShader.vert.wgsl.js +12 -0
  467. package/dist/esmdev/xr/WebARSystem.js +69 -69
  468. package/dist/esmdev/xr/WebXRSystem.js +153 -153
  469. package/package.json +1 -1
@@ -32,16 +32,16 @@ import { WebGLStereoUtil } from "./WebGLStereoUtil.js";
32
32
  var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResourceRepository {
33
33
  constructor() {
34
34
  super();
35
- this.qD = /* @__PURE__ */ new Map();
36
- this.rD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
37
- this.$C = /* @__PURE__ */ new Map();
38
- this.dD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
39
- this.eD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
40
- this.fD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
41
- this.gD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
42
- this.hD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
43
- this.iD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
44
- this.jD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
35
+ this.VD = /* @__PURE__ */ new Map();
36
+ this.WD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
37
+ this.ED = /* @__PURE__ */ new Map();
38
+ this.ID = CGAPIResourceRepository.InvalidCGAPIResourceUid;
39
+ this.JD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
40
+ this.KD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
41
+ this.LD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
42
+ this.MD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
43
+ this.ND = CGAPIResourceRepository.InvalidCGAPIResourceUid;
44
+ this.OD = CGAPIResourceRepository.InvalidCGAPIResourceUid;
45
45
  }
46
46
  /**
47
47
  * Gets the singleton instance of WebGLResourceRepository.
@@ -62,12 +62,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
62
62
  addWebGLContext(config, gl, canvas, asCurrent) {
63
63
  var _a;
64
64
  const glw = new WebGLContextWrapper(config, gl, canvas);
65
- this.qD.set("default", glw);
65
+ this.VD.set("default", glw);
66
66
  if (asCurrent) {
67
- (_a = this.aD) == null ? void 0 : _a.invalidateAll();
68
- this.aD = void 0;
69
- this.bD = void 0;
70
- this.ZC = glw;
67
+ (_a = this.FD) == null ? void 0 : _a.invalidateAll();
68
+ this.FD = void 0;
69
+ this.GD = void 0;
70
+ this.CD = glw;
71
71
  }
72
72
  }
73
73
  /**
@@ -90,20 +90,20 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
90
90
  * @returns The current WebGLContextWrapper instance or undefined if none is set
91
91
  */
92
92
  get currentWebGLContextWrapper() {
93
- return this.ZC;
93
+ return this.CD;
94
94
  }
95
95
  /**
96
96
  * Gets the engine-wide instance SID table used by multi-draw rendering.
97
97
  * The table is created lazily for the current WebGL context.
98
98
  */
99
99
  get instanceSidTable() {
100
- if (this.bD == null) {
101
- if (this.ZC == null) {
100
+ if (this.GD == null) {
101
+ if (this.CD == null) {
102
102
  throw new Error("No WebGL context is available for the instance SID table.");
103
103
  }
104
- this.bD = new InstanceSidTable(this.ZC);
104
+ this.GD = new InstanceSidTable(this.CD);
105
105
  }
106
- return this.bD;
106
+ return this.GD;
107
107
  }
108
108
  /**
109
109
  * Whether this context can use the instance SID path used by multi-draw rendering.
@@ -112,17 +112,17 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
112
112
  */
113
113
  get isInstanceSidTextureCapable() {
114
114
  var _a;
115
- return ((_a = this.ZC) == null ? void 0 : _a.isWebGL2) === true && this.ZC.webgl2ExtMD != null;
115
+ return ((_a = this.CD) == null ? void 0 : _a.isWebGL2) === true && this.CD.webgl2ExtMD != null;
116
116
  }
117
117
  /**
118
118
  * Gets the engine-wide multi-draw group repository, creating it lazily.
119
119
  * @param engine - The engine that owns the WebGL context
120
120
  */
121
121
  getMultiDrawRepository(engine) {
122
- if (this.aD == null) {
123
- this.aD = new MultiDrawRepository(engine);
122
+ if (this.FD == null) {
123
+ this.FD = new MultiDrawRepository(engine);
124
124
  }
125
- return this.aD;
125
+ return this.FD;
126
126
  }
127
127
  /**
128
128
  * Generates a unique resource handle for WebGL objects.
@@ -130,7 +130,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
130
130
  * @returns A unique WebGL resource handle
131
131
  */
132
132
  getResourceNumber() {
133
- return ++this.rD;
133
+ return ++this.WD;
134
134
  }
135
135
  /**
136
136
  * Registers a WebGL object and assigns it a unique handle.
@@ -138,10 +138,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
138
138
  * @param obj - The WebGL object to register
139
139
  * @returns The assigned resource handle
140
140
  */
141
- _C(obj) {
141
+ DD(obj) {
142
142
  const handle = this.getResourceNumber();
143
143
  obj._resourceUid = handle;
144
- this.$C.set(handle, obj);
144
+ this.ED.set(handle, obj);
145
145
  return handle;
146
146
  }
147
147
  /**
@@ -151,7 +151,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
151
151
  * @returns The WebGL resource or null if not found
152
152
  */
153
153
  getWebGLResource(WebGLResourceHandle) {
154
- const result = this.$C.get(WebGLResourceHandle);
154
+ const result = this.ED.get(WebGLResourceHandle);
155
155
  return result != null ? result : null;
156
156
  }
157
157
  /**
@@ -162,13 +162,13 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
162
162
  * @throws Error if no WebGL context is available
163
163
  */
164
164
  createIndexBuffer(accessor) {
165
- const gl = this.ZC.getRawContext();
165
+ const gl = this.CD.getRawContext();
166
166
  if (gl == null) {
167
167
  throw new Error("No WebGLRenderingContext set as Default.");
168
168
  }
169
- this.ZC.bindVertexArray(null);
169
+ this.CD.bindVertexArray(null);
170
170
  const ibo = gl.createBuffer();
171
- const resourceHandle = this._C(ibo);
171
+ const resourceHandle = this.DD(ibo);
172
172
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ibo);
173
173
  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, accessor.getTypedArray(), gl.STATIC_DRAW);
174
174
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
@@ -182,12 +182,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
182
182
  * @throws Error if no WebGL context is available or IBO not found
183
183
  */
184
184
  updateIndexBuffer(accessor, resourceHandle) {
185
- const glw = this.ZC;
185
+ const glw = this.CD;
186
186
  const gl = glw == null ? void 0 : glw.getRawContext();
187
187
  if (Is.not.exist(gl)) {
188
188
  throw new Error("No WebGLRenderingContext set as Default.");
189
189
  }
190
- const ibo = this.$C.get(resourceHandle);
190
+ const ibo = this.ED.get(resourceHandle);
191
191
  if (Is.not.exist(ibo)) {
192
192
  throw new Error("Not found IBO.");
193
193
  }
@@ -204,13 +204,13 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
204
204
  * @throws Error if no WebGL context is available
205
205
  */
206
206
  createVertexBuffer(accessor) {
207
- const gl = this.ZC.getRawContext();
207
+ const gl = this.CD.getRawContext();
208
208
  if (gl == null) {
209
209
  throw new Error("No WebGLRenderingContext set as Default.");
210
210
  }
211
- this.ZC.bindVertexArray(null);
211
+ this.CD.bindVertexArray(null);
212
212
  const vbo = gl.createBuffer();
213
- const resourceHandle = this._C(vbo);
213
+ const resourceHandle = this.DD(vbo);
214
214
  gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
215
215
  gl.bufferData(gl.ARRAY_BUFFER, accessor.getUint8Array(), gl.STATIC_DRAW);
216
216
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
@@ -224,13 +224,13 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
224
224
  * @throws Error if no WebGL context is available
225
225
  */
226
226
  createVertexBufferFromTypedArray(typedArray) {
227
- const gl = this.ZC.getRawContext();
227
+ const gl = this.CD.getRawContext();
228
228
  if (gl == null) {
229
229
  throw new Error("No WebGLRenderingContext set as Default.");
230
230
  }
231
- this.ZC.bindVertexArray(null);
231
+ this.CD.bindVertexArray(null);
232
232
  const vbo = gl.createBuffer();
233
- const resourceHandle = this._C(vbo);
233
+ const resourceHandle = this.DD(vbo);
234
234
  gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
235
235
  gl.bufferData(gl.ARRAY_BUFFER, typedArray, gl.STATIC_DRAW);
236
236
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
@@ -243,13 +243,13 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
243
243
  * @returns The handle of the created index buffer
244
244
  */
245
245
  createIndexBufferFromTypedArray(typedArray) {
246
- const gl = this.ZC.getRawContext();
246
+ const gl = this.CD.getRawContext();
247
247
  if (gl == null) {
248
248
  throw new Error("No WebGLRenderingContext set as Default.");
249
249
  }
250
- this.ZC.bindVertexArray(null);
250
+ this.CD.bindVertexArray(null);
251
251
  const ibo = gl.createBuffer();
252
- const resourceHandle = this._C(ibo);
252
+ const resourceHandle = this.DD(ibo);
253
253
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ibo);
254
254
  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, typedArray, gl.STATIC_DRAW);
255
255
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
@@ -263,12 +263,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
263
263
  * @throws Error if no WebGL context is available or VBO not found
264
264
  */
265
265
  updateVertexBuffer(accessor, resourceHandle) {
266
- const glw = this.ZC;
266
+ const glw = this.CD;
267
267
  const gl = glw == null ? void 0 : glw.getRawContext();
268
268
  if (!Is.exist(gl)) {
269
269
  throw new Error("No WebGLRenderingContext set as Default.");
270
270
  }
271
- const vbo = this.$C.get(resourceHandle);
271
+ const vbo = this.ED.get(resourceHandle);
272
272
  if (!Is.exist(vbo)) {
273
273
  throw new Error("Not found VBO.");
274
274
  }
@@ -289,11 +289,11 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
289
289
  */
290
290
  updateVertexBufferWithTypedArray(resourceHandle, typedArray) {
291
291
  var _a;
292
- const gl = (_a = this.ZC) == null ? void 0 : _a.getRawContext();
292
+ const gl = (_a = this.CD) == null ? void 0 : _a.getRawContext();
293
293
  if (!Is.exist(gl)) {
294
294
  throw new Error("No WebGLRenderingContext set as Default.");
295
295
  }
296
- const vbo = this.$C.get(resourceHandle);
296
+ const vbo = this.ED.get(resourceHandle);
297
297
  if (!Is.exist(vbo)) {
298
298
  throw new Error("Not found VBO.");
299
299
  }
@@ -308,15 +308,15 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
308
308
  * @throws Error if no WebGL context is available
309
309
  */
310
310
  createVertexArray() {
311
- const gl = this.ZC;
311
+ const gl = this.CD;
312
312
  if (gl == null) {
313
313
  throw new Error("No WebGLRenderingContext set as Default.");
314
314
  }
315
- const vao = this.ZC.createVertexArray();
315
+ const vao = this.CD.createVertexArray();
316
316
  if (Is.not.exist(vao)) {
317
317
  return void 0;
318
318
  }
319
- const resourceHandle = this._C(vao);
319
+ const resourceHandle = this.DD(vao);
320
320
  return resourceHandle;
321
321
  }
322
322
  /**
@@ -326,8 +326,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
326
326
  * @param textureUid - The handle of the texture to bind
327
327
  */
328
328
  bindTexture2D(textureSlotIndex, textureUid) {
329
- const texture = this.$C.get(textureUid);
330
- this.ZC.bindTexture2D(textureSlotIndex, texture);
329
+ const texture = this.ED.get(textureUid);
330
+ this.CD.bindTexture2D(textureSlotIndex, texture);
331
331
  }
332
332
  /**
333
333
  * Binds a texture sampler to the specified texture slot.
@@ -337,10 +337,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
337
337
  */
338
338
  bindTextureSampler(textureSlotIndex, samplerUid) {
339
339
  if (samplerUid === -1) {
340
- this.ZC.bindTextureSampler(textureSlotIndex, null);
340
+ this.CD.bindTextureSampler(textureSlotIndex, null);
341
341
  } else {
342
342
  const sampler = this.getWebGLResource(samplerUid);
343
- this.ZC.bindTextureSampler(textureSlotIndex, sampler);
343
+ this.CD.bindTextureSampler(textureSlotIndex, sampler);
344
344
  }
345
345
  }
346
346
  /**
@@ -351,7 +351,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
351
351
  */
352
352
  bindTextureCube(textureSlotIndex, textureUid) {
353
353
  const texture = this.getWebGLResource(textureUid);
354
- this.ZC.bindTextureCube(textureSlotIndex, texture);
354
+ this.CD.bindTextureCube(textureSlotIndex, texture);
355
355
  }
356
356
  /**
357
357
  * Binds a 2D texture array to the specified texture slot.
@@ -361,7 +361,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
361
361
  */
362
362
  bindTexture2DArray(textureSlotIndex, textureUid) {
363
363
  const texture = this.getWebGLResource(textureUid);
364
- this.ZC.bindTexture2DArray(textureSlotIndex, texture);
364
+ this.CD.bindTexture2DArray(textureSlotIndex, texture);
365
365
  }
366
366
  /**
367
367
  * Creates vertex buffers and index buffers for a primitive and returns handles for them.
@@ -437,7 +437,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
437
437
  attributeSemantics,
438
438
  onError
439
439
  }) {
440
- const gl = this.ZC.getRawContext();
440
+ const gl = this.CD.getRawContext();
441
441
  if (gl == null) {
442
442
  throw new Error("No WebGLRenderingContext set as Default.");
443
443
  }
@@ -446,7 +446,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
446
446
  gl.shaderSource(vertexShader, vertexShaderStr);
447
447
  gl.compileShader(vertexShader);
448
448
  if (isDebugMode) {
449
- const result = this.oD(
449
+ const result = this.TD(
450
450
  engine,
451
451
  material.materialTypeName,
452
452
  vertexShader,
@@ -461,7 +461,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
461
461
  gl.shaderSource(fragmentShader, fragmentShaderStr);
462
462
  gl.compileShader(fragmentShader);
463
463
  if (isDebugMode) {
464
- this.oD(engine, material.materialTypeName, fragmentShader, fragmentShaderStr, onError);
464
+ this.TD(engine, material.materialTypeName, fragmentShader, fragmentShaderStr, onError);
465
465
  }
466
466
  const shaderProgram = gl.createProgram();
467
467
  shaderProgram._engine = engine;
@@ -490,7 +490,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
490
490
  bindAttribLocation(VertexAttribute.MaterialSid.getAttributeSlot(), "a_materialSid");
491
491
  gl.linkProgram(shaderProgram);
492
492
  if (isDebugMode) {
493
- const result = this.sD(
493
+ const result = this.XD(
494
494
  engine,
495
495
  material.materialTypeName,
496
496
  shaderProgram,
@@ -501,8 +501,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
501
501
  return CGAPIResourceRepository.InvalidCGAPIResourceUid;
502
502
  }
503
503
  }
504
- shaderProgram.uD = this.rebuildProgramBySpector.bind(shaderProgram);
505
- const resourceHandle = this._C(shaderProgram);
504
+ shaderProgram.ZD = this.rebuildProgramBySpector.bind(shaderProgram);
505
+ const resourceHandle = this.DD(shaderProgram);
506
506
  gl.deleteShader(vertexShader);
507
507
  gl.deleteShader(fragmentShader);
508
508
  return resourceHandle;
@@ -517,8 +517,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
517
517
  * @param onError - Optional error callback function
518
518
  * @returns True if compilation succeeded, false otherwise
519
519
  */
520
- oD(engine, materialTypeName, shader, shaderText, onError) {
521
- const glw = this.ZC;
520
+ TD(engine, materialTypeName, shader, shaderText, onError) {
521
+ const glw = this.CD;
522
522
  const gl = glw.getRawContext();
523
523
  if (Is.false(gl.getShaderParameter(shader, gl.COMPILE_STATUS)) && Is.false(gl.isContextLost())) {
524
524
  engine.logger.info(`MaterialTypeName: ${materialTypeName}`);
@@ -544,8 +544,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
544
544
  * @param fragmentShaderText - The fragment shader source code for error reporting
545
545
  * @returns True if linking succeeded, false otherwise
546
546
  */
547
- sD(engine, materialTypeName, shaderProgram, vertexShaderText, fragmentShaderText) {
548
- const glw = this.ZC;
547
+ XD(engine, materialTypeName, shaderProgram, vertexShaderText, fragmentShaderText) {
548
+ const glw = this.CD;
549
549
  const gl = glw.getRawContext();
550
550
  if (Is.false(gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) && Is.false(gl.isContextLost())) {
551
551
  engine.logger.info(`MaterialTypeName: ${materialTypeName}`);
@@ -570,7 +570,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
570
570
  * @returns The WebGL program object with configured uniform locations
571
571
  */
572
572
  setupUniformLocations(config, shaderProgramUid, infoArray) {
573
- const glw = this.ZC;
573
+ const glw = this.CD;
574
574
  const gl = glw.getRawContext();
575
575
  const shaderProgram = this.getWebGLResource(shaderProgramUid);
576
576
  const infoArrayLen = infoArray.length;
@@ -629,7 +629,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
629
629
  }
630
630
  const textureUnit = value[0];
631
631
  if (textureUnits.get(semanticStr) !== textureUnit) {
632
- const gl = this.ZC.getRawContext();
632
+ const gl = this.CD.getRawContext();
633
633
  const loc = shaderProgram[semanticStr];
634
634
  gl.uniform1i(loc, textureUnit);
635
635
  textureUnits.set(semanticStr, textureUnit);
@@ -778,7 +778,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
778
778
  return false;
779
779
  }
780
780
  const uLocation = loc;
781
- const gl = this.ZC.getRawContext();
781
+ const gl = this.CD.getRawContext();
782
782
  if (isMatrix) {
783
783
  if (componentNumber === 4) {
784
784
  gl.uniformMatrix4fv(uLocation, false, x);
@@ -859,9 +859,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
859
859
  iboHandle,
860
860
  vboHandles
861
861
  }, primitive, instanceIDBufferUid = CGAPIResourceRepository.InvalidCGAPIResourceUid) {
862
- const gl = this.ZC.getRawContextAsWebGL2();
862
+ const gl = this.CD.getRawContextAsWebGL2();
863
863
  const vao = this.getWebGLResource(vaoHandle);
864
- this.ZC.bindVertexArray(vao);
864
+ this.CD.bindVertexArray(vao);
865
865
  if (iboHandle != null) {
866
866
  const ibo = this.getWebGLResource(iboHandle);
867
867
  if (ibo != null) {
@@ -925,10 +925,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
925
925
  0,
926
926
  0
927
927
  );
928
- this.ZC.vertexAttribDivisor(VertexAttribute.Instance.getAttributeSlot(), 1);
928
+ this.CD.vertexAttribDivisor(VertexAttribute.Instance.getAttributeSlot(), 1);
929
929
  }
930
930
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
931
- this.ZC.bindVertexArray(null);
931
+ this.CD.bindVertexArray(null);
932
932
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
933
933
  }
934
934
  /**
@@ -942,9 +942,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
942
942
  if (handles == null) {
943
943
  return;
944
944
  }
945
- const gl = this.ZC.getRawContextAsWebGL2();
945
+ const gl = this.CD.getRawContextAsWebGL2();
946
946
  const vao = this.getWebGLResource(vaoHandle);
947
- this.ZC.bindVertexArray(vao);
947
+ this.CD.bindVertexArray(vao);
948
948
  if (handles.iboHandle != null) {
949
949
  const ibo = this.getWebGLResource(handles.iboHandle);
950
950
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ibo);
@@ -992,20 +992,20 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
992
992
  const instanceSlot = VertexAttribute.Instance.getAttributeSlot();
993
993
  gl.enableVertexAttribArray(instanceSlot);
994
994
  gl.vertexAttribIPointer(instanceSlot, 1, ComponentType.UnsignedInt.index, 4, 0);
995
- this.ZC.vertexAttribDivisor(instanceSlot, 0);
995
+ this.CD.vertexAttribDivisor(instanceSlot, 0);
996
996
  const materialSidSlot = VertexAttribute.MaterialSid.getAttributeSlot();
997
997
  if (useMaterialSidAttribute) {
998
998
  const materialSidVbo = this.getWebGLResource(group.materialSidVboHandle);
999
999
  gl.bindBuffer(gl.ARRAY_BUFFER, materialSidVbo);
1000
1000
  gl.enableVertexAttribArray(materialSidSlot);
1001
1001
  gl.vertexAttribIPointer(materialSidSlot, 1, ComponentType.UnsignedInt.index, 4, 0);
1002
- this.ZC.vertexAttribDivisor(materialSidSlot, 0);
1002
+ this.CD.vertexAttribDivisor(materialSidSlot, 0);
1003
1003
  } else {
1004
1004
  gl.disableVertexAttribArray(materialSidSlot);
1005
1005
  gl.vertexAttribI4ui(materialSidSlot, 0, 0, 0, 0);
1006
1006
  }
1007
1007
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
1008
- this.ZC.bindVertexArray(null);
1008
+ this.CD.bindVertexArray(null);
1009
1009
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
1010
1010
  }
1011
1011
  /**
@@ -1025,12 +1025,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1025
1025
  width,
1026
1026
  height
1027
1027
  }) {
1028
- const gl = this.ZC.getRawContextAsWebGL2();
1028
+ const gl = this.CD.getRawContextAsWebGL2();
1029
1029
  const texture = gl.createTexture();
1030
- this.ZC.bindTexture2D(15, texture);
1030
+ this.CD.bindTexture2D(15, texture);
1031
1031
  gl.texStorage2D(GL_TEXTURE_2D, levels, internalFormat.index, width, height);
1032
- const resourceHandle = this._C(texture);
1033
- this.ZC.unbindTexture2D(15);
1032
+ const resourceHandle = this.DD(texture);
1033
+ this.CD.unbindTexture2D(15);
1034
1034
  return resourceHandle;
1035
1035
  }
1036
1036
  /**
@@ -1055,9 +1055,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1055
1055
  anisotropy,
1056
1056
  shadowCompareMode
1057
1057
  }) {
1058
- const gl = this.ZC.getRawContextAsWebGL2();
1058
+ const gl = this.CD.getRawContextAsWebGL2();
1059
1059
  const sampler = gl.createSampler();
1060
- const resourceHandle = this._C(sampler);
1060
+ const resourceHandle = this.DD(sampler);
1061
1061
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, minFilter.index);
1062
1062
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, magFilter.index);
1063
1063
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, wrapS.index);
@@ -1068,8 +1068,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1068
1068
  gl.samplerParameteri(sampler, gl.TEXTURE_COMPARE_FUNC, gl.LESS);
1069
1069
  }
1070
1070
  if (anisotropy) {
1071
- if (this.ZC.webgl2ExtTFA) {
1072
- gl.samplerParameteri(sampler, this.ZC.webgl2ExtTFA.TEXTURE_MAX_ANISOTROPY_EXT, 4);
1071
+ if (this.CD.webgl2ExtTFA) {
1072
+ gl.samplerParameteri(sampler, this.CD.webgl2ExtTFA.TEXTURE_MAX_ANISOTROPY_EXT, 4);
1073
1073
  }
1074
1074
  }
1075
1075
  return resourceHandle;
@@ -1081,18 +1081,18 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1081
1081
  * @returns The handle of the clamp-to-edge linear sampler
1082
1082
  */
1083
1083
  createOrGetTextureSamplerClampToEdgeLinear() {
1084
- if (this.dD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1085
- const gl = this.ZC.getRawContextAsWebGL2();
1084
+ if (this.ID === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1085
+ const gl = this.CD.getRawContextAsWebGL2();
1086
1086
  const sampler = gl.createSampler();
1087
- const resourceHandle = this._C(sampler);
1088
- this.dD = resourceHandle;
1087
+ const resourceHandle = this.DD(sampler);
1088
+ this.ID = resourceHandle;
1089
1089
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
1090
1090
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
1091
1091
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1092
1092
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1093
1093
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.CLAMP_TO_EDGE);
1094
1094
  }
1095
- return this.dD;
1095
+ return this.ID;
1096
1096
  }
1097
1097
  /**
1098
1098
  * Creates or returns an existing texture sampler with clamp-to-edge wrapping and nearest filtering.
@@ -1101,18 +1101,18 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1101
1101
  * @returns The handle of the clamp-to-edge nearest sampler
1102
1102
  */
1103
1103
  createOrGetTextureSamplerClampToEdgeNearest() {
1104
- if (this.eD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1105
- const gl = this.ZC.getRawContextAsWebGL2();
1104
+ if (this.JD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1105
+ const gl = this.CD.getRawContextAsWebGL2();
1106
1106
  const sampler = gl.createSampler();
1107
- const resourceHandle = this._C(sampler);
1108
- this.eD = resourceHandle;
1107
+ const resourceHandle = this.DD(sampler);
1108
+ this.JD = resourceHandle;
1109
1109
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
1110
1110
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
1111
1111
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1112
1112
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1113
1113
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.CLAMP_TO_EDGE);
1114
1114
  }
1115
- return this.eD;
1115
+ return this.JD;
1116
1116
  }
1117
1117
  /**
1118
1118
  * Creates or returns an existing texture sampler with repeat wrapping and nearest filtering.
@@ -1121,18 +1121,18 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1121
1121
  * @returns The handle of the repeat nearest sampler
1122
1122
  */
1123
1123
  createOrGetTextureSamplerRepeatNearest() {
1124
- if (this.fD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1125
- const gl = this.ZC.getRawContextAsWebGL2();
1124
+ if (this.KD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1125
+ const gl = this.CD.getRawContextAsWebGL2();
1126
1126
  const sampler = gl.createSampler();
1127
- const resourceHandle = this._C(sampler);
1128
- this.fD = resourceHandle;
1127
+ const resourceHandle = this.DD(sampler);
1128
+ this.KD = resourceHandle;
1129
1129
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
1130
1130
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
1131
1131
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.REPEAT);
1132
1132
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.REPEAT);
1133
1133
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.REPEAT);
1134
1134
  }
1135
- return this.fD;
1135
+ return this.KD;
1136
1136
  }
1137
1137
  /**
1138
1138
  * Creates or returns an existing texture sampler with repeat wrapping and linear filtering.
@@ -1141,18 +1141,18 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1141
1141
  * @returns The handle of the repeat linear sampler
1142
1142
  */
1143
1143
  createOrGetTextureSamplerRepeatLinear() {
1144
- if (this.gD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1145
- const gl = this.ZC.getRawContextAsWebGL2();
1144
+ if (this.LD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1145
+ const gl = this.CD.getRawContextAsWebGL2();
1146
1146
  const sampler = gl.createSampler();
1147
- const resourceHandle = this._C(sampler);
1148
- this.gD = resourceHandle;
1147
+ const resourceHandle = this.DD(sampler);
1148
+ this.LD = resourceHandle;
1149
1149
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
1150
1150
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
1151
1151
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.REPEAT);
1152
1152
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.REPEAT);
1153
1153
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.REPEAT);
1154
1154
  }
1155
- return this.gD;
1155
+ return this.LD;
1156
1156
  }
1157
1157
  /**
1158
1158
  * Creates or returns an existing texture sampler with repeat wrapping and trilinear filtering.
@@ -1161,18 +1161,18 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1161
1161
  * @returns The handle of the repeat trilinear sampler
1162
1162
  */
1163
1163
  createOrGetTextureSamplerRepeatTriLinear() {
1164
- if (this.iD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1165
- const gl = this.ZC.getRawContextAsWebGL2();
1164
+ if (this.ND === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1165
+ const gl = this.CD.getRawContextAsWebGL2();
1166
1166
  const sampler = gl.createSampler();
1167
- const resourceHandle = this._C(sampler);
1168
- this.iD = resourceHandle;
1167
+ const resourceHandle = this.DD(sampler);
1168
+ this.ND = resourceHandle;
1169
1169
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
1170
1170
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
1171
1171
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.REPEAT);
1172
1172
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.REPEAT);
1173
1173
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.REPEAT);
1174
1174
  }
1175
- return this.iD;
1175
+ return this.ND;
1176
1176
  }
1177
1177
  /**
1178
1178
  * Creates or returns an existing texture sampler configured for shadow mapping.
@@ -1181,11 +1181,11 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1181
1181
  * @returns The handle of the shadow sampler
1182
1182
  */
1183
1183
  createOrGetTextureSamplerShadow() {
1184
- if (this.hD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1185
- const gl = this.ZC.getRawContextAsWebGL2();
1184
+ if (this.MD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1185
+ const gl = this.CD.getRawContextAsWebGL2();
1186
1186
  const sampler = gl.createSampler();
1187
- const resourceHandle = this._C(sampler);
1188
- this.hD = resourceHandle;
1187
+ const resourceHandle = this.DD(sampler);
1188
+ this.MD = resourceHandle;
1189
1189
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
1190
1190
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
1191
1191
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
@@ -1193,7 +1193,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1193
1193
  gl.samplerParameteri(sampler, gl.TEXTURE_COMPARE_MODE, gl.COMPARE_REF_TO_TEXTURE);
1194
1194
  gl.samplerParameteri(sampler, gl.TEXTURE_COMPARE_FUNC, gl.LESS);
1195
1195
  }
1196
- return this.hD;
1196
+ return this.MD;
1197
1197
  }
1198
1198
  /**
1199
1199
  * Creates or returns an existing texture sampler with repeat wrapping, anisotropic filtering, and linear filtering.
@@ -1202,19 +1202,19 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1202
1202
  * @returns The handle of the repeat anisotropy linear sampler
1203
1203
  */
1204
1204
  createOrGetTextureSamplerRepeatAnisotropyLinear() {
1205
- if (this.jD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1206
- const gl = this.ZC.getRawContextAsWebGL2();
1205
+ if (this.OD === CGAPIResourceRepository.InvalidCGAPIResourceUid) {
1206
+ const gl = this.CD.getRawContextAsWebGL2();
1207
1207
  const sampler = gl.createSampler();
1208
- const resourceHandle = this._C(sampler);
1209
- this.jD = resourceHandle;
1208
+ const resourceHandle = this.DD(sampler);
1209
+ this.OD = resourceHandle;
1210
1210
  gl.samplerParameteri(sampler, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
1211
1211
  gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
1212
1212
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_S, gl.REPEAT);
1213
1213
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_T, gl.REPEAT);
1214
1214
  gl.samplerParameteri(sampler, gl.TEXTURE_WRAP_R, gl.REPEAT);
1215
- gl.samplerParameteri(sampler, this.ZC.webgl2ExtTFA.TEXTURE_MAX_ANISOTROPY_EXT, 4);
1215
+ gl.samplerParameteri(sampler, this.CD.webgl2ExtTFA.TEXTURE_MAX_ANISOTROPY_EXT, 4);
1216
1216
  }
1217
- return this.jD;
1217
+ return this.OD;
1218
1218
  }
1219
1219
  /**
1220
1220
  * Creates a 2D texture from ImageBitmap data with specified parameters.
@@ -1238,7 +1238,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1238
1238
  type,
1239
1239
  generateMipmap
1240
1240
  }) {
1241
- const gl = this.ZC.getRawContextAsWebGL2();
1241
+ const gl = this.CD.getRawContextAsWebGL2();
1242
1242
  let finalImageData = imageData;
1243
1243
  let finalWidth = width;
1244
1244
  let finalHeight = height;
@@ -1251,12 +1251,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1251
1251
  finalImageData = await createImageBitmap(canvas);
1252
1252
  }
1253
1253
  const texture = gl.createTexture();
1254
- const textureHandle = this._C(texture);
1255
- this.ZC.bindTexture2D(15, texture);
1254
+ const textureHandle = this.DD(texture);
1255
+ this.CD.bindTexture2D(15, texture);
1256
1256
  const levels = Math.floor(Math.log2(Math.max(finalWidth, finalHeight))) + 1;
1257
1257
  gl.texStorage2D(GL_TEXTURE_2D, levels, internalFormat.index, finalWidth, finalHeight);
1258
1258
  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, format.index, type.index, finalImageData);
1259
- this.kD(gl, finalWidth, finalHeight, generateMipmap);
1259
+ this.PD(gl, finalWidth, finalHeight, generateMipmap);
1260
1260
  return textureHandle;
1261
1261
  }
1262
1262
  /**
@@ -1268,9 +1268,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1268
1268
  * @param height - Height of the texture
1269
1269
  * @param generateMipmap - Whether to generate mipmaps
1270
1270
  */
1271
- kD(gl, _width, _height, _generateMipmap) {
1271
+ PD(gl, _width, _height, _generateMipmap) {
1272
1272
  gl.generateMipmap(gl.TEXTURE_2D);
1273
- this.ZC.unbindTexture2D(15);
1273
+ this.CD.unbindTexture2D(15);
1274
1274
  }
1275
1275
  /**
1276
1276
  * Creates a 2D texture from an HTML image element with specified parameters.
@@ -1294,7 +1294,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1294
1294
  type,
1295
1295
  generateMipmap
1296
1296
  }) {
1297
- const gl = this.ZC.getRawContextAsWebGL2();
1297
+ const gl = this.CD.getRawContextAsWebGL2();
1298
1298
  let finalImageData = imageData;
1299
1299
  let finalWidth = width;
1300
1300
  let finalHeight = height;
@@ -1307,12 +1307,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1307
1307
  finalImageData = await createImageBitmap(canvas);
1308
1308
  }
1309
1309
  const texture = gl.createTexture();
1310
- const resourceHandle = this._C(texture);
1311
- this.ZC.bindTexture2D(15, texture);
1310
+ const resourceHandle = this.DD(texture);
1311
+ this.CD.bindTexture2D(15, texture);
1312
1312
  const levels = generateMipmap ? Math.max(Math.log2(finalWidth), Math.log2(finalHeight)) : 1;
1313
1313
  gl.texStorage2D(GL_TEXTURE_2D, levels, internalFormat.index, finalWidth, finalHeight);
1314
1314
  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, format.index, type.index, finalImageData);
1315
- this.kD(gl, finalWidth, finalHeight, generateMipmap);
1315
+ this.PD(gl, finalWidth, finalHeight, generateMipmap);
1316
1316
  return resourceHandle;
1317
1317
  }
1318
1318
  /**
@@ -1330,10 +1330,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1330
1330
  * @returns The handle of the created texture array
1331
1331
  */
1332
1332
  createTextureArray(width, height, arrayLength, mipLevelCount, internalFormat, format, type, imageData) {
1333
- const gl = this.ZC.getRawContextAsWebGL2();
1333
+ const gl = this.CD.getRawContextAsWebGL2();
1334
1334
  const texture = gl.createTexture();
1335
- const resourceHandle = this._C(texture);
1336
- this.ZC.bindTexture2DArray(15, texture);
1335
+ const resourceHandle = this.DD(texture);
1336
+ this.CD.bindTexture2DArray(15, texture);
1337
1337
  gl.texStorage3D(gl.TEXTURE_2D_ARRAY, mipLevelCount, internalFormat.index, width, height, arrayLength);
1338
1338
  for (let layer = 0; layer < arrayLength; layer++) {
1339
1339
  gl.texSubImage3D(
@@ -1355,7 +1355,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1355
1355
  imageData
1356
1356
  );
1357
1357
  }
1358
- this.ZC.unbindTexture2DArray(15);
1358
+ this.CD.unbindTexture2DArray(15);
1359
1359
  return resourceHandle;
1360
1360
  }
1361
1361
  /**
@@ -1375,12 +1375,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1375
1375
  height,
1376
1376
  mipLevelCount
1377
1377
  }) {
1378
- const gl = this.ZC.getRawContextAsWebGL2();
1378
+ const gl = this.CD.getRawContextAsWebGL2();
1379
1379
  const texture = gl.createTexture();
1380
- const resourceHandle = this._C(texture);
1381
- this.ZC.bindTexture2D(15, texture);
1380
+ const resourceHandle = this.DD(texture);
1381
+ this.CD.bindTexture2D(15, texture);
1382
1382
  gl.texStorage2D(GL_TEXTURE_2D, mipLevelCount, format.index, width, height);
1383
- this.ZC.unbindTexture2D(15);
1383
+ this.CD.unbindTexture2D(15);
1384
1384
  return resourceHandle;
1385
1385
  }
1386
1386
  /**
@@ -1411,7 +1411,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1411
1411
  rowSizeByPixel,
1412
1412
  data
1413
1413
  }) {
1414
- const gl = this.ZC.getRawContextAsWebGL2();
1414
+ const gl = this.CD.getRawContextAsWebGL2();
1415
1415
  const texture = this.getWebGLResource(textureUid);
1416
1416
  const pixelFormat = TextureFormat.getPixelFormatFromTextureFormat(format);
1417
1417
  const compositionNum = PixelFormat.getCompositionNumFromPixelFormat(pixelFormat);
@@ -1426,7 +1426,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1426
1426
  );
1427
1427
  }
1428
1428
  }
1429
- this.ZC.bindTexture2D(15, texture);
1429
+ this.CD.bindTexture2D(15, texture);
1430
1430
  gl.texSubImage2D(
1431
1431
  gl.TEXTURE_2D,
1432
1432
  mipLevel,
@@ -1438,7 +1438,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1438
1438
  type.index,
1439
1439
  reducedData
1440
1440
  );
1441
- this.ZC.unbindTexture2D(15);
1441
+ this.CD.unbindTexture2D(15);
1442
1442
  }
1443
1443
  /**
1444
1444
  * Creates a 2D texture from a typed array with specified parameters.
@@ -1462,10 +1462,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1462
1462
  type,
1463
1463
  generateMipmap
1464
1464
  }) {
1465
- const gl = this.ZC.getRawContextAsWebGL2();
1465
+ const gl = this.CD.getRawContextAsWebGL2();
1466
1466
  const texture = gl.createTexture();
1467
- const resourceHandle = this._C(texture);
1468
- this.ZC.bindTexture2D(15, texture);
1467
+ const resourceHandle = this.DD(texture);
1468
+ this.CD.bindTexture2D(15, texture);
1469
1469
  const levels = generateMipmap ? Math.max(Math.log2(width), Math.log2(height)) : 1;
1470
1470
  gl.texStorage2D(GL_TEXTURE_2D, levels, internalFormat.index, width, height);
1471
1471
  gl.texSubImage2D(
@@ -1479,7 +1479,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1479
1479
  type.index,
1480
1480
  imageData
1481
1481
  );
1482
- this.kD(gl, width, height, generateMipmap);
1482
+ this.PD(gl, width, height, generateMipmap);
1483
1483
  return resourceHandle;
1484
1484
  }
1485
1485
  /**
@@ -1491,10 +1491,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1491
1491
  * @returns Promise that resolves to the handle of the created compressed texture
1492
1492
  */
1493
1493
  async createCompressedTexture(textureDataArray, compressionTextureType) {
1494
- const gl = this.ZC.getRawContext();
1494
+ const gl = this.CD.getRawContext();
1495
1495
  const texture = gl.createTexture();
1496
- const resourceHandle = this._C(texture);
1497
- this.ZC.bindTexture2D(15, texture);
1496
+ const resourceHandle = this.DD(texture);
1497
+ this.CD.bindTexture2D(15, texture);
1498
1498
  const internalFormat = compressionTextureType.index;
1499
1499
  for (const textureData of textureDataArray) {
1500
1500
  gl.compressedTexImage2D(
@@ -1507,7 +1507,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1507
1507
  textureData.buffer
1508
1508
  );
1509
1509
  }
1510
- this.ZC.unbindTexture2D(15);
1510
+ this.CD.unbindTexture2D(15);
1511
1511
  return resourceHandle;
1512
1512
  }
1513
1513
  /**
@@ -1525,10 +1525,10 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1525
1525
  }) {
1526
1526
  let basisCompressionType;
1527
1527
  let compressionType;
1528
- const gl = this.ZC.getRawContext();
1528
+ const gl = this.CD.getRawContext();
1529
1529
  const texture = gl.createTexture();
1530
- const resourceHandle = this._C(texture);
1531
- this.ZC.bindTexture2D(15, texture);
1530
+ const resourceHandle = this.DD(texture);
1531
+ this.CD.bindTexture2D(15, texture);
1532
1532
  const s3tc = gl.getExtension("WEBGL_compressed_texture_s3tc");
1533
1533
  if (s3tc) {
1534
1534
  basisCompressionType = BasisCompressionType.BC3;
@@ -1566,7 +1566,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1566
1566
  const textureSource = this.decodeBasisImage(basisFile, basisCompressionType, 0, i);
1567
1567
  gl.compressedTexImage2D(gl.TEXTURE_2D, i, compressionType, width, height, border, textureSource);
1568
1568
  }
1569
- this.ZC.unbindTexture2D(15);
1569
+ this.CD.unbindTexture2D(15);
1570
1570
  return resourceHandle;
1571
1571
  }
1572
1572
  /**
@@ -1594,9 +1594,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1594
1594
  * @returns The handle of the created framebuffer object
1595
1595
  */
1596
1596
  createFrameBufferObject() {
1597
- const gl = this.ZC.getRawContext();
1597
+ const gl = this.CD.getRawContext();
1598
1598
  const fbo = gl.createFramebuffer();
1599
- const resourceHandle = this._C(fbo);
1599
+ const resourceHandle = this.DD(fbo);
1600
1600
  return resourceHandle;
1601
1601
  }
1602
1602
  /**
@@ -1608,15 +1608,15 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1608
1608
  * @param renderable - The texture or renderbuffer to attach
1609
1609
  */
1610
1610
  attachColorBufferToFrameBufferObject(framebuffer, attachmentIndex, renderable) {
1611
- const gl = this.ZC.getRawContextAsWebGL2();
1611
+ const gl = this.CD.getRawContextAsWebGL2();
1612
1612
  const fbo = this.getWebGLResource(framebuffer.framebufferUID);
1613
1613
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
1614
1614
  const renderableWebGLResource = this.getWebGLResource(renderable._textureResourceUid);
1615
- const attachmentId = this.ZC.colorAttachment(attachmentIndex);
1615
+ const attachmentId = this.CD.colorAttachment(attachmentIndex);
1616
1616
  if (renderable instanceof RenderTargetTexture2DArray) {
1617
1617
  renderable._fbo = framebuffer;
1618
- if (this.ZC.webgl2ExtMLTVIEW.is_multisample) {
1619
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
1618
+ if (this.CD.webgl2ExtMLTVIEW.is_multisample) {
1619
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
1620
1620
  gl.DRAW_FRAMEBUFFER,
1621
1621
  attachmentId,
1622
1622
  renderableWebGLResource,
@@ -1627,7 +1627,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1627
1627
  renderable.arrayLength
1628
1628
  );
1629
1629
  } else {
1630
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
1630
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
1631
1631
  gl.DRAW_FRAMEBUFFER,
1632
1632
  attachmentId,
1633
1633
  renderableWebGLResource,
@@ -1661,11 +1661,11 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1661
1661
  * @param mipLevel - The mip level to attach
1662
1662
  */
1663
1663
  attachColorBufferLayerToFrameBufferObject(framebuffer, attachmentIndex, renderable, layerIndex, mipLevel) {
1664
- const gl = this.ZC.getRawContextAsWebGL2();
1664
+ const gl = this.CD.getRawContextAsWebGL2();
1665
1665
  const fbo = this.getWebGLResource(framebuffer.framebufferUID);
1666
1666
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
1667
1667
  const renderableWebGLResource = this.getWebGLResource(renderable._textureResourceUid);
1668
- const attachmentId = this.ZC.colorAttachment(attachmentIndex);
1668
+ const attachmentId = this.CD.colorAttachment(attachmentIndex);
1669
1669
  renderable._fbo = framebuffer;
1670
1670
  gl.framebufferTextureLayer(gl.FRAMEBUFFER, attachmentId, renderableWebGLResource, mipLevel, layerIndex);
1671
1671
  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
@@ -1681,11 +1681,11 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1681
1681
  * @param renderable - The cube texture to attach
1682
1682
  */
1683
1683
  attachColorBufferCubeToFrameBufferObject(framebuffer, attachmentIndex, faceIndex, mipLevel, renderable) {
1684
- const gl = this.ZC.getRawContextAsWebGL2();
1684
+ const gl = this.CD.getRawContextAsWebGL2();
1685
1685
  const fbo = this.getWebGLResource(framebuffer.framebufferUID);
1686
1686
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
1687
1687
  const renderableWebGLResource = this.getWebGLResource(renderable._textureResourceUid);
1688
- const attachmentId = this.ZC.colorAttachment(attachmentIndex);
1688
+ const attachmentId = this.CD.colorAttachment(attachmentIndex);
1689
1689
  renderable._fbo = framebuffer;
1690
1690
  gl.framebufferTexture2D(
1691
1691
  gl.FRAMEBUFFER,
@@ -1703,7 +1703,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1703
1703
  * @param renderable - The depth texture or renderbuffer to attach
1704
1704
  */
1705
1705
  attachDepthBufferToFrameBufferObject(framebuffer, renderable) {
1706
- this.lD(framebuffer, renderable, 36096);
1706
+ this.QD(framebuffer, renderable, 36096);
1707
1707
  }
1708
1708
  /**
1709
1709
  * Attaches a stencil buffer to a framebuffer object.
@@ -1712,7 +1712,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1712
1712
  * @param renderable - The stencil texture or renderbuffer to attach
1713
1713
  */
1714
1714
  attachStencilBufferToFrameBufferObject(framebuffer, renderable) {
1715
- this.lD(framebuffer, renderable, 36128);
1715
+ this.QD(framebuffer, renderable, 36128);
1716
1716
  }
1717
1717
  /**
1718
1718
  * Attaches a combined depth-stencil buffer to a framebuffer object.
@@ -1721,7 +1721,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1721
1721
  * @param renderable - The depth-stencil texture or renderbuffer to attach
1722
1722
  */
1723
1723
  attachDepthStencilBufferToFrameBufferObject(framebuffer, renderable) {
1724
- this.lD(framebuffer, renderable, 33306);
1724
+ this.QD(framebuffer, renderable, 33306);
1725
1725
  }
1726
1726
  /**
1727
1727
  * Internal method for attaching depth or stencil buffers to framebuffers.
@@ -1731,15 +1731,15 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1731
1731
  * @param renderable - The texture or renderbuffer to attach
1732
1732
  * @param attachmentType - The WebGL attachment type constant
1733
1733
  */
1734
- lD(framebuffer, renderable, attachmentType) {
1735
- const gl = this.ZC.getRawContextAsWebGL2();
1734
+ QD(framebuffer, renderable, attachmentType) {
1735
+ const gl = this.CD.getRawContextAsWebGL2();
1736
1736
  const fbo = this.getWebGLResource(framebuffer.framebufferUID);
1737
1737
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
1738
1738
  const renderableWebGLResource = this.getWebGLResource(renderable._textureResourceUid);
1739
1739
  if (renderable instanceof RenderTargetTexture2DArray) {
1740
1740
  renderable._fbo = framebuffer;
1741
- if (this.ZC.webgl2ExtMLTVIEW.is_multisample) {
1742
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
1741
+ if (this.CD.webgl2ExtMLTVIEW.is_multisample) {
1742
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
1743
1743
  gl.DRAW_FRAMEBUFFER,
1744
1744
  attachmentType,
1745
1745
  renderableWebGLResource,
@@ -1750,7 +1750,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1750
1750
  renderable.arrayLength
1751
1751
  );
1752
1752
  } else {
1753
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
1753
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
1754
1754
  gl.DRAW_FRAMEBUFFER,
1755
1755
  attachmentType,
1756
1756
  renderableWebGLResource,
@@ -1777,9 +1777,9 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1777
1777
  * create Renderbuffer
1778
1778
  */
1779
1779
  createRenderBuffer(width, height, internalFormat, isMSAA, sampleCountMSAA) {
1780
- const gl = this.ZC.getRawContext();
1780
+ const gl = this.CD.getRawContext();
1781
1781
  const renderBuffer = gl.createRenderbuffer();
1782
- const resourceHandle = this._C(renderBuffer);
1782
+ const resourceHandle = this.DD(renderBuffer);
1783
1783
  gl.bindRenderbuffer(gl.RENDERBUFFER, renderBuffer);
1784
1784
  if (isMSAA) {
1785
1785
  gl.renderbufferStorageMultisample(
@@ -1804,12 +1804,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1804
1804
  if (framebuffer) {
1805
1805
  const renderBufferTargetEnums = renderPass.getRenderTargetColorAttachments();
1806
1806
  if (Is.exist(renderBufferTargetEnums)) {
1807
- this.ZC.drawBuffers(renderBufferTargetEnums);
1807
+ this.CD.drawBuffers(renderBufferTargetEnums);
1808
1808
  } else {
1809
- this.ZC.drawBuffers(framebuffer.colorAttachmentsRenderBufferTargets);
1809
+ this.CD.drawBuffers(framebuffer.colorAttachmentsRenderBufferTargets);
1810
1810
  }
1811
1811
  } else {
1812
- this.ZC.drawBuffers([RenderBufferTarget.Back]);
1812
+ this.CD.drawBuffers([RenderBufferTarget.Back]);
1813
1813
  }
1814
1814
  }
1815
1815
  /**
@@ -1817,7 +1817,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1817
1817
  * @param framebuffer
1818
1818
  */
1819
1819
  bindFramebuffer(framebuffer) {
1820
- const gl = this.ZC.getRawContext();
1820
+ const gl = this.CD.getRawContext();
1821
1821
  if (framebuffer) {
1822
1822
  const fboUid = framebuffer.cgApiResourceUid;
1823
1823
  const fbo = this.getWebGLResource(fboUid);
@@ -1830,7 +1830,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1830
1830
  * unbind Framebuffer
1831
1831
  */
1832
1832
  unbindFramebuffer() {
1833
- const gl = this.ZC.getRawContext();
1833
+ const gl = this.CD.getRawContext();
1834
1834
  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
1835
1835
  }
1836
1836
  /**
@@ -1844,12 +1844,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1844
1844
  mipLevelCount,
1845
1845
  format
1846
1846
  }) {
1847
- const gl = this.ZC.getRawContextAsWebGL2();
1847
+ const gl = this.CD.getRawContextAsWebGL2();
1848
1848
  const texture = gl.createTexture();
1849
- const resourceHandle = this._C(texture);
1850
- this.ZC.bindTexture2D(15, texture);
1849
+ const resourceHandle = this.DD(texture);
1850
+ this.CD.bindTexture2D(15, texture);
1851
1851
  gl.texStorage2D(gl.TEXTURE_2D, mipLevelCount, format.index, width, height);
1852
- this.ZC.unbindTexture2D(15);
1852
+ this.CD.unbindTexture2D(15);
1853
1853
  return resourceHandle;
1854
1854
  }
1855
1855
  /**
@@ -1863,12 +1863,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1863
1863
  internalFormat,
1864
1864
  arrayLength
1865
1865
  }) {
1866
- const gl = this.ZC.getRawContextAsWebGL2();
1866
+ const gl = this.CD.getRawContextAsWebGL2();
1867
1867
  const texture = gl.createTexture();
1868
- const resourceHandle = this._C(texture);
1869
- this.ZC.bindTexture2DArray(15, texture);
1868
+ const resourceHandle = this.DD(texture);
1869
+ this.CD.bindTexture2DArray(15, texture);
1870
1870
  gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, internalFormat.index, width, height, arrayLength);
1871
- this.ZC.unbindTexture2DArray(15);
1871
+ this.CD.unbindTexture2DArray(15);
1872
1872
  return resourceHandle;
1873
1873
  }
1874
1874
  /**
@@ -1882,12 +1882,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1882
1882
  mipLevelCount,
1883
1883
  format
1884
1884
  }) {
1885
- const gl = this.ZC.getRawContextAsWebGL2();
1885
+ const gl = this.CD.getRawContextAsWebGL2();
1886
1886
  const texture = gl.createTexture();
1887
- const resourceHandle = this._C(texture);
1888
- this.ZC.bindTextureCube(15, texture);
1887
+ const resourceHandle = this.DD(texture);
1888
+ this.CD.bindTextureCube(15, texture);
1889
1889
  gl.texStorage2D(gl.TEXTURE_CUBE_MAP, mipLevelCount, format.index, width, height);
1890
- this.ZC.unbindTextureCube(15);
1890
+ this.CD.unbindTextureCube(15);
1891
1891
  return resourceHandle;
1892
1892
  }
1893
1893
  /**
@@ -1900,15 +1900,15 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1900
1900
  * @returns resource handle
1901
1901
  */
1902
1902
  createCubeTexture(engine, mipLevelCount, images, width, height) {
1903
- const gl = this.ZC.getRawContext();
1903
+ const gl = this.CD.getRawContext();
1904
1904
  const texture = gl.createTexture();
1905
- const resourceHandle = this._C(texture);
1906
- this.ZC.bindTextureCube(15, texture);
1905
+ const resourceHandle = this.DD(texture);
1906
+ this.CD.bindTextureCube(15, texture);
1907
1907
  const wrapS = TextureParameter.ClampToEdge;
1908
1908
  const wrapT = TextureParameter.ClampToEdge;
1909
1909
  let minFilter = TextureParameter.Linear;
1910
1910
  let magFilter = TextureParameter.Linear;
1911
- if (images[0].posX.hdriFormat === HdriFormat.HDR_LINEAR && this.ZC.isNotSupportWebGL1Extension(engine.config, WebGLExtension.TextureFloatLinear)) {
1911
+ if (images[0].posX.hdriFormat === HdriFormat.HDR_LINEAR && this.CD.isNotSupportWebGL1Extension(engine.config, WebGLExtension.TextureFloatLinear)) {
1912
1912
  if (mipLevelCount >= 2) {
1913
1913
  minFilter = TextureParameter.NearestMipmapNearest;
1914
1914
  } else {
@@ -1927,7 +1927,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1927
1927
  sampler.create();
1928
1928
  const loadImageToGPU = (image, cubeMapSide, i) => {
1929
1929
  if (image.hdriFormat === HdriFormat.HDR_LINEAR) {
1930
- const gl2 = this.ZC.getRawContextAsWebGL2();
1930
+ const gl2 = this.CD.getRawContextAsWebGL2();
1931
1931
  gl2.texImage2D(
1932
1932
  cubeMapSide,
1933
1933
  i,
@@ -1964,7 +1964,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1964
1964
  loadImageToGPU(image.posZ, gl.TEXTURE_CUBE_MAP_POSITIVE_Z, i);
1965
1965
  loadImageToGPU(image.negZ, gl.TEXTURE_CUBE_MAP_NEGATIVE_Z, i);
1966
1966
  }
1967
- this.ZC.unbindTextureCube(15);
1967
+ this.CD.unbindTextureCube(15);
1968
1968
  return [resourceHandle, sampler];
1969
1969
  }
1970
1970
  /**
@@ -1974,7 +1974,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
1974
1974
  * @returns the WebGLResourceHandle for the generated Cube Texture
1975
1975
  */
1976
1976
  async createCubeTextureFromFiles(engine, baseUri, mipLevelCount, isNamePosNeg, hdriFormat) {
1977
- const gl = this.ZC.getRawContext();
1977
+ const gl = this.CD.getRawContext();
1978
1978
  const imageArgs = [];
1979
1979
  let width = 0;
1980
1980
  let height = 0;
@@ -2088,12 +2088,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2088
2088
  wrapT = TextureParameter.Repeat,
2089
2089
  border = 0
2090
2090
  }) {
2091
- const gl = this.ZC.getRawContext();
2091
+ const gl = this.CD.getRawContext();
2092
2092
  let basisCompressionType;
2093
2093
  let compressionType;
2094
2094
  const texture = gl.createTexture();
2095
- const resourceHandle = this._C(texture);
2096
- this.ZC.bindTextureCube(15, texture);
2095
+ const resourceHandle = this.DD(texture);
2096
+ this.CD.bindTextureCube(15, texture);
2097
2097
  const s3tc = gl.getExtension("WEBGL_compressed_texture_s3tc");
2098
2098
  if (s3tc) {
2099
2099
  basisCompressionType = BasisCompressionType.BC3;
@@ -2157,12 +2157,12 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2157
2157
  );
2158
2158
  }
2159
2159
  }
2160
- this.ZC.unbindTextureCube(15);
2160
+ this.CD.unbindTextureCube(15);
2161
2161
  return { resourceHandle, width: baseLevelWidth, height: baseLevelHeight };
2162
2162
  }
2163
2163
  createDummyBlackCubeTexture(engine) {
2164
2164
  const base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg==";
2165
- const arrayBuffer = this.cD(base64);
2165
+ const arrayBuffer = this.HD(base64);
2166
2166
  const typedArray = new Uint8Array(arrayBuffer);
2167
2167
  return this.createCubeTexture(
2168
2168
  engine,
@@ -2207,7 +2207,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2207
2207
  }
2208
2208
  setWebGLTextureDirectly(webGLTexture) {
2209
2209
  const texture = webGLTexture;
2210
- const resourceHandle = this._C(texture);
2210
+ const resourceHandle = this.DD(texture);
2211
2211
  return resourceHandle;
2212
2212
  }
2213
2213
  async createTextureFromDataUri(dataUri, {
@@ -2244,8 +2244,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2244
2244
  type
2245
2245
  }) {
2246
2246
  const texture = this.getWebGLResource(textureUid);
2247
- this.ZC.bindTexture2D(15, texture);
2248
- const gl = this.ZC.getRawContextAsWebGL2();
2247
+ this.CD.bindTexture2D(15, texture);
2248
+ const gl = this.CD.getRawContextAsWebGL2();
2249
2249
  gl.texSubImage2D(
2250
2250
  gl.TEXTURE_2D,
2251
2251
  0,
@@ -2258,7 +2258,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2258
2258
  textureData
2259
2259
  );
2260
2260
  gl.generateMipmap(gl.TEXTURE_2D);
2261
- this.ZC.unbindTexture2D(15);
2261
+ this.CD.unbindTexture2D(15);
2262
2262
  }
2263
2263
  updateTexture(textureUid, textureData, {
2264
2264
  level,
@@ -2270,8 +2270,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2270
2270
  type
2271
2271
  }) {
2272
2272
  const texture = this.getWebGLResource(textureUid);
2273
- this.ZC.bindTexture2D(15, texture);
2274
- const gl = this.ZC.getRawContextAsWebGL2();
2273
+ this.CD.bindTexture2D(15, texture);
2274
+ const gl = this.CD.getRawContextAsWebGL2();
2275
2275
  gl.texSubImage2D(
2276
2276
  gl.TEXTURE_2D,
2277
2277
  level,
@@ -2283,28 +2283,28 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2283
2283
  type.index,
2284
2284
  textureData
2285
2285
  );
2286
- this.ZC.unbindTexture2D(15);
2286
+ this.CD.unbindTexture2D(15);
2287
2287
  }
2288
2288
  deleteFrameBufferObject(frameBufferObjectHandle) {
2289
2289
  const fbo = this.getWebGLResource(frameBufferObjectHandle);
2290
- const gl = this.ZC.getRawContext();
2290
+ const gl = this.CD.getRawContext();
2291
2291
  if (fbo != null) {
2292
2292
  gl.deleteFramebuffer(fbo);
2293
- this.$C.delete(frameBufferObjectHandle);
2293
+ this.ED.delete(frameBufferObjectHandle);
2294
2294
  }
2295
2295
  }
2296
2296
  deleteRenderBuffer(renderBufferUid) {
2297
- const gl = this.ZC.getRawContext();
2297
+ const gl = this.CD.getRawContext();
2298
2298
  const renderBuffer = this.getWebGLResource(renderBufferUid);
2299
2299
  gl.deleteRenderbuffer(renderBuffer);
2300
- this.$C.delete(renderBufferUid);
2300
+ this.ED.delete(renderBufferUid);
2301
2301
  }
2302
2302
  deleteTexture(textureHandle) {
2303
2303
  const texture = this.getWebGLResource(textureHandle);
2304
- const gl = this.ZC.getRawContext();
2304
+ const gl = this.CD.getRawContext();
2305
2305
  if (texture != null) {
2306
2306
  gl.deleteTexture(texture);
2307
- this.$C.delete(textureHandle);
2307
+ this.ED.delete(textureHandle);
2308
2308
  Logger.default.debug(`gl.deleteTexture called: ${textureHandle}`);
2309
2309
  }
2310
2310
  }
@@ -2326,17 +2326,17 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2326
2326
  }
2327
2327
  createDummyBlackTexture() {
2328
2328
  const base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg==";
2329
- return this.cD(base64);
2329
+ return this.HD(base64);
2330
2330
  }
2331
2331
  createDummyWhiteTexture() {
2332
2332
  const base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5/hPwAIAgL/4d1j8wAAAABJRU5ErkJggg==";
2333
- return this.cD(base64);
2333
+ return this.HD(base64);
2334
2334
  }
2335
2335
  createDummyNormalTexture() {
2336
2336
  const base64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOsr///HwAGgAL+v1RumAAAAABJRU5ErkJggg==";
2337
- return this.cD(base64);
2337
+ return this.HD(base64);
2338
2338
  }
2339
- cD(base64) {
2339
+ HD(base64) {
2340
2340
  const arrayBuffer = DataUtil.base64ToArrayBuffer(base64);
2341
2341
  return this.createTextureFromTypedArray(new Uint8Array(arrayBuffer), {
2342
2342
  internalFormat: TextureFormat.RGBA8,
@@ -2351,21 +2351,21 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2351
2351
  if (!MathUtil.isPowerOfTwoTexture(width, height) && MiscUtil.isIOS()) {
2352
2352
  return;
2353
2353
  }
2354
- const gl = this.ZC.getRawContext();
2354
+ const gl = this.CD.getRawContext();
2355
2355
  const texture = this.getWebGLResource(textureHandle);
2356
- this.ZC.bindTexture2D(15, texture);
2356
+ this.CD.bindTexture2D(15, texture);
2357
2357
  gl.generateMipmap(gl.TEXTURE_2D);
2358
- this.ZC.unbindTexture2D(15);
2358
+ this.CD.unbindTexture2D(15);
2359
2359
  }
2360
2360
  generateMipmapsCube(textureHandle, _width, _height) {
2361
- const gl = this.ZC.getRawContext();
2361
+ const gl = this.CD.getRawContext();
2362
2362
  const texture = this.getWebGLResource(textureHandle);
2363
- this.ZC.bindTextureCube(15, texture);
2363
+ this.CD.bindTextureCube(15, texture);
2364
2364
  gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
2365
- this.ZC.unbindTextureCube(15);
2365
+ this.CD.unbindTextureCube(15);
2366
2366
  }
2367
2367
  async getTexturePixelData(_textureHandle, width, height, frameBufferUid, colorAttachmentIndex) {
2368
- const gl = this.ZC.getRawContext();
2368
+ const gl = this.CD.getRawContext();
2369
2369
  const fbo = this.getWebGLResource(frameBufferUid);
2370
2370
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
2371
2371
  const data = new Uint8Array(width * height * 4);
@@ -2388,7 +2388,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2388
2388
  * @returns Promise resolving to the pixel data as a Uint8Array (RGBA format)
2389
2389
  */
2390
2390
  async getCubeTexturePixelData(textureHandle, width, height, faceIndex) {
2391
- const gl = this.ZC.getRawContext();
2391
+ const gl = this.CD.getRawContext();
2392
2392
  const texture = this.getWebGLResource(textureHandle);
2393
2393
  const fbo = gl.createFramebuffer();
2394
2394
  gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
@@ -2398,7 +2398,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2398
2398
  if (status !== gl.FRAMEBUFFER_COMPLETE) {
2399
2399
  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
2400
2400
  gl.deleteFramebuffer(fbo);
2401
- return this.tD(gl, texture, width, height, faceIndex, true);
2401
+ return this.YD(gl, texture, width, height, faceIndex, true);
2402
2402
  }
2403
2403
  const data = new Uint8Array(width * height * 4);
2404
2404
  gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, data);
@@ -2417,7 +2417,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2417
2417
  * @param faceIndex - Index of the cube face (0=+X, 1=-X, 2=+Y, 3=-Y, 4=+Z, 5=-Z)
2418
2418
  * @param isHdrFormat - Whether the texture is HDR format (applies tone mapping and gamma correction if true)
2419
2419
  */
2420
- tD(gl, cubeTexture, width, height, faceIndex, isHdrFormat) {
2420
+ YD(gl, cubeTexture, width, height, faceIndex, isHdrFormat) {
2421
2421
  const prevViewport = gl.getParameter(gl.VIEWPORT);
2422
2422
  const prevProgram = gl.getParameter(gl.CURRENT_PROGRAM);
2423
2423
  const prevVAO = gl.getParameter(gl.VERTEX_ARRAY_BINDING);
@@ -2523,35 +2523,35 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2523
2523
  return data;
2524
2524
  }
2525
2525
  createUniformBuffer() {
2526
- const gl = this.ZC.getRawContextAsWebGL2();
2526
+ const gl = this.CD.getRawContextAsWebGL2();
2527
2527
  if (gl == null) {
2528
2528
  throw new Error("No WebGLRenderingContext set as Default.");
2529
2529
  }
2530
2530
  const ubo = gl.createBuffer();
2531
- const resourceHandle = this._C(ubo);
2531
+ const resourceHandle = this.DD(ubo);
2532
2532
  return resourceHandle;
2533
2533
  }
2534
2534
  createUniformBufferWithBufferView(bufferView) {
2535
- const gl = this.ZC.getRawContextAsWebGL2();
2535
+ const gl = this.CD.getRawContextAsWebGL2();
2536
2536
  if (gl == null) {
2537
2537
  throw new Error("No WebGLRenderingContext set as Default.");
2538
2538
  }
2539
2539
  const ubo = gl.createBuffer();
2540
- const resourceHandle = this._C(ubo);
2540
+ const resourceHandle = this.DD(ubo);
2541
2541
  gl.bindBuffer(gl.UNIFORM_BUFFER, ubo);
2542
2542
  gl.bufferData(gl.UNIFORM_BUFFER, bufferView, gl.DYNAMIC_DRAW);
2543
2543
  gl.bindBuffer(gl.UNIFORM_BUFFER, null);
2544
2544
  return resourceHandle;
2545
2545
  }
2546
2546
  updateUniformBuffer(uboUid, typedArray, offsetByte, arrayLength) {
2547
- const gl = this.ZC.getRawContextAsWebGL2();
2547
+ const gl = this.CD.getRawContextAsWebGL2();
2548
2548
  const ubo = this.getWebGLResource(uboUid);
2549
2549
  gl.bindBuffer(gl.UNIFORM_BUFFER, ubo);
2550
2550
  gl.bufferSubData(gl.UNIFORM_BUFFER, 0, typedArray, offsetByte, arrayLength);
2551
2551
  gl.bindBuffer(gl.UNIFORM_BUFFER, null);
2552
2552
  }
2553
2553
  bindUniformBlock(shaderProgramUid, blockName, blockIndex) {
2554
- const gl = this.ZC.getRawContextAsWebGL2();
2554
+ const gl = this.CD.getRawContextAsWebGL2();
2555
2555
  if (gl == null) {
2556
2556
  throw new Error("No WebGLRenderingContext set as Default.");
2557
2557
  }
@@ -2560,7 +2560,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2560
2560
  gl.uniformBlockBinding(shaderProgram, block, blockIndex);
2561
2561
  }
2562
2562
  bindUniformBufferBase(blockIndex, uboUid) {
2563
- const gl = this.ZC.getRawContextAsWebGL2();
2563
+ const gl = this.CD.getRawContextAsWebGL2();
2564
2564
  if (gl == null) {
2565
2565
  throw new Error("No WebGLRenderingContext set as Default.");
2566
2566
  }
@@ -2568,23 +2568,23 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2568
2568
  gl.bindBufferBase(gl.UNIFORM_BUFFER, blockIndex, ubo);
2569
2569
  }
2570
2570
  deleteUniformBuffer(uboUid) {
2571
- const gl = this.ZC.getRawContext();
2571
+ const gl = this.CD.getRawContext();
2572
2572
  if (gl == null) {
2573
2573
  new Error("No WebGLRenderingContext set as Default.");
2574
2574
  }
2575
2575
  const ubo = this.getWebGLResource(uboUid);
2576
- this.$C.delete(uboUid);
2576
+ this.ED.delete(uboUid);
2577
2577
  gl.deleteBuffer(ubo);
2578
2578
  }
2579
2579
  setupUniformBufferDataArea(typedArray) {
2580
- const gl = this.ZC.getRawContextAsWebGL2();
2580
+ const gl = this.CD.getRawContextAsWebGL2();
2581
2581
  if (gl == null) {
2582
2582
  new Error("No WebGLRenderingContext set as Default.");
2583
2583
  }
2584
2584
  const ubo = gl.createBuffer();
2585
- const resourceHandle = this._C(ubo);
2586
- const maxConventionBlocks = this.ZC.getMaxConventionUniformBlocks();
2587
- const alignedMaxUniformBlockSize = this.ZC.getAlignedMaxUniformBlockSize();
2585
+ const resourceHandle = this.DD(ubo);
2586
+ const maxConventionBlocks = this.CD.getMaxConventionUniformBlocks();
2587
+ const alignedMaxUniformBlockSize = this.CD.getAlignedMaxUniformBlockSize();
2588
2588
  const realSize = alignedMaxUniformBlockSize * maxConventionBlocks;
2589
2589
  const array = new Float32Array(realSize / 4);
2590
2590
  if (Is.exist(typedArray)) {
@@ -2599,7 +2599,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2599
2599
  return resourceHandle;
2600
2600
  }
2601
2601
  setUniformBlockBindingForMorphOffsetsAndWeights(shaderProgramUid, morphOffsetsUBOUid, morphWeightsUBOUid) {
2602
- const gl = this.ZC.getRawContextAsWebGL2();
2602
+ const gl = this.CD.getRawContextAsWebGL2();
2603
2603
  const shaderProgram = this.getWebGLResource(shaderProgramUid);
2604
2604
  const morphOffsetsUBO = this.getWebGLResource(morphOffsetsUBOUid);
2605
2605
  const morphWeightsUBO = this.getWebGLResource(morphWeightsUBOUid);
@@ -2611,7 +2611,7 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2611
2611
  gl.bindBufferBase(gl.UNIFORM_BUFFER, 1, morphWeightsUBO);
2612
2612
  }
2613
2613
  setUniformBlockBindingForMorphOffsetsAndWeightsWithoutShaderProgram(morphOffsetsUBOUid, morphWeightsUBOUid) {
2614
- const gl = this.ZC.getRawContextAsWebGL2();
2614
+ const gl = this.CD.getRawContextAsWebGL2();
2615
2615
  const morphOffsetsUBO = this.getWebGLResource(morphOffsetsUBOUid);
2616
2616
  const morphWeightsUBO = this.getWebGLResource(morphWeightsUBOUid);
2617
2617
  gl.bindBufferBase(gl.UNIFORM_BUFFER, 0, morphOffsetsUBO);
@@ -2626,8 +2626,8 @@ var WebGLResourceRepository = class _WebGLResourceRepository extends CGAPIResour
2626
2626
  }
2627
2627
  getGlslDataUBODefinitionString() {
2628
2628
  let text = "";
2629
- const maxConventionblocks = this.ZC.getMaxConventionUniformBlocks();
2630
- const alignedMaxUniformBlockSize = this.ZC.getAlignedMaxUniformBlockSize();
2629
+ const maxConventionblocks = this.CD.getMaxConventionUniformBlocks();
2630
+ const alignedMaxUniformBlockSize = this.CD.getAlignedMaxUniformBlockSize();
2631
2631
  for (let i = 0; i < maxConventionblocks; i++) {
2632
2632
  text += `
2633
2633
  layout (std140) uniform Vec4Block${i} {
@@ -2651,23 +2651,23 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2651
2651
  return text;
2652
2652
  }
2653
2653
  getGlslDataUBOVec4SizeString() {
2654
- const alignedMaxUniformBlockSize = this.ZC.getAlignedMaxUniformBlockSize();
2654
+ const alignedMaxUniformBlockSize = this.CD.getAlignedMaxUniformBlockSize();
2655
2655
  return `const int dataUBOVec4Size = ${alignedMaxUniformBlockSize / 4 / 4};`;
2656
2656
  }
2657
2657
  createMultiviewFramebuffer(width, height, samples) {
2658
- if (Is.not.exist(this.ZC.webgl2ExtMLTVIEW)) {
2658
+ if (Is.not.exist(this.CD.webgl2ExtMLTVIEW)) {
2659
2659
  return [-1, -1];
2660
2660
  }
2661
- const gl = this.ZC.getRawContextAsWebGL2();
2661
+ const gl = this.CD.getRawContextAsWebGL2();
2662
2662
  const framebuffer = gl.createFramebuffer();
2663
- const framebufferHandle = this._C(framebuffer);
2663
+ const framebufferHandle = this.DD(framebuffer);
2664
2664
  gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, framebuffer);
2665
2665
  const colorTexture = gl.createTexture();
2666
- const colorTextureHandle = this._C(colorTexture);
2666
+ const colorTextureHandle = this.DD(colorTexture);
2667
2667
  gl.bindTexture(gl.TEXTURE_2D_ARRAY, colorTexture);
2668
2668
  gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, gl.RGBA8, width, height, 2);
2669
- if (!this.ZC.webgl2ExtMLTVIEW.is_multisample)
2670
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
2669
+ if (!this.CD.webgl2ExtMLTVIEW.is_multisample)
2670
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
2671
2671
  gl.DRAW_FRAMEBUFFER,
2672
2672
  gl.COLOR_ATTACHMENT0,
2673
2673
  colorTexture,
@@ -2676,7 +2676,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2676
2676
  2
2677
2677
  );
2678
2678
  else
2679
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
2679
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
2680
2680
  gl.DRAW_FRAMEBUFFER,
2681
2681
  gl.COLOR_ATTACHMENT0,
2682
2682
  colorTexture,
@@ -2688,8 +2688,8 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2688
2688
  const depthStencilTex = gl.createTexture();
2689
2689
  gl.bindTexture(gl.TEXTURE_2D_ARRAY, depthStencilTex);
2690
2690
  gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, gl.DEPTH32F_STENCIL8, width, height, 2);
2691
- if (!this.ZC.webgl2ExtMLTVIEW.is_multisample)
2692
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
2691
+ if (!this.CD.webgl2ExtMLTVIEW.is_multisample)
2692
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultiviewOVR(
2693
2693
  gl.DRAW_FRAMEBUFFER,
2694
2694
  gl.DEPTH_STENCIL_ATTACHMENT,
2695
2695
  depthStencilTex,
@@ -2698,7 +2698,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2698
2698
  2
2699
2699
  );
2700
2700
  else
2701
- this.ZC.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
2701
+ this.CD.webgl2ExtMLTVIEW.framebufferTextureMultisampleMultiviewOVR(
2702
2702
  gl.DRAW_FRAMEBUFFER,
2703
2703
  gl.DEPTH_STENCIL_ATTACHMENT,
2704
2704
  depthStencilTex,
@@ -2710,26 +2710,26 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2710
2710
  return [framebufferHandle, colorTextureHandle];
2711
2711
  }
2712
2712
  createTransformFeedback() {
2713
- const gl = this.ZC.getRawContextAsWebGL2();
2713
+ const gl = this.CD.getRawContextAsWebGL2();
2714
2714
  const transformFeedback = gl.createTransformFeedback();
2715
- const resourceHandle = this._C(transformFeedback);
2715
+ const resourceHandle = this.DD(transformFeedback);
2716
2716
  gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, transformFeedback);
2717
2717
  return resourceHandle;
2718
2718
  }
2719
2719
  deleteTransformFeedback(transformFeedbackUid) {
2720
- const gl = this.ZC.getRawContextAsWebGL2();
2720
+ const gl = this.CD.getRawContextAsWebGL2();
2721
2721
  const transformFeedback = this.getWebGLResource(transformFeedbackUid);
2722
2722
  gl.deleteTransformFeedback(transformFeedback);
2723
- this.$C.delete(transformFeedbackUid);
2723
+ this.ED.delete(transformFeedbackUid);
2724
2724
  }
2725
2725
  setViewport(engine, viewport) {
2726
2726
  var _a, _b;
2727
2727
  if (viewport) {
2728
- (_a = this.ZC) == null ? void 0 : _a.setViewportAsVector4(viewport);
2728
+ (_a = this.CD) == null ? void 0 : _a.setViewportAsVector4(viewport);
2729
2729
  engine.engineState.viewportAspectRatio = (viewport.z - viewport.x) / (viewport.w - viewport.y);
2730
2730
  } else {
2731
- (_b = this.ZC) == null ? void 0 : _b.setViewport(0, 0, this.ZC.width, this.ZC.height);
2732
- engine.engineState.viewportAspectRatio = this.ZC.width / this.ZC.height;
2731
+ (_b = this.CD) == null ? void 0 : _b.setViewport(0, 0, this.CD.width, this.CD.height);
2732
+ engine.engineState.viewportAspectRatio = this.CD.width / this.CD.height;
2733
2733
  }
2734
2734
  }
2735
2735
  /**
@@ -2743,31 +2743,31 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2743
2743
  */
2744
2744
  setScissorRect(renderPass) {
2745
2745
  var _a;
2746
- const gl = this.ZC.getRawContextAsWebGL2();
2746
+ const gl = this.CD.getRawContextAsWebGL2();
2747
2747
  const rect = renderPass == null ? void 0 : renderPass.getScissorRect();
2748
2748
  if (rect == null) {
2749
2749
  gl.disable(gl.SCISSOR_TEST);
2750
2750
  return;
2751
2751
  }
2752
2752
  const framebuffer = renderPass.getFramebuffer();
2753
- const targetHeight = (_a = framebuffer == null ? void 0 : framebuffer.height) != null ? _a : this.ZC.canvas.height;
2753
+ const targetHeight = (_a = framebuffer == null ? void 0 : framebuffer.height) != null ? _a : this.CD.canvas.height;
2754
2754
  gl.enable(gl.SCISSOR_TEST);
2755
2755
  gl.scissor(rect.x, targetHeight - (rect.y + rect.height), rect.width, rect.height);
2756
2756
  }
2757
2757
  clearFrameBuffer(engine, renderPass, _ = 0) {
2758
2758
  var _a, _b;
2759
- const gl = this.ZC.getRawContext();
2759
+ const gl = this.CD.getRawContext();
2760
2760
  const isCanvasTarget = renderPass.getFramebuffer() == null && !(((_a = engine._webXRSystemIfEnabled) == null ? void 0 : _a.isWebXRMode) && renderPass.isOutputForVr) && !((_b = engine._webARSystemIfEnabled) == null ? void 0 : _b.isWebARMode);
2761
2761
  let bufferBit = 0;
2762
2762
  if (renderPass.toClearColorBuffer) {
2763
2763
  gl.clearColor(renderPass.clearColor.x, renderPass.clearColor.y, renderPass.clearColor.z, renderPass.clearColor.w);
2764
2764
  bufferBit |= gl.COLOR_BUFFER_BIT;
2765
2765
  }
2766
- if (renderPass.toClearDepthBuffer && !(isCanvasTarget && !this.pD().depth)) {
2766
+ if (renderPass.toClearDepthBuffer && !(isCanvasTarget && !this.UD().depth)) {
2767
2767
  gl.clearDepth(renderPass.clearDepth);
2768
2768
  bufferBit |= gl.DEPTH_BUFFER_BIT;
2769
2769
  }
2770
- if (renderPass.toClearStencilBuffer && !(isCanvasTarget && !this.pD().stencil)) {
2770
+ if (renderPass.toClearStencilBuffer && !(isCanvasTarget && !this.UD().stencil)) {
2771
2771
  gl.clearStencil(renderPass.clearStencil);
2772
2772
  bufferBit |= gl.STENCIL_BUFFER_BIT;
2773
2773
  }
@@ -2780,62 +2780,62 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2780
2780
  * getContextAttributes() allocates a new object on every call. While the context is lost the
2781
2781
  * attributes are unknown, so both are reported as present and nothing is skipped.
2782
2782
  */
2783
- pD() {
2784
- const glw = this.ZC;
2785
- let attributes = this.mD;
2786
- if (attributes == null || this.nD !== glw) {
2783
+ UD() {
2784
+ const glw = this.CD;
2785
+ let attributes = this.RD;
2786
+ if (attributes == null || this.SD !== glw) {
2787
2787
  const contextAttributes = glw.getRawContext().getContextAttributes();
2788
2788
  if (contextAttributes == null) {
2789
2789
  return { depth: true, stencil: true };
2790
2790
  }
2791
2791
  attributes = { depth: contextAttributes.depth !== false, stencil: contextAttributes.stencil === true };
2792
- this.mD = attributes;
2793
- this.nD = glw;
2792
+ this.RD = attributes;
2793
+ this.SD = glw;
2794
2794
  }
2795
2795
  return attributes;
2796
2796
  }
2797
2797
  deleteVertexDataResources(vertexHandles) {
2798
- const gl = this.ZC.getRawContext();
2798
+ const gl = this.CD.getRawContext();
2799
2799
  const iboHandle = vertexHandles.iboHandle;
2800
2800
  if (iboHandle) {
2801
2801
  const ibo = this.getWebGLResource(iboHandle);
2802
2802
  gl.deleteBuffer(ibo);
2803
- this.$C.delete(iboHandle);
2803
+ this.ED.delete(iboHandle);
2804
2804
  }
2805
2805
  const vboHandles = vertexHandles.vboHandles;
2806
2806
  for (const vboHandle of vboHandles) {
2807
2807
  const vbo = this.getWebGLResource(vboHandle);
2808
2808
  gl.deleteBuffer(vbo);
2809
- this.$C.delete(vboHandle);
2809
+ this.ED.delete(vboHandle);
2810
2810
  }
2811
2811
  const vaoHandle = vertexHandles.vaoHandle;
2812
2812
  const vao = this.getWebGLResource(vaoHandle);
2813
- this.ZC.deleteVertexArray(vao);
2814
- this.$C.delete(vaoHandle);
2813
+ this.CD.deleteVertexArray(vao);
2814
+ this.ED.delete(vaoHandle);
2815
2815
  }
2816
2816
  deleteVertexArray(vaoHandle) {
2817
2817
  const vao = this.getWebGLResource(vaoHandle);
2818
- this.ZC.deleteVertexArray(vao);
2819
- this.$C.delete(vaoHandle);
2818
+ this.CD.deleteVertexArray(vao);
2819
+ this.ED.delete(vaoHandle);
2820
2820
  }
2821
2821
  deleteVertexBuffer(vboUid) {
2822
- const gl = this.ZC.getRawContext();
2822
+ const gl = this.CD.getRawContext();
2823
2823
  const vbo = this.getWebGLResource(vboUid);
2824
2824
  gl.deleteBuffer(vbo);
2825
- this.$C.delete(vboUid);
2825
+ this.ED.delete(vboUid);
2826
2826
  }
2827
2827
  resizeCanvas(width, height) {
2828
- this.ZC.width = width;
2829
- this.ZC.height = height;
2830
- this.ZC.canvas.width = width;
2831
- this.ZC.canvas.height = height;
2832
- this.ZC.setViewportAsVector4(Vector4.fromCopyArray([0, 0, width, height]));
2828
+ this.CD.width = width;
2829
+ this.CD.height = height;
2830
+ this.CD.canvas.width = width;
2831
+ this.CD.canvas.height = height;
2832
+ this.CD.setViewportAsVector4(Vector4.fromCopyArray([0, 0, width, height]));
2833
2833
  }
2834
2834
  getCanvasSize() {
2835
- return [this.ZC.canvas.width, this.ZC.canvas.height];
2835
+ return [this.CD.canvas.width, this.CD.canvas.height];
2836
2836
  }
2837
2837
  switchDepthTest(flag) {
2838
- const gl = this.ZC.getRawContext();
2838
+ const gl = this.CD.getRawContext();
2839
2839
  if (flag) {
2840
2840
  gl.enable(gl.DEPTH_TEST);
2841
2841
  } else {
@@ -2874,7 +2874,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2874
2874
  return true;
2875
2875
  }
2876
2876
  getPixelDataFromTexture(texUid, x, y, width, height) {
2877
- const gl = this.ZC.getRawContext();
2877
+ const gl = this.CD.getRawContext();
2878
2878
  const pixels = new Uint8Array((width - x) * (height - y) * 4);
2879
2879
  const texture = this.getWebGLResource(texUid);
2880
2880
  const fbo = gl.createFramebuffer();
@@ -2900,7 +2900,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2900
2900
  return this.getPixelDataFromTexture(texUid, x, y, width, height);
2901
2901
  }
2902
2902
  getCurrentTexture2DBindingsForEffekseer() {
2903
- const gl = this.ZC.getRawContextAsWebGL2();
2903
+ const gl = this.CD.getRawContextAsWebGL2();
2904
2904
  const maxTextureUnits = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
2905
2905
  const textureBindings = [];
2906
2906
  for (let i = 0; i < maxTextureUnits; i++) {
@@ -2934,7 +2934,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2934
2934
  elementArrayBuffer,
2935
2935
  currentProgram
2936
2936
  }) {
2937
- const gl = this.ZC.getRawContextAsWebGL2();
2937
+ const gl = this.CD.getRawContextAsWebGL2();
2938
2938
  for (let i = 0; i < textureBindings.length; i++) {
2939
2939
  gl.activeTexture(gl.TEXTURE0 + i);
2940
2940
  gl.bindTexture(gl.TEXTURE_2D, textureBindings[i].texture2D);
@@ -2945,12 +2945,12 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2945
2945
  gl.bindBuffer(gl.ARRAY_BUFFER, arrayBuffer);
2946
2946
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementArrayBuffer);
2947
2947
  gl.useProgram(currentProgram);
2948
- gl.vD = true;
2948
+ gl._D = true;
2949
2949
  }
2950
2950
  setWebGLStateToDefaultForEffekseer() {
2951
2951
  }
2952
2952
  setWebGLStateToDefault() {
2953
- const gl = this.ZC.getRawContextAsWebGL2();
2953
+ const gl = this.CD.getRawContextAsWebGL2();
2954
2954
  gl.bindVertexArray(null);
2955
2955
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
2956
2956
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
@@ -2995,7 +2995,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
2995
2995
  gl.colorMask(true, true, true, true);
2996
2996
  gl.polygonOffset(0, 0);
2997
2997
  gl.sampleCoverage(1, false);
2998
- const canvas = this.ZC.canvas;
2998
+ const canvas = this.CD.canvas;
2999
2999
  const maxTextureUnits = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
3000
3000
  gl.scissor(0, 0, canvas.width, canvas.height);
3001
3001
  gl.viewport(0, 0, canvas.width, canvas.height);
@@ -3011,7 +3011,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3011
3011
  gl.activeTexture(gl.TEXTURE0);
3012
3012
  }
3013
3013
  restoreWebGLStates(webGLStates) {
3014
- const gl = this.ZC.getRawContextAsWebGL2();
3014
+ const gl = this.CD.getRawContextAsWebGL2();
3015
3015
  if (webGLStates.depthTest) {
3016
3016
  gl.enable(gl.DEPTH_TEST);
3017
3017
  } else {
@@ -3150,7 +3150,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3150
3150
  gl.useProgram(webGLStates.currentProgram);
3151
3151
  }
3152
3152
  getCurrentWebGLStates() {
3153
- const gl = this.ZC.getRawContextAsWebGL2();
3153
+ const gl = this.CD.getRawContextAsWebGL2();
3154
3154
  const depthTest = gl.isEnabled(gl.DEPTH_TEST);
3155
3155
  const stencilTest = gl.isEnabled(gl.STENCIL_TEST);
3156
3156
  const blend = gl.isEnabled(gl.BLEND);
@@ -3335,7 +3335,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3335
3335
  };
3336
3336
  }
3337
3337
  unbindTextureSamplers() {
3338
- const gl = this.ZC.getRawContextAsWebGL2();
3338
+ const gl = this.CD.getRawContextAsWebGL2();
3339
3339
  const maxTextureUnits = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
3340
3340
  for (let i = 0; i < maxTextureUnits; i++) {
3341
3341
  gl.bindSampler(i, null);
@@ -3343,12 +3343,12 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3343
3343
  }
3344
3344
  isSupportMultiViewVRRendering(engine) {
3345
3345
  if (engine.engineState.currentProcessApproach === ProcessApproach.WebGL2) {
3346
- return this.ZC.isMultiview(engine.config);
3346
+ return this.CD.isMultiview(engine.config);
3347
3347
  }
3348
3348
  return false;
3349
3349
  }
3350
3350
  blitToTexture2dFromTexture2dArray(srcTextureUid, dstFboUid, dstWidth, dstHeight) {
3351
- const gl = this.ZC.getRawContextAsWebGL2();
3351
+ const gl = this.CD.getRawContextAsWebGL2();
3352
3352
  const srcTexture = this.getWebGLResource(srcTextureUid);
3353
3353
  const dstFbo = this.getWebGLResource(dstFboUid);
3354
3354
  gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, dstFbo);
@@ -3357,7 +3357,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3357
3357
  gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);
3358
3358
  }
3359
3359
  blitToTexture2dFromTexture2dArrayFake(srcTextureUid, dstFboUid, dstWidth, dstHeight) {
3360
- const gl = this.ZC.getRawContextAsWebGL2();
3360
+ const gl = this.CD.getRawContextAsWebGL2();
3361
3361
  const srcTexture = this.getWebGLResource(srcTextureUid);
3362
3362
  const dstFbo = this.getWebGLResource(dstFboUid);
3363
3363
  gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, dstFbo);
@@ -3366,7 +3366,7 @@ vec4 fetchVec4FromVec4Block(int vec4Idx) {
3366
3366
  gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);
3367
3367
  }
3368
3368
  blitToTexture2dFromTexture2dArray2(srcTextureUid, dstTextureUid, dstWidth, dstHeight) {
3369
- const gl = this.ZC.getRawContextAsWebGL2();
3369
+ const gl = this.CD.getRawContextAsWebGL2();
3370
3370
  const srcTexture = this.getWebGLResource(srcTextureUid);
3371
3371
  const dstTexture = this.getWebGLResource(dstTextureUid);
3372
3372
  const webStereoUtil = WebGLStereoUtil.getInstance(gl);