@onerjs/smart-filters-blocks 8.25.4 → 8.25.6

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.
@@ -1,5 +1,18 @@
1
1
  import type { ThinEngine } from "@onerjs/core/Engines/thinEngine.js";
2
2
  import type { SmartFilter, SmartFilterDeserializer, ISerializedBlockV1, BaseBlock } from "@onerjs/smart-filters";
3
+ /**
4
+ * Options for the block factory when creating a new block
5
+ */
6
+ export interface IBlockRegistrationFactoryOptions {
7
+ /**
8
+ * If true, automatic input blocks will not be created for the block
9
+ */
10
+ suppressAutomaticInputBlocks?: boolean;
11
+ /**
12
+ * If a serialized block is not provided, this is the name to use for the block, otherwise a default will be used
13
+ */
14
+ name?: string;
15
+ }
3
16
  /**
4
17
  * An object which describes a block definition, as well as a factory for creating a new instance of the block or
5
18
  * deserializing it
@@ -15,9 +28,10 @@ export interface IBlockRegistration {
15
28
  * @param engine - The engine to use for creating blocks
16
29
  * @param smartFilterDeserializer - The deserializer to use for deserializing blocks
17
30
  * @param serializedBlock - The serialized block to deserialize, if any
31
+ * @param options - Options for creating the block
18
32
  * @returns - A promise for a new instance of the block
19
33
  */
20
- factory?: (smartFilter: SmartFilter, engine: ThinEngine, smartFilterDeserializer: SmartFilterDeserializer, serializedBlock?: ISerializedBlockV1) => Promise<BaseBlock>;
34
+ factory?: (smartFilter: SmartFilter, engine: ThinEngine, smartFilterDeserializer: SmartFilterDeserializer, serializedBlock?: ISerializedBlockV1, options?: IBlockRegistrationFactoryOptions) => Promise<BaseBlock>;
21
35
  /**
22
36
  * The namespace of the block
23
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IBlockRegistration.d.ts","sourceRoot":"","sources":["../../src/registration/IBlockRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,2CAAmC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,SAAS,EAAE,8BAAsB;AAEzG;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,eAAe,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvK;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"IBlockRegistration.d.ts","sourceRoot":"","sources":["../../src/registration/IBlockRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,2CAAmC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,SAAS,EAAE,8BAAsB;AAEzG;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC7C;;OAEG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAEvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,CACN,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,UAAU,EAClB,uBAAuB,EAAE,uBAAuB,EAChD,eAAe,CAAC,EAAE,kBAAkB,EACpC,OAAO,CAAC,EAAE,gCAAgC,KACzC,OAAO,CAAC,SAAS,CAAC,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"builtInBlockRegistrations.d.ts","sourceRoot":"","sources":["../../src/registration/builtInBlockRegistrations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAoBlE;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EAoQzD,CAAC"}
1
+ {"version":3,"file":"builtInBlockRegistrations.d.ts","sourceRoot":"","sources":["../../src/registration/builtInBlockRegistrations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAoC,MAAM,yBAAyB,CAAC;AAoBpG;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EA8VzD,CAAC"}
@@ -18,9 +18,9 @@ export const BuiltInBlockRegistrations = [
18
18
  {
19
19
  blockType: blackAndWhiteBlockType,
20
20
  // eslint-disable-next-line @typescript-eslint/naming-convention
21
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
21
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
22
22
  const module = await import(/* webpackChunkName: "blackAndWhiteBlock" */ "../blocks/babylon/demo/effects/blackAndWhiteBlock.block.js");
23
- return new module.BlackAndWhiteBlock(smartFilter, serializedBlock?.name || "BlackAndWhite");
23
+ return new module.BlackAndWhiteBlock(smartFilter, serializedBlock?.name || options?.name || "BlackAndWhite");
24
24
  },
25
25
  namespace: babylonDemoEffectsNamespace,
26
26
  tooltip: "Transform the input texture to black and white",
@@ -28,10 +28,10 @@ export const BuiltInBlockRegistrations = [
28
28
  {
29
29
  blockType: kaleidoscopeBlockType,
30
30
  // eslint-disable-next-line @typescript-eslint/naming-convention
31
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
31
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
32
32
  const module = await import(/* webpackChunkName: "kaleidoscopeBlock" */ "../blocks/babylon/demo/effects/kaleidoscopeBlock.js");
33
- const block = new module.KaleidoscopeBlock(smartFilter, serializedBlock?.name || "Kaleidoscope");
34
- if (!serializedBlock) {
33
+ const block = new module.KaleidoscopeBlock(smartFilter, serializedBlock?.name || options?.name || "Kaleidoscope");
34
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
35
35
  const input = new InputBlock(smartFilter, "Angle", ConnectionPointType.Float, 0);
36
36
  input.output.connectTo(block.time);
37
37
  }
@@ -43,10 +43,10 @@ export const BuiltInBlockRegistrations = [
43
43
  {
44
44
  blockType: posterizeBlockType,
45
45
  // eslint-disable-next-line @typescript-eslint/naming-convention
46
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
46
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
47
47
  const module = await import(/* webpackChunkName: "posterizeBlock" */ "../blocks/babylon/demo/effects/posterizeBlock.block.js");
48
- const block = new module.PosterizeBlock(smartFilter, serializedBlock?.name || "Posterize");
49
- if (!serializedBlock) {
48
+ const block = new module.PosterizeBlock(smartFilter, serializedBlock?.name || options?.name || "Posterize");
49
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
50
50
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
51
51
  input.output.connectTo(block.intensity);
52
52
  }
@@ -58,10 +58,10 @@ export const BuiltInBlockRegistrations = [
58
58
  {
59
59
  blockType: desaturateBlockType,
60
60
  // eslint-disable-next-line @typescript-eslint/naming-convention
61
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
61
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
62
62
  const module = await import(/* webpackChunkName: "desaturateBlock" */ "../blocks/babylon/demo/effects/desaturateBlock.block.js");
63
- const block = new module.DesaturateBlock(smartFilter, serializedBlock?.name || "Desaturate");
64
- if (!serializedBlock) {
63
+ const block = new module.DesaturateBlock(smartFilter, serializedBlock?.name || options?.name || "Desaturate");
64
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
65
65
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
66
66
  input.output.connectTo(block.intensity);
67
67
  }
@@ -73,10 +73,10 @@ export const BuiltInBlockRegistrations = [
73
73
  {
74
74
  blockType: contrastBlockType,
75
75
  // eslint-disable-next-line @typescript-eslint/naming-convention
76
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
76
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
77
77
  const module = await import(/* webpackChunkName: "contrastBlock" */ "../blocks/babylon/demo/effects/contrastBlock.block.js");
78
- const block = new module.ContrastBlock(smartFilter, serializedBlock?.name || "Contrast");
79
- if (!serializedBlock) {
78
+ const block = new module.ContrastBlock(smartFilter, serializedBlock?.name || options?.name || "Contrast");
79
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
80
80
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
81
81
  input.output.connectTo(block.intensity);
82
82
  }
@@ -88,10 +88,10 @@ export const BuiltInBlockRegistrations = [
88
88
  {
89
89
  blockType: greenScreenBlockType,
90
90
  // eslint-disable-next-line @typescript-eslint/naming-convention
91
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
91
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
92
92
  const module = await import(/* webpackChunkName: "greenScreenBlock" */ "../blocks/babylon/demo/effects/greenScreenBlock.block.js");
93
- const block = new module.GreenScreenBlock(smartFilter, serializedBlock?.name || "GreenScreen");
94
- if (!serializedBlock) {
93
+ const block = new module.GreenScreenBlock(smartFilter, serializedBlock?.name || options?.name || "GreenScreen");
94
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
95
95
  const reference = new InputBlock(smartFilter, "Reference", ConnectionPointType.Color3, {
96
96
  r: 92 / 255,
97
97
  g: 204 / 255,
@@ -109,10 +109,10 @@ export const BuiltInBlockRegistrations = [
109
109
  {
110
110
  blockType: pixelateBlockType,
111
111
  // eslint-disable-next-line @typescript-eslint/naming-convention
112
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
112
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
113
113
  const module = await import(/* webpackChunkName: "pixelateBlock" */ "../blocks/babylon/demo/effects/pixelateBlock.block.js");
114
- const block = new module.PixelateBlock(smartFilter, serializedBlock?.name || "Pixelate");
115
- if (!serializedBlock) {
114
+ const block = new module.PixelateBlock(smartFilter, serializedBlock?.name || options?.name || "Pixelate");
115
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
116
116
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.4);
117
117
  input.output.connectTo(block.intensity);
118
118
  }
@@ -124,10 +124,10 @@ export const BuiltInBlockRegistrations = [
124
124
  {
125
125
  blockType: exposureBlockType,
126
126
  // eslint-disable-next-line @typescript-eslint/naming-convention
127
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
127
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
128
128
  const module = await import(/* webpackChunkName: "exposureBlock" */ "../blocks/babylon/demo/effects/exposureBlock.block.js");
129
- const block = new module.ExposureBlock(smartFilter, serializedBlock?.name || "Exposure");
130
- if (!serializedBlock) {
129
+ const block = new module.ExposureBlock(smartFilter, serializedBlock?.name || options?.name || "Exposure");
130
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
131
131
  const input = new InputBlock(smartFilter, "Amount", ConnectionPointType.Float, 0.7);
132
132
  input.output.connectTo(block.amount);
133
133
  }
@@ -139,9 +139,9 @@ export const BuiltInBlockRegistrations = [
139
139
  {
140
140
  blockType: maskBlockType,
141
141
  // eslint-disable-next-line @typescript-eslint/naming-convention
142
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
142
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
143
143
  const module = await import(/* webpackChunkName: "maskBlock" */ "../blocks/babylon/demo/effects/maskBlock.block.js");
144
- return new module.MaskBlock(smartFilter, serializedBlock?.name || "Mask");
144
+ return new module.MaskBlock(smartFilter, serializedBlock?.name || options?.name || "Mask");
145
145
  },
146
146
  namespace: babylonDemoEffectsNamespace,
147
147
  tooltip: "Applies mask in one texture to another texture",
@@ -149,9 +149,9 @@ export const BuiltInBlockRegistrations = [
149
149
  {
150
150
  blockType: spritesheetBlockType,
151
151
  // eslint-disable-next-line @typescript-eslint/naming-convention
152
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
152
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
153
153
  const module = await import(/* webpackChunkName: "spritesheetBlock" */ "../blocks/babylon/demo/effects/spritesheetBlock.js");
154
- return new module.SpritesheetBlock(smartFilter, serializedBlock?.name || "Spritesheet");
154
+ return new module.SpritesheetBlock(smartFilter, serializedBlock?.name || options?.name || "Spritesheet");
155
155
  },
156
156
  namespace: babylonDemoEffectsNamespace,
157
157
  tooltip: "Animates a sprite sheet texture",
@@ -159,9 +159,9 @@ export const BuiltInBlockRegistrations = [
159
159
  {
160
160
  blockType: premultiplyAlphaBlockType,
161
161
  // eslint-disable-next-line @typescript-eslint/naming-convention
162
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
162
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
163
163
  const module = await import(/* webpackChunkName: "premultiplyAlphaBlock" */ "../blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.js");
164
- return new module.PremultiplyAlphaBlock(smartFilter, serializedBlock?.name || "PremultiplyAlpha");
164
+ return new module.PremultiplyAlphaBlock(smartFilter, serializedBlock?.name || options?.name || "PremultiplyAlpha");
165
165
  },
166
166
  namespace: babylonDemoUtilitiesNamespace,
167
167
  tooltip: "Premultiplies the input texture's color against its alpha",
@@ -169,9 +169,9 @@ export const BuiltInBlockRegistrations = [
169
169
  {
170
170
  blockType: wipeBlockType,
171
171
  // eslint-disable-next-line @typescript-eslint/naming-convention
172
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
172
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
173
173
  const module = await import(/* webpackChunkName: "wipeBlock" */ "../blocks/babylon/demo/transitions/wipeBlock.block.js");
174
- return new module.WipeBlock(smartFilter, serializedBlock?.name || "Wipe");
174
+ return new module.WipeBlock(smartFilter, serializedBlock?.name || options?.name || "Wipe");
175
175
  },
176
176
  namespace: babylonDemoTransitionsNamespace,
177
177
  tooltip: "Transition from one texture to another using a wipe",
@@ -181,14 +181,14 @@ export const BuiltInBlockRegistrations = [
181
181
  {
182
182
  blockType: blurBlockType,
183
183
  // eslint-disable-next-line @typescript-eslint/naming-convention
184
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
184
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
185
185
  if (serializedBlock) {
186
186
  const module = await import(/* webpackChunkName: "blurBlockDeserializer" */ "../blocks/babylon/demo/effects/blurBlock.deserializer.js");
187
187
  return module.BlurBlockDeserializer(smartFilter, serializedBlock);
188
188
  }
189
189
  else {
190
190
  const module = await import(/* webpackChunkName: "blurBlock" */ "../blocks/babylon/demo/effects/blurBlock.js");
191
- return new module.BlurBlock(smartFilter, "Blur");
191
+ return new module.BlurBlock(smartFilter, options?.name || "Blur");
192
192
  }
193
193
  },
194
194
  namespace: babylonDemoEffectsNamespace,
@@ -197,14 +197,14 @@ export const BuiltInBlockRegistrations = [
197
197
  {
198
198
  blockType: compositionBlockType,
199
199
  // eslint-disable-next-line @typescript-eslint/naming-convention
200
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
200
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
201
201
  if (serializedBlock) {
202
202
  const module = await import(/* webpackChunkName: "compositionBlockDeserializer" */ "../blocks/babylon/demo/effects/compositionBlock.deserializer.js");
203
203
  return module.CompositionDeserializer(smartFilter, serializedBlock);
204
204
  }
205
205
  else {
206
206
  const module = await import(/* webpackChunkName: "compositionBlock" */ "../blocks/babylon/demo/effects/compositionBlock.js");
207
- const block = new module.CompositionBlock(smartFilter, "Composition");
207
+ const block = new module.CompositionBlock(smartFilter, options?.name || "Composition");
208
208
  const top = new InputBlock(smartFilter, "Top", ConnectionPointType.Float, 0.0);
209
209
  const left = new InputBlock(smartFilter, "Left", ConnectionPointType.Float, 0.0);
210
210
  const width = new InputBlock(smartFilter, "Width", ConnectionPointType.Float, 1.0);
@@ -224,9 +224,9 @@ export const BuiltInBlockRegistrations = [
224
224
  {
225
225
  blockType: tintBlockType,
226
226
  // eslint-disable-next-line @typescript-eslint/naming-convention
227
- factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock) => {
227
+ factory: async (smartFilter, _engine, _smartFilterDeserializer, serializedBlock, options) => {
228
228
  const module = await import(/* webpackChunkName: "tintBlock" */ "../blocks/babylon/demo/effects/tintBlock.js");
229
- return CustomShaderBlock.Create(smartFilter, serializedBlock?.name || "Tint", module.DeserializedTintBlockDefinition);
229
+ return CustomShaderBlock.Create(smartFilter, serializedBlock?.name || options?.name || "Tint", module.DeserializedTintBlockDefinition);
230
230
  },
231
231
  namespace: babylonDemoEffectsNamespace,
232
232
  tooltip: "Adds colored tint to the input texture",
@@ -1 +1 @@
1
- {"version":3,"file":"builtInBlockRegistrations.js","sourceRoot":"","sources":["../../src/registration/builtInBlockRegistrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2E,mBAAmB,EAAE,iBAAiB,EAAE,8BAAsB;AAE5J,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,eAAe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;QACb,OAAO,EAAE,wDAAwD;KACpE;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;CACJ,CAAC"}
1
+ {"version":3,"file":"builtInBlockRegistrations.js","sourceRoot":"","sources":["../../src/registration/builtInBlockRegistrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA2E,mBAAmB,EAAE,iBAAiB,EAAE,8BAAsB;AAE5J,OAAO,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC5J,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,aAAa,GAChB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAyB;IAC3D,oCAAoC;IACpC,0FAA0F;IAC1F,0FAA0F;IAC1F;QACI,SAAS,EAAE,sBAAsB;QACjC,gEAAgE;QAChE,OAAO,EAAE,KAAK,EACV,WAAwB,EACxB,OAAmB,EACnB,wBAAiD,EACjD,eAA+C,EAC/C,OAA0C,EAC5C,EAAE;YACA,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,4CAA4C,CAAC,4DAA4D,CAAC,CAAC;YACvI,OAAO,IAAI,MAAM,CAAC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,QAAQ;QACnB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,wDAAwD;KACpE;IACD;QACI,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,wDAAwD;KACpE;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;IACD;QACI,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,eAAe;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;KAC3C;CACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onerjs/smart-filters-blocks",
3
- "version": "8.25.4",
3
+ "version": "8.25.6",
4
4
  "description": "Babylon.js Smart Filter Block Library",
5
5
  "keywords": [
6
6
  "video",
@@ -49,6 +49,6 @@
49
49
  "@onerjs/core": "^7.47.3 || ^8.0.1"
50
50
  },
51
51
  "dependencies": {
52
- "@onerjs/smart-filters": "^8.25.4"
52
+ "@onerjs/smart-filters": "^8.25.6"
53
53
  }
54
54
  }
@@ -1,6 +1,21 @@
1
1
  import type { ThinEngine } from "core/Engines/thinEngine.js";
2
2
  import type { SmartFilter, SmartFilterDeserializer, ISerializedBlockV1, BaseBlock } from "smart-filters";
3
3
 
4
+ /**
5
+ * Options for the block factory when creating a new block
6
+ */
7
+ export interface IBlockRegistrationFactoryOptions {
8
+ /**
9
+ * If true, automatic input blocks will not be created for the block
10
+ */
11
+ suppressAutomaticInputBlocks?: boolean;
12
+
13
+ /**
14
+ * If a serialized block is not provided, this is the name to use for the block, otherwise a default will be used
15
+ */
16
+ name?: string;
17
+ }
18
+
4
19
  /**
5
20
  * An object which describes a block definition, as well as a factory for creating a new instance of the block or
6
21
  * deserializing it
@@ -17,9 +32,16 @@ export interface IBlockRegistration {
17
32
  * @param engine - The engine to use for creating blocks
18
33
  * @param smartFilterDeserializer - The deserializer to use for deserializing blocks
19
34
  * @param serializedBlock - The serialized block to deserialize, if any
35
+ * @param options - Options for creating the block
20
36
  * @returns - A promise for a new instance of the block
21
37
  */
22
- factory?: (smartFilter: SmartFilter, engine: ThinEngine, smartFilterDeserializer: SmartFilterDeserializer, serializedBlock?: ISerializedBlockV1) => Promise<BaseBlock>;
38
+ factory?: (
39
+ smartFilter: SmartFilter,
40
+ engine: ThinEngine,
41
+ smartFilterDeserializer: SmartFilterDeserializer,
42
+ serializedBlock?: ISerializedBlockV1,
43
+ options?: IBlockRegistrationFactoryOptions
44
+ ) => Promise<BaseBlock>;
23
45
 
24
46
  /**
25
47
  * The namespace of the block
@@ -1,6 +1,6 @@
1
1
  import type { ThinEngine } from "core/Engines/thinEngine.js";
2
2
  import { InputBlock, type SmartFilter, type SmartFilterDeserializer, type ISerializedBlockV1, ConnectionPointType, CustomShaderBlock } from "smart-filters";
3
- import type { IBlockRegistration } from "./IBlockRegistration.js";
3
+ import type { IBlockRegistration, IBlockRegistrationFactoryOptions } from "./IBlockRegistration.js";
4
4
  import { babylonDemoEffectsNamespace, babylonDemoTransitionsNamespace, babylonDemoUtilitiesNamespace, inputsNamespace } from "../blocks/blockNamespaces.js";
5
5
  import {
6
6
  blackAndWhiteBlockType,
@@ -37,9 +37,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
37
37
  {
38
38
  blockType: blackAndWhiteBlockType,
39
39
  // eslint-disable-next-line @typescript-eslint/naming-convention
40
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
40
+ factory: async (
41
+ smartFilter: SmartFilter,
42
+ _engine: ThinEngine,
43
+ _smartFilterDeserializer: SmartFilterDeserializer,
44
+ serializedBlock: ISerializedBlockV1 | undefined,
45
+ options?: IBlockRegistrationFactoryOptions
46
+ ) => {
41
47
  const module = await import(/* webpackChunkName: "blackAndWhiteBlock" */ "../blocks/babylon/demo/effects/blackAndWhiteBlock.block.js");
42
- return new module.BlackAndWhiteBlock(smartFilter, serializedBlock?.name || "BlackAndWhite");
48
+ return new module.BlackAndWhiteBlock(smartFilter, serializedBlock?.name || options?.name || "BlackAndWhite");
43
49
  },
44
50
  namespace: babylonDemoEffectsNamespace,
45
51
  tooltip: "Transform the input texture to black and white",
@@ -47,10 +53,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
47
53
  {
48
54
  blockType: kaleidoscopeBlockType,
49
55
  // eslint-disable-next-line @typescript-eslint/naming-convention
50
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
56
+ factory: async (
57
+ smartFilter: SmartFilter,
58
+ _engine: ThinEngine,
59
+ _smartFilterDeserializer: SmartFilterDeserializer,
60
+ serializedBlock: ISerializedBlockV1 | undefined,
61
+ options?: IBlockRegistrationFactoryOptions
62
+ ) => {
51
63
  const module = await import(/* webpackChunkName: "kaleidoscopeBlock" */ "../blocks/babylon/demo/effects/kaleidoscopeBlock.js");
52
- const block = new module.KaleidoscopeBlock(smartFilter, serializedBlock?.name || "Kaleidoscope");
53
- if (!serializedBlock) {
64
+ const block = new module.KaleidoscopeBlock(smartFilter, serializedBlock?.name || options?.name || "Kaleidoscope");
65
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
54
66
  const input = new InputBlock(smartFilter, "Angle", ConnectionPointType.Float, 0);
55
67
  input.output.connectTo(block.time);
56
68
  }
@@ -62,10 +74,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
62
74
  {
63
75
  blockType: posterizeBlockType,
64
76
  // eslint-disable-next-line @typescript-eslint/naming-convention
65
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
77
+ factory: async (
78
+ smartFilter: SmartFilter,
79
+ _engine: ThinEngine,
80
+ _smartFilterDeserializer: SmartFilterDeserializer,
81
+ serializedBlock: ISerializedBlockV1 | undefined,
82
+ options?: IBlockRegistrationFactoryOptions
83
+ ) => {
66
84
  const module = await import(/* webpackChunkName: "posterizeBlock" */ "../blocks/babylon/demo/effects/posterizeBlock.block.js");
67
- const block = new module.PosterizeBlock(smartFilter, serializedBlock?.name || "Posterize");
68
- if (!serializedBlock) {
85
+ const block = new module.PosterizeBlock(smartFilter, serializedBlock?.name || options?.name || "Posterize");
86
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
69
87
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
70
88
  input.output.connectTo(block.intensity);
71
89
  }
@@ -77,10 +95,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
77
95
  {
78
96
  blockType: desaturateBlockType,
79
97
  // eslint-disable-next-line @typescript-eslint/naming-convention
80
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
98
+ factory: async (
99
+ smartFilter: SmartFilter,
100
+ _engine: ThinEngine,
101
+ _smartFilterDeserializer: SmartFilterDeserializer,
102
+ serializedBlock: ISerializedBlockV1 | undefined,
103
+ options?: IBlockRegistrationFactoryOptions
104
+ ) => {
81
105
  const module = await import(/* webpackChunkName: "desaturateBlock" */ "../blocks/babylon/demo/effects/desaturateBlock.block.js");
82
- const block = new module.DesaturateBlock(smartFilter, serializedBlock?.name || "Desaturate");
83
- if (!serializedBlock) {
106
+ const block = new module.DesaturateBlock(smartFilter, serializedBlock?.name || options?.name || "Desaturate");
107
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
84
108
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
85
109
  input.output.connectTo(block.intensity);
86
110
  }
@@ -92,10 +116,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
92
116
  {
93
117
  blockType: contrastBlockType,
94
118
  // eslint-disable-next-line @typescript-eslint/naming-convention
95
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
119
+ factory: async (
120
+ smartFilter: SmartFilter,
121
+ _engine: ThinEngine,
122
+ _smartFilterDeserializer: SmartFilterDeserializer,
123
+ serializedBlock: ISerializedBlockV1 | undefined,
124
+ options?: IBlockRegistrationFactoryOptions
125
+ ) => {
96
126
  const module = await import(/* webpackChunkName: "contrastBlock" */ "../blocks/babylon/demo/effects/contrastBlock.block.js");
97
- const block = new module.ContrastBlock(smartFilter, serializedBlock?.name || "Contrast");
98
- if (!serializedBlock) {
127
+ const block = new module.ContrastBlock(smartFilter, serializedBlock?.name || options?.name || "Contrast");
128
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
99
129
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.5);
100
130
  input.output.connectTo(block.intensity);
101
131
  }
@@ -107,10 +137,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
107
137
  {
108
138
  blockType: greenScreenBlockType,
109
139
  // eslint-disable-next-line @typescript-eslint/naming-convention
110
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
140
+ factory: async (
141
+ smartFilter: SmartFilter,
142
+ _engine: ThinEngine,
143
+ _smartFilterDeserializer: SmartFilterDeserializer,
144
+ serializedBlock: ISerializedBlockV1 | undefined,
145
+ options?: IBlockRegistrationFactoryOptions
146
+ ) => {
111
147
  const module = await import(/* webpackChunkName: "greenScreenBlock" */ "../blocks/babylon/demo/effects/greenScreenBlock.block.js");
112
- const block = new module.GreenScreenBlock(smartFilter, serializedBlock?.name || "GreenScreen");
113
- if (!serializedBlock) {
148
+ const block = new module.GreenScreenBlock(smartFilter, serializedBlock?.name || options?.name || "GreenScreen");
149
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
114
150
  const reference = new InputBlock(smartFilter, "Reference", ConnectionPointType.Color3, {
115
151
  r: 92 / 255,
116
152
  g: 204 / 255,
@@ -128,10 +164,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
128
164
  {
129
165
  blockType: pixelateBlockType,
130
166
  // eslint-disable-next-line @typescript-eslint/naming-convention
131
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
167
+ factory: async (
168
+ smartFilter: SmartFilter,
169
+ _engine: ThinEngine,
170
+ _smartFilterDeserializer: SmartFilterDeserializer,
171
+ serializedBlock: ISerializedBlockV1 | undefined,
172
+ options?: IBlockRegistrationFactoryOptions
173
+ ) => {
132
174
  const module = await import(/* webpackChunkName: "pixelateBlock" */ "../blocks/babylon/demo/effects/pixelateBlock.block.js");
133
- const block = new module.PixelateBlock(smartFilter, serializedBlock?.name || "Pixelate");
134
- if (!serializedBlock) {
175
+ const block = new module.PixelateBlock(smartFilter, serializedBlock?.name || options?.name || "Pixelate");
176
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
135
177
  const input = new InputBlock(smartFilter, "Intensity", ConnectionPointType.Float, 0.4);
136
178
  input.output.connectTo(block.intensity);
137
179
  }
@@ -143,10 +185,16 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
143
185
  {
144
186
  blockType: exposureBlockType,
145
187
  // eslint-disable-next-line @typescript-eslint/naming-convention
146
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
188
+ factory: async (
189
+ smartFilter: SmartFilter,
190
+ _engine: ThinEngine,
191
+ _smartFilterDeserializer: SmartFilterDeserializer,
192
+ serializedBlock: ISerializedBlockV1 | undefined,
193
+ options?: IBlockRegistrationFactoryOptions
194
+ ) => {
147
195
  const module = await import(/* webpackChunkName: "exposureBlock" */ "../blocks/babylon/demo/effects/exposureBlock.block.js");
148
- const block = new module.ExposureBlock(smartFilter, serializedBlock?.name || "Exposure");
149
- if (!serializedBlock) {
196
+ const block = new module.ExposureBlock(smartFilter, serializedBlock?.name || options?.name || "Exposure");
197
+ if (!serializedBlock && !options?.suppressAutomaticInputBlocks) {
150
198
  const input = new InputBlock(smartFilter, "Amount", ConnectionPointType.Float, 0.7);
151
199
  input.output.connectTo(block.amount);
152
200
  }
@@ -158,9 +206,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
158
206
  {
159
207
  blockType: maskBlockType,
160
208
  // eslint-disable-next-line @typescript-eslint/naming-convention
161
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
209
+ factory: async (
210
+ smartFilter: SmartFilter,
211
+ _engine: ThinEngine,
212
+ _smartFilterDeserializer: SmartFilterDeserializer,
213
+ serializedBlock: ISerializedBlockV1 | undefined,
214
+ options?: IBlockRegistrationFactoryOptions
215
+ ) => {
162
216
  const module = await import(/* webpackChunkName: "maskBlock" */ "../blocks/babylon/demo/effects/maskBlock.block.js");
163
- return new module.MaskBlock(smartFilter, serializedBlock?.name || "Mask");
217
+ return new module.MaskBlock(smartFilter, serializedBlock?.name || options?.name || "Mask");
164
218
  },
165
219
  namespace: babylonDemoEffectsNamespace,
166
220
  tooltip: "Applies mask in one texture to another texture",
@@ -168,9 +222,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
168
222
  {
169
223
  blockType: spritesheetBlockType,
170
224
  // eslint-disable-next-line @typescript-eslint/naming-convention
171
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
225
+ factory: async (
226
+ smartFilter: SmartFilter,
227
+ _engine: ThinEngine,
228
+ _smartFilterDeserializer: SmartFilterDeserializer,
229
+ serializedBlock: ISerializedBlockV1 | undefined,
230
+ options?: IBlockRegistrationFactoryOptions
231
+ ) => {
172
232
  const module = await import(/* webpackChunkName: "spritesheetBlock" */ "../blocks/babylon/demo/effects/spritesheetBlock.js");
173
- return new module.SpritesheetBlock(smartFilter, serializedBlock?.name || "Spritesheet");
233
+ return new module.SpritesheetBlock(smartFilter, serializedBlock?.name || options?.name || "Spritesheet");
174
234
  },
175
235
  namespace: babylonDemoEffectsNamespace,
176
236
  tooltip: "Animates a sprite sheet texture",
@@ -178,9 +238,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
178
238
  {
179
239
  blockType: premultiplyAlphaBlockType,
180
240
  // eslint-disable-next-line @typescript-eslint/naming-convention
181
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
241
+ factory: async (
242
+ smartFilter: SmartFilter,
243
+ _engine: ThinEngine,
244
+ _smartFilterDeserializer: SmartFilterDeserializer,
245
+ serializedBlock: ISerializedBlockV1 | undefined,
246
+ options?: IBlockRegistrationFactoryOptions
247
+ ) => {
182
248
  const module = await import(/* webpackChunkName: "premultiplyAlphaBlock" */ "../blocks/babylon/demo/utilities/premultiplyAlphaBlock.block.js");
183
- return new module.PremultiplyAlphaBlock(smartFilter, serializedBlock?.name || "PremultiplyAlpha");
249
+ return new module.PremultiplyAlphaBlock(smartFilter, serializedBlock?.name || options?.name || "PremultiplyAlpha");
184
250
  },
185
251
  namespace: babylonDemoUtilitiesNamespace,
186
252
  tooltip: "Premultiplies the input texture's color against its alpha",
@@ -188,9 +254,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
188
254
  {
189
255
  blockType: wipeBlockType,
190
256
  // eslint-disable-next-line @typescript-eslint/naming-convention
191
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
257
+ factory: async (
258
+ smartFilter: SmartFilter,
259
+ _engine: ThinEngine,
260
+ _smartFilterDeserializer: SmartFilterDeserializer,
261
+ serializedBlock: ISerializedBlockV1 | undefined,
262
+ options?: IBlockRegistrationFactoryOptions
263
+ ) => {
192
264
  const module = await import(/* webpackChunkName: "wipeBlock" */ "../blocks/babylon/demo/transitions/wipeBlock.block.js");
193
- return new module.WipeBlock(smartFilter, serializedBlock?.name || "Wipe");
265
+ return new module.WipeBlock(smartFilter, serializedBlock?.name || options?.name || "Wipe");
194
266
  },
195
267
  namespace: babylonDemoTransitionsNamespace,
196
268
  tooltip: "Transition from one texture to another using a wipe",
@@ -201,13 +273,19 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
201
273
  {
202
274
  blockType: blurBlockType,
203
275
  // eslint-disable-next-line @typescript-eslint/naming-convention
204
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
276
+ factory: async (
277
+ smartFilter: SmartFilter,
278
+ _engine: ThinEngine,
279
+ _smartFilterDeserializer: SmartFilterDeserializer,
280
+ serializedBlock: ISerializedBlockV1 | undefined,
281
+ options?: IBlockRegistrationFactoryOptions
282
+ ) => {
205
283
  if (serializedBlock) {
206
284
  const module = await import(/* webpackChunkName: "blurBlockDeserializer" */ "../blocks/babylon/demo/effects/blurBlock.deserializer.js");
207
285
  return module.BlurBlockDeserializer(smartFilter, serializedBlock);
208
286
  } else {
209
287
  const module = await import(/* webpackChunkName: "blurBlock" */ "../blocks/babylon/demo/effects/blurBlock.js");
210
- return new module.BlurBlock(smartFilter, "Blur");
288
+ return new module.BlurBlock(smartFilter, options?.name || "Blur");
211
289
  }
212
290
  },
213
291
  namespace: babylonDemoEffectsNamespace,
@@ -216,13 +294,19 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
216
294
  {
217
295
  blockType: compositionBlockType,
218
296
  // eslint-disable-next-line @typescript-eslint/naming-convention
219
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
297
+ factory: async (
298
+ smartFilter: SmartFilter,
299
+ _engine: ThinEngine,
300
+ _smartFilterDeserializer: SmartFilterDeserializer,
301
+ serializedBlock: ISerializedBlockV1 | undefined,
302
+ options?: IBlockRegistrationFactoryOptions
303
+ ) => {
220
304
  if (serializedBlock) {
221
305
  const module = await import(/* webpackChunkName: "compositionBlockDeserializer" */ "../blocks/babylon/demo/effects/compositionBlock.deserializer.js");
222
306
  return module.CompositionDeserializer(smartFilter, serializedBlock);
223
307
  } else {
224
308
  const module = await import(/* webpackChunkName: "compositionBlock" */ "../blocks/babylon/demo/effects/compositionBlock.js");
225
- const block = new module.CompositionBlock(smartFilter, "Composition");
309
+ const block = new module.CompositionBlock(smartFilter, options?.name || "Composition");
226
310
  const top = new InputBlock(smartFilter, "Top", ConnectionPointType.Float, 0.0);
227
311
  const left = new InputBlock(smartFilter, "Left", ConnectionPointType.Float, 0.0);
228
312
  const width = new InputBlock(smartFilter, "Width", ConnectionPointType.Float, 1.0);
@@ -244,9 +328,15 @@ export const BuiltInBlockRegistrations: IBlockRegistration[] = [
244
328
  {
245
329
  blockType: tintBlockType,
246
330
  // eslint-disable-next-line @typescript-eslint/naming-convention
247
- factory: async (smartFilter: SmartFilter, _engine: ThinEngine, _smartFilterDeserializer: SmartFilterDeserializer, serializedBlock: ISerializedBlockV1 | undefined) => {
331
+ factory: async (
332
+ smartFilter: SmartFilter,
333
+ _engine: ThinEngine,
334
+ _smartFilterDeserializer: SmartFilterDeserializer,
335
+ serializedBlock: ISerializedBlockV1 | undefined,
336
+ options?: IBlockRegistrationFactoryOptions
337
+ ) => {
248
338
  const module = await import(/* webpackChunkName: "tintBlock" */ "../blocks/babylon/demo/effects/tintBlock.js");
249
- return CustomShaderBlock.Create(smartFilter, serializedBlock?.name || "Tint", module.DeserializedTintBlockDefinition);
339
+ return CustomShaderBlock.Create(smartFilter, serializedBlock?.name || options?.name || "Tint", module.DeserializedTintBlockDefinition);
250
340
  },
251
341
  namespace: babylonDemoEffectsNamespace,
252
342
  tooltip: "Adds colored tint to the input texture",