@babylonjs/smart-filters-blocks 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.block.d.ts +34 -0
  2. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.block.d.ts.map +1 -0
  3. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.block.js +101 -0
  4. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.block.js.map +1 -0
  5. package/dist/blocks/babylon/demo/effects/blurBlock.d.ts +53 -0
  6. package/dist/blocks/babylon/demo/effects/blurBlock.d.ts.map +1 -0
  7. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts +28 -0
  8. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts.map +1 -0
  9. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js +17 -0
  10. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js.map +1 -0
  11. package/dist/blocks/babylon/demo/effects/blurBlock.js +98 -0
  12. package/dist/blocks/babylon/demo/effects/blurBlock.js.map +1 -0
  13. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts +8 -0
  14. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts.map +1 -0
  15. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js +28 -0
  16. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js.map +1 -0
  17. package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts +116 -0
  18. package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts.map +1 -0
  19. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts +24 -0
  20. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts.map +1 -0
  21. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js +15 -0
  22. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js.map +1 -0
  23. package/dist/blocks/babylon/demo/effects/compositionBlock.fragment.d.ts +18 -0
  24. package/dist/blocks/babylon/demo/effects/compositionBlock.fragment.d.ts.map +1 -0
  25. package/dist/blocks/babylon/demo/effects/compositionBlock.fragment.js +69 -0
  26. package/dist/blocks/babylon/demo/effects/compositionBlock.fragment.js.map +1 -0
  27. package/dist/blocks/babylon/demo/effects/compositionBlock.js +167 -0
  28. package/dist/blocks/babylon/demo/effects/compositionBlock.js.map +1 -0
  29. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts +6 -0
  30. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts.map +1 -0
  31. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js +25 -0
  32. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js.map +1 -0
  33. package/dist/blocks/babylon/demo/effects/contrastBlock.block.d.ts +39 -0
  34. package/dist/blocks/babylon/demo/effects/contrastBlock.block.d.ts.map +1 -0
  35. package/dist/blocks/babylon/demo/effects/contrastBlock.block.js +140 -0
  36. package/dist/blocks/babylon/demo/effects/contrastBlock.block.js.map +1 -0
  37. package/dist/blocks/babylon/demo/effects/desaturateBlock.block.d.ts +39 -0
  38. package/dist/blocks/babylon/demo/effects/desaturateBlock.block.d.ts.map +1 -0
  39. package/dist/blocks/babylon/demo/effects/desaturateBlock.block.js +115 -0
  40. package/dist/blocks/babylon/demo/effects/desaturateBlock.block.js.map +1 -0
  41. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts +74 -0
  42. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts.map +1 -0
  43. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts +32 -0
  44. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts.map +1 -0
  45. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js +17 -0
  46. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js.map +1 -0
  47. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js +167 -0
  48. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js.map +1 -0
  49. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts +6 -0
  50. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts.map +1 -0
  51. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js +27 -0
  52. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js.map +1 -0
  53. package/dist/blocks/babylon/demo/effects/exposureBlock.block.d.ts +38 -0
  54. package/dist/blocks/babylon/demo/effects/exposureBlock.block.d.ts.map +1 -0
  55. package/dist/blocks/babylon/demo/effects/exposureBlock.block.js +107 -0
  56. package/dist/blocks/babylon/demo/effects/exposureBlock.block.js.map +1 -0
  57. package/dist/blocks/babylon/demo/effects/greenScreenBlock.block.d.ts +46 -0
  58. package/dist/blocks/babylon/demo/effects/greenScreenBlock.block.d.ts.map +1 -0
  59. package/dist/blocks/babylon/demo/effects/greenScreenBlock.block.js +133 -0
  60. package/dist/blocks/babylon/demo/effects/greenScreenBlock.block.js.map +1 -0
  61. package/dist/blocks/babylon/demo/effects/index.d.ts +15 -0
  62. package/dist/blocks/babylon/demo/effects/index.d.ts.map +1 -0
  63. package/dist/blocks/babylon/demo/effects/index.js +15 -0
  64. package/dist/blocks/babylon/demo/effects/index.js.map +1 -0
  65. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts +58 -0
  66. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts.map +1 -0
  67. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js +158 -0
  68. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js.map +1 -0
  69. package/dist/blocks/babylon/demo/effects/maskBlock.block.d.ts +38 -0
  70. package/dist/blocks/babylon/demo/effects/maskBlock.block.d.ts.map +1 -0
  71. package/dist/blocks/babylon/demo/effects/maskBlock.block.js +110 -0
  72. package/dist/blocks/babylon/demo/effects/maskBlock.block.js.map +1 -0
  73. package/dist/blocks/babylon/demo/effects/pixelateBlock.block.d.ts +44 -0
  74. package/dist/blocks/babylon/demo/effects/pixelateBlock.block.d.ts.map +1 -0
  75. package/dist/blocks/babylon/demo/effects/pixelateBlock.block.js +125 -0
  76. package/dist/blocks/babylon/demo/effects/pixelateBlock.block.js.map +1 -0
  77. package/dist/blocks/babylon/demo/effects/posterizeBlock.block.d.ts +39 -0
  78. package/dist/blocks/babylon/demo/effects/posterizeBlock.block.d.ts.map +1 -0
  79. package/dist/blocks/babylon/demo/effects/posterizeBlock.block.js +116 -0
  80. package/dist/blocks/babylon/demo/effects/posterizeBlock.block.js.map +1 -0
  81. package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts +77 -0
  82. package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts.map +1 -0
  83. package/dist/blocks/babylon/demo/effects/spritesheetBlock.fragment.d.ts +18 -0
  84. package/dist/blocks/babylon/demo/effects/spritesheetBlock.fragment.d.ts.map +1 -0
  85. package/dist/blocks/babylon/demo/effects/spritesheetBlock.fragment.js +58 -0
  86. package/dist/blocks/babylon/demo/effects/spritesheetBlock.fragment.js.map +1 -0
  87. package/dist/blocks/babylon/demo/effects/spritesheetBlock.js +98 -0
  88. package/dist/blocks/babylon/demo/effects/spritesheetBlock.js.map +1 -0
  89. package/dist/blocks/babylon/demo/effects/tintBlock.d.ts +7 -0
  90. package/dist/blocks/babylon/demo/effects/tintBlock.d.ts.map +1 -0
  91. package/dist/blocks/babylon/demo/effects/tintBlock.js +51 -0
  92. package/dist/blocks/babylon/demo/effects/tintBlock.js.map +1 -0
  93. package/dist/blocks/babylon/demo/transitions/index.d.ts +2 -0
  94. package/dist/blocks/babylon/demo/transitions/index.d.ts.map +1 -0
  95. package/dist/blocks/babylon/demo/transitions/index.js +2 -0
  96. package/dist/blocks/babylon/demo/transitions/index.js.map +1 -0
  97. package/dist/blocks/babylon/demo/transitions/wipeBlock.block.d.ts +42 -0
  98. package/dist/blocks/babylon/demo/transitions/wipeBlock.block.d.ts.map +1 -0
  99. package/dist/blocks/babylon/demo/transitions/wipeBlock.block.js +116 -0
  100. package/dist/blocks/babylon/demo/transitions/wipeBlock.block.js.map +1 -0
  101. package/dist/blocks/babylon/demo/utilities/index.d.ts +2 -0
  102. package/dist/blocks/babylon/demo/utilities/index.d.ts.map +1 -0
  103. package/dist/blocks/babylon/demo/utilities/index.js +2 -0
  104. package/dist/blocks/babylon/demo/utilities/index.js.map +1 -0
  105. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.d.ts +34 -0
  106. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.d.ts.map +1 -0
  107. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.js +97 -0
  108. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.js.map +1 -0
  109. package/dist/blocks/blockNamespaces.d.ts +5 -0
  110. package/dist/blocks/blockNamespaces.d.ts.map +1 -0
  111. package/dist/blocks/blockNamespaces.js +5 -0
  112. package/dist/blocks/blockNamespaces.js.map +1 -0
  113. package/dist/blocks/blockTypes.d.ts +22 -0
  114. package/dist/blocks/blockTypes.d.ts.map +1 -0
  115. package/dist/blocks/blockTypes.js +22 -0
  116. package/dist/blocks/blockTypes.js.map +1 -0
  117. package/dist/blocks/index.d.ts +6 -0
  118. package/dist/blocks/index.d.ts.map +1 -0
  119. package/dist/blocks/index.js +6 -0
  120. package/dist/blocks/index.js.map +1 -0
  121. package/dist/index.d.ts +3 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/dist/index.js +3 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/registration/IBlockRegistration.d.ts +34 -0
  126. package/dist/registration/IBlockRegistration.d.ts.map +1 -0
  127. package/dist/registration/IBlockRegistration.js +2 -0
  128. package/dist/registration/IBlockRegistration.js.map +1 -0
  129. package/dist/registration/blockSerializers.d.ts +13 -0
  130. package/dist/registration/blockSerializers.d.ts.map +1 -0
  131. package/dist/registration/blockSerializers.js +35 -0
  132. package/dist/registration/blockSerializers.js.map +1 -0
  133. package/dist/registration/builtInBlockRegistrations.d.ts +13 -0
  134. package/dist/registration/builtInBlockRegistrations.d.ts.map +1 -0
  135. package/dist/registration/builtInBlockRegistrations.js +269 -0
  136. package/dist/registration/builtInBlockRegistrations.js.map +1 -0
  137. package/dist/registration/index.d.ts +3 -0
  138. package/dist/registration/index.d.ts.map +1 -0
  139. package/dist/registration/index.js +3 -0
  140. package/dist/registration/index.js.map +1 -0
  141. package/license.md +21 -0
  142. package/package.json +52 -0
  143. package/readme.md +7 -0
  144. package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.block.glsl +18 -0
  145. package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.block.ts +133 -0
  146. package/src/blocks/babylon/demo/effects/blurBlock.deserializer.ts +37 -0
  147. package/src/blocks/babylon/demo/effects/blurBlock.serializer.ts +31 -0
  148. package/src/blocks/babylon/demo/effects/blurBlock.ts +122 -0
  149. package/src/blocks/babylon/demo/effects/compositionBlock.deserializer.ts +31 -0
  150. package/src/blocks/babylon/demo/effects/compositionBlock.fragment.glsl +38 -0
  151. package/src/blocks/babylon/demo/effects/compositionBlock.fragment.ts +71 -0
  152. package/src/blocks/babylon/demo/effects/compositionBlock.serializer.ts +28 -0
  153. package/src/blocks/babylon/demo/effects/compositionBlock.ts +243 -0
  154. package/src/blocks/babylon/demo/effects/contrastBlock.block.glsl +36 -0
  155. package/src/blocks/babylon/demo/effects/contrastBlock.block.ts +180 -0
  156. package/src/blocks/babylon/demo/effects/desaturateBlock.block.glsl +24 -0
  157. package/src/blocks/babylon/demo/effects/desaturateBlock.block.ts +155 -0
  158. package/src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts +46 -0
  159. package/src/blocks/babylon/demo/effects/directionalBlurBlock.serializer.ts +30 -0
  160. package/src/blocks/babylon/demo/effects/directionalBlurBlock.ts +196 -0
  161. package/src/blocks/babylon/demo/effects/exposureBlock.block.glsl +15 -0
  162. package/src/blocks/babylon/demo/effects/exposureBlock.block.ts +142 -0
  163. package/src/blocks/babylon/demo/effects/greenScreenBlock.block.glsl +23 -0
  164. package/src/blocks/babylon/demo/effects/greenScreenBlock.block.ts +174 -0
  165. package/src/blocks/babylon/demo/effects/index.ts +14 -0
  166. package/src/blocks/babylon/demo/effects/kaleidoscopeBlock.ts +192 -0
  167. package/src/blocks/babylon/demo/effects/maskBlock.block.glsl +18 -0
  168. package/src/blocks/babylon/demo/effects/maskBlock.block.ts +145 -0
  169. package/src/blocks/babylon/demo/effects/pixelateBlock.block.glsl +28 -0
  170. package/src/blocks/babylon/demo/effects/pixelateBlock.block.ts +169 -0
  171. package/src/blocks/babylon/demo/effects/posterizeBlock.block.glsl +25 -0
  172. package/src/blocks/babylon/demo/effects/posterizeBlock.block.ts +156 -0
  173. package/src/blocks/babylon/demo/effects/spritesheetBlock.fragment.glsl +26 -0
  174. package/src/blocks/babylon/demo/effects/spritesheetBlock.fragment.ts +60 -0
  175. package/src/blocks/babylon/demo/effects/spritesheetBlock.ts +138 -0
  176. package/src/blocks/babylon/demo/effects/tintBlock.ts +51 -0
  177. package/src/blocks/babylon/demo/transitions/index.ts +1 -0
  178. package/src/blocks/babylon/demo/transitions/wipeBlock.block.glsl +11 -0
  179. package/src/blocks/babylon/demo/transitions/wipeBlock.block.ts +152 -0
  180. package/src/blocks/babylon/demo/utilities/index.ts +1 -0
  181. package/src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.glsl +14 -0
  182. package/src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.ts +129 -0
  183. package/src/blocks/blockNamespaces.ts +4 -0
  184. package/src/blocks/blockTypes.ts +21 -0
  185. package/src/blocks/index.ts +5 -0
  186. package/src/index.ts +2 -0
  187. package/src/registration/IBlockRegistration.ts +43 -0
  188. package/src/registration/blockSerializers.ts +52 -0
  189. package/src/registration/builtInBlockRegistrations.ts +397 -0
  190. package/src/registration/index.ts +2 -0
@@ -0,0 +1,42 @@
1
+ import { ShaderBinding, ConnectionPointType, type SmartFilter, ShaderBlock, type ShaderProgram } from "@babylonjs/smart-filters";
2
+ /**
3
+ * The implementation of the WipeBlock
4
+ */
5
+ export declare class WipeBlock extends ShaderBlock {
6
+ /**
7
+ * The class name of the block.
8
+ */
9
+ static ClassName: string;
10
+ /**
11
+ * The namespace of the block.
12
+ */
13
+ static Namespace: string;
14
+ /**
15
+ * The textureA connection point.
16
+ */
17
+ readonly textureA: import("@babylonjs/smart-filters").ConnectionPoint<ConnectionPointType.Texture>;
18
+ /**
19
+ * The textureB connection point.
20
+ */
21
+ readonly textureB: import("@babylonjs/smart-filters").ConnectionPoint<ConnectionPointType.Texture>;
22
+ /**
23
+ * The progress connection point.
24
+ */
25
+ readonly progress: import("@babylonjs/smart-filters").ConnectionPoint<ConnectionPointType.Float>;
26
+ /**
27
+ * The shader program (vertex and fragment code) to use to render the block
28
+ */
29
+ static ShaderCode: ShaderProgram;
30
+ /**
31
+ * Instantiates a new WipeBlock.
32
+ * @param smartFilter - The smart filter this block belongs to
33
+ * @param name - The friendly name of the block
34
+ */
35
+ constructor(smartFilter: SmartFilter, name: string);
36
+ /**
37
+ * Get the class instance that binds all the required data to the shader (effect) when rendering.
38
+ * @returns The class instance that binds the data to the effect
39
+ */
40
+ getShaderBinding(): ShaderBinding;
41
+ }
42
+ //# sourceMappingURL=wipeBlock.block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wipeBlock.block.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/transitions/wipeBlock.block.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,aAAa,EAEb,mBAAmB,EACnB,KAAK,WAAW,EAChB,WAAW,EACX,KAAK,aAAa,EACrB,MAAM,0BAA0B,CAAC;AA6ElC;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACtC;;OAEG;IACH,OAAuB,SAAS,SAAe;IAE/C;;OAEG;IACH,OAAuB,SAAS,SAA8B;IAE9D;;OAEG;IACH,SAAgB,QAAQ,kFAAuE;IAE/F;;OAEG;IACH,SAAgB,QAAQ,kFAAuE;IAE/F;;OAEG;IACH,SAAgB,QAAQ,gFAAqE;IAE7F;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,aAAa;CAO3C"}
@@ -0,0 +1,116 @@
1
+ /* eslint-disable prettier/prettier */
2
+ // ************************************************************
3
+ // Note: this file is auto-generated, do not modify it directly
4
+ // ************************************************************
5
+ import { ShaderBinding, ConnectionPointType, ShaderBlock, } from "@babylonjs/smart-filters";
6
+ /**
7
+ * The shader program for the block.
8
+ */
9
+ const shaderProgram = {
10
+ vertex: undefined,
11
+ fragment: {
12
+ uniform: `
13
+ uniform sampler2D _textureA_;
14
+ uniform sampler2D _textureB_;
15
+ uniform float _progress_;`,
16
+ mainInputTexture: "",
17
+ mainFunctionName: "_wipe_",
18
+ functions: [
19
+ {
20
+ name: "_wipe_",
21
+ code: `
22
+ vec4 _wipe_(vec2 vUV) {
23
+ vec4 colorA = texture2D(_textureA_, vUV);
24
+ vec4 colorB = texture2D(_textureB_, vUV);
25
+ return mix(colorB, colorA, step(_progress_, vUV.y));
26
+ }
27
+
28
+ `,
29
+ params: "vec2 vUV",
30
+ },
31
+ ],
32
+ },
33
+ };
34
+ /**
35
+ * The uniform names for this shader, to be used in the shader binding so
36
+ * that the names are always in sync.
37
+ */
38
+ const uniforms = {
39
+ textureA: "textureA",
40
+ textureB: "textureB",
41
+ progress: "progress",
42
+ };
43
+ /**
44
+ * The shader binding for the WipeBlock, used by the runtime
45
+ */
46
+ class WipeBlockShaderBinding extends ShaderBinding {
47
+ /**
48
+ * Creates a new shader binding instance for the block.
49
+ * @param textureA - The textureA runtime value
50
+ * @param textureB - The textureB runtime value
51
+ * @param progress - The progress runtime value
52
+ */
53
+ constructor(textureA, textureB, progress) {
54
+ super();
55
+ this._textureA = textureA;
56
+ this._textureB = textureB;
57
+ this._progress = progress;
58
+ }
59
+ /**
60
+ * Binds all the required data to the shader when rendering.
61
+ * @param effect - defines the effect to bind the data to
62
+ */
63
+ bind(effect) {
64
+ effect.setTexture(this.getRemappedName(uniforms.textureA), this._textureA.value);
65
+ effect.setTexture(this.getRemappedName(uniforms.textureB), this._textureB.value);
66
+ effect.setFloat(this.getRemappedName(uniforms.progress), this._progress.value);
67
+ }
68
+ }
69
+ /**
70
+ * The implementation of the WipeBlock
71
+ */
72
+ export class WipeBlock extends ShaderBlock {
73
+ /**
74
+ * Instantiates a new WipeBlock.
75
+ * @param smartFilter - The smart filter this block belongs to
76
+ * @param name - The friendly name of the block
77
+ */
78
+ constructor(smartFilter, name) {
79
+ super(smartFilter, name, false);
80
+ /**
81
+ * The textureA connection point.
82
+ */
83
+ this.textureA = this._registerInput(uniforms.textureA, ConnectionPointType.Texture);
84
+ /**
85
+ * The textureB connection point.
86
+ */
87
+ this.textureB = this._registerInput(uniforms.textureB, ConnectionPointType.Texture);
88
+ /**
89
+ * The progress connection point.
90
+ */
91
+ this.progress = this._registerInput(uniforms.progress, ConnectionPointType.Float);
92
+ }
93
+ /**
94
+ * Get the class instance that binds all the required data to the shader (effect) when rendering.
95
+ * @returns The class instance that binds the data to the effect
96
+ */
97
+ getShaderBinding() {
98
+ const textureA = this._confirmRuntimeDataSupplied(this.textureA);
99
+ const textureB = this._confirmRuntimeDataSupplied(this.textureB);
100
+ const progress = this._confirmRuntimeDataSupplied(this.progress);
101
+ return new WipeBlockShaderBinding(textureA, textureB, progress);
102
+ }
103
+ }
104
+ /**
105
+ * The class name of the block.
106
+ */
107
+ WipeBlock.ClassName = "WipeBlock";
108
+ /**
109
+ * The namespace of the block.
110
+ */
111
+ WipeBlock.Namespace = "Babylon.Demo.Transitions";
112
+ /**
113
+ * The shader program (vertex and fragment code) to use to render the block
114
+ */
115
+ WipeBlock.ShaderCode = shaderProgram;
116
+ //# sourceMappingURL=wipeBlock.block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wipeBlock.block.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/transitions/wipeBlock.block.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,+DAA+D;AAC/D,+DAA+D;AAC/D,+DAA+D;AAS/D,OAAO,EACH,aAAa,EAEb,mBAAmB,EAEnB,WAAW,GAEd,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,aAAa,GAAkB;IACjC,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE;QACN,OAAO,EAAE;;;sCAGqB;QAC9B,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,QAAQ;QAC1B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE;;;;;;;qBAOD;gBACL,MAAM,EAAE,UAAU;aACrB;SACJ;KACJ;CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,QAAQ,GAAG;IACb,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAuB,SAAQ,aAAa;IAK9C;;;;;OAKG;IACH,YACI,QAAkD,EAClD,QAAkD,EAClD,QAAgD;QAEhD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACa,IAAI,CAAC,MAAc;QAC/B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjF,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACnF,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IA+BtC;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QA1BpC;;WAEG;QACa,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAE/F;;WAEG;QACa,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAE/F;;WAEG;QACa,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAc7F,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEjE,OAAO,IAAI,sBAAsB,CAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;;AAjDD;;GAEG;AACoB,mBAAS,GAAG,WAAW,AAAd,CAAe;AAE/C;;GAEG;AACoB,mBAAS,GAAG,0BAA0B,AAA7B,CAA8B;AAiB9D;;GAEG;AACoB,oBAAU,GAAG,aAAa,AAAhB,CAAiB"}
@@ -0,0 +1,2 @@
1
+ export * from "./premultiplyAlphaBlock.block.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./premultiplyAlphaBlock.block.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { DisableableShaderBinding, ConnectionPointType, type SmartFilter, DisableableShaderBlock, type ShaderProgram } from "@babylonjs/smart-filters";
2
+ /**
3
+ * The implementation of the PremultiplyAlphaBlock
4
+ */
5
+ export declare class PremultiplyAlphaBlock extends DisableableShaderBlock {
6
+ /**
7
+ * The class name of the block.
8
+ */
9
+ static ClassName: string;
10
+ /**
11
+ * The namespace of the block.
12
+ */
13
+ static Namespace: string;
14
+ /**
15
+ * The input connection point.
16
+ */
17
+ readonly input: import("@babylonjs/smart-filters").ConnectionPoint<ConnectionPointType.Texture>;
18
+ /**
19
+ * The shader program (vertex and fragment code) to use to render the block
20
+ */
21
+ static ShaderCode: ShaderProgram;
22
+ /**
23
+ * Instantiates a new PremultiplyAlphaBlock.
24
+ * @param smartFilter - The smart filter this block belongs to
25
+ * @param name - The friendly name of the block
26
+ */
27
+ constructor(smartFilter: SmartFilter, name: string);
28
+ /**
29
+ * Get the class instance that binds all the required data to the shader (effect) when rendering.
30
+ * @returns The class instance that binds the data to the effect
31
+ */
32
+ getShaderBinding(): DisableableShaderBinding;
33
+ }
34
+ //# sourceMappingURL=premultiplyAlphaBlock.block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premultiplyAlphaBlock.block.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,wBAAwB,EAExB,mBAAmB,EACnB,KAAK,WAAW,EAChB,sBAAsB,EACtB,KAAK,aAAa,EAEG,MAAM,0BAA0B,CAAC;AAiE1D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,sBAAsB;IAC7D;;OAEG;IACH,OAAuB,SAAS,SAA2B;IAE3D;;OAEG;IACH,OAAuB,SAAS,SAA4B;IAE5D;;OAEG;IACH,SAAgB,KAAK,kFAAoE;IAEzF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAKtD"}
@@ -0,0 +1,97 @@
1
+ /* eslint-disable prettier/prettier */
2
+ // ************************************************************
3
+ // Note: this file is auto-generated, do not modify it directly
4
+ // ************************************************************
5
+ import { DisableableShaderBinding, ConnectionPointType, DisableableShaderBlock, BlockDisableStrategy } from "@babylonjs/smart-filters";
6
+ /**
7
+ * The shader program for the block.
8
+ */
9
+ const shaderProgram = {
10
+ vertex: undefined,
11
+ fragment: {
12
+ uniform: `
13
+ uniform sampler2D _input_; // main`,
14
+ mainInputTexture: "_input_",
15
+ mainFunctionName: "_premultiply_",
16
+ functions: [
17
+ {
18
+ name: "_premultiply_",
19
+ code: `
20
+ vec4 _premultiply_(vec2 vUV) {
21
+ vec4 color = texture2D(_input_, vUV);
22
+ return vec4(color.rgb * color.a, color.a);
23
+ }
24
+
25
+ `,
26
+ params: "vec2 vUV",
27
+ },
28
+ ],
29
+ },
30
+ };
31
+ /**
32
+ * The uniform names for this shader, to be used in the shader binding so
33
+ * that the names are always in sync.
34
+ */
35
+ const uniforms = {
36
+ input: "input",
37
+ };
38
+ /**
39
+ * The shader binding for the PremultiplyAlphaBlock, used by the runtime
40
+ */
41
+ class PremultiplyAlphaBlockShaderBinding extends DisableableShaderBinding {
42
+ /**
43
+ * Creates a new shader binding instance for the block.
44
+ * @param parentBlock - IDisableableBlock
45
+ * @param input - The input runtime value
46
+ */
47
+ constructor(parentBlock, input) {
48
+ super(parentBlock);
49
+ this._input = input;
50
+ }
51
+ /**
52
+ * Binds all the required data to the shader when rendering.
53
+ * @param effect - defines the effect to bind the data to
54
+ */
55
+ bind(effect) {
56
+ super.bind(effect);
57
+ effect.setTexture(this.getRemappedName(uniforms.input), this._input.value);
58
+ }
59
+ }
60
+ /**
61
+ * The implementation of the PremultiplyAlphaBlock
62
+ */
63
+ export class PremultiplyAlphaBlock extends DisableableShaderBlock {
64
+ /**
65
+ * Instantiates a new PremultiplyAlphaBlock.
66
+ * @param smartFilter - The smart filter this block belongs to
67
+ * @param name - The friendly name of the block
68
+ */
69
+ constructor(smartFilter, name) {
70
+ super(smartFilter, name, false, BlockDisableStrategy.AutoSample);
71
+ /**
72
+ * The input connection point.
73
+ */
74
+ this.input = this._registerInput(uniforms.input, ConnectionPointType.Texture);
75
+ }
76
+ /**
77
+ * Get the class instance that binds all the required data to the shader (effect) when rendering.
78
+ * @returns The class instance that binds the data to the effect
79
+ */
80
+ getShaderBinding() {
81
+ const input = this._confirmRuntimeDataSupplied(this.input);
82
+ return new PremultiplyAlphaBlockShaderBinding(this, input);
83
+ }
84
+ }
85
+ /**
86
+ * The class name of the block.
87
+ */
88
+ PremultiplyAlphaBlock.ClassName = "PremultiplyAlphaBlock";
89
+ /**
90
+ * The namespace of the block.
91
+ */
92
+ PremultiplyAlphaBlock.Namespace = "Babylon.Demo.Utilities";
93
+ /**
94
+ * The shader program (vertex and fragment code) to use to render the block
95
+ */
96
+ PremultiplyAlphaBlock.ShaderCode = shaderProgram;
97
+ //# sourceMappingURL=premultiplyAlphaBlock.block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premultiplyAlphaBlock.block.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,+DAA+D;AAC/D,+DAA+D;AAC/D,+DAA+D;AAS/D,OAAO,EACH,wBAAwB,EAExB,mBAAmB,EAEnB,sBAAsB,EAGtB,oBAAoB,EAAC,MAAM,0BAA0B,CAAC;AAE1D;;GAEG;AACH,MAAM,aAAa,GAAkB;IACjC,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE;QACN,OAAO,EAAE;+CAC8B;QACvC,gBAAgB,EAAE,SAAS;QAC3B,gBAAgB,EAAE,eAAe;QACjC,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;;;;;;qBAMD;gBACL,MAAM,EAAE,UAAU;aACrB;SACJ;KACJ;CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,QAAQ,GAAG;IACb,KAAK,EAAE,OAAO;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,kCAAmC,SAAQ,wBAAwB;IAGrE;;;;OAIG;IACH,YACI,WAA8B,EAC9B,KAA+C;QAE/C,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED;;;OAGG;IACa,IAAI,CAAC,MAAc;QAC/B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/E,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,sBAAsB;IAqB7D;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAhBrE;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAczF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE3D,OAAO,IAAI,kCAAkC,CAAC,IAAI,EAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;;AArCD;;GAEG;AACoB,+BAAS,GAAG,uBAAuB,AAA1B,CAA2B;AAE3D;;GAEG;AACoB,+BAAS,GAAG,wBAAwB,AAA3B,CAA4B;AAO5D;;GAEG;AACoB,gCAAU,GAAG,aAAa,AAAhB,CAAiB"}
@@ -0,0 +1,5 @@
1
+ export declare const babylonDemoEffectsNamespace = "Babylon.Demo.Effects";
2
+ export declare const babylonDemoUtilitiesNamespace = "Babylon.Demo.Utilities";
3
+ export declare const babylonDemoTransitionsNamespace = "Babylon.Demo.Transitions";
4
+ export declare const inputsNamespace = "Inputs";
5
+ //# sourceMappingURL=blockNamespaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockNamespaces.d.ts","sourceRoot":"","sources":["../../src/blocks/blockNamespaces.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAClE,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AACtE,eAAO,MAAM,+BAA+B,6BAA6B,CAAC;AAC1E,eAAO,MAAM,eAAe,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const babylonDemoEffectsNamespace = "Babylon.Demo.Effects";
2
+ export const babylonDemoUtilitiesNamespace = "Babylon.Demo.Utilities";
3
+ export const babylonDemoTransitionsNamespace = "Babylon.Demo.Transitions";
4
+ export const inputsNamespace = "Inputs";
5
+ //# sourceMappingURL=blockNamespaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockNamespaces.js","sourceRoot":"","sources":["../../src/blocks/blockNamespaces.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,wBAAwB,CAAC;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,0BAA0B,CAAC;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,22 @@
1
+ export declare const pixelateBlockType = "PixelateBlock";
2
+ export declare const blackAndWhiteBlockType = "BlackAndWhiteBlock";
3
+ export declare const exposureBlockType = "ExposureBlock";
4
+ export declare const contrastBlockType = "ContrastBlock";
5
+ export declare const desaturateBlockType = "DesaturateBlock";
6
+ export declare const posterizeBlockType = "PosterizeBlock";
7
+ export declare const kaleidoscopeBlockType = "KaleidoscopeBlock";
8
+ export declare const greenScreenBlockType = "GreenScreenBlock";
9
+ export declare const glassBlockType = "GlassBlock";
10
+ export declare const frameBlockType = "FrameBlock";
11
+ export declare const blurBlockType = "BlurBlock";
12
+ export declare const directionalBlurBlockType = "DirectionalBlurBlock";
13
+ export declare const compositionBlockType = "CompositionBlock";
14
+ export declare const glitchBlockType = "GlitchBlock";
15
+ export declare const tileBlockType = "TileBlock";
16
+ export declare const wipeBlockType = "WipeBlock";
17
+ export declare const maskBlockType = "MaskBlock";
18
+ export declare const particleBlockType = "ParticleBlock";
19
+ export declare const spritesheetBlockType = "SpritesheetBlock";
20
+ export declare const tintBlockType = "TintBlock";
21
+ export declare const premultiplyAlphaBlockType = "PremultiplyAlphaBlock";
22
+ //# sourceMappingURL=blockTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockTypes.d.ts","sourceRoot":"","sources":["../../src/blocks/blockTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAC3D,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AACjD,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,yBAAyB,0BAA0B,CAAC"}
@@ -0,0 +1,22 @@
1
+ export const pixelateBlockType = "PixelateBlock";
2
+ export const blackAndWhiteBlockType = "BlackAndWhiteBlock";
3
+ export const exposureBlockType = "ExposureBlock";
4
+ export const contrastBlockType = "ContrastBlock";
5
+ export const desaturateBlockType = "DesaturateBlock";
6
+ export const posterizeBlockType = "PosterizeBlock";
7
+ export const kaleidoscopeBlockType = "KaleidoscopeBlock";
8
+ export const greenScreenBlockType = "GreenScreenBlock";
9
+ export const glassBlockType = "GlassBlock";
10
+ export const frameBlockType = "FrameBlock";
11
+ export const blurBlockType = "BlurBlock";
12
+ export const directionalBlurBlockType = "DirectionalBlurBlock";
13
+ export const compositionBlockType = "CompositionBlock";
14
+ export const glitchBlockType = "GlitchBlock";
15
+ export const tileBlockType = "TileBlock";
16
+ export const wipeBlockType = "WipeBlock";
17
+ export const maskBlockType = "MaskBlock";
18
+ export const particleBlockType = "ParticleBlock";
19
+ export const spritesheetBlockType = "SpritesheetBlock";
20
+ export const tintBlockType = "TintBlock";
21
+ export const premultiplyAlphaBlockType = "PremultiplyAlphaBlock";
22
+ //# sourceMappingURL=blockTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockTypes.js","sourceRoot":"","sources":["../../src/blocks/blockTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AACnD,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;AACzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AACzC,MAAM,CAAC,MAAM,yBAAyB,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./babylon/demo/effects/index.js";
2
+ export * from "./babylon/demo/transitions/index.js";
3
+ export * from "./babylon/demo/utilities/index.js";
4
+ export * from "./blockTypes.js";
5
+ export * from "./blockNamespaces.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./babylon/demo/effects/index.js";
2
+ export * from "./babylon/demo/transitions/index.js";
3
+ export * from "./babylon/demo/utilities/index.js";
4
+ export * from "./blockTypes.js";
5
+ export * from "./blockNamespaces.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./registration/index.js";
2
+ export * from "./blocks/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./registration/index.js";
2
+ export * from "./blocks/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { ThinEngine } from "@babylonjs/core/Engines/thinEngine";
2
+ import type { SmartFilter, SmartFilterDeserializer, ISerializedBlockV1, BaseBlock } from "@babylonjs/smart-filters";
3
+ /**
4
+ * An object which describes a block definition, as well as a factory for creating a new instance of the block or
5
+ * deserializing it
6
+ */
7
+ export interface IBlockRegistration {
8
+ /**
9
+ * The block type of the block
10
+ */
11
+ blockType: string;
12
+ /**
13
+ * Creates an instance of the block, either fresh or deserialized from a serialized block
14
+ * @param smartFilter - The smart filter to create the block for
15
+ * @param engine - The engine to use for creating blocks
16
+ * @param smartFilterDeserializer - The deserializer to use for deserializing blocks
17
+ * @param serializedBlock - The serialized block to deserialize, if any
18
+ * @returns - A promise for a new instance of the block
19
+ */
20
+ factory?: (smartFilter: SmartFilter, engine: ThinEngine, smartFilterDeserializer: SmartFilterDeserializer, serializedBlock?: ISerializedBlockV1) => Promise<BaseBlock>;
21
+ /**
22
+ * The namespace of the block
23
+ */
24
+ namespace: string;
25
+ /**
26
+ * A tooltip for the block if displayed in an editor, for instance
27
+ */
28
+ tooltip: string;
29
+ /**
30
+ * If true, this represents a custom block (not one that was programmatically included)
31
+ */
32
+ isCustom?: boolean;
33
+ }
34
+ //# sourceMappingURL=IBlockRegistration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBlockRegistration.d.ts","sourceRoot":"","sources":["../../src/registration/IBlockRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEpH;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CACN,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,UAAU,EAClB,uBAAuB,EAAE,uBAAuB,EAChD,eAAe,CAAC,EAAE,kBAAkB,KACnC,OAAO,CAAC,SAAS,CAAC,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IBlockRegistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBlockRegistration.js","sourceRoot":"","sources":["../../src/registration/IBlockRegistration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { IBlockSerializerV1 } from "@babylonjs/smart-filters";
2
+ /**
3
+ * Any blocks that do not need to make use of ISerializedBlockV1.data can use the default serialization and
4
+ * should go in this list. If the serializer needs to store additional info in ISerializedBlockV1.data (e.g.
5
+ * webcam source name), then it should be registered in additionalBlockSerializers below.
6
+ */
7
+ export declare const blocksUsingDefaultSerialization: string[];
8
+ /**
9
+ * Any blocks which require serializing more information than just the connections should be registered here.
10
+ * They should make use of the ISerializedBlockV1.data field to store this information.
11
+ */
12
+ export declare const additionalBlockSerializers: IBlockSerializerV1[];
13
+ //# sourceMappingURL=blockSerializers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockSerializers.d.ts","sourceRoot":"","sources":["../../src/registration/blockSerializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAqBnE;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,EAenD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,EAI1D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { blurBlockSerializer } from "../blocks/babylon/demo/effects/blurBlock.serializer.js";
2
+ import { directionalBlurBlockSerializer } from "../blocks/babylon/demo/effects/directionalBlurBlock.serializer.js";
3
+ import { compositionBlockSerializer } from "../blocks/babylon/demo/effects/compositionBlock.serializer.js";
4
+ import { blackAndWhiteBlockType, pixelateBlockType, exposureBlockType, contrastBlockType, desaturateBlockType, posterizeBlockType, kaleidoscopeBlockType, greenScreenBlockType, maskBlockType, particleBlockType, spritesheetBlockType, tintBlockType, premultiplyAlphaBlockType, wipeBlockType, } from "../blocks/blockTypes.js";
5
+ /**
6
+ * Any blocks that do not need to make use of ISerializedBlockV1.data can use the default serialization and
7
+ * should go in this list. If the serializer needs to store additional info in ISerializedBlockV1.data (e.g.
8
+ * webcam source name), then it should be registered in additionalBlockSerializers below.
9
+ */
10
+ export const blocksUsingDefaultSerialization = [
11
+ blackAndWhiteBlockType,
12
+ pixelateBlockType,
13
+ exposureBlockType,
14
+ contrastBlockType,
15
+ desaturateBlockType,
16
+ posterizeBlockType,
17
+ kaleidoscopeBlockType,
18
+ greenScreenBlockType,
19
+ maskBlockType,
20
+ particleBlockType,
21
+ spritesheetBlockType,
22
+ tintBlockType,
23
+ premultiplyAlphaBlockType,
24
+ wipeBlockType,
25
+ ];
26
+ /**
27
+ * Any blocks which require serializing more information than just the connections should be registered here.
28
+ * They should make use of the ISerializedBlockV1.data field to store this information.
29
+ */
30
+ export const additionalBlockSerializers = [
31
+ blurBlockSerializer,
32
+ directionalBlurBlockSerializer,
33
+ compositionBlockSerializer,
34
+ ];
35
+ //# sourceMappingURL=blockSerializers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockSerializers.js","sourceRoot":"","sources":["../../src/registration/blockSerializers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAC3G,OAAO,EACH,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,yBAAyB,EACzB,aAAa,GAChB,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAa;IACrD,sBAAsB;IACtB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,aAAa;IACb,iBAAiB;IACjB,oBAAoB;IACpB,aAAa;IACb,yBAAyB;IACzB,aAAa;CAChB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC5D,mBAAmB;IACnB,8BAA8B;IAC9B,0BAA0B;CAC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { IBlockRegistration } from "./IBlockRegistration.js";
2
+ /**
3
+ * The list of block registrations.
4
+ *
5
+ * Important notes:
6
+ * 1. Do not import the block code directly in this file. Instead, use dynamic imports to ensure that the block code
7
+ * is only loaded when needed.
8
+ * 2. If the deserializer is trivial (doesn't require consulting the serializedBlock.data), it can be implemented here
9
+ * 3. If the deserializer is non-trivial (needs serializedBlock.data), implement it in a separate file alongside the block
10
+ * in the form blockClassName.deserializer.ts
11
+ */
12
+ export declare const builtInBlockRegistrations: IBlockRegistration[];
13
+ //# sourceMappingURL=builtInBlockRegistrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtInBlockRegistrations.d.ts","sourceRoot":"","sources":["../../src/registration/builtInBlockRegistrations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAyBlE;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EAgWzD,CAAC"}