@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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateCommand } from "../command/command.js";
|
|
2
2
|
/**
|
|
3
3
|
* Registers the final command of the command queue - the one that draws to either the canvas or
|
|
4
4
|
* renderTargetTexture.
|
|
@@ -7,15 +7,15 @@ import { createCommand } from "../command/command.js";
|
|
|
7
7
|
* @param commandOwner - The owner of the command.
|
|
8
8
|
* @param shaderBlockRuntime - The shader block runtime to use.
|
|
9
9
|
*/
|
|
10
|
-
export function
|
|
10
|
+
export function RegisterFinalRenderCommand(outputBlock, runtime, commandOwner, shaderBlockRuntime) {
|
|
11
11
|
const commandOwnerBlockType = commandOwner.blockType;
|
|
12
12
|
if (outputBlock.renderTargetWrapper) {
|
|
13
|
-
runtime.registerCommand(
|
|
13
|
+
runtime.registerCommand(CreateCommand(`${commandOwnerBlockType}.renderToFinalTexture`, commandOwner, () => {
|
|
14
14
|
shaderBlockRuntime.renderToTargetWrapper(outputBlock);
|
|
15
15
|
}));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
|
-
runtime.registerCommand(
|
|
18
|
+
runtime.registerCommand(CreateCommand(`${commandOwnerBlockType}.renderToCanvas`, commandOwner, () => {
|
|
19
19
|
shaderBlockRuntime.renderToCanvas();
|
|
20
20
|
}));
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderTargetUtils.js","sourceRoot":"","sources":["../../src/utils/renderTargetUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,
|
|
1
|
+
{"version":3,"file":"renderTargetUtils.js","sourceRoot":"","sources":["../../src/utils/renderTargetUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CAAC,WAAwB,EAAE,OAAmC,EAAE,YAAuB,EAAE,kBAAiC;IAChK,MAAM,qBAAqB,GAAG,YAAY,CAAC,SAAS,CAAC;IACrD,IAAI,WAAW,CAAC,mBAAmB,EAAE,CAAC;QAClC,OAAO,CAAC,eAAe,CACnB,aAAa,CAAC,GAAG,qBAAqB,uBAAuB,EAAE,YAAY,EAAE,GAAG,EAAE;YAC9E,kBAAkB,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;QAC1D,CAAC,CAAC,CACL,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,eAAe,CACnB,aAAa,CAAC,GAAG,qBAAqB,iBAAiB,EAAE,YAAY,EAAE,GAAG,EAAE;YACxE,kBAAkB,CAAC,cAAc,EAAE,CAAC;QACxC,CAAC,CAAC,CACL,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Effect } from "@babylonjs/core/Materials/effect";
|
|
2
|
-
import type { ShaderCode } from "./buildTools/shaderCode.types";
|
|
1
|
+
import type { Effect } from "@babylonjs/core/Materials/effect.js";
|
|
2
|
+
import type { ShaderCode } from "./buildTools/shaderCode.types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The shader code decorator.
|
|
5
5
|
* Used to decorate the names of uniform, function and const variables for easier parsing.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const DecorateChar = "_";
|
|
8
8
|
/**
|
|
9
9
|
* Describes a shader program.
|
|
10
10
|
*/
|
|
@@ -62,30 +62,30 @@ export declare const DisableUniform = "disabled";
|
|
|
62
62
|
* Injects the disable uniform and adds a check for it at the beginning of the main function
|
|
63
63
|
* @param shaderProgram - The shader program to inject the disable feature into
|
|
64
64
|
*/
|
|
65
|
-
export declare function
|
|
65
|
+
export declare function InjectAutoSampleDisableCode(shaderProgram: ShaderProgram): void;
|
|
66
66
|
/**
|
|
67
67
|
* Gets the shader fragment code.
|
|
68
68
|
* @param shaderProgram - The shader program to extract the code from.
|
|
69
69
|
* @param mainCodeOnly - If true, only the main function code will be returned.
|
|
70
70
|
* @returns The shader fragment code.
|
|
71
71
|
*/
|
|
72
|
-
export declare function
|
|
72
|
+
export declare function GetShaderFragmentCode(shaderProgram: ShaderProgram, mainCodeOnly?: boolean): string;
|
|
73
73
|
/**
|
|
74
74
|
* Gets the shader creation options from a shader program.
|
|
75
75
|
* @param shaderProgram - The shader program to build the create options from.
|
|
76
76
|
* @returns The shader creation options.
|
|
77
77
|
*/
|
|
78
|
-
export declare function
|
|
78
|
+
export declare function GetShaderCreateOptions(shaderProgram: ShaderProgram): ShaderCreationOptions;
|
|
79
79
|
/**
|
|
80
80
|
* Decorates a symbol (uniform, function or const) name.
|
|
81
81
|
* @param symbol - The symbol to decorate.
|
|
82
82
|
* @returns The decorated symbol.
|
|
83
83
|
*/
|
|
84
|
-
export declare function
|
|
84
|
+
export declare function DecorateSymbol(symbol: string): string;
|
|
85
85
|
/**
|
|
86
86
|
* Undecorates a symbol (uniform, function or const) name.
|
|
87
87
|
* @param symbol - The symbol to undecorate.
|
|
88
88
|
* @returns The undecorated symbol. Throws an error if the symbol is not decorated.
|
|
89
89
|
*/
|
|
90
|
-
export declare function
|
|
90
|
+
export declare function UndecorateSymbol(symbol: string): string;
|
|
91
91
|
//# sourceMappingURL=shaderCodeUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaderCodeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/shaderCodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"shaderCodeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/shaderCodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,4CAAiC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC;;GAEG;AACH,MAA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the names of uniform, function and const variables for easier parsing.
|
|
4
4
|
*/
|
|
5
|
-
export const
|
|
5
|
+
export const DecorateChar = "_";
|
|
6
6
|
export const AutoDisableMainInputColorName = "autoMainInputColor";
|
|
7
7
|
export const DisableUniform = "disabled";
|
|
8
8
|
/**
|
|
9
9
|
* Injects the disable uniform and adds a check for it at the beginning of the main function
|
|
10
10
|
* @param shaderProgram - The shader program to inject the disable feature into
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
12
|
+
export function InjectAutoSampleDisableCode(shaderProgram) {
|
|
13
13
|
const shaderFragment = shaderProgram.fragment;
|
|
14
14
|
// Inject the disable uniform
|
|
15
|
-
shaderFragment.uniform += `\nuniform bool ${
|
|
15
|
+
shaderFragment.uniform += `\nuniform bool ${DecorateSymbol(DisableUniform)};`;
|
|
16
16
|
// Find the main function
|
|
17
17
|
const mainFunction = shaderFragment.functions.find((f) => f.name === shaderFragment.mainFunctionName);
|
|
18
18
|
if (!mainFunction) {
|
|
@@ -23,9 +23,9 @@ export function injectAutoSampleDisableCode(shaderProgram) {
|
|
|
23
23
|
throw new Error(`Main input texture not found when trying to inject auto disable into ${shaderFragment.mainFunctionName}`);
|
|
24
24
|
}
|
|
25
25
|
// Inject the code
|
|
26
|
-
const autoDisableVariableName =
|
|
27
|
-
mainFunction.code = mainFunction.code.replace("{", `{\n vec4 ${autoDisableVariableName} = texture2D(${shaderFragment.mainInputTexture}, vUV);\n
|
|
28
|
-
if (${
|
|
26
|
+
const autoDisableVariableName = DecorateSymbol(AutoDisableMainInputColorName);
|
|
27
|
+
mainFunction.code = mainFunction.code.replace("{", `{\n vec4 ${autoDisableVariableName} = texture2D(${shaderFragment.mainInputTexture}, vUV);\n
|
|
28
|
+
if (${DecorateSymbol(DisableUniform)}) return ${autoDisableVariableName};\n`);
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Gets the shader fragment code.
|
|
@@ -33,15 +33,9 @@ export function injectAutoSampleDisableCode(shaderProgram) {
|
|
|
33
33
|
* @param mainCodeOnly - If true, only the main function code will be returned.
|
|
34
34
|
* @returns The shader fragment code.
|
|
35
35
|
*/
|
|
36
|
-
export function
|
|
37
|
-
var _a, _b;
|
|
36
|
+
export function GetShaderFragmentCode(shaderProgram, mainCodeOnly = false) {
|
|
38
37
|
const shaderFragment = shaderProgram.fragment;
|
|
39
|
-
const declarations = (
|
|
40
|
-
"\n" +
|
|
41
|
-
shaderFragment.uniform +
|
|
42
|
-
"\n" +
|
|
43
|
-
((_b = shaderFragment.uniformSingle) !== null && _b !== void 0 ? _b : "") +
|
|
44
|
-
"\n";
|
|
38
|
+
const declarations = (shaderFragment.const ?? "") + "\n" + shaderFragment.uniform + "\n" + (shaderFragment.uniformSingle ?? "") + "\n";
|
|
45
39
|
let mainFunctionCode = "";
|
|
46
40
|
let otherFunctionsCode = "";
|
|
47
41
|
for (let i = 0; i < shaderFragment.functions.length; ++i) {
|
|
@@ -63,11 +57,10 @@ export function getShaderFragmentCode(shaderProgram, mainCodeOnly = false) {
|
|
|
63
57
|
* @param shaderProgram - The shader program to build the create options from.
|
|
64
58
|
* @returns The shader creation options.
|
|
65
59
|
*/
|
|
66
|
-
export function
|
|
67
|
-
var _a;
|
|
60
|
+
export function GetShaderCreateOptions(shaderProgram) {
|
|
68
61
|
const shaderFragment = shaderProgram.fragment;
|
|
69
|
-
let code =
|
|
70
|
-
const uniforms = shaderFragment.uniform + "\n" + (
|
|
62
|
+
let code = GetShaderFragmentCode(shaderProgram);
|
|
63
|
+
const uniforms = shaderFragment.uniform + "\n" + (shaderFragment.uniformSingle ?? "");
|
|
71
64
|
const uniformNames = [];
|
|
72
65
|
const samplerNames = [];
|
|
73
66
|
const rx = new RegExp(`uniform\\s+(\\S+)\\s+(\\w+)\\s*;`, "g");
|
|
@@ -83,12 +76,7 @@ export function getShaderCreateOptions(shaderProgram) {
|
|
|
83
76
|
}
|
|
84
77
|
match = rx.exec(uniforms);
|
|
85
78
|
}
|
|
86
|
-
code =
|
|
87
|
-
"varying vec2 vUV;\n" +
|
|
88
|
-
code +
|
|
89
|
-
"\nvoid main(void) {\ngl_FragColor = " +
|
|
90
|
-
shaderFragment.mainFunctionName +
|
|
91
|
-
"(vUV);\n}";
|
|
79
|
+
code = "varying vec2 vUV;\n" + code + "\nvoid main(void) {\ngl_FragColor = " + shaderFragment.mainFunctionName + "(vUV);\n}";
|
|
92
80
|
const options = {
|
|
93
81
|
name: shaderFragment.mainFunctionName,
|
|
94
82
|
fragmentShader: code,
|
|
@@ -106,16 +94,16 @@ export function getShaderCreateOptions(shaderProgram) {
|
|
|
106
94
|
* @param symbol - The symbol to decorate.
|
|
107
95
|
* @returns The decorated symbol.
|
|
108
96
|
*/
|
|
109
|
-
export function
|
|
110
|
-
return
|
|
97
|
+
export function DecorateSymbol(symbol) {
|
|
98
|
+
return DecorateChar + symbol + DecorateChar;
|
|
111
99
|
}
|
|
112
100
|
/**
|
|
113
101
|
* Undecorates a symbol (uniform, function or const) name.
|
|
114
102
|
* @param symbol - The symbol to undecorate.
|
|
115
103
|
* @returns The undecorated symbol. Throws an error if the symbol is not decorated.
|
|
116
104
|
*/
|
|
117
|
-
export function
|
|
118
|
-
if (symbol.charAt(0) !==
|
|
105
|
+
export function UndecorateSymbol(symbol) {
|
|
106
|
+
if (symbol.charAt(0) !== DecorateChar || symbol.charAt(symbol.length - 1) !== DecorateChar) {
|
|
119
107
|
throw new Error(`undecorateSymbol: Invalid symbol name "${symbol}"`);
|
|
120
108
|
}
|
|
121
109
|
return symbol.substring(1, symbol.length - 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaderCodeUtils.js","sourceRoot":"","sources":["../../src/utils/shaderCodeUtils.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC;AAwDhC,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAE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;QAC1B,OAAO,EAAE,cAAc,CAAC,OAAO;KAClC,CAAC;IAEF,IAAI,aAAa,CAAC,MAAM,EAAE,CAAC;QACvB,OAAO,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC;IAChD,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IACzC,OAAO,YAAY,GAAG,MAAM,GAAG,YAAY,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC3C,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,GAAG,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThinTexture } from "@babylonjs/core/Materials/Textures/thinTexture.js";
|
|
2
2
|
import { type ThinEngine } from "@babylonjs/core/Engines/thinEngine.js";
|
|
3
|
-
import type { Nullable } from "@babylonjs/core/types";
|
|
3
|
+
import type { Nullable } from "@babylonjs/core/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Helper that takes in a URL to an image and returns a ThinTexture
|
|
6
6
|
* @param engine - defines the engine to use to create the texture
|
|
@@ -12,5 +12,5 @@ import type { Nullable } from "@babylonjs/core/types";
|
|
|
12
12
|
* @param forcedExtension - defines the extension to use to pick the right loader
|
|
13
13
|
* @returns A ThinTexture of the image
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function CreateImageTexture(engine: ThinEngine, url: string, flipY?: Nullable<boolean>, samplingMode?: number | undefined, forcedExtension?: string | null): ThinTexture;
|
|
16
16
|
//# sourceMappingURL=textureLoaders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textureLoaders.d.ts","sourceRoot":"","sources":["../../src/utils/textureLoaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"textureLoaders.d.ts","sourceRoot":"","sources":["../../src/utils/textureLoaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0DAA+C;AACrE,OAAO,EAAE,KAAK,UAAU,EAAE,8CAAmC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,iCAAsB;AAE9C;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,QAAQ,CAAC,OAAO,CAAQ,EAC/B,YAAY,GAAE,MAAM,GAAG,SAAqB,EAC5C,eAAe,GAAE,MAAM,GAAG,IAAW,GACtC,WAAW,CAGb"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ThinTexture } from "@babylonjs/core/Materials/Textures/thinTexture.js";
|
|
2
|
-
import {} from "@babylonjs/core/Engines/thinEngine.js";
|
|
3
2
|
/**
|
|
4
3
|
* Helper that takes in a URL to an image and returns a ThinTexture
|
|
5
4
|
* @param engine - defines the engine to use to create the texture
|
|
@@ -11,8 +10,8 @@ import {} from "@babylonjs/core/Engines/thinEngine.js";
|
|
|
11
10
|
* @param forcedExtension - defines the extension to use to pick the right loader
|
|
12
11
|
* @returns A ThinTexture of the image
|
|
13
12
|
*/
|
|
14
|
-
export function
|
|
15
|
-
const internalTexture = engine.createTexture(url, true, flipY
|
|
13
|
+
export function CreateImageTexture(engine, url, flipY = null, samplingMode = undefined, forcedExtension = null) {
|
|
14
|
+
const internalTexture = engine.createTexture(url, true, flipY ?? true, null, samplingMode, null, null, null, null, null, forcedExtension);
|
|
16
15
|
return new ThinTexture(internalTexture);
|
|
17
16
|
}
|
|
18
17
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textureLoaders.js","sourceRoot":"","sources":["../../src/utils/textureLoaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"textureLoaders.js","sourceRoot":"","sources":["../../src/utils/textureLoaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0DAA+C;AAIrE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAC9B,MAAkB,EAClB,GAAW,EACX,QAA2B,IAAI,EAC/B,eAAmC,SAAS,EAC5C,kBAAiC,IAAI;IAErC,MAAM,eAAe,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IAC1I,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC;AAC5C,CAAC;AAED;;;;EAIE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TextureSize } from "@babylonjs/core/Materials/Textures/textureCreationOptions";
|
|
2
|
-
import type { OutputTextureOptions } from "../blockFoundation/textureOptions";
|
|
3
|
-
import type { SmartFilter } from "../smartFilter";
|
|
4
|
-
import type { ThinEngine } from "@babylonjs/core/Engines/thinEngine";
|
|
1
|
+
import type { TextureSize } from "@babylonjs/core/Materials/Textures/textureCreationOptions.js";
|
|
2
|
+
import type { OutputTextureOptions } from "../blockFoundation/textureOptions.js";
|
|
3
|
+
import type { SmartFilter } from "../smartFilter.js";
|
|
4
|
+
import type { ThinEngine } from "@babylonjs/core/Engines/thinEngine.js";
|
|
5
5
|
/**
|
|
6
6
|
* Determines the output texture size for a given shader block
|
|
7
7
|
* @param smartFilter - The smart filter to use
|
|
@@ -9,5 +9,5 @@ import type { ThinEngine } from "@babylonjs/core/Engines/thinEngine";
|
|
|
9
9
|
* @param textureOptions - The texture options to use
|
|
10
10
|
* @returns - The output texture size
|
|
11
11
|
*/
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function GetBlockOutputTextureSize(smartFilter: SmartFilter, engine: ThinEngine, textureOptions: OutputTextureOptions): TextureSize;
|
|
13
13
|
//# sourceMappingURL=textureUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textureUtils.d.ts","sourceRoot":"","sources":["../../src/utils/textureUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"textureUtils.d.ts","sourceRoot":"","sources":["../../src/utils/textureUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,qEAA0D;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,8CAAmC;AAE7D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,oBAAoB,GAAG,WAAW,CAezI"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param textureOptions - The texture options to use
|
|
6
6
|
* @returns - The output texture size
|
|
7
7
|
*/
|
|
8
|
-
export function
|
|
8
|
+
export function GetBlockOutputTextureSize(smartFilter, engine, textureOptions) {
|
|
9
9
|
let outputWidth;
|
|
10
10
|
let outputHeight;
|
|
11
11
|
const renderTargetWrapper = smartFilter.outputBlock.renderTargetWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textureUtils.js","sourceRoot":"","sources":["../../src/utils/textureUtils.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,
|
|
1
|
+
{"version":3,"file":"textureUtils.js","sourceRoot":"","sources":["../../src/utils/textureUtils.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAwB,EAAE,MAAkB,EAAE,cAAoC;IACxH,IAAI,WAAmB,CAAC;IACxB,IAAI,YAAoB,CAAC;IACzB,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;IACxE,IAAI,mBAAmB,EAAE,CAAC;QACtB,WAAW,GAAG,mBAAmB,CAAC,KAAK,CAAC;QACxC,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC9C,CAAC;SAAM,CAAC;QACJ,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1C,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,OAAO;QACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC;QACrD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC;KAC1D,CAAC;AACN,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The version of the SmartFilter core. During publish, this file is overwritten by
|
|
2
|
+
* The version of the SmartFilter core. During publish, this file is overwritten by recordVersionNumber.ts with the same version that is used for the NPM publish.
|
|
3
3
|
*/
|
|
4
|
-
export declare const SmartFilterCoreVersion = "
|
|
4
|
+
export declare const SmartFilterCoreVersion = "8.18.0";
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The version of the SmartFilter core. During publish, this file is overwritten by
|
|
2
|
+
* The version of the SmartFilter core. During publish, this file is overwritten by recordVersionNumber.ts with the same version that is used for the NPM publish.
|
|
3
3
|
*/
|
|
4
|
-
export const SmartFilterCoreVersion = "
|
|
4
|
+
export const SmartFilterCoreVersion = "8.18.0";
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/license.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Babylon.js
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/smart-filters",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Babylon.js Smart Filter core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"video",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/BabylonJS/
|
|
29
|
+
"url": "git+https://github.com/BabylonJS/Babylon.js.git"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
@@ -35,13 +35,18 @@
|
|
|
35
35
|
"readme.md"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
38
|
+
"build": "npm run clean && npm run copySrc && npm run compile",
|
|
39
|
+
"clean": "rimraf dist && rimraf src && rimraf *.tsbuildinfo -g && rimraf \"./**/*.!(cmd|md|json|build.json|lts.json|tasks.json|cjs)\" -g",
|
|
40
|
+
"copySrc": "node -e \"require('fs').cpSync('../../../dev/smartFilters/src', './src', { recursive: true })\"",
|
|
41
|
+
"compile": "node src/utils/buildTools/recordVersionNumber.js && tsc -b tsconfig.build.json",
|
|
42
|
+
"postcompile": "build-tools -c add-js-to-es6"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@dev/build-tools": "^1.0.0",
|
|
46
|
+
"@dev/core": "^1.0.0",
|
|
47
|
+
"@dev/shared-ui-components": "1.0.0"
|
|
43
48
|
},
|
|
44
49
|
"peerDependencies": {
|
|
45
50
|
"@babylonjs/core": "^7.47.3 || ^8.0.1"
|
|
46
51
|
}
|
|
47
|
-
}
|
|
52
|
+
}
|