@babylonjs/smart-filters 1.0.13 → 8.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockFoundation/aggregateBlock.d.ts +3 -3
- package/dist/blockFoundation/aggregateBlock.d.ts.map +1 -1
- package/dist/blockFoundation/aggregateBlock.js +1 -2
- package/dist/blockFoundation/aggregateBlock.js.map +1 -1
- package/dist/blockFoundation/baseBlock.d.ts +2 -2
- package/dist/blockFoundation/baseBlock.d.ts.map +1 -1
- package/dist/blockFoundation/baseBlock.js +5 -6
- package/dist/blockFoundation/baseBlock.js.map +1 -1
- package/dist/blockFoundation/customAggregateBlock.d.ts.map +1 -1
- package/dist/blockFoundation/customAggregateBlock.js +2 -2
- package/dist/blockFoundation/customAggregateBlock.js.map +1 -1
- package/dist/blockFoundation/customShaderBlock.d.ts.map +1 -1
- package/dist/blockFoundation/customShaderBlock.js +4 -6
- package/dist/blockFoundation/customShaderBlock.js.map +1 -1
- package/dist/blockFoundation/disableableShaderBlock.d.ts.map +1 -1
- package/dist/blockFoundation/disableableShaderBlock.js +4 -4
- package/dist/blockFoundation/disableableShaderBlock.js.map +1 -1
- package/dist/blockFoundation/index.js +0 -2
- package/dist/blockFoundation/index.js.map +1 -1
- package/dist/blockFoundation/inputBlock.d.ts +8 -8
- package/dist/blockFoundation/inputBlock.d.ts.map +1 -1
- package/dist/blockFoundation/inputBlock.deserializer.d.ts +1 -1
- package/dist/blockFoundation/inputBlock.deserializer.d.ts.map +1 -1
- package/dist/blockFoundation/inputBlock.deserializer.js +1 -1
- package/dist/blockFoundation/inputBlock.deserializer.js.map +1 -1
- package/dist/blockFoundation/inputBlock.js +7 -7
- package/dist/blockFoundation/inputBlock.js.map +1 -1
- package/dist/blockFoundation/inputBlock.serialization.types.d.ts.map +1 -1
- package/dist/blockFoundation/inputBlock.serializer.d.ts +1 -1
- package/dist/blockFoundation/inputBlock.serializer.js +26 -28
- package/dist/blockFoundation/inputBlock.serializer.js.map +1 -1
- package/dist/blockFoundation/outputBlock.d.ts +4 -9
- package/dist/blockFoundation/outputBlock.d.ts.map +1 -1
- package/dist/blockFoundation/outputBlock.js +13 -14
- package/dist/blockFoundation/outputBlock.js.map +1 -1
- package/dist/blockFoundation/shaderBlock.d.ts +4 -4
- package/dist/blockFoundation/shaderBlock.d.ts.map +1 -1
- package/dist/blockFoundation/shaderBlock.js +13 -19
- package/dist/blockFoundation/shaderBlock.js.map +1 -1
- package/dist/blockFoundation/textureOptions.d.ts +1 -1
- package/dist/blockFoundation/textureOptions.js +1 -1
- package/dist/command/command.d.ts +1 -1
- package/dist/command/command.js +1 -1
- package/dist/command/commandBuffer.d.ts +1 -1
- package/dist/command/commandBuffer.d.ts.map +1 -1
- package/dist/command/commandBuffer.js +2 -2
- package/dist/command/commandBufferDebugger.d.ts +2 -2
- package/dist/command/commandBufferDebugger.d.ts.map +1 -1
- package/dist/command/commandBufferDebugger.js +1 -1
- package/dist/command/commandBufferDebugger.js.map +1 -1
- package/dist/command/index.d.ts +3 -1
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +5 -1
- package/dist/command/index.js.map +1 -1
- package/dist/connection/connectionPoint.d.ts +3 -3
- package/dist/connection/connectionPoint.d.ts.map +1 -1
- package/dist/connection/connectionPoint.js +2 -2
- package/dist/connection/connectionPoint.js.map +1 -1
- package/dist/connection/connectionPointCompatibilityState.d.ts +1 -1
- package/dist/connection/connectionPointCompatibilityState.js +1 -1
- package/dist/connection/connectionPointType.d.ts +3 -3
- package/dist/connection/connectionPointType.d.ts.map +1 -1
- package/dist/connection/connectionPointWithDefault.d.ts +3 -3
- package/dist/connection/connectionPointWithDefault.d.ts.map +1 -1
- package/dist/connection/connectionPointWithDefault.js.map +1 -1
- package/dist/connection/index.d.ts +2 -1
- package/dist/connection/index.d.ts.map +1 -1
- package/dist/connection/index.js +3 -3
- package/dist/connection/index.js.map +1 -1
- package/dist/editorUtils/editableInPropertyPage.d.ts +2 -2
- package/dist/editorUtils/editableInPropertyPage.d.ts.map +1 -1
- package/dist/editorUtils/editableInPropertyPage.js +2 -2
- package/dist/editorUtils/editableInPropertyPage.js.map +1 -1
- package/dist/editorUtils/index.d.ts +1 -0
- package/dist/editorUtils/index.d.ts.map +1 -1
- package/dist/editorUtils/index.js +2 -0
- package/dist/editorUtils/index.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/optimization/dependencyGraph.js.map +1 -1
- package/dist/optimization/optimizedShaderBlock.d.ts +4 -4
- package/dist/optimization/optimizedShaderBlock.d.ts.map +1 -1
- package/dist/optimization/optimizedShaderBlock.js.map +1 -1
- package/dist/optimization/smartFilterOptimizer.d.ts +2 -2
- package/dist/optimization/smartFilterOptimizer.d.ts.map +1 -1
- package/dist/optimization/smartFilterOptimizer.js +34 -57
- package/dist/optimization/smartFilterOptimizer.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/renderTargetGenerator.d.ts +1 -1
- package/dist/runtime/renderTargetGenerator.d.ts.map +1 -1
- package/dist/runtime/renderTargetGenerator.js +5 -7
- package/dist/runtime/renderTargetGenerator.js.map +1 -1
- package/dist/runtime/shaderRuntime.d.ts +7 -7
- package/dist/runtime/shaderRuntime.d.ts.map +1 -1
- package/dist/runtime/shaderRuntime.js +7 -8
- package/dist/runtime/shaderRuntime.js.map +1 -1
- package/dist/runtime/smartFilterRuntime.d.ts +3 -3
- package/dist/runtime/smartFilterRuntime.d.ts.map +1 -1
- package/dist/runtime/smartFilterRuntime.js.map +1 -1
- package/dist/runtime/strongRef.d.ts +1 -1
- package/dist/runtime/strongRef.js +1 -1
- package/dist/serialization/importCustomBlockDefinition.d.ts +1 -1
- package/dist/serialization/importCustomBlockDefinition.js +8 -9
- package/dist/serialization/importCustomBlockDefinition.js.map +1 -1
- package/dist/serialization/index.d.ts +1 -0
- package/dist/serialization/index.d.ts.map +1 -1
- package/dist/serialization/index.js +3 -0
- package/dist/serialization/index.js.map +1 -1
- package/dist/serialization/serializedBlockDefinition.d.ts +2 -2
- package/dist/serialization/serializedBlockDefinition.d.ts.map +1 -1
- package/dist/serialization/serializedShaderBlockDefinition.d.ts +1 -1
- package/dist/serialization/serializedShaderBlockDefinition.d.ts.map +1 -1
- package/dist/serialization/serializedSmartFilter.d.ts +1 -1
- package/dist/serialization/serializedSmartFilter.d.ts.map +1 -1
- package/dist/serialization/smartFilterDeserializer.d.ts +6 -6
- package/dist/serialization/smartFilterDeserializer.d.ts.map +1 -1
- package/dist/serialization/smartFilterDeserializer.js +9 -12
- package/dist/serialization/smartFilterDeserializer.js.map +1 -1
- package/dist/serialization/smartFilterSerializer.d.ts +2 -2
- package/dist/serialization/smartFilterSerializer.d.ts.map +1 -1
- package/dist/serialization/smartFilterSerializer.js +10 -13
- package/dist/serialization/smartFilterSerializer.js.map +1 -1
- package/dist/serialization/v1/defaultBlockSerializer.d.ts +2 -2
- package/dist/serialization/v1/defaultBlockSerializer.d.ts.map +1 -1
- package/dist/serialization/v1/defaultBlockSerializer.js +1 -1
- package/dist/serialization/v1/index.d.ts +1 -0
- package/dist/serialization/v1/index.d.ts.map +1 -1
- package/dist/serialization/v1/index.js +2 -0
- package/dist/serialization/v1/index.js.map +1 -1
- package/dist/serialization/v1/shaderBlockSerialization.types.d.ts +3 -3
- package/dist/serialization/v1/shaderBlockSerialization.types.d.ts.map +1 -1
- package/dist/serialization/v1/smartFilterSerialization.types.d.ts +2 -2
- package/dist/serialization/v1/smartFilterSerialization.types.d.ts.map +1 -1
- package/dist/smartFilter.d.ts +8 -8
- package/dist/smartFilter.d.ts.map +1 -1
- package/dist/smartFilter.js +6 -7
- package/dist/smartFilter.js.map +1 -1
- package/dist/utils/buildTools/buildShaders.d.ts +3 -2
- package/dist/utils/buildTools/buildShaders.d.ts.map +1 -1
- package/dist/utils/buildTools/buildShaders.js +7 -6
- package/dist/utils/buildTools/buildShaders.js.map +1 -1
- package/dist/utils/buildTools/convertGlslIntoBlock.d.ts +4 -2
- package/dist/utils/buildTools/convertGlslIntoBlock.d.ts.map +1 -1
- package/dist/utils/buildTools/convertGlslIntoBlock.js +136 -141
- package/dist/utils/buildTools/convertGlslIntoBlock.js.map +1 -1
- package/dist/utils/buildTools/convertGlslIntoShaderProgram.d.ts +4 -4
- package/dist/utils/buildTools/convertGlslIntoShaderProgram.d.ts.map +1 -1
- package/dist/utils/buildTools/convertGlslIntoShaderProgram.js +55 -48
- package/dist/utils/buildTools/convertGlslIntoShaderProgram.js.map +1 -1
- package/dist/utils/buildTools/convertShaders.d.ts +8 -5
- package/dist/utils/buildTools/convertShaders.d.ts.map +1 -1
- package/dist/utils/buildTools/convertShaders.js +38 -14
- package/dist/utils/buildTools/convertShaders.js.map +1 -1
- package/dist/utils/buildTools/shaderConverter.d.ts +4 -4
- package/dist/utils/buildTools/shaderConverter.d.ts.map +1 -1
- package/dist/utils/buildTools/shaderConverter.js +17 -21
- package/dist/utils/buildTools/shaderConverter.js.map +1 -1
- package/dist/utils/buildTools/watchShaders.d.ts +3 -2
- package/dist/utils/buildTools/watchShaders.d.ts.map +1 -1
- package/dist/utils/buildTools/watchShaders.js +10 -8
- package/dist/utils/buildTools/watchShaders.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/renderTargetUtils.d.ts +3 -3
- package/dist/utils/renderTargetUtils.d.ts.map +1 -1
- package/dist/utils/renderTargetUtils.js +4 -4
- package/dist/utils/renderTargetUtils.js.map +1 -1
- package/dist/utils/shaderCodeUtils.d.ts +8 -8
- package/dist/utils/shaderCodeUtils.d.ts.map +1 -1
- package/dist/utils/shaderCodeUtils.js +16 -28
- package/dist/utils/shaderCodeUtils.js.map +1 -1
- package/dist/utils/textureLoaders.d.ts +2 -2
- package/dist/utils/textureLoaders.d.ts.map +1 -1
- package/dist/utils/textureLoaders.js +2 -3
- package/dist/utils/textureLoaders.js.map +1 -1
- package/dist/utils/textureUtils.d.ts +5 -5
- package/dist/utils/textureUtils.d.ts.map +1 -1
- package/dist/utils/textureUtils.js +1 -1
- package/dist/utils/textureUtils.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/license.md +21 -21
- package/package.json +13 -8
- package/src/blockFoundation/aggregateBlock.ts +148 -151
- package/src/blockFoundation/baseBlock.ts +339 -364
- package/src/blockFoundation/customAggregateBlock.ts +88 -104
- package/src/blockFoundation/customShaderBlock.ts +312 -326
- package/src/blockFoundation/disableableShaderBlock.ts +91 -100
- package/src/blockFoundation/index.ts +9 -9
- package/src/blockFoundation/inputBlock.deserializer.ts +72 -97
- package/src/blockFoundation/inputBlock.serialization.types.ts +126 -132
- package/src/blockFoundation/inputBlock.serializer.ts +150 -150
- package/src/blockFoundation/inputBlock.ts +181 -192
- package/src/blockFoundation/outputBlock.ts +144 -151
- package/src/blockFoundation/shaderBlock.ts +156 -163
- package/src/blockFoundation/textureOptions.ts +57 -57
- package/src/command/command.ts +59 -59
- package/src/command/commandBuffer.ts +71 -71
- package/src/command/commandBufferDebugger.ts +14 -14
- package/src/command/index.ts +7 -3
- package/src/connection/connectionPoint.ts +205 -214
- package/src/connection/connectionPointCompatibilityState.ts +31 -31
- package/src/connection/connectionPointType.ts +45 -45
- package/src/connection/connectionPointWithDefault.ts +27 -35
- package/src/connection/index.ts +8 -9
- package/src/editorUtils/editableInPropertyPage.ts +106 -106
- package/src/editorUtils/index.ts +3 -1
- package/src/index.ts +16 -15
- package/src/optimization/dependencyGraph.ts +96 -96
- package/src/optimization/index.ts +1 -1
- package/src/optimization/optimizedShaderBlock.ts +131 -134
- package/src/optimization/smartFilterOptimizer.ts +757 -825
- package/src/runtime/index.ts +8 -6
- package/src/runtime/renderTargetGenerator.ts +222 -248
- package/src/runtime/shaderRuntime.ts +174 -173
- package/src/runtime/smartFilterRuntime.ts +112 -112
- package/src/runtime/strongRef.ts +18 -18
- package/src/serialization/importCustomBlockDefinition.ts +86 -86
- package/src/serialization/index.ts +10 -7
- package/src/serialization/serializedBlockDefinition.ts +12 -12
- package/src/serialization/serializedShaderBlockDefinition.ts +7 -7
- package/src/serialization/serializedSmartFilter.ts +6 -6
- package/src/serialization/smartFilterDeserializer.ts +190 -220
- package/src/serialization/smartFilterSerializer.ts +110 -121
- package/src/serialization/v1/defaultBlockSerializer.ts +21 -21
- package/src/serialization/v1/index.ts +4 -2
- package/src/serialization/v1/shaderBlockSerialization.types.ts +85 -85
- package/src/serialization/v1/smartFilterSerialization.types.ts +129 -133
- package/src/smartFilter.ts +255 -260
- package/src/utils/buildTools/buildShaders.ts +14 -13
- package/src/utils/buildTools/convertGlslIntoBlock.ts +370 -385
- package/src/utils/buildTools/convertGlslIntoShaderProgram.ts +173 -172
- package/src/utils/buildTools/convertShaders.ts +65 -43
- package/src/utils/buildTools/recordVersionNumber.js +17 -0
- package/src/utils/buildTools/shaderConverter.ts +466 -478
- package/src/utils/buildTools/watchShaders.ts +44 -42
- package/src/utils/index.ts +4 -2
- package/src/utils/renderTargetUtils.ts +30 -35
- package/src/utils/shaderCodeUtils.ts +192 -207
- package/src/utils/textureLoaders.ts +31 -43
- package/src/utils/textureUtils.ts +28 -32
- package/src/version.ts +2 -2
- package/dist/utils/buildTools/determineVersion.d.ts +0 -36
- package/dist/utils/buildTools/determineVersion.d.ts.map +0 -1
- package/dist/utils/buildTools/determineVersion.js +0 -109
- package/dist/utils/buildTools/determineVersion.js.map +0 -1
- package/dist/utils/buildTools/versionUp.d.ts +0 -2
- package/dist/utils/buildTools/versionUp.d.ts.map +0 -1
- package/dist/utils/buildTools/versionUp.js +0 -53
- package/dist/utils/buildTools/versionUp.js.map +0 -1
- package/src/utils/buildTools/determineVersion.ts +0 -128
- package/src/utils/buildTools/versionUp.ts +0 -61
|
@@ -6,20 +6,20 @@ import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
|
6
6
|
* @param inputBlock - The InputBlock to serialize
|
|
7
7
|
* @returns Serialized data for the InputBlock
|
|
8
8
|
*/
|
|
9
|
-
function
|
|
9
|
+
function SerializeInputBlockData(inputBlock) {
|
|
10
10
|
switch (inputBlock.type) {
|
|
11
11
|
case ConnectionPointType.Texture:
|
|
12
|
-
return
|
|
12
|
+
return SerializeTextureInputBlock(inputBlock);
|
|
13
13
|
case ConnectionPointType.Boolean:
|
|
14
|
-
return
|
|
14
|
+
return SerializeBooleanInputBlock(inputBlock);
|
|
15
15
|
case ConnectionPointType.Float:
|
|
16
|
-
return
|
|
16
|
+
return SerializeFloatInputBlock(inputBlock);
|
|
17
17
|
case ConnectionPointType.Color3:
|
|
18
|
-
return
|
|
18
|
+
return SerializeColor3InputBlock(inputBlock);
|
|
19
19
|
case ConnectionPointType.Color4:
|
|
20
|
-
return
|
|
20
|
+
return SerializeColor4InputBlock(inputBlock);
|
|
21
21
|
case ConnectionPointType.Vector2:
|
|
22
|
-
return
|
|
22
|
+
return SerializeVector2InputBlock(inputBlock);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -27,20 +27,19 @@ function serializeInputBlockData(inputBlock) {
|
|
|
27
27
|
* @param inputBlock - The Texture InputBlock to serialize
|
|
28
28
|
* @returns The serialized data for the InputBlock
|
|
29
29
|
*/
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
let url = (_c = internalTexture === null || internalTexture === void 0 ? void 0 : internalTexture.url) !== null && _c !== void 0 ? _c : null;
|
|
30
|
+
function SerializeTextureInputBlock(inputBlock) {
|
|
31
|
+
const internalTexture = inputBlock.runtimeValue.value?.getInternalTexture();
|
|
32
|
+
const forcedExtension = internalTexture?._extension ?? null;
|
|
33
|
+
let url = internalTexture?.url ?? null;
|
|
35
34
|
if (url === "" || !url) {
|
|
36
|
-
url =
|
|
35
|
+
url = inputBlock.editorData?.url ?? null;
|
|
37
36
|
}
|
|
38
37
|
return {
|
|
39
38
|
inputType: ConnectionPointType.Texture,
|
|
40
39
|
url,
|
|
41
|
-
urlTypeHint:
|
|
42
|
-
flipY:
|
|
43
|
-
anisotropicFilteringLevel:
|
|
40
|
+
urlTypeHint: inputBlock.editorData?.urlTypeHint ?? null,
|
|
41
|
+
flipY: internalTexture?.invertY ?? null,
|
|
42
|
+
anisotropicFilteringLevel: internalTexture?.anisotropicFilteringLevel ?? null,
|
|
44
43
|
forcedExtension: forcedExtension !== "" ? forcedExtension : null,
|
|
45
44
|
appMetadata: inputBlock.appMetadata,
|
|
46
45
|
};
|
|
@@ -50,7 +49,7 @@ function serializeTextureInputBlock(inputBlock) {
|
|
|
50
49
|
* @param inputBlock - The Boolean InputBlock to serialize
|
|
51
50
|
* @returns The serialized data for the InputBlock
|
|
52
51
|
*/
|
|
53
|
-
function
|
|
52
|
+
function SerializeBooleanInputBlock(inputBlock) {
|
|
54
53
|
return {
|
|
55
54
|
inputType: ConnectionPointType.Boolean,
|
|
56
55
|
value: inputBlock.runtimeValue.value,
|
|
@@ -62,15 +61,14 @@ function serializeBooleanInputBlock(inputBlock) {
|
|
|
62
61
|
* @param inputBlock - The Float InputBlock to serialize
|
|
63
62
|
* @returns The serialized data for the InputBlock
|
|
64
63
|
*/
|
|
65
|
-
function
|
|
66
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
64
|
+
function SerializeFloatInputBlock(inputBlock) {
|
|
67
65
|
return {
|
|
68
66
|
inputType: ConnectionPointType.Float,
|
|
69
67
|
value: inputBlock.runtimeValue.value,
|
|
70
|
-
animationType:
|
|
71
|
-
valueDeltaPerMs:
|
|
72
|
-
min:
|
|
73
|
-
max:
|
|
68
|
+
animationType: inputBlock.editorData?.animationType ?? null,
|
|
69
|
+
valueDeltaPerMs: inputBlock.editorData?.valueDeltaPerMs ?? null,
|
|
70
|
+
min: inputBlock.editorData?.min ?? null,
|
|
71
|
+
max: inputBlock.editorData?.max ?? null,
|
|
74
72
|
appMetadata: inputBlock.appMetadata,
|
|
75
73
|
};
|
|
76
74
|
}
|
|
@@ -79,7 +77,7 @@ function serializeFloatInputBlock(inputBlock) {
|
|
|
79
77
|
* @param inputBlock - The Color3 InputBlock to serialize
|
|
80
78
|
* @returns The serialized data for the InputBlock
|
|
81
79
|
*/
|
|
82
|
-
function
|
|
80
|
+
function SerializeColor3InputBlock(inputBlock) {
|
|
83
81
|
return {
|
|
84
82
|
inputType: ConnectionPointType.Color3,
|
|
85
83
|
value: inputBlock.runtimeValue.value,
|
|
@@ -91,7 +89,7 @@ function serializeColor3InputBlock(inputBlock) {
|
|
|
91
89
|
* @param inputBlock - The Color4 InputBlock to serialize
|
|
92
90
|
* @returns The serialized data for the InputBlock
|
|
93
91
|
*/
|
|
94
|
-
function
|
|
92
|
+
function SerializeColor4InputBlock(inputBlock) {
|
|
95
93
|
return {
|
|
96
94
|
inputType: ConnectionPointType.Color4,
|
|
97
95
|
value: inputBlock.runtimeValue.value,
|
|
@@ -103,7 +101,7 @@ function serializeColor4InputBlock(inputBlock) {
|
|
|
103
101
|
* @param inputBlock - The Vector2 InputBlock to serialize
|
|
104
102
|
* @returns The serialized data for the InputBlock
|
|
105
103
|
*/
|
|
106
|
-
function
|
|
104
|
+
function SerializeVector2InputBlock(inputBlock) {
|
|
107
105
|
return {
|
|
108
106
|
inputType: ConnectionPointType.Vector2,
|
|
109
107
|
value: inputBlock.runtimeValue.value,
|
|
@@ -113,7 +111,7 @@ function serializeVector2InputBlock(inputBlock) {
|
|
|
113
111
|
/**
|
|
114
112
|
* The V1 serializer for an InputBlock
|
|
115
113
|
*/
|
|
116
|
-
export const
|
|
114
|
+
export const InputBlockSerializer = {
|
|
117
115
|
blockType: InputBlockBase.ClassName,
|
|
118
116
|
serialize: (block) => {
|
|
119
117
|
if (block.blockType !== InputBlockBase.ClassName) {
|
|
@@ -125,7 +123,7 @@ export const inputBlockSerializer = {
|
|
|
125
123
|
blockType: InputBlockBase.ClassName,
|
|
126
124
|
namespace: null,
|
|
127
125
|
comments: block.comments,
|
|
128
|
-
data:
|
|
126
|
+
data: SerializeInputBlockData(block),
|
|
129
127
|
};
|
|
130
128
|
},
|
|
131
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputBlock.serializer.js","sourceRoot":"","sources":["../../src/blockFoundation/inputBlock.serializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAY3E;;;;;GAKG;AACH,SAAS,uBAAuB,CAAC,UAA0B;IACvD,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,mBAAmB,CAAC,OAAO;YAC5B,OAAO,0BAA0B,CAAC,UAAqD,CAAC,CAAC;QAC7F,KAAK,mBAAmB,CAAC,OAAO;YAC5B,OAAO,0BAA0B,CAAC,UAAqD,CAAC,CAAC;QAC7F,KAAK,mBAAmB,CAAC,KAAK;YAC1B,OAAO,wBAAwB,CAAC,UAAmD,CAAC,CAAC;QACzF,KAAK,mBAAmB,CAAC,MAAM;YAC3B,OAAO,yBAAyB,CAAC,UAAoD,CAAC,CAAC;QAC3F,KAAK,mBAAmB,CAAC,MAAM;YAC3B,OAAO,yBAAyB,CAAC,UAAoD,CAAC,CAAC;QAC3F,KAAK,mBAAmB,CAAC,OAAO;YAC5B,OAAO,0BAA0B,CAAC,UAAqD,CAAC,CAAC;IACjG,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,SAAS,0BAA0B,CAAC,UAAmD
|
|
1
|
+
{"version":3,"file":"inputBlock.serializer.js","sourceRoot":"","sources":["../../src/blockFoundation/inputBlock.serializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AA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O;QACH,SAAS,EAAE,mBAAmB,CAAC,OAAO;QACtC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC,KAAK;QACpC,WAAW,EAAE,UAAU,CAAC,WAAW;KACtC,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACpD,SAAS,EAAE,cAAc,CAAC,SAAS;IACnC,SAAS,EAAE,CAAC,KAAgB,EAAE,EAAE;QAC5B,IAAI,KAAK,CAAC,SAAS,KAAK,cAAc,CAAC,SAAS,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACzE,CAAC;QACD,OAAO;YACH,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS,EAAE,cAAc,CAAC,SAAS;YACnC,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,IAAI,EAAE,uBAAuB,CAAC,KAAkC,CAAC;SACpE,CAAC;IACN,CAAC;CACJ,CAAC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import type { InitializationData, SmartFilter } from "../smartFilter";
|
|
1
|
+
import type { InitializationData, SmartFilter } from "../smartFilter.js";
|
|
2
2
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
3
3
|
import { BaseBlock } from "./baseBlock.js";
|
|
4
|
-
import type { Nullable } from "@babylonjs/core/types";
|
|
5
|
-
import type { RenderTargetWrapper } from "@babylonjs/core/Engines/renderTargetWrapper";
|
|
6
|
-
import type { ShaderProgram } from "../utils/shaderCodeUtils";
|
|
7
|
-
/**
|
|
8
|
-
* The shader program for the block.
|
|
9
|
-
*/
|
|
10
|
-
export declare const shaderProgram: ShaderProgram;
|
|
4
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
5
|
+
import type { RenderTargetWrapper } from "@babylonjs/core/Engines/renderTargetWrapper.js";
|
|
11
6
|
/**
|
|
12
7
|
* The output block of a smart filter.
|
|
13
8
|
*
|
|
@@ -23,7 +18,7 @@ export declare class OutputBlock extends BaseBlock {
|
|
|
23
18
|
* Input connection point of the output block.
|
|
24
19
|
* This takes a texture as input.
|
|
25
20
|
*/
|
|
26
|
-
readonly input: import("../connection/connectionPoint").ConnectionPoint<ConnectionPointType.Texture>;
|
|
21
|
+
readonly input: import("../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
|
|
27
22
|
/**
|
|
28
23
|
* If supplied, the Smart Filter will render into this RenderTargetWrapper. Otherwise, it renders
|
|
29
24
|
* into the the canvas or WebGL context the ThinEngine is using for rendering.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputBlock.d.ts","sourceRoot":"","sources":["../../src/blockFoundation/outputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"outputBlock.d.ts","sourceRoot":"","sources":["../../src/blockFoundation/outputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,QAAQ,EAAE,iCAAsB;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,uDAA4C;AAsC/E;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,SAAS;IACtC;;OAEG;IACH,OAAuB,SAAS,SAAiB;IAEjD;;;OAGG;IACH,SAAgB,KAAK,0FAA6D;IAElF;;;OAGG;IACI,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAQ;IAEjE;;;OAGG;gBACS,WAAW,EAAE,WAAW;IAIpC;;OAEG;IACa,iBAAiB,IAAI,IAAI;IAQzC;;OAEG;IACa,oBAAoB,IAAI,IAAI;IAS5C;;;;OAIG;IACa,qCAAqC,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI;CAe5H"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
2
2
|
import { BaseBlock } from "./baseBlock.js";
|
|
3
3
|
import { ShaderBinding, ShaderRuntime } from "../runtime/shaderRuntime.js";
|
|
4
|
-
import {
|
|
4
|
+
import { RegisterFinalRenderCommand } from "../utils/renderTargetUtils.js";
|
|
5
5
|
/**
|
|
6
6
|
* The shader program for the block.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
const BlockShaderProgram = {
|
|
9
9
|
vertex: undefined,
|
|
10
10
|
fragment: {
|
|
11
|
-
uniform: `
|
|
11
|
+
uniform: `
|
|
12
12
|
uniform sampler2D _input_; // main`,
|
|
13
13
|
mainInputTexture: "_input_",
|
|
14
14
|
mainFunctionName: "_copy_",
|
|
15
15
|
functions: [
|
|
16
16
|
{
|
|
17
17
|
name: "_copy_",
|
|
18
|
-
code: `
|
|
19
|
-
vec4 _copy_(vec2 vUV) {
|
|
20
|
-
return texture2D(_input_, vUV);
|
|
21
|
-
}
|
|
22
|
-
|
|
18
|
+
code: `
|
|
19
|
+
vec4 _copy_(vec2 vUV) {
|
|
20
|
+
return texture2D(_input_, vUV);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
23
|
`,
|
|
24
24
|
},
|
|
25
25
|
],
|
|
@@ -29,7 +29,7 @@ export const shaderProgram = {
|
|
|
29
29
|
* The uniform names for this shader, to be used in the shader binding so
|
|
30
30
|
* that the names are always in sync.
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
32
|
+
const Uniforms = {
|
|
33
33
|
input: "input",
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -83,15 +83,14 @@ export class OutputBlock extends BaseBlock {
|
|
|
83
83
|
* @param finalOutput - Defines if the block is the final output of the smart filter
|
|
84
84
|
*/
|
|
85
85
|
generateCommandsAndGatherInitPromises(initializationData, finalOutput) {
|
|
86
|
-
var _a;
|
|
87
86
|
// In the case that this OutputBlock is directly connected to a texture InputBlock, we must
|
|
88
87
|
// use a shader to copy the texture to the render target texture.
|
|
89
|
-
if (
|
|
88
|
+
if (this.input.connectedTo?.ownerBlock.isInput && this.input.runtimeData) {
|
|
90
89
|
const runtime = initializationData.runtime;
|
|
91
|
-
const shaderBlockRuntime = new ShaderRuntime(runtime.effectRenderer,
|
|
90
|
+
const shaderBlockRuntime = new ShaderRuntime(runtime.effectRenderer, BlockShaderProgram, new OutputShaderBinding(this.input.runtimeData));
|
|
92
91
|
initializationData.initializationPromises.push(shaderBlockRuntime.onReadyAsync);
|
|
93
92
|
runtime.registerResource(shaderBlockRuntime);
|
|
94
|
-
|
|
93
|
+
RegisterFinalRenderCommand(this, runtime, this, shaderBlockRuntime);
|
|
95
94
|
super.generateCommandsAndGatherInitPromises(initializationData, finalOutput);
|
|
96
95
|
}
|
|
97
96
|
}
|
|
@@ -118,7 +117,7 @@ class OutputShaderBinding extends ShaderBinding {
|
|
|
118
117
|
* @internal
|
|
119
118
|
*/
|
|
120
119
|
bind(effect) {
|
|
121
|
-
effect.setTexture(this.getRemappedName(
|
|
120
|
+
effect.setTexture(this.getRemappedName(Uniforms.input), this._inputTexture.value);
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
//# sourceMappingURL=outputBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputBlock.js","sourceRoot":"","sources":["../../src/blockFoundation/outputBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+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,CAAC,MAAc;QAC/B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACtF,CAAC;CACJ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@babylonjs/core/Engines/Extensions/engine.renderTarget.js";
|
|
2
|
-
import type { InitializationData, SmartFilter } from "../smartFilter";
|
|
3
|
-
import type { ShaderProgram } from "../utils/shaderCodeUtils";
|
|
4
|
-
import type { ShaderBinding } from "../runtime/shaderRuntime";
|
|
5
|
-
import type { ConnectionPoint } from "../connection/connectionPoint";
|
|
2
|
+
import type { InitializationData, SmartFilter } from "../smartFilter.js";
|
|
3
|
+
import type { ShaderProgram } from "../utils/shaderCodeUtils.js";
|
|
4
|
+
import type { ShaderBinding } from "../runtime/shaderRuntime.js";
|
|
5
|
+
import type { ConnectionPoint } from "../connection/connectionPoint.js";
|
|
6
6
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
7
7
|
import { BaseBlock } from "./baseBlock.js";
|
|
8
8
|
import { type OutputTextureOptions } from "./textureOptions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaderBlock.d.ts","sourceRoot":"","sources":["../../src/blockFoundation/shaderBlock.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"shaderBlock.d.ts","sourceRoot":"","sources":["../../src/blockFoundation/shaderBlock.ts"],"names":[],"mappings":"AACA,mEAAwD;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAA8B,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAM5F;;;;;;GAMG;AACH,8BAAsB,WAAY,SAAQ,SAAS;IAC/C;;OAEG;IACH,OAAuB,SAAS,SAAiB;IAEjD;;;;OAIG;aACa,gBAAgB,IAAI,aAAa;IAEjD;;OAEG;IACH,OAAc,UAAU,EAAE,aAAa,CAAC;IAExC;;OAEG;IACH,SAAgB,MAAM,+CAA+D;IAErF;;OAEG;IAyBI,oBAAoB,EAAE,oBAAoB,CAI/C;IAEF;;;OAGG;IACa,mBAAmB,CAAC,uBAAuB,CAAC,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC,EAAE,GAAG,IAAI;IASzG,SAAS,CAAC,iCAAiC,IAAI,eAAe;IAc9D;;;;;OAKG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,UAAQ;IAI/E;;;OAGG;IACI,gBAAgB;IAIvB;;;;OAIG;IACa,qCAAqC,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI;CAuB5H"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
1
|
+
import { __decorate } from "@babylonjs/core/tslib.es6.js";
|
|
7
2
|
import "@babylonjs/core/Engines/Extensions/engine.renderTarget.js";
|
|
8
3
|
import { ShaderRuntime } from "../runtime/shaderRuntime.js";
|
|
9
4
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { CreateCommand } from "../command/command.js";
|
|
6
|
+
import { UndecorateSymbol } from "../utils/shaderCodeUtils.js";
|
|
7
|
+
import { RegisterFinalRenderCommand } from "../utils/renderTargetUtils.js";
|
|
13
8
|
import { BaseBlock } from "./baseBlock.js";
|
|
14
9
|
import { TextureFormat, TextureType } from "./textureOptions.js";
|
|
15
|
-
import {
|
|
10
|
+
import { EditableInPropertyPage, PropertyTypeForEdition } from "../editorUtils/editableInPropertyPage.js";
|
|
16
11
|
const OutputTexturePropertiesGroupName = "OUTPUT TEXTURE PROPERTIES";
|
|
17
12
|
/**
|
|
18
13
|
* This is the base class for all shader blocks.
|
|
@@ -29,7 +24,7 @@ export class ShaderBlock extends BaseBlock {
|
|
|
29
24
|
disconnectFromGraph(disconnectedConnections) {
|
|
30
25
|
const input = this._getConnectionForMainInputTexture();
|
|
31
26
|
for (const endpoint of this.output.endpoints) {
|
|
32
|
-
disconnectedConnections
|
|
27
|
+
disconnectedConnections?.push([endpoint, this.output]);
|
|
33
28
|
input.connectTo(endpoint);
|
|
34
29
|
}
|
|
35
30
|
}
|
|
@@ -38,7 +33,7 @@ export class ShaderBlock extends BaseBlock {
|
|
|
38
33
|
if (!mainInputTextureName) {
|
|
39
34
|
throw `The block named "${this.name}" does not have a main input texture defined!`;
|
|
40
35
|
}
|
|
41
|
-
const mainInputTexture = this.findInput(
|
|
36
|
+
const mainInputTexture = this.findInput(UndecorateSymbol(mainInputTextureName));
|
|
42
37
|
if (!mainInputTexture || !mainInputTexture.connectedTo) {
|
|
43
38
|
throw `The main input texture "${mainInputTextureName}" of block named "${this.name}" is not connected!`;
|
|
44
39
|
}
|
|
@@ -78,20 +73,19 @@ export class ShaderBlock extends BaseBlock {
|
|
|
78
73
|
* @param finalOutput - Defines if the block is the final output of the smart filter
|
|
79
74
|
*/
|
|
80
75
|
generateCommandsAndGatherInitPromises(initializationData, finalOutput) {
|
|
81
|
-
var _a;
|
|
82
76
|
const runtime = initializationData.runtime;
|
|
83
77
|
const shaderBlockRuntime = new ShaderRuntime(runtime.effectRenderer, this.getShaderProgram(), this.getShaderBinding());
|
|
84
78
|
initializationData.initializationPromises.push(shaderBlockRuntime.onReadyAsync);
|
|
85
79
|
runtime.registerResource(shaderBlockRuntime);
|
|
86
80
|
if (finalOutput) {
|
|
87
|
-
|
|
81
|
+
RegisterFinalRenderCommand(initializationData.outputBlock, runtime, this, shaderBlockRuntime);
|
|
88
82
|
}
|
|
89
83
|
else {
|
|
90
|
-
const renderTargetTexture =
|
|
84
|
+
const renderTargetTexture = this.output.runtimeData?.value;
|
|
91
85
|
if (!renderTargetTexture) {
|
|
92
86
|
throw new Error(`${this.blockType} did not have a render target texture.`);
|
|
93
87
|
}
|
|
94
|
-
runtime.registerCommand(
|
|
88
|
+
runtime.registerCommand(CreateCommand(`${this.blockType}.render`, this, () => {
|
|
95
89
|
shaderBlockRuntime.renderToTargetTexture(renderTargetTexture);
|
|
96
90
|
}));
|
|
97
91
|
}
|
|
@@ -103,13 +97,13 @@ export class ShaderBlock extends BaseBlock {
|
|
|
103
97
|
*/
|
|
104
98
|
ShaderBlock.ClassName = "ShaderBlock";
|
|
105
99
|
__decorate([
|
|
106
|
-
|
|
100
|
+
EditableInPropertyPage("Ratio", PropertyTypeForEdition.Float, OutputTexturePropertiesGroupName, {
|
|
107
101
|
min: 0.1,
|
|
108
102
|
max: 10.0,
|
|
109
103
|
notifiers: { rebuild: true },
|
|
110
104
|
subPropertyName: "ratio",
|
|
111
105
|
}),
|
|
112
|
-
|
|
106
|
+
EditableInPropertyPage("Format", PropertyTypeForEdition.List, OutputTexturePropertiesGroupName, {
|
|
113
107
|
notifiers: { rebuild: true },
|
|
114
108
|
subPropertyName: "format",
|
|
115
109
|
options: [
|
|
@@ -118,7 +112,7 @@ __decorate([
|
|
|
118
112
|
{ label: "RGBA", value: TextureFormat.RGBA },
|
|
119
113
|
],
|
|
120
114
|
}),
|
|
121
|
-
|
|
115
|
+
EditableInPropertyPage("Type", PropertyTypeForEdition.List, OutputTexturePropertiesGroupName, {
|
|
122
116
|
notifiers: { rebuild: true },
|
|
123
117
|
subPropertyName: "type",
|
|
124
118
|
options: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaderBlock.js","sourceRoot":"","sources":["../../src/blockFoundation/shaderBlock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shaderBlock.js","sourceRoot":"","sources":["../../src/blockFoundation/shaderBlock.ts"],"names":[],"mappings":";AACA,mEAAwD;AAMxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,WAAW,EAA6B,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAG1G,MAAM,gCAAgC,GAAG,2BAA2B,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,OAAgB,WAAY,SAAQ,SAAS;IAwD/C;;;OAGG;IACa,mBAAmB,CAAC,uBAA8D;QAC9F,MAAM,KAAK,GAAG,IAAI,CAAC,iCAAiC,EAAE,CAAC;QAEvD,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC3C,uBAAuB,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,CA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AAE,IAAI,EAAE;QAC5B,eAAe,EAAE,QAAQ;QACzB,OAAO,EAAE;YACL,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE;YACtC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,EAAE;YACxC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE;SAC/C;KACJ,CAAC;IACD,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,CAAC,IAAI,EAAE,gCAAgC,EAAE;QAC3F,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QAC5B,eAAe,EAAE,MAAM;QACvB,OAAO,EAAE;YACL,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE;YACpD,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE;YAC5C,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,EAAE;SACzD;KACJ,CAAC;yDAKA"}
|
|
@@ -43,5 +43,5 @@ export type OutputTextureOptions = {
|
|
|
43
43
|
* @param b - The second OutputTextureOptions
|
|
44
44
|
* @returns True if the two options match, false otherwise
|
|
45
45
|
*/
|
|
46
|
-
export declare function
|
|
46
|
+
export declare function TextureOptionsMatch(a: OutputTextureOptions | undefined, b: OutputTextureOptions | undefined): boolean;
|
|
47
47
|
//# sourceMappingURL=textureOptions.d.ts.map
|
|
@@ -28,7 +28,7 @@ export var TextureType;
|
|
|
28
28
|
* @param b - The second OutputTextureOptions
|
|
29
29
|
* @returns True if the two options match, false otherwise
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function TextureOptionsMatch(a, b) {
|
|
32
32
|
if (a === undefined || b === undefined) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
@@ -44,5 +44,5 @@ export type Command = {
|
|
|
44
44
|
* @param action - The action to execute when the command is executed
|
|
45
45
|
* @returns The new command
|
|
46
46
|
*/
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function CreateCommand(name: string, owner: ICommandOwner, action: CommandAction): Command;
|
|
48
48
|
//# sourceMappingURL=command.d.ts.map
|
package/dist/command/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandBuffer.d.ts","sourceRoot":"","sources":["../../src/command/commandBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"commandBuffer.d.ts","sourceRoot":"","sources":["../../src/command/commandBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAUzD;;;GAGG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAE3C;;;OAGG;gBACS,GAAG,IAAI,EAAE,OAAO,EAAE;IAM9B;;;OAGG;IACI,IAAI,CAAC,OAAO,EAAE,OAAO;IAI5B;;OAEG;IACI,KAAK;IAIZ;;;OAGG;IACI,aAAa,CAAC,cAAc,EAAE,eAAe,GAAG,IAAI;IAM3D;;OAEG;IACI,OAAO;IAId;;OAEG;IACI,OAAO;CAGjB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @see CommandsVisitor used to execute the commands of a @see CommandBuffer.
|
|
3
3
|
* @param command - The command to execute.
|
|
4
4
|
*/
|
|
5
|
-
function
|
|
5
|
+
function ExecuteCommandsVisitor(command) {
|
|
6
6
|
command.action();
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
@@ -46,7 +46,7 @@ export class CommandBuffer {
|
|
|
46
46
|
* Execute all the commands in the command buffer.
|
|
47
47
|
*/
|
|
48
48
|
execute() {
|
|
49
|
-
this.visitCommands(
|
|
49
|
+
this.visitCommands(ExecuteCommandsVisitor);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Dispose the resources associated to the command buffer.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CommandBuffer } from "./commandBuffer";
|
|
1
|
+
import type { CommandBuffer } from "./commandBuffer.js";
|
|
2
2
|
/**
|
|
3
3
|
* Logs all the commands associated to a command buffer.
|
|
4
4
|
* @param commandBuffer - The command buffer to log
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function LogCommands(commandBuffer: Readonly<CommandBuffer>): void;
|
|
7
7
|
//# sourceMappingURL=commandBufferDebugger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandBufferDebugger.d.ts","sourceRoot":"","sources":["../../src/command/commandBufferDebugger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"commandBufferDebugger.d.ts","sourceRoot":"","sources":["../../src/command/commandBufferDebugger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,QAMjE"}
|
|
@@ -3,7 +3,7 @@ import { Logger } from "@babylonjs/core/Misc/logger.js";
|
|
|
3
3
|
* Logs all the commands associated to a command buffer.
|
|
4
4
|
* @param commandBuffer - The command buffer to log
|
|
5
5
|
*/
|
|
6
|
-
export function
|
|
6
|
+
export function LogCommands(commandBuffer) {
|
|
7
7
|
Logger.Log("----- Command buffer commands -----");
|
|
8
8
|
commandBuffer.visitCommands((command) => {
|
|
9
9
|
Logger.Log(` Owner: ${command.owner.blockType} (${command.owner.name}) - Command: ${command.name}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandBufferDebugger.js","sourceRoot":"","sources":["../../src/command/commandBufferDebugger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"commandBufferDebugger.js","sourceRoot":"","sources":["../../src/command/commandBufferDebugger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,uCAA4B;AAG7C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,aAAsC;IAC9D,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAClD,aAAa,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,MAAM,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,gBAAgB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACzG,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AACtD,CAAC"}
|
package/dist/command/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./command.js";
|
|
2
|
+
export { CreateCommand as createCommand } from "./command.js";
|
|
2
3
|
export * from "./commandBuffer.js";
|
|
3
|
-
export {
|
|
4
|
+
export { LogCommands } from "./commandBufferDebugger.js";
|
|
5
|
+
export { LogCommands as logCommands } from "./commandBufferDebugger.js";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/command/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from "./command.js";
|
|
2
|
+
// Back compat for when camelCase was used
|
|
3
|
+
export { CreateCommand as createCommand } from "./command.js";
|
|
2
4
|
export * from "./commandBuffer.js";
|
|
3
|
-
export {
|
|
5
|
+
export { LogCommands } from "./commandBufferDebugger.js";
|
|
6
|
+
// Back compat for when camelCase was used
|
|
7
|
+
export { LogCommands as logCommands } from "./commandBufferDebugger.js";
|
|
4
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,0CAA0C;AAC1C,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,0CAA0C;AAC1C,OAAO,EAAE,WAAW,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Nullable } from "@babylonjs/core/types";
|
|
1
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
2
2
|
import { ConnectionPointCompatibilityState } from "./connectionPointCompatibilityState.js";
|
|
3
3
|
import { ConnectionPointDirection } from "./connectionPointDirection.js";
|
|
4
4
|
import type { BaseBlock } from "../blockFoundation/baseBlock.js";
|
|
5
|
-
import type { ConnectionPointType, ConnectionPointValue } from "./connectionPointType";
|
|
6
|
-
import type { StrongRef } from "../runtime/strongRef";
|
|
5
|
+
import type { ConnectionPointType, ConnectionPointValue } from "./connectionPointType.js";
|
|
6
|
+
import type { StrongRef } from "../runtime/strongRef.js";
|
|
7
7
|
/**
|
|
8
8
|
* This represents a strong reference to the data being passed through a connection point.
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionPoint.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"connectionPoint.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iCAAsB;AAC9C,OAAO,EAAE,iCAAiC,EAAgC,MAAM,wCAAwC,CAAC;AACzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,mBAAmB,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5F;;;;;;;;;GASG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB;IAC5E;;;OAGG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,SAAgB,IAAI,EAAE,CAAC,CAAC;IAExB;;OAEG;IACH,SAAgB,SAAS,EAAE,wBAAwB,CAAC;IAEpD;;OAEG;IACH,SAAgB,UAAU,EAAE,SAAS,CAAC;IAEtC;;OAEG;IACI,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAQ;IAE5C;;;;OAIG;IACI,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAQ;IAEpD;;OAEG;IACH,SAAgB,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAQ;IAEpE,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,UAAU,CAAiC;IAEnD;;;;;;;OAOG;gBACS,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,kBAAkB,GAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAQ;IASlJ;;;;;OAKG;IACH,IAAW,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAErD;IAED;;;;;OAKG;IACH,IAAW,SAAS,IAAI,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAExD;IAED;;;;OAIG;IACI,uBAAuB,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,iCAAiC;IAwB5F;;;;OAIG;IACI,YAAY,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;IAIvD;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAmBjD;;;OAGG;IACI,cAAc,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAczD;;OAEG;IACI,sBAAsB,IAAI,IAAI;IAQrC;;OAEG;IACI,oBAAoB,IAAI,IAAI;CAStC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConnectionPointCompatibilityState,
|
|
1
|
+
import { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
|
|
2
2
|
import { ConnectionPointDirection } from "./connectionPointDirection.js";
|
|
3
3
|
/**
|
|
4
4
|
* This defines a connection point.
|
|
@@ -107,7 +107,7 @@ export class ConnectionPoint {
|
|
|
107
107
|
// Check compatibility
|
|
108
108
|
const compatibility = this.checkCompatibilityState(other);
|
|
109
109
|
if (compatibility !== ConnectionPointCompatibilityState.Compatible) {
|
|
110
|
-
throw
|
|
110
|
+
throw GetCompatibilityIssueMessage(compatibility);
|
|
111
111
|
}
|
|
112
112
|
// Adds the connection point to the list of endpoints
|
|
113
113
|
this._endpoints.push(other);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionPoint.js","sourceRoot":"","sources":["../../src/connection/connectionPoint.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"connectionPoint.js","sourceRoot":"","sources":["../../src/connection/connectionPoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAUzE;;;;;;;;;GASG;AACH,MAAM,OAAO,eAAe;IA0CxB;;;;;;;OAOG;IACH,YAAY,IAAY,EAAE,UAAqB,EAAE,IAAO,EAAE,SAAmC,EAAE,qBAA+C,IAAI;QA5BlJ;;WAEG;QACI,gBAAW,GAAqB,IAAI,CAAC;QAE5C;;;;WAIG;QACI,gBAAW,GAA6B,IAAI,CAAC;QAEpD;;WAEG;QACa,uBAAkB,GAA6B,IAAI,CAAC;QAE5D,iBAAY,GAAiC,IAAI,CAAC;QAClD,eAAU,GAA8B,EAAE,CAAC;QAW/C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,WAAW,GAAG,kB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ilityState {
|
|
|
16
16
|
* @param state - Defines the compatibility state
|
|
17
17
|
* @returns the message associated with a compatibility state.
|
|
18
18
|
*/
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function GetCompatibilityIssueMessage(state: ConnectionPointCompatibilityState): string;
|
|
20
20
|
//# sourceMappingURL=connectionPointCompatibilityState.d.ts.map
|
|
@@ -17,7 +17,7 @@ export var ConnectionPointCompatibilityState;
|
|
|
17
17
|
* @param state - Defines the compatibility state
|
|
18
18
|
* @returns the message associated with a compatibility state.
|
|
19
19
|
*/
|
|
20
|
-
export function
|
|
20
|
+
export function GetCompatibilityIssueMessage(state) {
|
|
21
21
|
switch (state) {
|
|
22
22
|
case ConnectionPointCompatibilityState.TypeIncompatible:
|
|
23
23
|
return "Cannot connect two different connection types";
|