@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ThinTexture } from "@babylonjs/core/Materials/Textures/thinTexture";
|
|
2
|
-
import type { IColor3Like, IColor4Like, IVector2Like } from "@babylonjs/core/Maths/math.like";
|
|
3
|
-
import type { Nullable } from "@babylonjs/core/types";
|
|
1
|
+
import type { ThinTexture } from "@babylonjs/core/Materials/Textures/thinTexture.js";
|
|
2
|
+
import type { IColor3Like, IColor4Like, IVector2Like } from "@babylonjs/core/Maths/math.like.js";
|
|
3
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Defines the type of a connection point.
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionPointType.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"connectionPointType.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,0DAA+C;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,2CAAgC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,iCAAsB;AAE9C;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,YAAY;IACZ,KAAK,IAAI;IACT,cAAc;IACd,OAAO,IAAI;IACX,aAAa;IACb,MAAM,IAAI;IACV,aAAa;IACb,MAAM,IAAI;IACV,cAAc;IACd,OAAO,IAAI;IACX,cAAc;IACd,OAAO,IAAI;CACd;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC7B,mBAAmB,CAAC,KAAK,GACzB,mBAAmB,CAAC,OAAO,GAC3B,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,MAAM,GAC1B,mBAAmB,CAAC,OAAO,GAC3B,mBAAmB,CAAC,OAAO,CAAC;AAElC;;GAEG;AAEH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAChF,CAAC,SAAS,mBAAmB,CAAC,KAAK,GAAG,MAAM,GAC5C,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,GAC7D,CAAC,SAAS,mBAAmB,CAAC,MAAM,GAAG,WAAW,GAClD,CAAC,SAAS,mBAAmB,CAAC,MAAM,GAAG,WAAW,GAClD,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,OAAO,GAC/C,CAAC,SAAS,mBAAmB,CAAC,OAAO,GAAG,YAAY,GACpD,KAAK,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BaseBlock } from "../blockFoundation/baseBlock";
|
|
1
|
+
import type { BaseBlock } from "../blockFoundation/baseBlock.js";
|
|
2
2
|
import { ConnectionPoint, type RuntimeData } from "./connectionPoint.js";
|
|
3
|
-
import type { ConnectionPointDirection } from "./connectionPointDirection";
|
|
4
|
-
import type { ConnectionPointType } from "./connectionPointType";
|
|
3
|
+
import type { ConnectionPointDirection } from "./connectionPointDirection.js";
|
|
4
|
+
import type { ConnectionPointType } from "./connectionPointType.js";
|
|
5
5
|
/**
|
|
6
6
|
* A ConnectionPoint whose runtimeData is never null - if not hooked up to a connection, it will use a default value.
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionPointWithDefault.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"connectionPointWithDefault.d.ts","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AACH,qBAAa,0BAA0B,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACnH;;OAEG;IACa,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAE5C;;;;;;;OAOG;gBACS,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;CAI7H"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectionPointWithDefault.js","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAoB,MAAM,sBAAsB,CAAC;AAIzE;;GAEG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"connectionPointWithDefault.js","sourceRoot":"","sources":["../../src/connection/connectionPointWithDefault.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAoB,MAAM,sBAAsB,CAAC;AAIzE;;GAEG;AACH,MAAM,OAAO,0BAAgF,SAAQ,eAAkB;IAMnH;;;;;;;OAOG;IACH,YAAY,IAAY,EAAE,UAAqB,EAAE,IAAO,EAAE,SAAmC,EAAE,WAA2B;QACtH,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { ConnectionPointDirection } from "./connectionPointDirection.js";
|
|
2
2
|
export { ConnectionPointType } from "./connectionPointType.js";
|
|
3
3
|
export { type ConnectionPointValue } from "./connectionPointType.js";
|
|
4
|
-
export { ConnectionPointCompatibilityState,
|
|
4
|
+
export { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
|
|
5
|
+
export { GetCompatibilityIssueMessage as getCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
|
|
5
6
|
export { ConnectionPoint } from "./connectionPoint.js";
|
|
6
7
|
export { type RuntimeData } from "./connectionPoint.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEzH,OAAO,EAAE,4BAA4B,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/connection/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ConnectionPointDirection } from "./connectionPointDirection.js";
|
|
2
2
|
export { ConnectionPointType } from "./connectionPointType.js";
|
|
3
|
-
export {} from "./
|
|
4
|
-
|
|
3
|
+
export { ConnectionPointCompatibilityState, GetCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
|
|
4
|
+
// Back compat for when camelCase was used
|
|
5
|
+
export { GetCompatibilityIssueMessage as getCompatibilityIssueMessage } from "./connectionPointCompatibilityState.js";
|
|
5
6
|
export { ConnectionPoint } from "./connectionPoint.js";
|
|
6
|
-
export {} from "./connectionPoint.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACzH,0CAA0C;AAC1C,OAAO,EAAE,4BAA4B,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Observable } from "@babylonjs/core/Misc/observable";
|
|
1
|
+
import type { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
2
2
|
/**
|
|
3
3
|
* Enum defining the type of properties that can be edited in the property pages in the node editor
|
|
4
4
|
*/
|
|
@@ -76,5 +76,5 @@ export interface IPropertyDescriptionForEdition {
|
|
|
76
76
|
* @param options - the options of the property
|
|
77
77
|
* @returns the decorator
|
|
78
78
|
*/
|
|
79
|
-
export declare function
|
|
79
|
+
export declare function EditableInPropertyPage(displayName: string, propertyType?: PropertyTypeForEdition, groupName?: string, options?: IEditablePropertyOption): (target: any, propertyKey: string) => void;
|
|
80
80
|
//# sourceMappingURL=editableInPropertyPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableInPropertyPage.d.ts","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"editableInPropertyPage.d.ts","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,2CAAgC;AAE1D;;GAEG;AACH,oBAAY,sBAAsB;IAC9B,4BAA4B;IAC5B,OAAO,IAAA;IACP,0BAA0B;IAC1B,KAAK,IAAA;IACL,wBAAwB;IACxB,GAAG,IAAA;IACH,4BAA4B;IAC5B,OAAO,IAAA;IACP,mCAAmC;IACnC,IAAI,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,gBAAgB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,CAAC,EAAE;QACR,mCAAmC;QACnC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,oCAAoC;QACpC,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,wFAAwF;QACxF,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,4BAA4B;QAC5B,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;QAC5C,wJAAwJ;QACxJ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;KAChE,CAAC;IACF,wDAAwD;IACxD,OAAO,CAAC,EAAE,2BAA2B,EAAE,GAAG,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IACpF,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,IAAI,EAAE,sBAAsB,CAAC;IAC7B,+GAA+G;IAC/G,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,OAAO,EAAE,uBAAuB,CAAC;IACjC,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,sBAAuD,EACrE,SAAS,GAAE,MAAqB,EAChC,OAAO,CAAC,EAAE,uBAAuB,YAEjB,GAAG,eAAe,MAAM,UAgB3C"}
|
|
@@ -22,7 +22,7 @@ export var PropertyTypeForEdition;
|
|
|
22
22
|
* @param options - the options of the property
|
|
23
23
|
* @returns the decorator
|
|
24
24
|
*/
|
|
25
|
-
export function
|
|
25
|
+
export function EditableInPropertyPage(displayName, propertyType = PropertyTypeForEdition.Boolean, groupName = "PROPERTIES", options) {
|
|
26
26
|
return (target, propertyKey) => {
|
|
27
27
|
let propStore = target._propStore;
|
|
28
28
|
if (!propStore) {
|
|
@@ -34,7 +34,7 @@ export function editableInPropertyPage(displayName, propertyType = PropertyTypeF
|
|
|
34
34
|
displayName: displayName,
|
|
35
35
|
type: propertyType,
|
|
36
36
|
groupName: groupName,
|
|
37
|
-
options: options
|
|
37
|
+
options: options ?? {},
|
|
38
38
|
className: target.constructor.name,
|
|
39
39
|
});
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editableInPropertyPage.js","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,4BAA4B;IAC5B,yEAAO,CAAA;IACP,0BAA0B;IAC1B,qEAAK,CAAA;IACL,wBAAwB;IACxB,iEAAG,CAAA;IACH,4BAA4B;IAC5B,yEAAO,CAAA;IACP,mCAAmC;IACnC,mEAAI,CAAA;AACR,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC;AA2DD;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAClC,WAAmB,EACnB,eAAuC,sBAAsB,CAAC,OAAO,EACrE,YAAoB,YAAY,EAChC,OAAiC;IAEjC,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QACxC,IAAI,SAAS,GAAqC,MAAM,CAAC,UAAU,CAAC;QACpE,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,SAAS,GAAG,EAAE,CAAC;YACf,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;QAClC,CAAC;QAED,SAAS,CAAC,IAAI,CAAC;YACX,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"editableInPropertyPage.js","sourceRoot":"","sources":["../../src/editorUtils/editableInPropertyPage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAC9B,4BAA4B;IAC5B,yEAAO,CAAA;IACP,0BAA0B;IAC1B,qEAAK,CAAA;IACL,wBAAwB;IACxB,iEAAG,CAAA;IACH,4BAA4B;IAC5B,yEAAO,CAAA;IACP,mCAAmC;IACnC,mEAAI,CAAA;AACR,CAAC,EAXW,sBAAsB,KAAtB,sBAAsB,QAWjC;AA2DD;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAClC,WAAmB,EACnB,eAAuC,sBAAsB,CAAC,OAAO,EACrE,YAAoB,YAAY,EAChC,OAAiC;IAEjC,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QACxC,IAAI,SAAS,GAAqC,MAAM,CAAC,UAAU,CAAC;QACpE,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,SAAS,GAAG,EAAE,CAAC;YACf,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;QAClC,CAAC;QAED,SAAS,CAAC,IAAI,CAAC;YACX,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,YAAY;YAClB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO,IAAI,EAAE;YACtB,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI;SACrC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/editorUtils/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,0CAA0C;AAC1C,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,MAAM,EAAE,uCAA4B"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable import/no-internal-modules */
|
|
1
2
|
export * from "./command/index.js";
|
|
2
3
|
export * from "./connection/index.js";
|
|
3
4
|
export * from "./blockFoundation/index.js";
|
|
@@ -6,7 +7,6 @@ export * from "./optimization/index.js";
|
|
|
6
7
|
export * from "./runtime/index.js";
|
|
7
8
|
export * from "./serialization/index.js";
|
|
8
9
|
export * from "./utils/index.js";
|
|
9
|
-
export {} from "./IDisposable.js";
|
|
10
10
|
export { SmartFilter } from "./smartFilter.js";
|
|
11
11
|
export * from "./version.js";
|
|
12
12
|
// So that users of the Smart Filters core can easily modify the logger settings (e.g. to change the logging level)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AACxE,cAAc,cAAc,CAAC;AAE7B,mHAAmH;AACnH,OAAO,EAAE,MAAM,EAAE,uCAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencyGraph.js","sourceRoot":"","sources":["../../src/optimization/dependencyGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"dependencyGraph.js","sourceRoot":"","sources":["../../src/optimization/dependencyGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,uCAA4B;AAE7C;;GAEG;AACH,MAAM,OAAO,eAAe;IAKxB;;OAEG;IACH;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;IACjC,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,OAAU;QACxB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,+BAA+B,CAAC,CAAC;QACxE,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,OAAU,EAAE,UAAa;QAC1C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACpC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,QAA8B;QACtC,MAAM,OAAO,GAAQ,EAAE,CAAC;QAExB,+CAA+C;QAC/C,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACtB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC;QAED,iDAAiD;QACjD,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC;YAEjC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAElB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAE3B,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACjD,IAAI,UAAU,EAAE,CAAC;gBACb,KAAK,MAAM,gBAAgB,IAAI,UAAU,EAAE,CAAC;oBACxC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;oBAE1D,IAAI,YAAY,EAAE,CAAC;wBACf,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;wBAE7B,IAAI,YAAY,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;4BAC1B,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;wBACnC,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACrD,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Effect } from "@babylonjs/core/Materials/effect";
|
|
2
|
-
import type { SmartFilter } from "../smartFilter";
|
|
3
|
-
import type { ShaderProgram } from "../utils/shaderCodeUtils";
|
|
4
|
-
import type { RuntimeData } from "../connection/connectionPoint";
|
|
1
|
+
import type { Effect } from "@babylonjs/core/Materials/effect.js";
|
|
2
|
+
import type { SmartFilter } from "../smartFilter.js";
|
|
3
|
+
import type { ShaderProgram } from "../utils/shaderCodeUtils.js";
|
|
4
|
+
import type { RuntimeData } from "../connection/connectionPoint.js";
|
|
5
5
|
import { ShaderBlock } from "../blockFoundation/shaderBlock.js";
|
|
6
6
|
import { ShaderBinding } from "../runtime/shaderRuntime.js";
|
|
7
7
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizedShaderBlock.d.ts","sourceRoot":"","sources":["../../src/optimization/optimizedShaderBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"optimizedShaderBlock.d.ts","sourceRoot":"","sources":["../../src/optimization/optimizedShaderBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,4CAAiC;AAGvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACrD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,cAAc,CAA+D;IAErF;;;;OAIG;gBACS,cAAc,EAAE,aAAa,EAAE,EAAE,aAAa,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;KAAE;IAOxH;;;;;OAKG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAW5E;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACjD,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,cAAc,CAAoE;IAC1F,OAAO,CAAC,cAAc,CAAgB;IAEtC;;OAEG;IACH,OAAuB,SAAS,SAA0B;IAE1D;;OAEG;IACH,IAAoB,OAAO,IAAI,OAAO,CAErC;IAED;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAOlD;;;OAGG;IACa,gBAAgB,IAAI,aAAa;IAIjD;;;OAGG;IACI,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAI3D;;;OAGG;IACI,iBAAiB,CAAC,cAAc,EAAE,aAAa,EAAE,GAAG,IAAI;IAI/D;;;OAGG;IACI,gBAAgB,IAAI,aAAa;CAmB3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimizedShaderBlock.js","sourceRoot":"","sources":["../../src/optimization/optimizedShaderBlock.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,aAAa;IAIrD;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"optimizedShaderBlock.js","sourceRoot":"","sources":["../../src/optimization/optimizedShaderBlock.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,aAAa;IAIrD;;;;OAIG;IACH,YAAY,cAA+B,EAAE,aAA2E;QACpH,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACa,IAAI,CAAC,MAAc,EAAE,KAAa,EAAE,MAAc;QAC9D,KAAK,MAAM,aAAa,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YAC/C,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC9C,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACrC,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAC1C,wEAAwE;YACxE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,OAAQ,CAAC,KAAK,CAAC,CAAC;QAClE,CAAC;IACL,CAAC;CACJ;AAED;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAUjD;;OAEG;IACH,IAAoB,OAAO;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QArB3B,mBAAc,GAAiE,EAAE,CAAC;QAuBtF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,cAAc,GAAG,SAAgB,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACa,gBAAgB;QAC5B,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,gBAAgB,CAAC,aAA4B;QAChD,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACxC,CAAC;IAED;;;OAGG;IACI,iBAAiB,CAAC,cAA+B;QACpD,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,IAAI,IAAI,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAChD,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YAExB,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAmB,CAAC,OAAO,EAAE,CAAC;gBAC7C;;;mBAGG;gBACH,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,WAAuD,CAAC;YAC9F,CAAC;QACL,CAAC;QAED,OAAO,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IACjF,CAAC;;AAtED;;GAEG;AACoB,8BAAS,GAAG,sBAAsB,AAAzB,CAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Nullable } from "@babylonjs/core/types";
|
|
2
|
-
import type { ConnectionPoint } from "../connection/connectionPoint";
|
|
1
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
2
|
+
import type { ConnectionPoint } from "../connection/connectionPoint.js";
|
|
3
3
|
import { SmartFilter } from "../smartFilter.js";
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartFilterOptimizer.d.ts","sourceRoot":"","sources":["../../src/optimization/smartFilterOptimizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"smartFilterOptimizer.d.ts","sourceRoot":"","sources":["../../src/optimization/smartFilterOptimizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iCAAsB;AAG9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAIxE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqDhD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;OAEG;IACH,iBAAiB,EAAE,eAAe,EAAE,CAAC;IAErC;;OAEG;IACH,qBAAqB,EAAE,eAAe,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,WAAW,CAAmB;IACtC,OAAO,CAAC,iBAAiB,CAAwC;IACjE,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,sBAAsB,CAAwC;IAEtE,OAAO,CAAC,kBAAkB,CAAkC;IAC5D,OAAO,CAAC,gBAAgB,CAA6B;IACrD,OAAO,CAAC,wBAAwB,CAAqC;IACrE,OAAO,CAAC,uBAAuB,CAAkC;IACjE,OAAO,CAAC,gBAAgB,CAA0D;IAClF,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,4BAA4B,CAAmC;IACvE,OAAO,CAAC,iBAAiB,CAAkB;IAE3C;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,4BAA4B;IAQ5E;;;OAGG;IACI,QAAQ,IAAI,QAAQ,CAAC,WAAW,CAAC;IA8DxC,OAAO,CAAC,yBAAyB;IAoBjC,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,eAAe;IAyCvB,OAAO,CAAC,uBAAuB;IA4D/B,OAAO,CAAC,iBAAiB;IAgEzB,OAAO,CAAC,qBAAqB;IAsC7B,OAAO,CAAC,eAAe;IAoBvB,OAAO,CAAC,cAAc;IAiJtB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,aAAa;IAmHrB;;;;;;;;OAQG;IACH,OAAO,CAAC,wBAAwB;CAWnC"}
|
|
@@ -2,14 +2,14 @@ import { Logger } from "@babylonjs/core/Misc/logger.js";
|
|
|
2
2
|
import { SmartFilter } from "../smartFilter.js";
|
|
3
3
|
import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
4
4
|
import { ShaderBlock } from "../blockFoundation/shaderBlock.js";
|
|
5
|
-
import {
|
|
5
|
+
import { IsTextureInputBlock } from "../blockFoundation/inputBlock.js";
|
|
6
6
|
import { OptimizedShaderBlock } from "./optimizedShaderBlock.js";
|
|
7
|
-
import { AutoDisableMainInputColorName,
|
|
7
|
+
import { AutoDisableMainInputColorName, DecorateChar, DecorateSymbol, GetShaderFragmentCode, UndecorateSymbol } from "../utils/shaderCodeUtils.js";
|
|
8
8
|
import { DependencyGraph } from "./dependencyGraph.js";
|
|
9
9
|
import { DisableableShaderBlock, BlockDisableStrategy } from "../blockFoundation/disableableShaderBlock.js";
|
|
10
|
-
import {
|
|
10
|
+
import { TextureOptionsMatch } from "../blockFoundation/textureOptions.js";
|
|
11
11
|
const GetDefineRegEx = /^\S*#define\s+(\w+).*$/; // Matches a #define statement line, capturing its decorated or undecorated name
|
|
12
|
-
const
|
|
12
|
+
const ShowDebugData = false;
|
|
13
13
|
/**
|
|
14
14
|
* Optimizes a smart filter by aggregating blocks whenever possible, to reduce the number of draw calls.
|
|
15
15
|
*/
|
|
@@ -45,8 +45,7 @@ export class SmartFilterOptimizer {
|
|
|
45
45
|
this._blockToStackItem = new Map();
|
|
46
46
|
let newSmartFilter = null;
|
|
47
47
|
this._sourceSmartFilter._workWithAggregateFreeGraph(() => {
|
|
48
|
-
if (this._sourceSmartFilter.output.connectedTo &&
|
|
49
|
-
!isTextureInputBlock(this._sourceSmartFilter.output.connectedTo.ownerBlock)) {
|
|
48
|
+
if (this._sourceSmartFilter.output.connectedTo && !IsTextureInputBlock(this._sourceSmartFilter.output.connectedTo.ownerBlock)) {
|
|
50
49
|
const connectionsToReconnect = [];
|
|
51
50
|
if (this._options.removeDisabledBlocks) {
|
|
52
51
|
// Need to propagate runtime data to ensure we can tell if a block is disabled
|
|
@@ -56,7 +55,7 @@ export class SmartFilterOptimizer {
|
|
|
56
55
|
}
|
|
57
56
|
newSmartFilter = new SmartFilter(this._sourceSmartFilter.name + " - optimized");
|
|
58
57
|
// We must recheck isTextureInputBlock because all shader blocks may have been disconnected by the previous code
|
|
59
|
-
if (!
|
|
58
|
+
if (!IsTextureInputBlock(this._sourceSmartFilter.output.connectedTo.ownerBlock)) {
|
|
60
59
|
// Make sure all the connections in the graph have a runtimeData associated to them
|
|
61
60
|
// Note that the value of the runtimeData may not be set yet, we just need the objects to be created and propagated correctly
|
|
62
61
|
this._sourceSmartFilter.output.ownerBlock.prepareForRuntime();
|
|
@@ -133,22 +132,19 @@ export class SmartFilterOptimizer {
|
|
|
133
132
|
}
|
|
134
133
|
for (const define of defines) {
|
|
135
134
|
const match = define.match(GetDefineRegEx);
|
|
136
|
-
const defName = match
|
|
135
|
+
const defName = match?.[1];
|
|
137
136
|
if (!match || !defName) {
|
|
138
137
|
continue;
|
|
139
138
|
}
|
|
140
139
|
// See if we have already processed this define for this block type
|
|
141
|
-
const existingRemapped = this._remappedSymbols.find((s) => s.type === "define" &&
|
|
142
|
-
s.name === defName &&
|
|
143
|
-
s.owners[0] &&
|
|
144
|
-
s.owners[0].blockType === block.blockType);
|
|
140
|
+
const existingRemapped = this._remappedSymbols.find((s) => s.type === "define" && s.name === defName && s.owners[0] && s.owners[0].blockType === block.blockType);
|
|
145
141
|
let newDefName;
|
|
146
142
|
if (existingRemapped) {
|
|
147
143
|
newDefName = existingRemapped.remappedName;
|
|
148
144
|
}
|
|
149
145
|
else {
|
|
150
146
|
// Add the new define to the remapped symbols list
|
|
151
|
-
newDefName =
|
|
147
|
+
newDefName = DecorateSymbol(this._makeSymbolUnique(UndecorateSymbol(defName)));
|
|
152
148
|
this._remappedSymbols.push({
|
|
153
149
|
type: "define",
|
|
154
150
|
name: defName,
|
|
@@ -164,7 +160,6 @@ export class SmartFilterOptimizer {
|
|
|
164
160
|
return code;
|
|
165
161
|
}
|
|
166
162
|
_processHelperFunctions(block, code) {
|
|
167
|
-
var _a;
|
|
168
163
|
const functions = block.getShaderProgram().fragment.functions;
|
|
169
164
|
if (functions.length === 1) {
|
|
170
165
|
// There's only the main function, so we don't need to do anything
|
|
@@ -176,19 +171,12 @@ export class SmartFilterOptimizer {
|
|
|
176
171
|
if (funcName === block.getShaderProgram().fragment.mainFunctionName) {
|
|
177
172
|
continue;
|
|
178
173
|
}
|
|
179
|
-
funcName =
|
|
180
|
-
const regexFindCurName = new RegExp(
|
|
181
|
-
const existingFunctionExactOverload = this._remappedSymbols.find((s) => s.type === "function" &&
|
|
182
|
-
|
|
183
|
-
s.params === func.params &&
|
|
184
|
-
s.owners[0] &&
|
|
185
|
-
s.owners[0].blockType === block.blockType);
|
|
186
|
-
const existingFunction = this._remappedSymbols.find((s) => s.type === "function" &&
|
|
187
|
-
s.name === funcName &&
|
|
188
|
-
s.owners[0] &&
|
|
189
|
-
s.owners[0].blockType === block.blockType);
|
|
174
|
+
funcName = UndecorateSymbol(funcName);
|
|
175
|
+
const regexFindCurName = new RegExp(DecorateSymbol(funcName), "g");
|
|
176
|
+
const existingFunctionExactOverload = this._remappedSymbols.find((s) => s.type === "function" && s.name === funcName && s.params === func.params && s.owners[0] && s.owners[0].blockType === block.blockType);
|
|
177
|
+
const existingFunction = this._remappedSymbols.find((s) => s.type === "function" && s.name === funcName && s.owners[0] && s.owners[0].blockType === block.blockType);
|
|
190
178
|
// Get or create the remapped name, ignoring the parameter list
|
|
191
|
-
const newVarName =
|
|
179
|
+
const newVarName = existingFunction?.remappedName ?? DecorateSymbol(this._makeSymbolUnique(funcName));
|
|
192
180
|
// If the function name, regardless of params, wasn't found, add the rename mapping to our list
|
|
193
181
|
if (!existingFunction) {
|
|
194
182
|
replaceFuncNames.push([regexFindCurName, newVarName]);
|
|
@@ -218,7 +206,7 @@ export class SmartFilterOptimizer {
|
|
|
218
206
|
if (!declarations) {
|
|
219
207
|
return [code, []];
|
|
220
208
|
}
|
|
221
|
-
let rex = `${varDecl}\\s+(\\S+)\\s+${
|
|
209
|
+
let rex = `${varDecl}\\s+(\\S+)\\s+${DecorateChar}(\\w+)${DecorateChar}\\s*`;
|
|
222
210
|
if (hasValue) {
|
|
223
211
|
rex += "=\\s*(.+);";
|
|
224
212
|
}
|
|
@@ -235,13 +223,10 @@ export class SmartFilterOptimizer {
|
|
|
235
223
|
const varValue = hasValue ? match[3] : null;
|
|
236
224
|
let newVarName = null;
|
|
237
225
|
if (varType === "sampler2D") {
|
|
238
|
-
samplerList.push(
|
|
226
|
+
samplerList.push(DecorateSymbol(varName));
|
|
239
227
|
}
|
|
240
228
|
else {
|
|
241
|
-
const existingRemapped = this._remappedSymbols.find((s) => s.type === varDecl &&
|
|
242
|
-
s.name === varName &&
|
|
243
|
-
s.owners[0] &&
|
|
244
|
-
s.owners[0].blockType === block.blockType);
|
|
229
|
+
const existingRemapped = this._remappedSymbols.find((s) => s.type === varDecl && s.name === varName && s.owners[0] && s.owners[0].blockType === block.blockType);
|
|
245
230
|
if (existingRemapped && singleInstance) {
|
|
246
231
|
newVarName = existingRemapped.remappedName;
|
|
247
232
|
if (varDecl === "uniform") {
|
|
@@ -249,7 +234,7 @@ export class SmartFilterOptimizer {
|
|
|
249
234
|
}
|
|
250
235
|
}
|
|
251
236
|
else {
|
|
252
|
-
newVarName =
|
|
237
|
+
newVarName = DecorateSymbol(this._makeSymbolUnique(varName));
|
|
253
238
|
this._remappedSymbols.push({
|
|
254
239
|
type: varDecl,
|
|
255
240
|
name: varName,
|
|
@@ -261,14 +246,14 @@ export class SmartFilterOptimizer {
|
|
|
261
246
|
}
|
|
262
247
|
}
|
|
263
248
|
if (newVarName) {
|
|
264
|
-
code = code.replace(new RegExp(
|
|
249
|
+
code = code.replace(new RegExp(DecorateSymbol(varName), "g"), newVarName);
|
|
265
250
|
}
|
|
266
251
|
match = rx.exec(declarations);
|
|
267
252
|
}
|
|
268
253
|
return [code, samplerList];
|
|
269
254
|
}
|
|
270
255
|
_processSampleTexture(block, code, sampler, samplers, inputTextureBlock) {
|
|
271
|
-
const rx = new RegExp(`sampleTexture\\s*\\(\\s*${
|
|
256
|
+
const rx = new RegExp(`sampleTexture\\s*\\(\\s*${DecorateChar}${sampler}${DecorateChar}\\s*,\\s*(.*?)\\s*\\)`);
|
|
272
257
|
let newSamplerName = sampler;
|
|
273
258
|
const existingRemapped = this._remappedSymbols.find((s) => s.type === "sampler" && s.inputBlock && s.inputBlock === inputTextureBlock);
|
|
274
259
|
if (existingRemapped) {
|
|
@@ -276,7 +261,7 @@ export class SmartFilterOptimizer {
|
|
|
276
261
|
newSamplerName = existingRemapped.remappedName;
|
|
277
262
|
}
|
|
278
263
|
else {
|
|
279
|
-
newSamplerName =
|
|
264
|
+
newSamplerName = DecorateSymbol(this._makeSymbolUnique(newSamplerName));
|
|
280
265
|
this._remappedSymbols.push({
|
|
281
266
|
type: "sampler",
|
|
282
267
|
name: sampler,
|
|
@@ -292,10 +277,7 @@ export class SmartFilterOptimizer {
|
|
|
292
277
|
let match = rx.exec(code);
|
|
293
278
|
while (match !== null) {
|
|
294
279
|
const uv = match[1];
|
|
295
|
-
code =
|
|
296
|
-
code.substring(0, match.index) +
|
|
297
|
-
`texture2D(${newSamplerName}, ${uv})` +
|
|
298
|
-
code.substring(match.index + match[0].length);
|
|
280
|
+
code = code.substring(0, match.index) + `texture2D(${newSamplerName}, ${uv})` + code.substring(match.index + match[0].length);
|
|
299
281
|
match = rx.exec(code);
|
|
300
282
|
}
|
|
301
283
|
return code;
|
|
@@ -308,7 +290,7 @@ export class SmartFilterOptimizer {
|
|
|
308
290
|
if (block.getShaderProgram().vertex !== this._vertexShaderCode) {
|
|
309
291
|
return false;
|
|
310
292
|
}
|
|
311
|
-
if (!
|
|
293
|
+
if (!TextureOptionsMatch(block.outputTextureOptions, this._currentOutputTextureOptions)) {
|
|
312
294
|
return false;
|
|
313
295
|
}
|
|
314
296
|
}
|
|
@@ -317,7 +299,6 @@ export class SmartFilterOptimizer {
|
|
|
317
299
|
// Processes a block given one of its output connection point
|
|
318
300
|
// Returns the name of the main function in the shader code
|
|
319
301
|
_optimizeBlock(optimizedBlock, outputConnectionPoint, samplers) {
|
|
320
|
-
var _a;
|
|
321
302
|
const block = outputConnectionPoint.ownerBlock;
|
|
322
303
|
if (block instanceof ShaderBlock) {
|
|
323
304
|
if (this._currentOutputTextureOptions === undefined) {
|
|
@@ -328,14 +309,14 @@ export class SmartFilterOptimizer {
|
|
|
328
309
|
throw new Error(`Shader program not found for block "${block.name}"!`);
|
|
329
310
|
}
|
|
330
311
|
// We get the shader code of the main function only
|
|
331
|
-
let code =
|
|
332
|
-
this._vertexShaderCode =
|
|
312
|
+
let code = GetShaderFragmentCode(shaderProgram, true);
|
|
313
|
+
this._vertexShaderCode = this._vertexShaderCode ?? shaderProgram.vertex;
|
|
333
314
|
// Generates a unique name for the fragment main function (if not already generated)
|
|
334
315
|
const shaderFuncName = shaderProgram.fragment.mainFunctionName;
|
|
335
316
|
let newShaderFuncName = this._blockToMainFunctionName.get(block);
|
|
336
317
|
if (!newShaderFuncName) {
|
|
337
|
-
newShaderFuncName =
|
|
338
|
-
newShaderFuncName =
|
|
318
|
+
newShaderFuncName = UndecorateSymbol(shaderFuncName);
|
|
319
|
+
newShaderFuncName = DecorateSymbol(this._makeSymbolUnique(newShaderFuncName));
|
|
339
320
|
this._blockToMainFunctionName.set(block, newShaderFuncName);
|
|
340
321
|
this._dependencyGraph.addElement(newShaderFuncName);
|
|
341
322
|
}
|
|
@@ -359,7 +340,7 @@ export class SmartFilterOptimizer {
|
|
|
359
340
|
samplerList.push(...additionalSamplers);
|
|
360
341
|
// Processes the texture inputs
|
|
361
342
|
for (const sampler of samplerList) {
|
|
362
|
-
const samplerName =
|
|
343
|
+
const samplerName = UndecorateSymbol(sampler);
|
|
363
344
|
const input = block.findInput(samplerName);
|
|
364
345
|
if (!input) {
|
|
365
346
|
// No connection point found corresponding to this texture: it must be a texture used internally by the filter (here we are assuming that the shader code is not bugged!)
|
|
@@ -371,12 +352,11 @@ export class SmartFilterOptimizer {
|
|
|
371
352
|
throw `The connection point corresponding to the input named "${samplerName}" in block named "${block.name}" is not connected!`;
|
|
372
353
|
}
|
|
373
354
|
// If we are using the AutoSample strategy, we must preprocess the code that samples the texture
|
|
374
|
-
if (block instanceof DisableableShaderBlock &&
|
|
375
|
-
block.blockDisableStrategy === BlockDisableStrategy.AutoSample) {
|
|
355
|
+
if (block instanceof DisableableShaderBlock && block.blockDisableStrategy === BlockDisableStrategy.AutoSample) {
|
|
376
356
|
code = this._applyAutoSampleStrategy(code, sampler);
|
|
377
357
|
}
|
|
378
358
|
const parentBlock = input.connectedTo.ownerBlock;
|
|
379
|
-
if (
|
|
359
|
+
if (IsTextureInputBlock(parentBlock)) {
|
|
380
360
|
// input is connected to an InputBlock of type "Texture": we must directly sample a texture
|
|
381
361
|
code = this._processSampleTexture(block, code, samplerName, samplers, parentBlock);
|
|
382
362
|
}
|
|
@@ -423,10 +403,7 @@ export class SmartFilterOptimizer {
|
|
|
423
403
|
let match = rx.exec(code);
|
|
424
404
|
while (match !== null) {
|
|
425
405
|
const uv = match[1];
|
|
426
|
-
code =
|
|
427
|
-
code.substring(0, match.index) +
|
|
428
|
-
`${parentFuncName}(${uv})` +
|
|
429
|
-
code.substring(match.index + match[0].length);
|
|
406
|
+
code = code.substring(0, match.index) + `${parentFuncName}(${uv})` + code.substring(match.index + match[0].length);
|
|
430
407
|
match = rx.exec(code);
|
|
431
408
|
}
|
|
432
409
|
}
|
|
@@ -505,14 +482,14 @@ export class SmartFilterOptimizer {
|
|
|
505
482
|
switch (s.type) {
|
|
506
483
|
case "uniform":
|
|
507
484
|
case "sampler":
|
|
508
|
-
shaderBinding.addShaderVariableRemapping(
|
|
485
|
+
shaderBinding.addShaderVariableRemapping(DecorateSymbol(s.name), s.remappedName);
|
|
509
486
|
break;
|
|
510
487
|
}
|
|
511
488
|
}
|
|
512
489
|
}
|
|
513
490
|
// Builds and sets the final shader code
|
|
514
491
|
code = codeFunctions + code;
|
|
515
|
-
if (
|
|
492
|
+
if (ShowDebugData) {
|
|
516
493
|
code = code.replace(/^ {16}/gm, "");
|
|
517
494
|
code = code.replace(/\r/g, "");
|
|
518
495
|
code = code.replace(/\n(\n)*/g, "\n");
|
|
@@ -563,7 +540,7 @@ export class SmartFilterOptimizer {
|
|
|
563
540
|
isFirstMatch = false;
|
|
564
541
|
return match;
|
|
565
542
|
}
|
|
566
|
-
return
|
|
543
|
+
return DecorateSymbol(AutoDisableMainInputColorName);
|
|
567
544
|
});
|
|
568
545
|
}
|
|
569
546
|
}
|