@babylonjs/smart-filters 0.7.11-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.
- package/dist/blockFoundation/outputBlock.d.ts +5 -0
- package/dist/blockFoundation/outputBlock.d.ts.map +1 -1
- package/dist/blockFoundation/outputBlock.js +30 -1
- package/dist/blockFoundation/outputBlock.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -10
- package/readme.md +2 -0
- package/src/blockFoundation/outputBlock.ts +33 -1
- package/src/index.ts +0 -2
- package/src/version.ts +1 -1
- package/dist/blockFoundation/outputBlock.shader.d.ts +0 -13
- package/dist/blockFoundation/outputBlock.shader.d.ts.map +0 -1
- package/dist/blockFoundation/outputBlock.shader.js +0 -31
- package/dist/blockFoundation/outputBlock.shader.js.map +0 -1
- package/dist/blockRegistration/IBlockRegistration.d.ts +0 -36
- package/dist/blockRegistration/IBlockRegistration.d.ts.map +0 -1
- package/dist/blockRegistration/IBlockRegistration.js +0 -2
- package/dist/blockRegistration/IBlockRegistration.js.map +0 -1
- package/dist/blockRegistration/blockSerializers.d.ts +0 -13
- package/dist/blockRegistration/blockSerializers.d.ts.map +0 -1
- package/dist/blockRegistration/blockSerializers.js +0 -35
- package/dist/blockRegistration/blockSerializers.js.map +0 -1
- package/dist/blockRegistration/builtInBlockRegistrations.d.ts +0 -13
- package/dist/blockRegistration/builtInBlockRegistrations.d.ts.map +0 -1
- package/dist/blockRegistration/builtInBlockRegistrations.js +0 -266
- package/dist/blockRegistration/builtInBlockRegistrations.js.map +0 -1
- package/dist/blockRegistration/index.d.ts +0 -3
- package/dist/blockRegistration/index.d.ts.map +0 -1
- package/dist/blockRegistration/index.js +0 -3
- package/dist/blockRegistration/index.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts +0 -56
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js +0 -66
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts +0 -13
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js +0 -36
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.d.ts +0 -56
- package/dist/blocks/babylon/demo/effects/blurBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts +0 -29
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js +0 -16
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.js +0 -100
- package/dist/blocks/babylon/demo/effects/blurBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts +0 -8
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js +0 -28
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts +0 -118
- package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts +0 -25
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js +0 -15
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.js +0 -219
- package/dist/blocks/babylon/demo/effects/compositionBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts +0 -6
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js +0 -25
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts +0 -63
- package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/contrastBlock.js +0 -122
- package/dist/blocks/babylon/demo/effects/contrastBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts +0 -63
- package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/desaturateBlock.js +0 -107
- package/dist/blocks/babylon/demo/effects/desaturateBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts +0 -79
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts +0 -33
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js +0 -17
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js +0 -171
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts +0 -6
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js +0 -27
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts +0 -63
- package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/exposureBlock.js +0 -95
- package/dist/blocks/babylon/demo/effects/exposureBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts +0 -75
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.js +0 -121
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/index.d.ts +0 -15
- package/dist/blocks/babylon/demo/effects/index.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/index.js +0 -15
- package/dist/blocks/babylon/demo/effects/index.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts +0 -63
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js +0 -159
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/maskBlock.d.ts +0 -62
- package/dist/blocks/babylon/demo/effects/maskBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/maskBlock.js +0 -75
- package/dist/blocks/babylon/demo/effects/maskBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts +0 -14
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.js +0 -37
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts +0 -62
- package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/pixelateBlock.js +0 -77
- package/dist/blocks/babylon/demo/effects/pixelateBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts +0 -15
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js +0 -44
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts +0 -63
- package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/posterizeBlock.js +0 -108
- package/dist/blocks/babylon/demo/effects/posterizeBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts +0 -81
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.js +0 -103
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts +0 -18
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js +0 -57
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js.map +0 -1
- package/dist/blocks/babylon/demo/effects/tintBlock.d.ts +0 -7
- package/dist/blocks/babylon/demo/effects/tintBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/effects/tintBlock.js +0 -51
- package/dist/blocks/babylon/demo/effects/tintBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/transitions/index.d.ts +0 -2
- package/dist/blocks/babylon/demo/transitions/index.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/transitions/index.js +0 -2
- package/dist/blocks/babylon/demo/transitions/index.js.map +0 -1
- package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts +0 -69
- package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/transitions/wipeBlock.js +0 -110
- package/dist/blocks/babylon/demo/transitions/wipeBlock.js.map +0 -1
- package/dist/blocks/babylon/demo/utilities/index.d.ts +0 -2
- package/dist/blocks/babylon/demo/utilities/index.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/utilities/index.js +0 -2
- package/dist/blocks/babylon/demo/utilities/index.js.map +0 -1
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts +0 -58
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts.map +0 -1
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js +0 -87
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js.map +0 -1
- package/dist/blocks/blockNamespaces.d.ts +0 -5
- package/dist/blocks/blockNamespaces.d.ts.map +0 -1
- package/dist/blocks/blockNamespaces.js +0 -5
- package/dist/blocks/blockNamespaces.js.map +0 -1
- package/dist/blocks/blockTypes.d.ts +0 -22
- package/dist/blocks/blockTypes.d.ts.map +0 -1
- package/dist/blocks/blockTypes.js +0 -22
- package/dist/blocks/blockTypes.js.map +0 -1
- package/dist/blocks/index.d.ts +0 -6
- package/dist/blocks/index.d.ts.map +0 -1
- package/dist/blocks/index.js +0 -6
- package/dist/blocks/index.js.map +0 -1
- package/src/blockFoundation/outputBlock.fragment.glsl +0 -5
- package/src/blockFoundation/outputBlock.shader.ts +0 -33
- package/src/blockRegistration/IBlockRegistration.ts +0 -45
- package/src/blockRegistration/blockSerializers.ts +0 -52
- package/src/blockRegistration/builtInBlockRegistrations.ts +0 -390
- package/src/blockRegistration/index.ts +0 -2
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.fragment.glsl +0 -10
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.ts +0 -38
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.ts +0 -80
- package/src/blocks/babylon/demo/effects/blurBlock.deserializer.ts +0 -38
- package/src/blocks/babylon/demo/effects/blurBlock.serializer.ts +0 -32
- package/src/blocks/babylon/demo/effects/blurBlock.ts +0 -119
- package/src/blocks/babylon/demo/effects/compositionBlock.deserializer.ts +0 -32
- package/src/blocks/babylon/demo/effects/compositionBlock.serializer.ts +0 -29
- package/src/blocks/babylon/demo/effects/compositionBlock.ts +0 -293
- package/src/blocks/babylon/demo/effects/contrastBlock.ts +0 -152
- package/src/blocks/babylon/demo/effects/desaturateBlock.ts +0 -137
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts +0 -47
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.serializer.ts +0 -31
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.ts +0 -193
- package/src/blocks/babylon/demo/effects/exposureBlock.ts +0 -120
- package/src/blocks/babylon/demo/effects/greenScreenBlock.ts +0 -152
- package/src/blocks/babylon/demo/effects/index.ts +0 -14
- package/src/blocks/babylon/demo/effects/kaleidoscopeBlock.ts +0 -186
- package/src/blocks/babylon/demo/effects/maskBlock.fragment.glsl +0 -10
- package/src/blocks/babylon/demo/effects/maskBlock.shader.ts +0 -39
- package/src/blocks/babylon/demo/effects/maskBlock.ts +0 -94
- package/src/blocks/babylon/demo/effects/pixelateBlock.fragment.glsl +0 -18
- package/src/blocks/babylon/demo/effects/pixelateBlock.shader.ts +0 -46
- package/src/blocks/babylon/demo/effects/pixelateBlock.ts +0 -101
- package/src/blocks/babylon/demo/effects/posterizeBlock.ts +0 -139
- package/src/blocks/babylon/demo/effects/spritesheetBlock.fragment.glsl +0 -26
- package/src/blocks/babylon/demo/effects/spritesheetBlock.shader.ts +0 -59
- package/src/blocks/babylon/demo/effects/spritesheetBlock.ts +0 -135
- package/src/blocks/babylon/demo/effects/tintBlock.ts +0 -52
- package/src/blocks/babylon/demo/transitions/index.ts +0 -1
- package/src/blocks/babylon/demo/transitions/wipeBlock.ts +0 -138
- package/src/blocks/babylon/demo/utilities/index.ts +0 -1
- package/src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.ts +0 -106
- package/src/blocks/blockNamespaces.ts +0 -4
- package/src/blocks/blockTypes.ts +0 -21
- package/src/blocks/index.ts +0 -5
|
@@ -1,110 +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 { babylonDemoTransitionsNamespace } from "../../../blockNamespaces.js";
|
|
6
|
-
import { wipeBlockType } from "../../../blockTypes.js";
|
|
7
|
-
const shaderProgram = {
|
|
8
|
-
fragment: {
|
|
9
|
-
const: `
|
|
10
|
-
const float HALF_PI = 1.57079632679;
|
|
11
|
-
const float LARGE = 10000.0;
|
|
12
|
-
`,
|
|
13
|
-
uniform: `
|
|
14
|
-
uniform sampler2D _textureA_;
|
|
15
|
-
uniform sampler2D _textureB_;
|
|
16
|
-
uniform float _mix_;
|
|
17
|
-
`,
|
|
18
|
-
mainFunctionName: "_wipe_",
|
|
19
|
-
mainInputTexture: "_textureB_",
|
|
20
|
-
functions: [
|
|
21
|
-
{
|
|
22
|
-
name: "_wipe_",
|
|
23
|
-
code: `
|
|
24
|
-
vec4 _wipe_(vec2 vUV)
|
|
25
|
-
{
|
|
26
|
-
vec4 colorA = texture2D(_textureA_, vUV);
|
|
27
|
-
vec4 colorB = texture2D(_textureB_, vUV);
|
|
28
|
-
return mix(colorB, colorA, step(_mix_, vUV.y));
|
|
29
|
-
}
|
|
30
|
-
`,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* The shader bindings for the Wipe block.
|
|
37
|
-
*/
|
|
38
|
-
export class WipeShaderBinding extends DisableableShaderBinding {
|
|
39
|
-
/**
|
|
40
|
-
* Creates a new shader binding instance for the Wipe block.
|
|
41
|
-
* @param parentBlock - The parent block
|
|
42
|
-
* @param textureA - The first texture
|
|
43
|
-
* @param textureB - The second texture
|
|
44
|
-
* @param mix - The mix value between the two textures
|
|
45
|
-
*/
|
|
46
|
-
constructor(parentBlock, textureA, textureB, mix) {
|
|
47
|
-
super(parentBlock);
|
|
48
|
-
this._textureA = textureA;
|
|
49
|
-
this._textureB = textureB;
|
|
50
|
-
this._mix = mix;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Binds all the required data to the shader when rendering.
|
|
54
|
-
* @param effect - defines the effect to bind the data to
|
|
55
|
-
*/
|
|
56
|
-
bind(effect) {
|
|
57
|
-
super.bind(effect);
|
|
58
|
-
effect.setTexture(this.getRemappedName("textureA"), this._textureA.value);
|
|
59
|
-
effect.setTexture(this.getRemappedName("textureB"), this._textureB.value);
|
|
60
|
-
effect.setFloat(this.getRemappedName("mix"), this._mix.value);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* A block simulating a wipe effect to transition between two textures according to the mix value.
|
|
65
|
-
*/
|
|
66
|
-
export class WipeBlock extends DisableableShaderBlock {
|
|
67
|
-
/**
|
|
68
|
-
* Instantiates a new Block.
|
|
69
|
-
* @param smartFilter - The smart filter this block belongs to
|
|
70
|
-
* @param name - The friendly name of the block
|
|
71
|
-
*/
|
|
72
|
-
constructor(smartFilter, name) {
|
|
73
|
-
super(smartFilter, name);
|
|
74
|
-
/**
|
|
75
|
-
* The first texture connection point.
|
|
76
|
-
*/
|
|
77
|
-
this.textureA = this._registerInput("textureA", ConnectionPointType.Texture);
|
|
78
|
-
/**
|
|
79
|
-
* The second texture connection point.
|
|
80
|
-
*/
|
|
81
|
-
this.textureB = this._registerInput("textureB", ConnectionPointType.Texture);
|
|
82
|
-
/**
|
|
83
|
-
* The connection point containing the transition value between 0 (textureA) and 1 (textureB).
|
|
84
|
-
*/
|
|
85
|
-
this.mix = this._registerInput("mix", ConnectionPointType.Float);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
89
|
-
* @returns The class instance that binds the data to the effect
|
|
90
|
-
*/
|
|
91
|
-
getShaderBinding() {
|
|
92
|
-
const textureA = this._confirmRuntimeDataSupplied(this.textureA);
|
|
93
|
-
const textureB = this._confirmRuntimeDataSupplied(this.textureB);
|
|
94
|
-
const mix = this._confirmRuntimeDataSupplied(this.mix);
|
|
95
|
-
return new WipeShaderBinding(this, textureA, textureB, mix);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* The class name of the block.
|
|
100
|
-
*/
|
|
101
|
-
WipeBlock.ClassName = wipeBlockType;
|
|
102
|
-
/**
|
|
103
|
-
* The namespace of the block.
|
|
104
|
-
*/
|
|
105
|
-
WipeBlock.Namespace = babylonDemoTransitionsNamespace;
|
|
106
|
-
/**
|
|
107
|
-
* The shader program (vertex and fragment code) to use to render the block
|
|
108
|
-
*/
|
|
109
|
-
WipeBlock.ShaderCode = shaderProgram;
|
|
110
|
-
//# sourceMappingURL=wipeBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wipeBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/transitions/wipeBlock.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;AAIhF,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,KAAK,EAAE;;;aAGF;QACL,OAAO,EAAE;;;;aAIJ;QAEL,gBAAgB,EAAE,QAAQ;QAE1B,gBAAgB,EAAE,YAAY;QAE9B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE;;;;;;;aAOT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,wBAAwB;IAK3D;;;;;;OAMG;IACH,YACI,WAA8B,EAC9B,QAAkD,EAClD,QAAkD,EAClD,GAA2C;QAE3C,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IACpB,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,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC1E,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC1E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,sBAAsB;IA+BjD;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QA1B7B;;WAEG;QACa,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAExF;;WAEG;QACa,aAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAExF;;WAEG;QACa,QAAG,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAc5E,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,GAAG,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEvD,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;;AAjDD;;GAEG;AACoB,mBAAS,GAAG,aAAa,AAAhB,CAAiB;AAEjD;;GAEG;AACoB,mBAAS,GAAG,+BAA+B,AAAlC,CAAmC;AAiBnE;;GAEG;AACoB,oBAAU,GAAG,aAAa,AAAhB,CAAiB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,58 +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 PremultiplyAlpha block.
|
|
10
|
-
*/
|
|
11
|
-
export declare class PremultiplyAlphaShaderBinding extends DisableableShaderBinding {
|
|
12
|
-
private readonly _inputTexture;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new shader binding instance for the PremultiplyAlpha block.
|
|
15
|
-
* @param parentBlock - The parent block
|
|
16
|
-
* @param inputTexture - The input texture
|
|
17
|
-
*/
|
|
18
|
-
constructor(parentBlock: IDisableableBlock, inputTexture: RuntimeData<ConnectionPointType.Texture>);
|
|
19
|
-
/**
|
|
20
|
-
* Binds all the required data to the shader when rendering.
|
|
21
|
-
* @param effect - defines the effect to bind the data to
|
|
22
|
-
*/
|
|
23
|
-
bind(effect: Effect): void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A utility block that premultiplies the input texture against its alpha.
|
|
27
|
-
* This is useful for preserving transparency when the WebGL context expects colors with pre-multiplied alpha (true by default).
|
|
28
|
-
*/
|
|
29
|
-
export declare class PremultiplyAlphaBlock extends DisableableShaderBlock {
|
|
30
|
-
/**
|
|
31
|
-
* The class name of the block.
|
|
32
|
-
*/
|
|
33
|
-
static ClassName: string;
|
|
34
|
-
/**
|
|
35
|
-
* The namespace of the block.
|
|
36
|
-
*/
|
|
37
|
-
static Namespace: string;
|
|
38
|
-
/**
|
|
39
|
-
* The input texture connection point.
|
|
40
|
-
*/
|
|
41
|
-
readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
|
|
42
|
-
/**
|
|
43
|
-
* The shader program (vertex and fragment code) to use to render the block
|
|
44
|
-
*/
|
|
45
|
-
static ShaderCode: ShaderProgram;
|
|
46
|
-
/**
|
|
47
|
-
* Instantiates a new block.
|
|
48
|
-
* @param smartFilter - The smart filter this block belongs to
|
|
49
|
-
* @param name - The friendly name of the block
|
|
50
|
-
*/
|
|
51
|
-
constructor(smartFilter: SmartFilter, name: string);
|
|
52
|
-
/**
|
|
53
|
-
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
54
|
-
* @returns The class instance that binds the data to the effect
|
|
55
|
-
*/
|
|
56
|
-
getShaderBinding(): DisableableShaderBinding;
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=premultiplyAlphaBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"premultiplyAlphaBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.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;AA6B9D;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,wBAAwB;IACvE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IAEzE;;;;OAIG;gBACS,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC;IAKlG;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAI7C;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,sBAAsB;IAC7D;;OAEG;IACH,OAAuB,SAAS,SAA6B;IAE7D;;OAEG;IACH,OAAuB,SAAS,SAAiC;IAEjE;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAKtD"}
|
|
@@ -1,87 +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 { babylonDemoUtilitiesNamespace } from "../../../blockNamespaces.js";
|
|
6
|
-
import { premultiplyAlphaBlockType } from "../../../blockTypes.js";
|
|
7
|
-
const shaderProgram = {
|
|
8
|
-
fragment: {
|
|
9
|
-
uniform: `
|
|
10
|
-
uniform sampler2D _input_;
|
|
11
|
-
`,
|
|
12
|
-
mainFunctionName: "_premultiply_",
|
|
13
|
-
mainInputTexture: "_input_",
|
|
14
|
-
functions: [
|
|
15
|
-
{
|
|
16
|
-
name: "_premultiply_",
|
|
17
|
-
code: `
|
|
18
|
-
vec4 _premultiply_(vec2 vUV) {
|
|
19
|
-
vec4 color = texture2D(_input_, vUV);
|
|
20
|
-
return vec4(color.rgb * color.a, color.a);
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* The shader bindings for the PremultiplyAlpha block.
|
|
29
|
-
*/
|
|
30
|
-
export class PremultiplyAlphaShaderBinding extends DisableableShaderBinding {
|
|
31
|
-
/**
|
|
32
|
-
* Creates a new shader binding instance for the PremultiplyAlpha block.
|
|
33
|
-
* @param parentBlock - The parent block
|
|
34
|
-
* @param inputTexture - The input texture
|
|
35
|
-
*/
|
|
36
|
-
constructor(parentBlock, inputTexture) {
|
|
37
|
-
super(parentBlock);
|
|
38
|
-
this._inputTexture = inputTexture;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Binds all the required data to the shader when rendering.
|
|
42
|
-
* @param effect - defines the effect to bind the data to
|
|
43
|
-
*/
|
|
44
|
-
bind(effect) {
|
|
45
|
-
super.bind(effect);
|
|
46
|
-
effect.setTexture(this.getRemappedName("input"), this._inputTexture.value);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* A utility block that premultiplies the input texture against its alpha.
|
|
51
|
-
* This is useful for preserving transparency when the WebGL context expects colors with pre-multiplied alpha (true by default).
|
|
52
|
-
*/
|
|
53
|
-
export class PremultiplyAlphaBlock extends DisableableShaderBlock {
|
|
54
|
-
/**
|
|
55
|
-
* Instantiates a new block.
|
|
56
|
-
* @param smartFilter - The smart filter this block belongs to
|
|
57
|
-
* @param name - The friendly name of the block
|
|
58
|
-
*/
|
|
59
|
-
constructor(smartFilter, name) {
|
|
60
|
-
super(smartFilter, name);
|
|
61
|
-
/**
|
|
62
|
-
* The input texture connection point.
|
|
63
|
-
*/
|
|
64
|
-
this.input = this._registerInput("input", ConnectionPointType.Texture);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
68
|
-
* @returns The class instance that binds the data to the effect
|
|
69
|
-
*/
|
|
70
|
-
getShaderBinding() {
|
|
71
|
-
const input = this._confirmRuntimeDataSupplied(this.input);
|
|
72
|
-
return new PremultiplyAlphaShaderBinding(this, input);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The class name of the block.
|
|
77
|
-
*/
|
|
78
|
-
PremultiplyAlphaBlock.ClassName = premultiplyAlphaBlockType;
|
|
79
|
-
/**
|
|
80
|
-
* The namespace of the block.
|
|
81
|
-
*/
|
|
82
|
-
PremultiplyAlphaBlock.Namespace = babylonDemoUtilitiesNamespace;
|
|
83
|
-
/**
|
|
84
|
-
* The shader program (vertex and fragment code) to use to render the block
|
|
85
|
-
*/
|
|
86
|
-
PremultiplyAlphaBlock.ShaderCode = shaderProgram;
|
|
87
|
-
//# sourceMappingURL=premultiplyAlphaBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"premultiplyAlphaBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.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;AAIhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,OAAO,EAAE;;aAEJ;QAEL,gBAAgB,EAAE,eAAe;QAEjC,gBAAgB,EAAE,SAAS;QAE3B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;;;;;aAKT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,wBAAwB;IAGvE;;;;OAIG;IACH,YAAY,WAA8B,EAAE,YAAsD;QAC9F,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,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;IAC/E,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,sBAAsB;IAqB7D;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAhB7B;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAclF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE3D,OAAO,IAAI,6BAA6B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1D,CAAC;;AArCD;;GAEG;AACoB,+BAAS,GAAG,yBAAyB,AAA5B,CAA6B;AAE7D;;GAEG;AACoB,+BAAS,GAAG,6BAA6B,AAAhC,CAAiC;AAOjE;;GAEG;AACoB,gCAAU,GAAG,aAAa,AAAhB,CAAiB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/blocks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/blocks/index.js
DELETED
package/dist/blocks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ShaderProgram } from "../utils/shaderCodeUtils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The shader program for the block.
|
|
5
|
-
*/
|
|
6
|
-
export const shaderProgram: ShaderProgram = {
|
|
7
|
-
vertex: undefined,
|
|
8
|
-
fragment: {
|
|
9
|
-
uniform: `
|
|
10
|
-
uniform sampler2D _input_; // main`,
|
|
11
|
-
mainInputTexture: "_input_",
|
|
12
|
-
mainFunctionName: "_copy_",
|
|
13
|
-
functions: [
|
|
14
|
-
{
|
|
15
|
-
name: "_copy_",
|
|
16
|
-
code: `
|
|
17
|
-
vec4 _copy_(vec2 vUV) {
|
|
18
|
-
return texture2D(_input_, vUV);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The uniform names for this shader, to be used in the shader binding so
|
|
29
|
-
* that the names are always in sync.
|
|
30
|
-
*/
|
|
31
|
-
export const uniforms = {
|
|
32
|
-
input: "input",
|
|
33
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { ThinEngine } from "@babylonjs/core/Engines/thinEngine";
|
|
2
|
-
import type { SmartFilter } from "../smartFilter";
|
|
3
|
-
import type { BaseBlock } from "../blockFoundation";
|
|
4
|
-
import type { SmartFilterDeserializer, ISerializedBlockV1 } from "../serialization";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* An object which describes a block definition, as well as a factory for creating a new instance of the block or
|
|
8
|
-
* deserializing it
|
|
9
|
-
*/
|
|
10
|
-
export interface IBlockRegistration {
|
|
11
|
-
/**
|
|
12
|
-
* The block type of the block
|
|
13
|
-
*/
|
|
14
|
-
blockType: string;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Creates an instance of the block, either fresh or deserialized from a serialized block
|
|
18
|
-
* @param smartFilter - The smart filter to create the block for
|
|
19
|
-
* @param engine - The engine to use for creating blocks
|
|
20
|
-
* @param smartFilterDeserializer - The deserializer to use for deserializing blocks
|
|
21
|
-
* @param serializedBlock - The serialized block to deserialize, if any
|
|
22
|
-
* @returns - A promise for a new instance of the block
|
|
23
|
-
*/
|
|
24
|
-
factory?: (
|
|
25
|
-
smartFilter: SmartFilter,
|
|
26
|
-
engine: ThinEngine,
|
|
27
|
-
smartFilterDeserializer: SmartFilterDeserializer,
|
|
28
|
-
serializedBlock?: ISerializedBlockV1
|
|
29
|
-
) => Promise<BaseBlock>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The namespace of the block
|
|
33
|
-
*/
|
|
34
|
-
namespace: string;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* A tooltip for the block if displayed in an editor, for instance
|
|
38
|
-
*/
|
|
39
|
-
tooltip: string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* If true, this represents a custom block (not one that was programmatically included)
|
|
43
|
-
*/
|
|
44
|
-
isCustom?: boolean;
|
|
45
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
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 type { IBlockSerializerV1 } from "../serialization/v1/smartFilterSerialization.types.js";
|
|
5
|
-
import {
|
|
6
|
-
blackAndWhiteBlockType,
|
|
7
|
-
pixelateBlockType,
|
|
8
|
-
exposureBlockType,
|
|
9
|
-
contrastBlockType,
|
|
10
|
-
desaturateBlockType,
|
|
11
|
-
posterizeBlockType,
|
|
12
|
-
kaleidoscopeBlockType,
|
|
13
|
-
greenScreenBlockType,
|
|
14
|
-
maskBlockType,
|
|
15
|
-
particleBlockType,
|
|
16
|
-
spritesheetBlockType,
|
|
17
|
-
tintBlockType,
|
|
18
|
-
premultiplyAlphaBlockType,
|
|
19
|
-
wipeBlockType,
|
|
20
|
-
} from "../blocks/blockTypes.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Any blocks that do not need to make use of ISerializedBlockV1.data can use the default serialization and
|
|
24
|
-
* should go in this list. If the serializer needs to store additional info in ISerializedBlockV1.data (e.g.
|
|
25
|
-
* webcam source name), then it should be registered in additionalBlockSerializers below.
|
|
26
|
-
*/
|
|
27
|
-
export const blocksUsingDefaultSerialization: string[] = [
|
|
28
|
-
blackAndWhiteBlockType,
|
|
29
|
-
pixelateBlockType,
|
|
30
|
-
exposureBlockType,
|
|
31
|
-
contrastBlockType,
|
|
32
|
-
desaturateBlockType,
|
|
33
|
-
posterizeBlockType,
|
|
34
|
-
kaleidoscopeBlockType,
|
|
35
|
-
greenScreenBlockType,
|
|
36
|
-
maskBlockType,
|
|
37
|
-
particleBlockType,
|
|
38
|
-
spritesheetBlockType,
|
|
39
|
-
tintBlockType,
|
|
40
|
-
premultiplyAlphaBlockType,
|
|
41
|
-
wipeBlockType,
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Any blocks which require serializing more information than just the connections should be registered here.
|
|
46
|
-
* They should make use of the ISerializedBlockV1.data field to store this information.
|
|
47
|
-
*/
|
|
48
|
-
export const additionalBlockSerializers: IBlockSerializerV1[] = [
|
|
49
|
-
blurBlockSerializer,
|
|
50
|
-
directionalBlurBlockSerializer,
|
|
51
|
-
compositionBlockSerializer,
|
|
52
|
-
];
|