@babylonjs/smart-filters 0.7.14-alpha → 0.7.15-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/serialization/importCustomBlockDefinition.d.ts +1 -1
- package/dist/serialization/importCustomBlockDefinition.d.ts.map +1 -1
- package/dist/serialization/importCustomBlockDefinition.js +5 -1
- package/dist/serialization/importCustomBlockDefinition.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/serialization/importCustomBlockDefinition.ts +7 -1
- package/src/version.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SerializedBlockDefinition } from "./serializedBlockDefinition.js";
|
|
2
2
|
/**
|
|
3
3
|
* Imports a serialized custom block definition. Supports either serialized CustomShaderBlock definitions or
|
|
4
|
-
* CustomAggregateBlock definitions.
|
|
4
|
+
* CustomAggregateBlock definitions. Can throw an exception if the serialized data is invalid.
|
|
5
5
|
*
|
|
6
6
|
* CustomShaderBlock definitions can be supplied either as serialized SerializedBlockDefinition object
|
|
7
7
|
* or a glsl shader with the required annotations (see readme.md for details).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importCustomBlockDefinition.d.ts","sourceRoot":"","sources":["../../src/serialization/importCustomBlockDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAIhF;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,yBAAyB,
|
|
1
|
+
{"version":3,"file":"importCustomBlockDefinition.d.ts","sourceRoot":"","sources":["../../src/serialization/importCustomBlockDefinition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAIhF;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,yBAAyB,CAyB7F"}
|
|
@@ -2,7 +2,7 @@ import { ConnectionPointType } from "../connection/connectionPointType.js";
|
|
|
2
2
|
import { hasGlslHeader, parseFragmentShader } from "../utils/buildTools/shaderConverter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Imports a serialized custom block definition. Supports either serialized CustomShaderBlock definitions or
|
|
5
|
-
* CustomAggregateBlock definitions.
|
|
5
|
+
* CustomAggregateBlock definitions. Can throw an exception if the serialized data is invalid.
|
|
6
6
|
*
|
|
7
7
|
* CustomShaderBlock definitions can be supplied either as serialized SerializedBlockDefinition object
|
|
8
8
|
* or a glsl shader with the required annotations (see readme.md for details).
|
|
@@ -28,6 +28,10 @@ export function importCustomBlockDefinition(serializedData) {
|
|
|
28
28
|
if (blockDefinition.format === "smartFilter" && blockDefinition.name && !blockDefinition.blockType) {
|
|
29
29
|
blockDefinition.blockType = blockDefinition.name;
|
|
30
30
|
}
|
|
31
|
+
// Validation
|
|
32
|
+
if (!blockDefinition.blockType) {
|
|
33
|
+
throw new Error("Could not find a blockType");
|
|
34
|
+
}
|
|
31
35
|
return blockDefinition;
|
|
32
36
|
}
|
|
33
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importCustomBlockDefinition.js","sourceRoot":"","sources":["../../src/serialization/importCustomBlockDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAK5F;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,2BAA2B,CAAC,cAAsB;IAC9D,IAAI,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,OAAO,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACJ,0CAA0C;QAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAEnD,0FAA0F;QAC1F,IAAI,eAAe,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACvC,eAAe,CAAC,MAAM,GAAG,aAAa,CAAC;QAC3C,CAAC;QAED,qDAAqD;QACrD,gHAAgH;QAChH,IAAI,eAAe,CAAC,MAAM,KAAK,aAAa,IAAI,eAAe,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YACjG,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC;QACrD,CAAC;
|
|
1
|
+
{"version":3,"file":"importCustomBlockDefinition.js","sourceRoot":"","sources":["../../src/serialization/importCustomBlockDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAK5F;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,2BAA2B,CAAC,cAAsB;IAC9D,IAAI,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,OAAO,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACJ,0CAA0C;QAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAEnD,0FAA0F;QAC1F,IAAI,eAAe,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACvC,eAAe,CAAC,MAAM,GAAG,aAAa,CAAC;QAC3C,CAAC;QAED,qDAAqD;QACrD,gHAAgH;QAChH,IAAI,eAAe,CAAC,MAAM,KAAK,aAAa,IAAI,eAAe,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YACjG,eAAe,CAAC,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC;QACrD,CAAC;QAED,aAAa;QACb,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,C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2
2
|
* The version of the SmartFilter core. During publish, this file is overwritten by versionUp.ts with the same version that is used for the NPM publish.
|
|
3
3
|
*/
|
|
4
|
-
export declare const SmartFilterCoreVersion = "0.7.
|
|
4
|
+
export declare const SmartFilterCoreVersion = "0.7.15-alpha";
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The version of the SmartFilter core. During publish, this file is overwritten by versionUp.ts with the same version that is used for the NPM publish.
|
|
3
3
|
*/
|
|
4
|
-
export const SmartFilterCoreVersion = "0.7.
|
|
4
|
+
export const SmartFilterCoreVersion = "0.7.15-alpha";
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import type { InputAutoBindV1, SerializedInputConnectionPointV1 } from "./v1/sha
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Imports a serialized custom block definition. Supports either serialized CustomShaderBlock definitions or
|
|
9
|
-
* CustomAggregateBlock definitions.
|
|
9
|
+
* CustomAggregateBlock definitions. Can throw an exception if the serialized data is invalid.
|
|
10
10
|
*
|
|
11
11
|
* CustomShaderBlock definitions can be supplied either as serialized SerializedBlockDefinition object
|
|
12
12
|
* or a glsl shader with the required annotations (see readme.md for details).
|
|
@@ -33,6 +33,12 @@ export function importCustomBlockDefinition(serializedData: string): SerializedB
|
|
|
33
33
|
if (blockDefinition.format === "smartFilter" && blockDefinition.name && !blockDefinition.blockType) {
|
|
34
34
|
blockDefinition.blockType = blockDefinition.name;
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// Validation
|
|
38
|
+
if (!blockDefinition.blockType) {
|
|
39
|
+
throw new Error("Could not find a blockType");
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
return blockDefinition;
|
|
37
43
|
}
|
|
38
44
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The version of the SmartFilter core. During publish, this file is overwritten by versionUp.ts with the same version that is used for the NPM publish.
|
|
3
3
|
*/
|
|
4
|
-
export const SmartFilterCoreVersion = "0.7.
|
|
4
|
+
export const SmartFilterCoreVersion = "0.7.15-alpha";
|