@babylonjs/smart-filters 0.7.10-alpha → 0.7.12-alpha

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 (205) hide show
  1. package/dist/blockFoundation/outputBlock.d.ts +5 -0
  2. package/dist/blockFoundation/outputBlock.d.ts.map +1 -1
  3. package/dist/blockFoundation/outputBlock.js +30 -1
  4. package/dist/blockFoundation/outputBlock.js.map +1 -1
  5. package/dist/index.d.ts +0 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +0 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/version.d.ts +1 -1
  10. package/dist/version.js +1 -1
  11. package/package.json +5 -10
  12. package/readme.md +2 -0
  13. package/src/blockFoundation/outputBlock.ts +33 -1
  14. package/src/index.ts +0 -2
  15. package/src/version.ts +1 -1
  16. package/dist/blockFoundation/outputBlock.shader.d.ts +0 -13
  17. package/dist/blockFoundation/outputBlock.shader.d.ts.map +0 -1
  18. package/dist/blockFoundation/outputBlock.shader.js +0 -31
  19. package/dist/blockFoundation/outputBlock.shader.js.map +0 -1
  20. package/dist/blockRegistration/IBlockRegistration.d.ts +0 -36
  21. package/dist/blockRegistration/IBlockRegistration.d.ts.map +0 -1
  22. package/dist/blockRegistration/IBlockRegistration.js +0 -2
  23. package/dist/blockRegistration/IBlockRegistration.js.map +0 -1
  24. package/dist/blockRegistration/blockSerializers.d.ts +0 -13
  25. package/dist/blockRegistration/blockSerializers.d.ts.map +0 -1
  26. package/dist/blockRegistration/blockSerializers.js +0 -35
  27. package/dist/blockRegistration/blockSerializers.js.map +0 -1
  28. package/dist/blockRegistration/builtInBlockRegistrations.d.ts +0 -13
  29. package/dist/blockRegistration/builtInBlockRegistrations.d.ts.map +0 -1
  30. package/dist/blockRegistration/builtInBlockRegistrations.js +0 -266
  31. package/dist/blockRegistration/builtInBlockRegistrations.js.map +0 -1
  32. package/dist/blockRegistration/index.d.ts +0 -3
  33. package/dist/blockRegistration/index.d.ts.map +0 -1
  34. package/dist/blockRegistration/index.js +0 -3
  35. package/dist/blockRegistration/index.js.map +0 -1
  36. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts +0 -56
  37. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts.map +0 -1
  38. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js +0 -66
  39. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js.map +0 -1
  40. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts +0 -13
  41. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts.map +0 -1
  42. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js +0 -36
  43. package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js.map +0 -1
  44. package/dist/blocks/babylon/demo/effects/blurBlock.d.ts +0 -56
  45. package/dist/blocks/babylon/demo/effects/blurBlock.d.ts.map +0 -1
  46. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts +0 -29
  47. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts.map +0 -1
  48. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js +0 -16
  49. package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js.map +0 -1
  50. package/dist/blocks/babylon/demo/effects/blurBlock.js +0 -100
  51. package/dist/blocks/babylon/demo/effects/blurBlock.js.map +0 -1
  52. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts +0 -8
  53. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts.map +0 -1
  54. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js +0 -28
  55. package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js.map +0 -1
  56. package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts +0 -118
  57. package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts.map +0 -1
  58. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts +0 -25
  59. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts.map +0 -1
  60. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js +0 -15
  61. package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js.map +0 -1
  62. package/dist/blocks/babylon/demo/effects/compositionBlock.js +0 -219
  63. package/dist/blocks/babylon/demo/effects/compositionBlock.js.map +0 -1
  64. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts +0 -6
  65. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts.map +0 -1
  66. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js +0 -25
  67. package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js.map +0 -1
  68. package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts +0 -63
  69. package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts.map +0 -1
  70. package/dist/blocks/babylon/demo/effects/contrastBlock.js +0 -122
  71. package/dist/blocks/babylon/demo/effects/contrastBlock.js.map +0 -1
  72. package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts +0 -63
  73. package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts.map +0 -1
  74. package/dist/blocks/babylon/demo/effects/desaturateBlock.js +0 -107
  75. package/dist/blocks/babylon/demo/effects/desaturateBlock.js.map +0 -1
  76. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts +0 -79
  77. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts.map +0 -1
  78. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts +0 -33
  79. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts.map +0 -1
  80. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js +0 -17
  81. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js.map +0 -1
  82. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js +0 -171
  83. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js.map +0 -1
  84. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts +0 -6
  85. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts.map +0 -1
  86. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js +0 -27
  87. package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js.map +0 -1
  88. package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts +0 -63
  89. package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts.map +0 -1
  90. package/dist/blocks/babylon/demo/effects/exposureBlock.js +0 -95
  91. package/dist/blocks/babylon/demo/effects/exposureBlock.js.map +0 -1
  92. package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts +0 -75
  93. package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts.map +0 -1
  94. package/dist/blocks/babylon/demo/effects/greenScreenBlock.js +0 -121
  95. package/dist/blocks/babylon/demo/effects/greenScreenBlock.js.map +0 -1
  96. package/dist/blocks/babylon/demo/effects/index.d.ts +0 -15
  97. package/dist/blocks/babylon/demo/effects/index.d.ts.map +0 -1
  98. package/dist/blocks/babylon/demo/effects/index.js +0 -15
  99. package/dist/blocks/babylon/demo/effects/index.js.map +0 -1
  100. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts +0 -63
  101. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts.map +0 -1
  102. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js +0 -159
  103. package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js.map +0 -1
  104. package/dist/blocks/babylon/demo/effects/maskBlock.d.ts +0 -62
  105. package/dist/blocks/babylon/demo/effects/maskBlock.d.ts.map +0 -1
  106. package/dist/blocks/babylon/demo/effects/maskBlock.js +0 -75
  107. package/dist/blocks/babylon/demo/effects/maskBlock.js.map +0 -1
  108. package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts +0 -14
  109. package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts.map +0 -1
  110. package/dist/blocks/babylon/demo/effects/maskBlock.shader.js +0 -37
  111. package/dist/blocks/babylon/demo/effects/maskBlock.shader.js.map +0 -1
  112. package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts +0 -62
  113. package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts.map +0 -1
  114. package/dist/blocks/babylon/demo/effects/pixelateBlock.js +0 -77
  115. package/dist/blocks/babylon/demo/effects/pixelateBlock.js.map +0 -1
  116. package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts +0 -15
  117. package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts.map +0 -1
  118. package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js +0 -44
  119. package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js.map +0 -1
  120. package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts +0 -63
  121. package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts.map +0 -1
  122. package/dist/blocks/babylon/demo/effects/posterizeBlock.js +0 -108
  123. package/dist/blocks/babylon/demo/effects/posterizeBlock.js.map +0 -1
  124. package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts +0 -81
  125. package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts.map +0 -1
  126. package/dist/blocks/babylon/demo/effects/spritesheetBlock.js +0 -103
  127. package/dist/blocks/babylon/demo/effects/spritesheetBlock.js.map +0 -1
  128. package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts +0 -18
  129. package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts.map +0 -1
  130. package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js +0 -57
  131. package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js.map +0 -1
  132. package/dist/blocks/babylon/demo/effects/tintBlock.d.ts +0 -7
  133. package/dist/blocks/babylon/demo/effects/tintBlock.d.ts.map +0 -1
  134. package/dist/blocks/babylon/demo/effects/tintBlock.js +0 -51
  135. package/dist/blocks/babylon/demo/effects/tintBlock.js.map +0 -1
  136. package/dist/blocks/babylon/demo/transitions/index.d.ts +0 -2
  137. package/dist/blocks/babylon/demo/transitions/index.d.ts.map +0 -1
  138. package/dist/blocks/babylon/demo/transitions/index.js +0 -2
  139. package/dist/blocks/babylon/demo/transitions/index.js.map +0 -1
  140. package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts +0 -69
  141. package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts.map +0 -1
  142. package/dist/blocks/babylon/demo/transitions/wipeBlock.js +0 -110
  143. package/dist/blocks/babylon/demo/transitions/wipeBlock.js.map +0 -1
  144. package/dist/blocks/babylon/demo/utilities/index.d.ts +0 -2
  145. package/dist/blocks/babylon/demo/utilities/index.d.ts.map +0 -1
  146. package/dist/blocks/babylon/demo/utilities/index.js +0 -2
  147. package/dist/blocks/babylon/demo/utilities/index.js.map +0 -1
  148. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts +0 -58
  149. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts.map +0 -1
  150. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js +0 -87
  151. package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js.map +0 -1
  152. package/dist/blocks/blockNamespaces.d.ts +0 -5
  153. package/dist/blocks/blockNamespaces.d.ts.map +0 -1
  154. package/dist/blocks/blockNamespaces.js +0 -5
  155. package/dist/blocks/blockNamespaces.js.map +0 -1
  156. package/dist/blocks/blockTypes.d.ts +0 -22
  157. package/dist/blocks/blockTypes.d.ts.map +0 -1
  158. package/dist/blocks/blockTypes.js +0 -22
  159. package/dist/blocks/blockTypes.js.map +0 -1
  160. package/dist/blocks/index.d.ts +0 -6
  161. package/dist/blocks/index.d.ts.map +0 -1
  162. package/dist/blocks/index.js +0 -6
  163. package/dist/blocks/index.js.map +0 -1
  164. package/src/blockFoundation/outputBlock.fragment.glsl +0 -5
  165. package/src/blockFoundation/outputBlock.shader.ts +0 -33
  166. package/src/blockRegistration/IBlockRegistration.ts +0 -45
  167. package/src/blockRegistration/blockSerializers.ts +0 -52
  168. package/src/blockRegistration/builtInBlockRegistrations.ts +0 -390
  169. package/src/blockRegistration/index.ts +0 -2
  170. package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.fragment.glsl +0 -10
  171. package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.ts +0 -38
  172. package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.ts +0 -80
  173. package/src/blocks/babylon/demo/effects/blurBlock.deserializer.ts +0 -38
  174. package/src/blocks/babylon/demo/effects/blurBlock.serializer.ts +0 -32
  175. package/src/blocks/babylon/demo/effects/blurBlock.ts +0 -119
  176. package/src/blocks/babylon/demo/effects/compositionBlock.deserializer.ts +0 -32
  177. package/src/blocks/babylon/demo/effects/compositionBlock.serializer.ts +0 -29
  178. package/src/blocks/babylon/demo/effects/compositionBlock.ts +0 -293
  179. package/src/blocks/babylon/demo/effects/contrastBlock.ts +0 -152
  180. package/src/blocks/babylon/demo/effects/desaturateBlock.ts +0 -137
  181. package/src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts +0 -47
  182. package/src/blocks/babylon/demo/effects/directionalBlurBlock.serializer.ts +0 -31
  183. package/src/blocks/babylon/demo/effects/directionalBlurBlock.ts +0 -193
  184. package/src/blocks/babylon/demo/effects/exposureBlock.ts +0 -120
  185. package/src/blocks/babylon/demo/effects/greenScreenBlock.ts +0 -152
  186. package/src/blocks/babylon/demo/effects/index.ts +0 -14
  187. package/src/blocks/babylon/demo/effects/kaleidoscopeBlock.ts +0 -186
  188. package/src/blocks/babylon/demo/effects/maskBlock.fragment.glsl +0 -10
  189. package/src/blocks/babylon/demo/effects/maskBlock.shader.ts +0 -39
  190. package/src/blocks/babylon/demo/effects/maskBlock.ts +0 -94
  191. package/src/blocks/babylon/demo/effects/pixelateBlock.fragment.glsl +0 -18
  192. package/src/blocks/babylon/demo/effects/pixelateBlock.shader.ts +0 -46
  193. package/src/blocks/babylon/demo/effects/pixelateBlock.ts +0 -101
  194. package/src/blocks/babylon/demo/effects/posterizeBlock.ts +0 -139
  195. package/src/blocks/babylon/demo/effects/spritesheetBlock.fragment.glsl +0 -26
  196. package/src/blocks/babylon/demo/effects/spritesheetBlock.shader.ts +0 -59
  197. package/src/blocks/babylon/demo/effects/spritesheetBlock.ts +0 -135
  198. package/src/blocks/babylon/demo/effects/tintBlock.ts +0 -52
  199. package/src/blocks/babylon/demo/transitions/index.ts +0 -1
  200. package/src/blocks/babylon/demo/transitions/wipeBlock.ts +0 -138
  201. package/src/blocks/babylon/demo/utilities/index.ts +0 -1
  202. package/src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.ts +0 -106
  203. package/src/blocks/blockNamespaces.ts +0 -4
  204. package/src/blocks/blockTypes.ts +0 -21
  205. package/src/blocks/index.ts +0 -5
@@ -1,63 +0,0 @@
1
- import type { Effect } from "@babylonjs/core/Materials/effect";
2
- import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
3
- import { DisableableShaderBlock, type IDisableableBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
4
- import type { RuntimeData } from "../../../../connection/connectionPoint.js";
5
- import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
6
- import type { SmartFilter } from "../../../../smartFilter.js";
7
- import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
8
- /**
9
- * The shader bindings for the Contrast block.
10
- */
11
- export declare class ContrastShaderBinding extends DisableableShaderBinding {
12
- private readonly _inputTexture;
13
- private readonly _intensity;
14
- /**
15
- * Creates a new shader binding instance for the Contrast block.
16
- * @param parentBlock - The parent block
17
- * @param inputTexture - The input texture
18
- * @param intensity - The intensity of the effect
19
- */
20
- constructor(parentBlock: IDisableableBlock, inputTexture: RuntimeData<ConnectionPointType.Texture>, intensity: RuntimeData<ConnectionPointType.Float>);
21
- /**
22
- * Binds all the required data to the shader when rendering.
23
- * @param effect - defines the effect to bind the data to
24
- */
25
- bind(effect: Effect): void;
26
- }
27
- /**
28
- * A simple block to change the contrast of a texture.
29
- */
30
- export declare class ContrastBlock extends DisableableShaderBlock {
31
- /**
32
- * The class name of the block.
33
- */
34
- static ClassName: string;
35
- /**
36
- * The namespace of the block.
37
- */
38
- static Namespace: string;
39
- /**
40
- * The input texture connection point.
41
- */
42
- readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
43
- /**
44
- * The intensity connection point.
45
- */
46
- readonly intensity: import("../../../../connection/connectionPointWithDefault.js").ConnectionPointWithDefault<ConnectionPointType.Float>;
47
- /**
48
- * The shader program (vertex and fragment code) to use to render the block
49
- */
50
- static ShaderCode: ShaderProgram;
51
- /**
52
- * Instantiates a new Block.
53
- * @param smartFilter - The smart filter this block belongs to
54
- * @param name - The friendly name of the block
55
- */
56
- constructor(smartFilter: SmartFilter, name: string);
57
- /**
58
- * Get the class instance that binds all the required data to the shader (effect) when rendering.
59
- * @returns The class instance that binds the data to the effect
60
- */
61
- getShaderBinding(): DisableableShaderBinding;
62
- }
63
- //# sourceMappingURL=contrastBlock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contrastBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/contrastBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AA0D1E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,wBAAwB;IAC/D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyC;IAEpE;;;;;OAKG;gBAEC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC;IAOrD;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAK7C;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACrD;;OAEG;IACH,OAAuB,SAAS,SAAqB;IAErD;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IACH,SAAgB,SAAS,uHAIvB;IAEF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAMtD"}
@@ -1,122 +0,0 @@
1
- import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
2
- import { DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
3
- import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
4
- import { createStrongRef } from "../../../../runtime/strongRef.js";
5
- import { contrastBlockType } from "../../../blockTypes.js";
6
- import { babylonDemoEffectsNamespace } from "../../../blockNamespaces.js";
7
- const shaderProgram = {
8
- fragment: {
9
- uniform: `
10
- uniform sampler2D _input_;
11
- uniform float _intensity_;
12
- `,
13
- const: `
14
- const float contrastIntensity = 0.44;
15
- `,
16
- mainFunctionName: "_contrast_",
17
- mainInputTexture: "_input_",
18
- functions: [
19
- {
20
- name: "_contrast_",
21
- code: `
22
- vec4 _contrast_(vec2 vUV) {
23
- vec4 color = texture2D(_input_, vUV);
24
-
25
- float contrastLMin = mix(-2., 0., _intensity_ * 2.0);
26
- float contrastLMax = mix(3., 1., _intensity_ * 2.0);
27
-
28
- vec3 contrastMin = _remap_(color.rgb, contrastLMin, contrastLMax, 0., 1.);
29
-
30
- float intensityMapped = _remap_(_intensity_, 0.5, 1., 0., 1.0);
31
- float contrastHMin = mix(0., 0.45, intensityMapped);
32
- float contrastHMax = mix(1., 0.5, intensityMapped);
33
-
34
- vec3 contrastMax = _remap_(color.rgb, contrastHMin, contrastHMax, 0., 1.);
35
-
36
- return vec4(mix(contrastMin, contrastMax, step(_intensity_, 0.5)), color.a);
37
- }
38
- `,
39
- },
40
- {
41
- name: "_remap_",
42
- code: `
43
- float _remap_(float i, float smin, float smax, float dmin, float dmax) {
44
- return dmin + (i - smin) * (dmax - dmin) / (smax - smin);
45
- }
46
-
47
- vec3 _remap_(vec3 i, float smin, float smax, float dmin, float dmax) {
48
- return dmin + (i - smin) * (dmax - dmin) / (smax - smin);
49
- }
50
- `,
51
- },
52
- ],
53
- },
54
- };
55
- /**
56
- * The shader bindings for the Contrast block.
57
- */
58
- export class ContrastShaderBinding extends DisableableShaderBinding {
59
- /**
60
- * Creates a new shader binding instance for the Contrast block.
61
- * @param parentBlock - The parent block
62
- * @param inputTexture - The input texture
63
- * @param intensity - The intensity of the effect
64
- */
65
- constructor(parentBlock, inputTexture, intensity) {
66
- super(parentBlock);
67
- this._inputTexture = inputTexture;
68
- this._intensity = intensity;
69
- }
70
- /**
71
- * Binds all the required data to the shader when rendering.
72
- * @param effect - defines the effect to bind the data to
73
- */
74
- bind(effect) {
75
- super.bind(effect);
76
- effect.setTexture(this.getRemappedName("input"), this._inputTexture.value);
77
- effect.setFloat(this.getRemappedName("intensity"), this._intensity.value);
78
- }
79
- }
80
- /**
81
- * A simple block to change the contrast of a texture.
82
- */
83
- export class ContrastBlock extends DisableableShaderBlock {
84
- /**
85
- * Instantiates a new Block.
86
- * @param smartFilter - The smart filter this block belongs to
87
- * @param name - The friendly name of the block
88
- */
89
- constructor(smartFilter, name) {
90
- super(smartFilter, name);
91
- /**
92
- * The input texture connection point.
93
- */
94
- this.input = this._registerInput("input", ConnectionPointType.Texture);
95
- /**
96
- * The intensity connection point.
97
- */
98
- this.intensity = this._registerOptionalInput("intensity", ConnectionPointType.Float, createStrongRef(0.5));
99
- }
100
- /**
101
- * Get the class instance that binds all the required data to the shader (effect) when rendering.
102
- * @returns The class instance that binds the data to the effect
103
- */
104
- getShaderBinding() {
105
- const input = this._confirmRuntimeDataSupplied(this.input);
106
- const intensity = this.intensity.runtimeData;
107
- return new ContrastShaderBinding(this, input, intensity);
108
- }
109
- }
110
- /**
111
- * The class name of the block.
112
- */
113
- ContrastBlock.ClassName = contrastBlockType;
114
- /**
115
- * The namespace of the block.
116
- */
117
- ContrastBlock.Namespace = babylonDemoEffectsNamespace;
118
- /**
119
- * The shader program (vertex and fragment code) to use to render the block
120
- */
121
- ContrastBlock.ShaderCode = shaderProgram;
122
- //# sourceMappingURL=contrastBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contrastBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/contrastBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAA0B,MAAM,uDAAuD,CAAC;AAEvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,OAAO,EAAE;;;aAGJ;QAEL,KAAK,EAAE;;aAEF;QAEL,gBAAgB,EAAE,YAAY;QAE9B,gBAAgB,EAAE,SAAS;QAE3B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE;;;;;;;;;;;;;;;;;aAiBT;aACA;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE;;;;;;;;aAQT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,wBAAwB;IAI/D;;;;;OAKG;IACH,YACI,WAA8B,EAC9B,YAAsD,EACtD,SAAiD;QAEjD,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,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,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,sBAAsB;IA8BrD;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAzB7B;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAElF;;WAEG;QACa,cAAS,GAAG,IAAI,CAAC,sBAAsB,CACnD,WAAW,EACX,mBAAmB,CAAC,KAAK,EACzB,eAAe,CAAC,GAAG,CAAC,CACvB,CAAC;IAcF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAE7C,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;;AA/CD;;GAEG;AACoB,uBAAS,GAAG,iBAAiB,AAApB,CAAqB;AAErD;;GAEG;AACoB,uBAAS,GAAG,2BAA2B,AAA9B,CAA+B;AAgB/D;;GAEG;AACoB,wBAAU,GAAG,aAAa,AAAhB,CAAiB"}
@@ -1,63 +0,0 @@
1
- import type { Effect } from "@babylonjs/core/Materials/effect";
2
- import { type RuntimeData } from "../../../../connection/connectionPoint.js";
3
- import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
4
- import { type IDisableableBlock, DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
5
- import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
6
- import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
7
- import type { SmartFilter } from "../../../../smartFilter.js";
8
- /**
9
- * The shader bindings for the Desaturate block.
10
- */
11
- export declare class DesaturateShaderBinding extends DisableableShaderBinding {
12
- private readonly _inputTexture;
13
- private readonly _intensity;
14
- /**
15
- * Creates a new shader binding instance for the Desaturate block.
16
- * @param parentBlock - The parent block
17
- * @param inputTexture - The input texture
18
- * @param intensity - The intensity of the desaturation
19
- */
20
- constructor(parentBlock: IDisableableBlock, inputTexture: RuntimeData<ConnectionPointType.Texture>, intensity: RuntimeData<ConnectionPointType.Float>);
21
- /**
22
- * Binds all the required data to the shader when rendering.
23
- * @param effect - defines the effect to bind the data to
24
- */
25
- bind(effect: Effect): void;
26
- }
27
- /**
28
- * A simple block to desaturate the input texture.
29
- */
30
- export declare class DesaturateBlock extends DisableableShaderBlock {
31
- /**
32
- * The class name of the block.
33
- */
34
- static ClassName: string;
35
- /**
36
- * The namespace of the block.
37
- */
38
- static Namespace: string;
39
- /**
40
- * The input texture connection point.
41
- */
42
- readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
43
- /**
44
- * The intensity connection point.
45
- */
46
- readonly intensity: import("../../../../connection/connectionPointWithDefault.js").ConnectionPointWithDefault<ConnectionPointType.Float>;
47
- /**
48
- * The shader program (vertex and fragment code) to use to render the block
49
- */
50
- static ShaderCode: ShaderProgram;
51
- /**
52
- * Instantiates a new Block.
53
- * @param smartFilter - The smart filter this block belongs to
54
- * @param name - The friendly name of the block
55
- */
56
- constructor(smartFilter: SmartFilter, name: string);
57
- /**
58
- * Get the class instance that binds all the required data to the shader (effect) when rendering.
59
- * @returns The class instance that binds the data to the effect
60
- */
61
- getShaderBinding(): DisableableShaderBinding;
62
- }
63
- //# sourceMappingURL=desaturateBlock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"desaturateBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/desaturateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,KAAK,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AA2C9D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,wBAAwB;IACjE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyC;IAEpE;;;;;OAKG;gBAEC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC;IAOrD;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAK7C;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,sBAAsB;IACvD;;OAEG;IACH,OAAuB,SAAS,SAAuB;IAEvD;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IACH,SAAgB,SAAS,uHAIvB;IAEF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAMtD"}
@@ -1,107 +0,0 @@
1
- import {} from "../../../../connection/connectionPoint.js";
2
- import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
3
- import { DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
4
- import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
5
- import { createStrongRef } from "../../../../runtime/strongRef.js";
6
- import { desaturateBlockType } from "../../../blockTypes.js";
7
- import { babylonDemoEffectsNamespace } from "../../../blockNamespaces.js";
8
- const shaderProgram = {
9
- fragment: {
10
- uniform: `
11
- uniform sampler2D _input_;
12
- uniform float _intensity_;
13
- `,
14
- const: `
15
- const float _aspect_ = 1.72;
16
- `,
17
- mainFunctionName: "_desaturate_",
18
- mainInputTexture: "_input_",
19
- functions: [
20
- {
21
- name: "_desaturate_",
22
- code: `
23
- vec4 _desaturate_(vec2 vUV)
24
- {
25
- float saturationStrength = 1. - _intensity_;
26
-
27
- vec4 color = texture2D(_input_, vUV);
28
-
29
- float tempMin = min(min(color.x, color.y), color.z);
30
- float tempMax = max(max(color.x, color.y), color.z);
31
- float tempMerge = 0.5 * (tempMin + tempMax);
32
-
33
- return vec4(mix(color.rgb, vec3(tempMerge, tempMerge, tempMerge), saturationStrength), color.a);
34
- }
35
- `,
36
- },
37
- ],
38
- },
39
- };
40
- /**
41
- * The shader bindings for the Desaturate block.
42
- */
43
- export class DesaturateShaderBinding extends DisableableShaderBinding {
44
- /**
45
- * Creates a new shader binding instance for the Desaturate block.
46
- * @param parentBlock - The parent block
47
- * @param inputTexture - The input texture
48
- * @param intensity - The intensity of the desaturation
49
- */
50
- constructor(parentBlock, inputTexture, intensity) {
51
- super(parentBlock);
52
- this._inputTexture = inputTexture;
53
- this._intensity = intensity;
54
- }
55
- /**
56
- * Binds all the required data to the shader when rendering.
57
- * @param effect - defines the effect to bind the data to
58
- */
59
- bind(effect) {
60
- super.bind(effect);
61
- effect.setTexture(this.getRemappedName("input"), this._inputTexture.value);
62
- effect.setFloat(this.getRemappedName("intensity"), this._intensity.value);
63
- }
64
- }
65
- /**
66
- * A simple block to desaturate the input texture.
67
- */
68
- export class DesaturateBlock extends DisableableShaderBlock {
69
- /**
70
- * Instantiates a new Block.
71
- * @param smartFilter - The smart filter this block belongs to
72
- * @param name - The friendly name of the block
73
- */
74
- constructor(smartFilter, name) {
75
- super(smartFilter, name);
76
- /**
77
- * The input texture connection point.
78
- */
79
- this.input = this._registerInput("input", ConnectionPointType.Texture);
80
- /**
81
- * The intensity connection point.
82
- */
83
- this.intensity = this._registerOptionalInput("intensity", ConnectionPointType.Float, createStrongRef(0.3));
84
- }
85
- /**
86
- * Get the class instance that binds all the required data to the shader (effect) when rendering.
87
- * @returns The class instance that binds the data to the effect
88
- */
89
- getShaderBinding() {
90
- const input = this._confirmRuntimeDataSupplied(this.input);
91
- const intensity = this.intensity.runtimeData;
92
- return new DesaturateShaderBinding(this, input, intensity);
93
- }
94
- }
95
- /**
96
- * The class name of the block.
97
- */
98
- DesaturateBlock.ClassName = desaturateBlockType;
99
- /**
100
- * The namespace of the block.
101
- */
102
- DesaturateBlock.Namespace = babylonDemoEffectsNamespace;
103
- /**
104
- * The shader program (vertex and fragment code) to use to render the block
105
- */
106
- DesaturateBlock.ShaderCode = shaderProgram;
107
- //# sourceMappingURL=desaturateBlock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"desaturateBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/desaturateBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAA0B,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,OAAO,EAAE;;;aAGJ;QAEL,KAAK,EAAE;;aAEF;QAEL,gBAAgB,EAAE,cAAc;QAEhC,gBAAgB,EAAE,SAAS;QAE3B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE;;;;;;;;;;;;;aAaT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,wBAAwB;IAIjE;;;;;OAKG;IACH,YACI,WAA8B,EAC9B,YAAsD,EACtD,SAAiD;QAEjD,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,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,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,sBAAsB;IA8BvD;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAzB7B;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAElF;;WAEG;QACa,cAAS,GAAG,IAAI,CAAC,sBAAsB,CACnD,WAAW,EACX,mBAAmB,CAAC,KAAK,EACzB,eAAe,CAAC,GAAG,CAAC,CACvB,CAAC;IAcF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAE7C,OAAO,IAAI,uBAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;;AA/CD;;GAEG;AACoB,yBAAS,GAAG,mBAAmB,AAAtB,CAAuB;AAEvD;;GAEG;AACoB,yBAAS,GAAG,2BAA2B,AAA9B,CAA+B;AAgB/D;;GAEG;AACoB,0BAAU,GAAG,aAAa,AAAhB,CAAiB"}
@@ -1,79 +0,0 @@
1
- import type { Effect } from "@babylonjs/core/Materials/effect";
2
- import { type RuntimeData } from "../../../../connection/connectionPoint.js";
3
- import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
4
- import { ShaderBinding } from "../../../../runtime/shaderRuntime.js";
5
- import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
6
- import type { SmartFilter } from "../../../../smartFilter.js";
7
- import { ShaderBlock } from "../../../../blockFoundation/shaderBlock.js";
8
- /**
9
- * The shader bindings for the DirectionalBlur block.
10
- */
11
- export declare class DirectionalBlurShaderBinding extends ShaderBinding {
12
- private readonly _inputTexture;
13
- private readonly _blurHorizontalWidth;
14
- private readonly _blurVerticalWidth;
15
- /**
16
- * Creates a new shader binding instance for the DirectionalBlur block.
17
- * @param inputTexture - The input texture
18
- * @param blurHorizontalWidth - The horizontal blur width
19
- * @param blurVerticalWidth - The vertical blur width
20
- */
21
- constructor(inputTexture: RuntimeData<ConnectionPointType.Texture>, blurHorizontalWidth: number, blurVerticalWidth: number);
22
- /**
23
- * Binds all the required data to the shader when rendering.
24
- * @param effect - defines the effect to bind the data to
25
- */
26
- bind(effect: Effect): void;
27
- }
28
- /**
29
- * A block performing a directional "gaussian" blur.
30
- *
31
- * It is aggregated as part of the @see BlurBlock.
32
- */
33
- export declare class DirectionalBlurBlock extends ShaderBlock {
34
- /**
35
- * The class name of the block.
36
- */
37
- static ClassName: string;
38
- /**
39
- * The namespace of the block.
40
- */
41
- static Namespace: string;
42
- /**
43
- * The input texture connection point.
44
- */
45
- readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
46
- /**
47
- * Defines how smaller we should make the target compared to the screen size.
48
- */
49
- blurTextureRatio: number;
50
- /**
51
- * Defines the horizontal strength of the blur.
52
- */
53
- blurHorizontalWidth: number;
54
- /**
55
- * Defines the vertical strength of the blur.
56
- */
57
- blurVerticalWidth: number;
58
- /**
59
- * The shader program (vertex and fragment code) to use to render the block
60
- */
61
- static ShaderCode: ShaderProgram;
62
- /**
63
- * Instantiates a new Block.
64
- * @param smartFilter - The smart filter this block belongs to
65
- * @param name - The friendly name of the block
66
- */
67
- constructor(smartFilter: SmartFilter, name: string);
68
- /**
69
- * Prepares the block for runtime.
70
- * This is called by the smart filter just before creating the smart filter runtime.
71
- */
72
- prepareForRuntime(): void;
73
- /**
74
- * Get the class instance that binds all the required data to the shader (effect) when rendering.
75
- * @returns The class instance that binds the data to the effect
76
- */
77
- getShaderBinding(): ShaderBinding;
78
- }
79
- //# sourceMappingURL=directionalBlurBlock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directionalBlurBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAuDzE;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,aAAa;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAE5C;;;;;OAKG;gBAEC,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,MAAM;IAQ7B;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAe7C;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACjD;;OAEG;IACH,OAAuB,SAAS,SAA4B;IAE5D;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IAMI,gBAAgB,SAAO;IAE9B;;OAEG;IAMI,mBAAmB,SAAK;IAE/B;;OAEG;IAMI,iBAAiB,SAAK;IAE7B;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACa,iBAAiB,IAAI,IAAI;IAMzC;;;OAGG;IACI,gBAAgB,IAAI,aAAa;CAK3C"}
@@ -1,33 +0,0 @@
1
- import type { ISerializedBlockV1 } from "../../../../serialization/index.js";
2
- import type { SmartFilter } from "../../../../smartFilter.js";
3
- import { DirectionalBlurBlock } from "./directionalBlurBlock.js";
4
- /**
5
- * The definition of the extra data serialized for directional blur blocks.
6
- */
7
- export interface ISerializedDirectionalBlurBlockV1 extends ISerializedBlockV1 {
8
- /**
9
- * The extra data of the block.
10
- */
11
- data: {
12
- /**
13
- * The horizontal width of the blur.
14
- */
15
- blurHorizontalWidth: number;
16
- /**
17
- * The vertical width of the blur.
18
- */
19
- blurVerticalWidth: number;
20
- /**
21
- * The blur texture ratio.
22
- */
23
- blurTextureRatio: number;
24
- };
25
- }
26
- /**
27
- * V1 Directional Blur Deserializer.
28
- * @param smartFilter - The SmartFilter to deserialize the block into
29
- * @param serializedBlock - The serialized block data
30
- * @returns A deserialized DirectionalBlurBlock
31
- */
32
- export declare function directionalBlurDeserializer(smartFilter: SmartFilter, serializedBlock: ISerializedDirectionalBlurBlockV1): DirectionalBlurBlock;
33
- //# sourceMappingURL=directionalBlurBlock.deserializer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directionalBlurBlock.deserializer.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,kBAAkB;IACzE;;OAEG;IACH,IAAI,EAAE;QACF;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAE5B;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACL;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,iCAAiC,wBASrD"}
@@ -1,17 +0,0 @@
1
- import { DirectionalBlurBlock } from "./directionalBlurBlock.js";
2
- /**
3
- * V1 Directional Blur Deserializer.
4
- * @param smartFilter - The SmartFilter to deserialize the block into
5
- * @param serializedBlock - The serialized block data
6
- * @returns A deserialized DirectionalBlurBlock
7
- */
8
- export function directionalBlurDeserializer(smartFilter, serializedBlock) {
9
- var _a, _b, _c;
10
- const block = new DirectionalBlurBlock(smartFilter, serializedBlock.name);
11
- // If data is missing, use the default value set by the block
12
- block.blurHorizontalWidth = (_a = serializedBlock.data.blurHorizontalWidth) !== null && _a !== void 0 ? _a : block.blurHorizontalWidth;
13
- block.blurVerticalWidth = (_b = serializedBlock.data.blurVerticalWidth) !== null && _b !== void 0 ? _b : block.blurVerticalWidth;
14
- block.blurTextureRatio = (_c = serializedBlock.data.blurTextureRatio) !== null && _c !== void 0 ? _c : block.blurTextureRatio;
15
- return block;
16
- }
17
- //# sourceMappingURL=directionalBlurBlock.deserializer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directionalBlurBlock.deserializer.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AA2BjE;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACvC,WAAwB,EACxB,eAAkD;;IAElD,MAAM,KAAK,GAAG,IAAI,oBAAoB,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAE1E,6DAA6D;IAC7D,KAAK,CAAC,mBAAmB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,mBAAmB,mCAAI,KAAK,CAAC,mBAAmB,CAAC;IAClG,KAAK,CAAC,iBAAiB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,iBAAiB,mCAAI,KAAK,CAAC,iBAAiB,CAAC;IAC5F,KAAK,CAAC,gBAAgB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,gBAAgB,mCAAI,KAAK,CAAC,gBAAgB,CAAC;IACzF,OAAO,KAAK,CAAC;AACjB,CAAC"}