@haiyue/extensions 0.1.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 (293) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +30 -0
  3. package/dist/animation/Animation2DComponent.d.ts +46 -0
  4. package/dist/animation/Animation2DExtensionRegistry.d.ts +27 -0
  5. package/dist/animation/Animation2DRenderSystem.d.ts +89 -0
  6. package/dist/animation/Animation2DRuntime.d.ts +99 -0
  7. package/dist/animation/Animation2DStateMachine.d.ts +13 -0
  8. package/dist/animation/Animation2DStateMachineComponent.d.ts +54 -0
  9. package/dist/animation/Animation2DStateMachineRuntime.d.ts +30 -0
  10. package/dist/animation/Animation2DStateMachineSystem.d.ts +14 -0
  11. package/dist/animation/Animation2DStateMachineVisualRuntime.d.ts +27 -0
  12. package/dist/animation/Animation2DSystem.d.ts +14 -0
  13. package/dist/animation/AnimationAssetLoader.d.ts +9 -0
  14. package/dist/animation/AnimationAudioClip.d.ts +26 -0
  15. package/dist/animation/AnimationPathTessellator.d.ts +52 -0
  16. package/dist/animation/AnimationTextRasterizer.d.ts +21 -0
  17. package/dist/animation/AnimationVisual2D.d.ts +68 -0
  18. package/dist/animation/HyaAnimation2DClipAdapter.d.ts +16 -0
  19. package/dist/animation/Particle2DDescriptorAdapter.d.ts +5 -0
  20. package/dist/animation/runtime/mixer/Action.d.ts +150 -0
  21. package/dist/animation/runtime/mixer/Mixer.d.ts +54 -0
  22. package/dist/animation/runtime/mixer/PoseBuffer.d.ts +23 -0
  23. package/dist/animation/runtime/mixer/Sampler.d.ts +17 -0
  24. package/dist/animation/runtime/mixer/Types.d.ts +101 -0
  25. package/dist/animation/runtime/mixer/index.d.ts +6 -0
  26. package/dist/animation-state-machine/AnimationStateMachine.d.ts +111 -0
  27. package/dist/animation-state-machine/AnimationStateMachineChannels.d.ts +23 -0
  28. package/dist/animation-state-machine/runtime/Animation2DStateMachineMixerAdapter.d.ts +51 -0
  29. package/dist/animation-state-machine/runtime/AnimationStateMachineBlendTreeWeights.d.ts +14 -0
  30. package/dist/animation-state-machine/runtime/AnimationStateMachineCompiler.d.ts +109 -0
  31. package/dist/animation-state-machine/runtime/AnimationStateMachineController.d.ts +103 -0
  32. package/dist/animation-state-machine/runtime/AnimationStateMachineMixerPort.d.ts +35 -0
  33. package/dist/animation-state-machine/runtime/index.d.ts +7 -0
  34. package/dist/animation.d.ts +15 -0
  35. package/dist/animation.js +1171 -0
  36. package/dist/animation3d/Animation3DAction.d.ts +46 -0
  37. package/dist/animation3d/Animation3DBinding.d.ts +85 -0
  38. package/dist/animation3d/Animation3DClip.d.ts +20 -0
  39. package/dist/animation3d/Animation3DError.d.ts +13 -0
  40. package/dist/animation3d/Animation3DMixer.d.ts +27 -0
  41. package/dist/animation3d/Animation3DPose.d.ts +40 -0
  42. package/dist/animation3d/Animation3DPoseBuffer.d.ts +24 -0
  43. package/dist/animation3d/Animation3DResource.d.ts +28 -0
  44. package/dist/animation3d/Animation3DStateMachine.d.ts +95 -0
  45. package/dist/animation3d/Animation3DStateMachineRuntime.d.ts +70 -0
  46. package/dist/animation3d/Animation3DTrack.d.ts +19 -0
  47. package/dist/animation3d/hya/HyaAnimation3DRuntime.d.ts +73 -0
  48. package/dist/animation3d/hya/HyaAnimation3DStateMachineRuntime.d.ts +65 -0
  49. package/dist/animation3d/hya/HyaAnimation3DTypes.d.ts +170 -0
  50. package/dist/animation3d/hya/index.d.ts +4 -0
  51. package/dist/animation3d/index.d.ts +14 -0
  52. package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.d.ts +81 -0
  53. package/dist/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.d.ts +39 -0
  54. package/dist/animation3d/runtime/integration/index.d.ts +2 -0
  55. package/dist/animation3d/runtime/mixer/Action.d.ts +150 -0
  56. package/dist/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.d.ts +6 -0
  57. package/dist/animation3d/runtime/mixer/Mixer.d.ts +59 -0
  58. package/dist/animation3d/runtime/mixer/PoseBuffer.d.ts +1 -0
  59. package/dist/animation3d/runtime/mixer/TrackSampler.d.ts +24 -0
  60. package/dist/animation3d/runtime/mixer/index.d.ts +4 -0
  61. package/dist/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.d.ts +1 -0
  62. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.d.ts +1 -0
  63. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineController.d.ts +1 -0
  64. package/dist/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.d.ts +1 -0
  65. package/dist/animation3d/runtime/state-machine/index.d.ts +6 -0
  66. package/dist/animation3d.d.ts +5 -0
  67. package/dist/animation3d.js +1708 -0
  68. package/dist/benchmark.d.ts +30 -0
  69. package/dist/benchmark.js +119 -0
  70. package/dist/canvas-text/CanvasText2DRenderSystem.d.ts +24 -0
  71. package/dist/canvas-text/CanvasTextComponent.d.ts +18 -0
  72. package/dist/canvas-text.d.ts +4 -0
  73. package/dist/canvas-text.js +276 -0
  74. package/dist/chunks/2d-ui-animation-2d.generated-D4aHzFU2.js +4 -0
  75. package/dist/chunks/2d-ui-canvas-text-2d.generated-C0Eaej2m.js +4 -0
  76. package/dist/chunks/2d-ui-spine2d.generated-CUUi8xjl.js +4 -0
  77. package/dist/chunks/2d-ui-tilemap2d.generated-gebw4mX7.js +4 -0
  78. package/dist/chunks/Animation2DStateMachine-9IonguNa.js +3245 -0
  79. package/dist/chunks/AnimationStateMachineController-BIcAh-sT.js +1438 -0
  80. package/dist/chunks/GltfAnimation3DAdapter-Cu3rQQsW.js +2240 -0
  81. package/dist/chunks/GltfAnimationRuntime-CRHsLycN.js +631 -0
  82. package/dist/chunks/RenderSystem2DBase-DDT61dAu.js +227 -0
  83. package/dist/chunks/Spine2DRuntime-D9M9LAQR.js +3056 -0
  84. package/dist/chunks/SpineAssetParser-BSDmPge1.js +378 -0
  85. package/dist/chunks/gltfLoader-Dm22jLYB.js +2085 -0
  86. package/dist/chunks/pluginUtils-CvwroRMd.js +33 -0
  87. package/dist/experimental-gltf-worker.d.ts +4 -0
  88. package/dist/experimental-gltf-worker.js +138 -0
  89. package/dist/experimental-spine-worker.d.ts +4 -0
  90. package/dist/experimental-spine-worker.js +110 -0
  91. package/dist/gltf/GltfAccessorReader.d.ts +7 -0
  92. package/dist/gltf/GltfAnimation3DAdapter.d.ts +47 -0
  93. package/dist/gltf/GltfAnimationRuntime.d.ts +10 -0
  94. package/dist/gltf/GltfAssetWorkerClient.d.ts +20 -0
  95. package/dist/gltf/GltfCompatibilityReport.d.ts +70 -0
  96. package/dist/gltf/GltfConservativeBounds.d.ts +18 -0
  97. package/dist/gltf/GltfDracoDecoder.d.ts +4 -0
  98. package/dist/gltf/GltfExtensionAdapter.d.ts +54 -0
  99. package/dist/gltf/GltfLoaderContract.d.ts +249 -0
  100. package/dist/gltf/GltfLoaderErrors.d.ts +4 -0
  101. package/dist/gltf/GltfMaterialDescriptor.d.ts +23 -0
  102. package/dist/gltf/GltfMaterialEncoder.d.ts +20 -0
  103. package/dist/gltf/GltfMaterialLoader.d.ts +6 -0
  104. package/dist/gltf/GltfModelComponent.d.ts +72 -0
  105. package/dist/gltf/GltfModelSystem.d.ts +37 -0
  106. package/dist/gltf/GltfPlugin.d.ts +6 -0
  107. package/dist/gltf/GltfSchema.d.ts +225 -0
  108. package/dist/gltf/GltfUvSemanticPlanner.d.ts +33 -0
  109. package/dist/gltf/gltfLoader.d.ts +9 -0
  110. package/dist/gltf-animation3d.d.ts +3 -0
  111. package/dist/gltf-animation3d.js +8 -0
  112. package/dist/gltf-worker-runtime.d.ts +7 -0
  113. package/dist/gltf-worker-runtime.js +6981 -0
  114. package/dist/gltf.d.ts +12 -0
  115. package/dist/gltf.js +517 -0
  116. package/dist/grid/Grid2DComponent.d.ts +25 -0
  117. package/dist/grid.d.ts +2 -0
  118. package/dist/grid.js +56 -0
  119. package/dist/hya-state-machine.d.ts +7 -0
  120. package/dist/hya-state-machine.js +2934 -0
  121. package/dist/index.d.ts +2 -0
  122. package/dist/index.js +7 -0
  123. package/dist/internal/2d-ui-shader-artifact.js +870 -0
  124. package/dist/plugins/pluginUtils.d.ts +20 -0
  125. package/dist/plugins.d.ts +6 -0
  126. package/dist/shaders/generated/2d-ui-artifact.generated.d.ts +658 -0
  127. package/dist/spine/Spine2DComponent.d.ts +116 -0
  128. package/dist/spine/Spine2DGpuRenderer.d.ts +65 -0
  129. package/dist/spine/Spine2DRenderSystem.d.ts +27 -0
  130. package/dist/spine/Spine2DRuntime.d.ts +103 -0
  131. package/dist/spine/SpineAnimationBoneTimelines.d.ts +8 -0
  132. package/dist/spine/SpineAssetParser.d.ts +18 -0
  133. package/dist/spine/SpineAssetWorkerClient.d.ts +19 -0
  134. package/dist/spine/SpineAssetWorkerContract.d.ts +6 -0
  135. package/dist/spine/SpineAtlasParser.d.ts +21 -0
  136. package/dist/spine/SpineFloatBuilder.d.ts +15 -0
  137. package/dist/spine/SpinePathConstraintSolver.d.ts +32 -0
  138. package/dist/spine/SpinePlugin.d.ts +8 -0
  139. package/dist/spine/SpineSkeletonRuntime.d.ts +185 -0
  140. package/dist/spine/SpineSlotAnimation.d.ts +17 -0
  141. package/dist/spine/SpineTimelineRuntime.d.ts +25 -0
  142. package/dist/spine/SpineVertexBuilder.d.ts +61 -0
  143. package/dist/spine.d.ts +7 -0
  144. package/dist/spine.js +578 -0
  145. package/dist/tilemap/Tilemap2DComponent.d.ts +110 -0
  146. package/dist/tilemap/Tilemap2DRenderSystem.d.ts +11 -0
  147. package/dist/tilemap/Tilemap2DRenderer.d.ts +24 -0
  148. package/dist/tilemap/TilemapPlugin.d.ts +8 -0
  149. package/dist/tilemap.d.ts +6 -0
  150. package/dist/tilemap.js +535 -0
  151. package/dist/tween/Tween2DComponent.d.ts +70 -0
  152. package/dist/tween/Tween2DSystem.d.ts +12 -0
  153. package/dist/tween.d.ts +4 -0
  154. package/dist/tween.js +138 -0
  155. package/dist/utils/RenderSystem2DBase.d.ts +42 -0
  156. package/dist/utils/arrayAccess.d.ts +4 -0
  157. package/dist/utils/camera2d.d.ts +12 -0
  158. package/dist/utils/render2dGpu.d.ts +32 -0
  159. package/package.json +124 -0
  160. package/src/animation/Animation2DComponent.ts +135 -0
  161. package/src/animation/Animation2DExtensionRegistry.ts +52 -0
  162. package/src/animation/Animation2DRenderSystem.ts +1026 -0
  163. package/src/animation/Animation2DRuntime.ts +1326 -0
  164. package/src/animation/Animation2DStateMachine.ts +39 -0
  165. package/src/animation/Animation2DStateMachineComponent.ts +228 -0
  166. package/src/animation/Animation2DStateMachineRuntime.ts +141 -0
  167. package/src/animation/Animation2DStateMachineSystem.ts +60 -0
  168. package/src/animation/Animation2DStateMachineVisualRuntime.ts +282 -0
  169. package/src/animation/Animation2DSystem.ts +72 -0
  170. package/src/animation/AnimationAssetLoader.ts +84 -0
  171. package/src/animation/AnimationAudioClip.ts +140 -0
  172. package/src/animation/AnimationPathTessellator.ts +691 -0
  173. package/src/animation/AnimationTextRasterizer.ts +340 -0
  174. package/src/animation/AnimationVisual2D.ts +153 -0
  175. package/src/animation/HyaAnimation2DClipAdapter.ts +845 -0
  176. package/src/animation/Particle2DDescriptorAdapter.ts +35 -0
  177. package/src/animation/runtime/mixer/Action.ts +876 -0
  178. package/src/animation/runtime/mixer/Mixer.ts +505 -0
  179. package/src/animation/runtime/mixer/PoseBuffer.ts +105 -0
  180. package/src/animation/runtime/mixer/Sampler.ts +252 -0
  181. package/src/animation/runtime/mixer/Types.ts +138 -0
  182. package/src/animation/runtime/mixer/index.ts +31 -0
  183. package/src/animation-state-machine/AnimationStateMachine.ts +146 -0
  184. package/src/animation-state-machine/AnimationStateMachineChannels.ts +116 -0
  185. package/src/animation-state-machine/runtime/Animation2DStateMachineMixerAdapter.ts +197 -0
  186. package/src/animation-state-machine/runtime/AnimationStateMachineBlendTreeWeights.ts +503 -0
  187. package/src/animation-state-machine/runtime/AnimationStateMachineCompiler.ts +763 -0
  188. package/src/animation-state-machine/runtime/AnimationStateMachineController.ts +987 -0
  189. package/src/animation-state-machine/runtime/AnimationStateMachineMixerPort.ts +54 -0
  190. package/src/animation-state-machine/runtime/index.ts +47 -0
  191. package/src/animation.ts +33 -0
  192. package/src/animation3d/Animation3DAction.ts +73 -0
  193. package/src/animation3d/Animation3DBinding.ts +116 -0
  194. package/src/animation3d/Animation3DClip.ts +22 -0
  195. package/src/animation3d/Animation3DError.ts +34 -0
  196. package/src/animation3d/Animation3DMixer.ts +82 -0
  197. package/src/animation3d/Animation3DPose.ts +100 -0
  198. package/src/animation3d/Animation3DPoseBuffer.ts +85 -0
  199. package/src/animation3d/Animation3DResource.ts +49 -0
  200. package/src/animation3d/Animation3DStateMachine.ts +126 -0
  201. package/src/animation3d/Animation3DStateMachineRuntime.ts +191 -0
  202. package/src/animation3d/Animation3DTrack.ts +29 -0
  203. package/src/animation3d/hya/HyaAnimation3DRuntime.ts +756 -0
  204. package/src/animation3d/hya/HyaAnimation3DStateMachineRuntime.ts +618 -0
  205. package/src/animation3d/hya/HyaAnimation3DTypes.ts +168 -0
  206. package/src/animation3d/hya/index.ts +10 -0
  207. package/src/animation3d/index.ts +76 -0
  208. package/src/animation3d/runtime/integration/Animation3DStateMachineMixerAdapter.ts +325 -0
  209. package/src/animation3d/runtime/integration/Animation3DStateMachineMixerIntegration.ts +158 -0
  210. package/src/animation3d/runtime/integration/index.ts +9 -0
  211. package/src/animation3d/runtime/mixer/Action.ts +833 -0
  212. package/src/animation3d/runtime/mixer/Animation3DMixerRuntimeStore.ts +26 -0
  213. package/src/animation3d/runtime/mixer/Mixer.ts +562 -0
  214. package/src/animation3d/runtime/mixer/PoseBuffer.ts +1 -0
  215. package/src/animation3d/runtime/mixer/TrackSampler.ts +399 -0
  216. package/src/animation3d/runtime/mixer/index.ts +8 -0
  217. package/src/animation3d/runtime/state-machine/Animation3DBlendTreeWeights.ts +4 -0
  218. package/src/animation3d/runtime/state-machine/Animation3DStateMachineCompiler.ts +1 -0
  219. package/src/animation3d/runtime/state-machine/Animation3DStateMachineController.ts +1 -0
  220. package/src/animation3d/runtime/state-machine/Animation3DStateMachineMixerPort.ts +1 -0
  221. package/src/animation3d/runtime/state-machine/index.ts +45 -0
  222. package/src/animation3d.ts +5 -0
  223. package/src/benchmark.ts +168 -0
  224. package/src/canvas-text/CanvasText2DRenderSystem.ts +292 -0
  225. package/src/canvas-text/CanvasTextComponent.ts +47 -0
  226. package/src/canvas-text.ts +4 -0
  227. package/src/experimental-gltf-worker.ts +18 -0
  228. package/src/experimental-spine-worker.ts +9 -0
  229. package/src/gltf/GltfAccessorReader.ts +271 -0
  230. package/src/gltf/GltfAnimation3DAdapter.ts +680 -0
  231. package/src/gltf/GltfAnimationRuntime.ts +392 -0
  232. package/src/gltf/GltfAssetWorkerClient.ts +136 -0
  233. package/src/gltf/GltfCompatibilityReport.ts +214 -0
  234. package/src/gltf/GltfConservativeBounds.ts +219 -0
  235. package/src/gltf/GltfDracoDecoder.ts +251 -0
  236. package/src/gltf/GltfExtensionAdapter.ts +340 -0
  237. package/src/gltf/GltfLoaderContract.ts +333 -0
  238. package/src/gltf/GltfLoaderErrors.ts +59 -0
  239. package/src/gltf/GltfMaterialDescriptor.ts +134 -0
  240. package/src/gltf/GltfMaterialEncoder.ts +173 -0
  241. package/src/gltf/GltfMaterialLoader.ts +293 -0
  242. package/src/gltf/GltfModelComponent.ts +115 -0
  243. package/src/gltf/GltfModelSystem.ts +208 -0
  244. package/src/gltf/GltfPlugin.ts +84 -0
  245. package/src/gltf/GltfSchema.ts +229 -0
  246. package/src/gltf/GltfUvSemanticPlanner.ts +166 -0
  247. package/src/gltf/gltfLoader.ts +910 -0
  248. package/src/gltf-animation3d.ts +10 -0
  249. package/src/gltf-worker-runtime.ts +10 -0
  250. package/src/gltf.ts +56 -0
  251. package/src/grid/Grid2DComponent.ts +69 -0
  252. package/src/grid.ts +2 -0
  253. package/src/hya-state-machine.ts +19 -0
  254. package/src/index.ts +2 -0
  255. package/src/plugins/pluginUtils.ts +50 -0
  256. package/src/plugins.ts +6 -0
  257. package/src/shaders/generated/2d-ui-animation-2d.generated.wgsl +242 -0
  258. package/src/shaders/generated/2d-ui-artifact.generated.ts +867 -0
  259. package/src/shaders/generated/2d-ui-canvas-text-2d.generated.wgsl +38 -0
  260. package/src/shaders/generated/2d-ui-spine2d.generated.wgsl +41 -0
  261. package/src/shaders/generated/2d-ui-tilemap2d.generated.wgsl +36 -0
  262. package/src/spine/Spine2DComponent.ts +168 -0
  263. package/src/spine/Spine2DGpuRenderer.ts +449 -0
  264. package/src/spine/Spine2DRenderSystem.ts +199 -0
  265. package/src/spine/Spine2DRuntime.ts +1529 -0
  266. package/src/spine/SpineAnimationBoneTimelines.ts +30 -0
  267. package/src/spine/SpineAssetParser.ts +20 -0
  268. package/src/spine/SpineAssetWorkerClient.ts +112 -0
  269. package/src/spine/SpineAssetWorkerContract.ts +4 -0
  270. package/src/spine/SpineAtlasParser.ts +127 -0
  271. package/src/spine/SpineFloatBuilder.ts +66 -0
  272. package/src/spine/SpinePathConstraintSolver.ts +582 -0
  273. package/src/spine/SpinePlugin.ts +76 -0
  274. package/src/spine/SpineSkeletonRuntime.ts +521 -0
  275. package/src/spine/SpineSlotAnimation.ts +195 -0
  276. package/src/spine/SpineTimelineRuntime.ts +453 -0
  277. package/src/spine/SpineVertexBuilder.ts +686 -0
  278. package/src/spine.ts +7 -0
  279. package/src/tilemap/Tilemap2DComponent.ts +232 -0
  280. package/src/tilemap/Tilemap2DRenderSystem.ts +58 -0
  281. package/src/tilemap/Tilemap2DRenderer.ts +289 -0
  282. package/src/tilemap/TilemapPlugin.ts +75 -0
  283. package/src/tilemap.ts +6 -0
  284. package/src/tween/Tween2DComponent.ts +83 -0
  285. package/src/tween/Tween2DSystem.ts +78 -0
  286. package/src/tween.ts +4 -0
  287. package/src/types/earcut.d.ts +7 -0
  288. package/src/types/wgsl.d.ts +4 -0
  289. package/src/utils/RenderSystem2DBase.ts +164 -0
  290. package/src/utils/arrayAccess.ts +17 -0
  291. package/src/utils/camera2d.ts +68 -0
  292. package/src/utils/render2dGpu.ts +132 -0
  293. package/test/fixtures/gltf/animation-characterization.gltf +344 -0
@@ -0,0 +1,10 @@
1
+ /** Stable glTF adapter for the source-independent Animation3D runtime. */
2
+ export {
3
+ GltfAnimation3DRuntime,
4
+ createGltfAnimation3DClips,
5
+ createGltfAnimation3DRuntime,
6
+ } from './gltf/GltfAnimation3DAdapter.js';
7
+ export type {
8
+ GltfAnimation3DRuntimeOptions,
9
+ GltfAnimation3DRuntimeState,
10
+ } from './gltf/GltfAnimation3DAdapter.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Self-contained module entry consumed by module workers.
3
+ *
4
+ * Keep these exports backed by the production glTF loader so worker parsing,
5
+ * Draco decoding, and geometry preparation cannot drift from the main thread.
6
+ */
7
+ export {
8
+ loadParsedGltfAsset,
9
+ prepareGltfGeometryPayloads,
10
+ } from './gltf/gltfLoader';
package/src/gltf.ts ADDED
@@ -0,0 +1,56 @@
1
+ export { GltfModelComponent } from './gltf/GltfModelComponent';
2
+ export type { GltfModelComponentOptions, GltfModelStatus } from './gltf/GltfModelComponent';
3
+ export { GltfModelSystem } from './gltf/GltfModelSystem';
4
+ export type { GltfModelSystemOptions } from './gltf/GltfModelSystem';
5
+ export { applyGltfAnimationClip, disposeGltfModel, GLTF_EXTENSION_CAPABILITIES, loadGltfModel, setGltfMaterialVariant } from './gltf/gltfLoader';
6
+ export {
7
+ DEFAULT_GLTF_EXTENSION_ADAPTERS,
8
+ collectGltfMaterialExtensionPatches,
9
+ collectGltfMaterialVariantNames,
10
+ collectGltfMaterialVariantReferences,
11
+ resolveGltfExtensionAdapters,
12
+ } from './gltf/GltfExtensionAdapter';
13
+ export { encodeGltfPbrMaterial } from './gltf/GltfMaterialEncoder';
14
+ export type {
15
+ EncodedGltfPbrMaterial,
16
+ EncodeGltfPbrMaterialOptions,
17
+ } from './gltf/GltfMaterialEncoder';
18
+ export type {
19
+ DracoDecoderConfig,
20
+ DracoDecoderFactory,
21
+ DracoDecoderModule,
22
+ GltfAssetWorker,
23
+ GltfAnimationClip,
24
+ GltfAnimationInfo,
25
+ GltfAnimationInterpolation,
26
+ GltfAnimationPath,
27
+ GltfAssetStats,
28
+ GltfExtensionCapability,
29
+ GltfExtensionAdapter,
30
+ GltfExtensionReport,
31
+ GltfExtensionReportEntry,
32
+ GltfExtensionSupport,
33
+ GltfLoadWarning,
34
+ GltfCompatibilityExtensionEntry,
35
+ GltfCompatibilityIssue,
36
+ GltfCompatibilityPerformanceSummary,
37
+ GltfCompatibilityReport,
38
+ GltfCompatibilityStatus,
39
+ GltfPrimitiveBoundsCompatibilityEntry,
40
+ GltfPrimitiveBoundsSupport,
41
+ GltfPrimitiveUvSemanticCompatibilityEntry,
42
+ GltfTextureCompatibilityEntry,
43
+ GltfTextureMipmapSource,
44
+ LoadedGltfModel,
45
+ LoadGltfOptions,
46
+ } from './gltf/gltfLoader';
47
+ export type {
48
+ GltfMaterialExtensionContext,
49
+ GltfMaterialExtensionPatch,
50
+ GltfMaterialStatePatch,
51
+ GltfMaterialTextureBinding,
52
+ GltfMaterialVariantReference,
53
+ GltfPrimitiveExtensionContext,
54
+ } from './gltf/GltfExtensionAdapter';
55
+ export { createGltfPlugin } from './gltf/GltfPlugin';
56
+ export type { GltfPluginOptions } from './gltf/GltfPlugin';
@@ -0,0 +1,69 @@
1
+ import { Component } from '@haiyue/engine';
2
+ import { UniqueCheckType } from '@haiyue/engine/ecs';
3
+
4
+ export interface Grid2DComponentOptions {
5
+ columns?: number;
6
+ rows?: number;
7
+ cellWidth?: number;
8
+ cellHeight?: number;
9
+ originX?: number;
10
+ originY?: number;
11
+ }
12
+
13
+ export class Grid2DComponent extends Component {
14
+ static override UniqueCheckType = UniqueCheckType.SYMBOL | UniqueCheckType.REPLACE;
15
+ static override UniqueSymbol = Symbol.for('Grid2DComponent');
16
+
17
+ columns: number;
18
+ rows: number;
19
+ cellWidth: number;
20
+ cellHeight: number;
21
+ originX: number;
22
+ originY: number;
23
+
24
+ constructor(options: Grid2DComponentOptions = {}) {
25
+ super('Grid2DComponent');
26
+ this.columns = Math.max(1, Math.floor(options.columns ?? 10));
27
+ this.rows = Math.max(1, Math.floor(options.rows ?? 20));
28
+ this.cellWidth = options.cellWidth ?? 32;
29
+ this.cellHeight = options.cellHeight ?? 32;
30
+ this.originX = options.originX ?? 0;
31
+ this.originY = options.originY ?? 0;
32
+ }
33
+
34
+ gridToWorld(column: number, row: number): [number, number] {
35
+ return [
36
+ this.originX + column * this.cellWidth,
37
+ this.originY + row * this.cellHeight,
38
+ ];
39
+ }
40
+
41
+ gridToWorldCenter(column: number, row: number): [number, number] {
42
+ return [
43
+ this.originX + (column + 0.5) * this.cellWidth,
44
+ this.originY + (row + 0.5) * this.cellHeight,
45
+ ];
46
+ }
47
+
48
+ worldToGrid(x: number, y: number): [number, number] {
49
+ return [
50
+ Math.floor((x - this.originX) / this.cellWidth),
51
+ Math.floor((y - this.originY) / this.cellHeight),
52
+ ];
53
+ }
54
+
55
+ contains(column: number, row: number): boolean {
56
+ return column >= 0 && row >= 0 && column < this.columns && row < this.rows;
57
+ }
58
+
59
+ override clone(): Grid2DComponent {
60
+ return new Grid2DComponent({
61
+ columns: this.columns,
62
+ rows: this.rows,
63
+ cellWidth: this.cellWidth,
64
+ cellHeight: this.cellHeight,
65
+ originX: this.originX,
66
+ originY: this.originY,
67
+ });
68
+ }
69
+ }
package/src/grid.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { Grid2DComponent } from './grid/Grid2DComponent';
2
+ export type { Grid2DComponentOptions } from './grid/Grid2DComponent';
@@ -0,0 +1,19 @@
1
+ export { Animation2DStateMachineComponent } from './animation/Animation2DStateMachineComponent';
2
+ export type { Animation2DStateMachineComponentOptions } from './animation/Animation2DStateMachineComponent';
3
+ export { Animation2DStateMachineSystem } from './animation/Animation2DStateMachineSystem';
4
+ export type { Animation2DStateMachineSystemOptions } from './animation/Animation2DStateMachineSystem';
5
+ export {
6
+ createHyaAnimation2DClips,
7
+ getHyaStateMachineExtension,
8
+ } from './animation/HyaAnimation2DClipAdapter';
9
+ export {
10
+ AnimationStateMachineChannelError,
11
+ assertAudioStateMachineCompatible,
12
+ audioStateMachineCompatibilityDiagnostic,
13
+ hyaStateMachineChannelCapability,
14
+ HYA_STATE_MACHINE_CHANNEL_REGISTRY,
15
+ } from './animation-state-machine/AnimationStateMachineChannels';
16
+ export type {
17
+ AnimationStateMachineChannelDiagnostic,
18
+ AnimationStateMachineChannelDiagnosticCode,
19
+ } from './animation-state-machine/AnimationStateMachineChannels';
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { RenderSystem2DBase } from './utils/RenderSystem2DBase';
2
+ export type { RenderSystem2DBaseOptions } from './utils/RenderSystem2DBase';
@@ -0,0 +1,50 @@
1
+ import type { EnginePlugin, RenderPipelineEntryOptions, ScenePluginContext, System } from '@haiyue/engine/experimental';
2
+ import type { Entity, HaiyueEngine, World } from '@haiyue/engine';
3
+
4
+ export const EXTENSIONS_PLUGIN_VERSION = '0.1.0';
5
+
6
+ export interface EditorViewportContributionContext {
7
+ world: World;
8
+ engine: HaiyueEngine;
9
+ camera2DEntity: Entity;
10
+ registerRenderSystem?: (system: System, options?: RenderPipelineEntryOptions) => void;
11
+ }
12
+
13
+ export function removeSystem(context: ScenePluginContext, system: System | null): void {
14
+ if (system) context.world.removeSystem(system);
15
+ }
16
+
17
+ export function installEditorRenderSystem<T extends System & { autoUpdate: boolean; setCameraEntity?(entity: Entity): unknown }>(
18
+ context: EditorViewportContributionContext,
19
+ constructor: new (...args: never[]) => T,
20
+ create: () => T,
21
+ ): { dispose(): void } {
22
+ let system = context.world.getSystem(constructor) as T | null;
23
+ const created = system === null;
24
+ if (!system) {
25
+ system = create();
26
+ context.world.addSystem(system);
27
+ }
28
+ system.setCameraEntity?.(context.camera2DEntity);
29
+ if (context.registerRenderSystem) {
30
+ system.autoUpdate = false;
31
+ context.registerRenderSystem(system);
32
+ } else {
33
+ system.autoUpdate = true;
34
+ }
35
+ return ownedEditorViewportSystem(context.world, system, created);
36
+ }
37
+
38
+ export function ownedEditorViewportSystem(
39
+ world: World,
40
+ system: System,
41
+ owned: boolean,
42
+ ): { dispose(): void } {
43
+ return {
44
+ dispose() {
45
+ if (owned && world.hasSystem(system)) world.removeSystem(system);
46
+ },
47
+ };
48
+ }
49
+
50
+ export type { EnginePlugin, RenderPipelineEntryOptions };
package/src/plugins.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { createGltfPlugin } from './gltf/GltfPlugin';
2
+ export type { GltfPluginOptions } from './gltf/GltfPlugin';
3
+ export { createSpinePlugin } from './spine/SpinePlugin';
4
+ export type { SpinePluginOptions } from './spine/SpinePlugin';
5
+ export { createTilemapPlugin } from './tilemap/TilemapPlugin';
6
+ export type { TilemapPluginOptions } from './tilemap/TilemapPlugin';
@@ -0,0 +1,242 @@
1
+ // haiyue:builtin-render animation-2d
2
+ // source: shader-language/builtin-components-2d-ui-family.json
3
+
4
+ struct CameraUniforms {
5
+ viewProj : mat4x4<f32>,
6
+ }
7
+
8
+ struct ObjectUniforms {
9
+ model : mat4x4<f32>,
10
+ color : vec4<f32>,
11
+ params : vec4<f32>, // x: composite layer count, y: output offscreen source
12
+ uvRect : vec4<f32>,
13
+ compositeParams : array<vec4<f32>, 8>, // mode, operation, feather x/y
14
+ compositeExpansion0 : vec4<f32>,
15
+ compositeExpansion1 : vec4<f32>,
16
+ gradientParams : vec4<f32>, // kind, stop count, opacity
17
+ gradientGeometry : vec4<f32>, // start.xy, end.xy
18
+ gradientColors : array<vec4<f32>, 8>,
19
+ gradientOffsets0 : vec4<f32>,
20
+ gradientOffsets1 : vec4<f32>,
21
+ effectKinds0 : vec4<f32>,
22
+ effectKinds1 : vec4<f32>,
23
+ effectData : array<EffectData, 8>,
24
+ }
25
+
26
+ struct EffectData {
27
+ data0 : vec4<f32>,
28
+ data1 : vec4<f32>,
29
+ data2 : vec4<f32>,
30
+ data3 : vec4<f32>,
31
+ data4 : vec4<f32>,
32
+ data5 : vec4<f32>,
33
+ }
34
+
35
+ @group(0) @binding(0) var<uniform> camera : CameraUniforms;
36
+ @group(1) @binding(0) var<uniform> object : ObjectUniforms;
37
+ @group(2) @binding(0) var baseTexture : texture_2d<f32>;
38
+ @group(2) @binding(1) var baseSampler : sampler;
39
+ @group(3) @binding(0) var compositeTexture0 : texture_2d<f32>;
40
+ @group(3) @binding(1) var compositeTexture1 : texture_2d<f32>;
41
+ @group(3) @binding(2) var compositeTexture2 : texture_2d<f32>;
42
+ @group(3) @binding(3) var compositeTexture3 : texture_2d<f32>;
43
+ @group(3) @binding(4) var compositeTexture4 : texture_2d<f32>;
44
+ @group(3) @binding(5) var compositeTexture5 : texture_2d<f32>;
45
+ @group(3) @binding(6) var compositeTexture6 : texture_2d<f32>;
46
+ @group(3) @binding(7) var compositeTexture7 : texture_2d<f32>;
47
+ @group(3) @binding(8) var compositeSampler : sampler;
48
+
49
+ struct VertexInput {
50
+ @location(0) position : vec2<f32>,
51
+ @location(1) uv : vec2<f32>,
52
+ }
53
+
54
+ struct VertexOutput {
55
+ @builtin(position) clipPos : vec4<f32>,
56
+ @location(0) uv : vec2<f32>,
57
+ @location(1) localPosition : vec2<f32>,
58
+ }
59
+
60
+ @vertex
61
+ fn vs_main(input : VertexInput) -> VertexOutput {
62
+ var out : VertexOutput;
63
+ out.clipPos = camera.viewProj * object.model * vec4<f32>(input.position, 0.0, 1.0);
64
+ out.uv = object.uvRect.xy + input.uv * object.uvRect.zw;
65
+ out.localPosition = input.position;
66
+ return out;
67
+ }
68
+
69
+ struct EffectVertexOutput {
70
+ @builtin(position) clipPos : vec4<f32>,
71
+ @location(0) uv : vec2<f32>,
72
+ @location(1) @interpolate(flat) effectIndex : u32,
73
+ }
74
+
75
+ @vertex
76
+ fn vs_effect(@builtin(vertex_index) vertexIndex : u32, @builtin(instance_index) effectIndex : u32) -> EffectVertexOutput {
77
+ let uv = vec2<f32>(f32((vertexIndex << 1u) & 2u), f32(vertexIndex & 2u));
78
+ var out : EffectVertexOutput;
79
+ out.clipPos = vec4<f32>(uv * vec2<f32>(2.0, -2.0) + vec2<f32>(-1.0, 1.0), 0.0, 1.0);
80
+ out.uv = uv;
81
+ out.effectIndex = effectIndex;
82
+ return out;
83
+ }
84
+
85
+ fn decode_coverage(value : vec4<f32>, mode : f32) -> f32 {
86
+ var coverage = select(value.a, dot(value.rgb, vec3<f32>(0.2126, 0.7152, 0.0722)), mode > 1.5);
87
+ if ((mode > 0.5 && mode < 1.5) || mode > 2.5) { coverage = 1.0 - coverage; }
88
+ return clamp(coverage, 0.0, 1.0);
89
+ }
90
+
91
+ fn filtered_coverage(
92
+ source : texture_2d<f32>,
93
+ uv : vec2<f32>,
94
+ parameters : vec4<f32>,
95
+ expansion : f32,
96
+ ) -> f32 {
97
+ let dimensions = vec2<f32>(textureDimensions(source));
98
+ let radius = max(vec2<f32>(abs(expansion)), parameters.zw);
99
+ let stepUv = radius / max(dimensions, vec2<f32>(1.0));
100
+ let center = decode_coverage(textureSample(source, compositeSampler, uv), parameters.x);
101
+ if (max(radius.x, radius.y) < 0.001) { return center; }
102
+ let a = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(-stepUv.x, -stepUv.y)), parameters.x);
103
+ let b = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(0.0, -stepUv.y)), parameters.x);
104
+ let c = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(stepUv.x, -stepUv.y)), parameters.x);
105
+ let d = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(-stepUv.x, 0.0)), parameters.x);
106
+ let e = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(stepUv.x, 0.0)), parameters.x);
107
+ let f = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(-stepUv.x, stepUv.y)), parameters.x);
108
+ let g = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(0.0, stepUv.y)), parameters.x);
109
+ let h = decode_coverage(textureSample(source, compositeSampler, uv + vec2<f32>(stepUv.x, stepUv.y)), parameters.x);
110
+ var expanded = center;
111
+ if (expansion > 0.001) { expanded = max(center, max(max(max(a, b), max(c, d)), max(max(e, f), max(g, h)))); }
112
+ if (expansion < -0.001) { expanded = min(center, min(min(min(a, b), min(c, d)), min(min(e, f), min(g, h)))); }
113
+ if (max(parameters.z, parameters.w) < 0.001) { return expanded; }
114
+ let blurred = (center * 2.0 + a + b + c + d + e + f + g + h) / 10.0;
115
+ return mix(expanded, blurred, clamp(max(parameters.z, parameters.w), 0.0, 1.0));
116
+ }
117
+
118
+ fn combine_coverage(current : f32, next : f32, operation : f32) -> f32 {
119
+ if (operation < 0.5) { return current + next * (1.0 - current); }
120
+ if (operation < 1.5) { return max(0.0, current - next); }
121
+ if (operation < 2.5) { return current * next; }
122
+ return abs(current - next);
123
+ }
124
+
125
+ fn gradient_offset(index : i32) -> f32 {
126
+ if (index < 4) { return object.gradientOffsets0[index]; }
127
+ return object.gradientOffsets1[index - 4];
128
+ }
129
+
130
+ fn gradient_color(position : vec2<f32>) -> vec4<f32> {
131
+ let start = object.gradientGeometry.xy;
132
+ let delta = object.gradientGeometry.zw - start;
133
+ var progress = dot(position - start, delta) / max(dot(delta, delta), 1e-6);
134
+ if (object.gradientParams.x > 1.5) { progress = length(position - start) / max(length(delta), 1e-6); }
135
+ progress = clamp(progress, 0.0, 1.0);
136
+ var previousOffset = gradient_offset(0);
137
+ var previousColor = object.gradientColors[0];
138
+ for (var index = 1; index < 8; index++) {
139
+ if (f32(index) >= object.gradientParams.y) { break; }
140
+ let nextOffset = gradient_offset(index);
141
+ let nextColor = object.gradientColors[index];
142
+ if (progress <= nextOffset) {
143
+ let local = clamp((progress - previousOffset) / max(nextOffset - previousOffset, 1e-6), 0.0, 1.0);
144
+ return mix(previousColor, nextColor, local) * vec4<f32>(1.0, 1.0, 1.0, object.gradientParams.z);
145
+ }
146
+ previousOffset = nextOffset;
147
+ previousColor = nextColor;
148
+ }
149
+ return previousColor * vec4<f32>(1.0, 1.0, 1.0, object.gradientParams.z);
150
+ }
151
+
152
+ fn effect_kind(index : u32) -> f32 {
153
+ if (index < 4u) { return object.effectKinds0[index]; }
154
+ return object.effectKinds1[index - 4u];
155
+ }
156
+
157
+ fn unpremultiply(value : vec4<f32>) -> vec4<f32> {
158
+ if (value.a <= 1e-6) { return vec4<f32>(0.0); }
159
+ return vec4<f32>(value.rgb / value.a, value.a);
160
+ }
161
+
162
+ fn apply_color_effect(value : vec4<f32>, index : u32) -> vec4<f32> {
163
+ let kind = effect_kind(index);
164
+ let data = object.effectData[index];
165
+ var color = unpremultiply(value);
166
+ if (kind < 1.5) {
167
+ let luminance = dot(color.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
168
+ let tinted = mix(data.data0.xyz, vec3<f32>(data.data0.w, data.data1.x, data.data1.y), luminance);
169
+ color = vec4<f32>(mix(color.rgb, tinted, clamp(data.data1.z, 0.0, 1.0)), color.a);
170
+ } else if (kind < 2.5) {
171
+ color = vec4<f32>(data.data0.rgb, color.a);
172
+ color.a = color.a * data.data0.a * clamp(data.data1.x, 0.0, 1.0);
173
+ } else if (kind < 3.5) {
174
+ color.a = color.a * clamp(data.data0.x, 0.0, 1.0);
175
+ } else if (kind < 4.5) {
176
+ let source = color;
177
+ color = vec4<f32>(
178
+ dot(source, data.data0) + data.data1.x,
179
+ dot(source, vec4<f32>(data.data1.yzw, data.data2.x)) + data.data2.y,
180
+ dot(source, vec4<f32>(data.data2.zw, data.data3.xy)) + data.data3.z,
181
+ dot(source, vec4<f32>(data.data3.w, data.data4.xyz)) + data.data4.w
182
+ );
183
+ color = clamp(color, vec4<f32>(0.0), vec4<f32>(1.0));
184
+ }
185
+ return vec4<f32>(color.rgb * color.a, color.a);
186
+ }
187
+
188
+ fn sample_blurred(uv : vec2<f32>, radius : vec2<f32>) -> vec4<f32> {
189
+ let dimensions = max(vec2<f32>(textureDimensions(baseTexture)), vec2<f32>(1.0));
190
+ let stepUv = radius / dimensions;
191
+ if (max(radius.x, radius.y) < 0.01) { return textureSampleLevel(baseTexture, baseSampler, uv, 0.0); }
192
+ var value = textureSampleLevel(baseTexture, baseSampler, uv, 0.0) * 0.25;
193
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(-stepUv.x, 0.0), 0.0) * 0.125;
194
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(stepUv.x, 0.0), 0.0) * 0.125;
195
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(0.0, -stepUv.y), 0.0) * 0.125;
196
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(0.0, stepUv.y), 0.0) * 0.125;
197
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(-stepUv.x, -stepUv.y), 0.0) * 0.0625;
198
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(stepUv.x, -stepUv.y), 0.0) * 0.0625;
199
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(-stepUv.x, stepUv.y), 0.0) * 0.0625;
200
+ value += textureSampleLevel(baseTexture, baseSampler, uv + vec2<f32>(stepUv.x, stepUv.y), 0.0) * 0.0625;
201
+ return value;
202
+ }
203
+
204
+ @fragment
205
+ fn fs_effect(input : EffectVertexOutput) -> @location(0) vec4<f32> {
206
+ let kind = effect_kind(input.effectIndex);
207
+ let data = object.effectData[input.effectIndex];
208
+ if (kind < 4.5) { return apply_color_effect(textureSampleLevel(baseTexture, baseSampler, input.uv, 0.0), input.effectIndex); }
209
+ if (kind < 5.5) { return sample_blurred(input.uv, max(data.data0.xy, vec2<f32>(0.0))); }
210
+ let dimensions = max(vec2<f32>(textureDimensions(baseTexture)), vec2<f32>(1.0));
211
+ let shadowUv = input.uv - data.data1.yz / dimensions;
212
+ let shadowCoverage = sample_blurred(shadowUv, vec2<f32>(max(data.data1.w, 0.0))).a;
213
+ let shadowAlpha = clamp(shadowCoverage * data.data1.x * data.data0.a, 0.0, 1.0);
214
+ let shadow = vec4<f32>(data.data0.rgb * shadowAlpha, shadowAlpha);
215
+ let foreground = textureSampleLevel(baseTexture, baseSampler, input.uv, 0.0);
216
+ return foreground + shadow * (1.0 - foreground.a);
217
+ }
218
+
219
+ @fragment
220
+ fn fs_present(input : EffectVertexOutput) -> @location(0) vec4<f32> {
221
+ return textureSampleLevel(baseTexture, baseSampler, input.uv, 0.0);
222
+ }
223
+
224
+ @fragment
225
+ fn fs_main(input : VertexOutput) -> @location(0) vec4<f32> {
226
+ var base = textureSample(baseTexture, baseSampler, input.uv) * object.color;
227
+ if (object.gradientParams.x > 0.5) { base = gradient_color(input.localPosition) * object.color; }
228
+ var coverage = 1.0;
229
+ if (object.params.x > 0.5) {
230
+ let uv = input.clipPos.xy / vec2<f32>(textureDimensions(compositeTexture0));
231
+ coverage = select(0.0, 1.0, object.compositeParams[0].y > 0.5 && object.compositeParams[0].y < 2.5);
232
+ coverage = combine_coverage(coverage, filtered_coverage(compositeTexture0, uv, object.compositeParams[0], object.compositeExpansion0.x), object.compositeParams[0].y);
233
+ if (object.params.x > 1.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture1, uv, object.compositeParams[1], object.compositeExpansion0.y), object.compositeParams[1].y); }
234
+ if (object.params.x > 2.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture2, uv, object.compositeParams[2], object.compositeExpansion0.z), object.compositeParams[2].y); }
235
+ if (object.params.x > 3.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture3, uv, object.compositeParams[3], object.compositeExpansion0.w), object.compositeParams[3].y); }
236
+ if (object.params.x > 4.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture4, uv, object.compositeParams[4], object.compositeExpansion1.x), object.compositeParams[4].y); }
237
+ if (object.params.x > 5.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture5, uv, object.compositeParams[5], object.compositeExpansion1.y), object.compositeParams[5].y); }
238
+ if (object.params.x > 6.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture6, uv, object.compositeParams[6], object.compositeExpansion1.z), object.compositeParams[6].y); }
239
+ if (object.params.x > 7.5) { coverage = combine_coverage(coverage, filtered_coverage(compositeTexture7, uv, object.compositeParams[7], object.compositeExpansion1.w), object.compositeParams[7].y); }
240
+ }
241
+ return vec4<f32>(base.rgb, base.a * coverage);
242
+ }