@babylonjs/core 6.21.0 → 6.21.2
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/Audio/soundTrack.js +1 -1
- package/Audio/soundTrack.js.map +1 -1
- package/Buffers/buffer.d.ts +2 -1
- package/Buffers/buffer.js +13 -5
- package/Buffers/buffer.js.map +1 -1
- package/Debug/rayHelper.d.ts +3 -3
- package/Debug/rayHelper.js +2 -2
- package/Debug/rayHelper.js.map +1 -1
- package/Engines/Native/nativeHelpers.d.ts +9 -0
- package/Engines/Native/nativeHelpers.js +296 -0
- package/Engines/Native/nativeHelpers.js.map +1 -0
- package/Engines/Native/nativeInterfaces.d.ts +92 -0
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/engine.d.ts +6 -4
- package/Engines/engine.js +7 -1
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +3 -12
- package/Engines/nativeEngine.js +43 -226
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +4 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +2 -1
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +23 -0
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +31 -0
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.d.ts +270 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js +347 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.d.ts +52 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js +71 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.d.ts +66 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js +86 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.d.ts +52 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js +71 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +17 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +19 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +13 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +16 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +15 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +17 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/index.d.ts +4 -1
- package/FlowGraph/Blocks/Data/index.js +4 -1
- package/FlowGraph/Blocks/Data/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +16 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +29 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/index.d.ts +1 -0
- package/FlowGraph/Blocks/Event/index.js +1 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +16 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +18 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/{flowGraphPlayAnimationBlock.d.ts → Animation/flowGraphPlayAnimationBlock.d.ts} +5 -5
- package/FlowGraph/Blocks/Execution/{flowGraphPlayAnimationBlock.js → Animation/flowGraphPlayAnimationBlock.js} +15 -8
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/{flowGraphStopAnimationBlock.d.ts → Animation/flowGraphStopAnimationBlock.d.ts} +4 -4
- package/FlowGraph/Blocks/Execution/{flowGraphStopAnimationBlock.js → Animation/flowGraphStopAnimationBlock.js} +2 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/Animation/index.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/Animation/index.js +4 -0
- package/FlowGraph/Blocks/Execution/Animation/index.js.map +1 -0
- package/FlowGraph/Blocks/Execution/index.d.ts +1 -2
- package/FlowGraph/Blocks/Execution/index.js +2 -2
- package/FlowGraph/Blocks/Execution/index.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.d.ts +2 -2
- package/FlowGraph/flowGraphDataConnection.js +3 -3
- package/FlowGraph/flowGraphDataConnection.js.map +1 -1
- package/Gizmos/axisDragGizmo.d.ts +1 -1
- package/Gizmos/axisDragGizmo.js +0 -1
- package/Gizmos/axisDragGizmo.js.map +1 -1
- package/Gizmos/axisScaleGizmo.js +0 -1
- package/Gizmos/axisScaleGizmo.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +12 -0
- package/Gizmos/boundingBoxGizmo.js +37 -1
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Gizmos/gizmo.d.ts +0 -4
- package/Gizmos/gizmo.js +19 -16
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/planeDragGizmo.js +0 -1
- package/Gizmos/planeDragGizmo.js.map +1 -1
- package/Gizmos/planeRotationGizmo.js +0 -1
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +2 -2
- package/Gizmos/scaleGizmo.js +5 -2
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +1 -0
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +1 -0
- package/Materials/PBR/pbrBaseMaterial.js +12 -2
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/equiRectangularCubeTexture.js +24 -4
- package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -0
- package/Materials/standardMaterial.js +6 -0
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.vector.d.ts +1 -1
- package/Maths/math.vector.js +1 -1
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +25 -8
- package/Meshes/Compression/dracoCompression.js +187 -119
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +22 -2
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +62 -4
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
- package/Meshes/Node/Blocks/debugBlock.d.ts +2 -1
- package/Meshes/Node/Blocks/debugBlock.js +8 -2
- package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.d.ts +14 -3
- package/Meshes/Node/Blocks/randomBlock.js +40 -13
- package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometryBuildState.d.ts +2 -2
- package/Meshes/Node/nodeGeometryBuildState.js +5 -3
- package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
- package/Meshes/meshSimplification.d.ts +1 -1
- package/Meshes/meshSimplification.js.map +1 -1
- package/Meshes/subMesh.js +1 -1
- package/Meshes/subMesh.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +8 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Shaders/ShadersInclude/bumpFragmentFunctions.js +14 -2
- package/Shaders/ShadersInclude/bumpFragmentFunctions.js.map +1 -1
- package/package.json +1 -1
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.d.ts +0 -23
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.js +0 -18
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock";
|
|
2
|
+
import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock";
|
|
3
|
+
/**
|
|
4
|
+
* Performs an AND operation on two boolean values.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export declare class FlowGraphLogicAndBlock extends FlowGraphBinaryOperationBlock<boolean, boolean, boolean> {
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Performs an OR operation on two boolean values.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export declare class FlowGraphLogicOrBlock extends FlowGraphBinaryOperationBlock<boolean, boolean, boolean> {
|
|
15
|
+
constructor();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Performs a NOT operation on a boolean value
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
21
|
+
export declare class FlowGraphLogicNotBlock extends FlowGraphUnaryOperationBlock<boolean, boolean> {
|
|
22
|
+
constructor();
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RichTypeBoolean } from "../../../flowGraphRichTypes.js";
|
|
2
|
+
import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock.js";
|
|
3
|
+
import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* Performs an AND operation on two boolean values.
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export class FlowGraphLogicAndBlock extends FlowGraphBinaryOperationBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(RichTypeBoolean, RichTypeBoolean, RichTypeBoolean, (left, right) => left && right);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Performs an OR operation on two boolean values.
|
|
15
|
+
* @experimental
|
|
16
|
+
*/
|
|
17
|
+
export class FlowGraphLogicOrBlock extends FlowGraphBinaryOperationBlock {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(RichTypeBoolean, RichTypeBoolean, RichTypeBoolean, (left, right) => left || right);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Performs a NOT operation on a boolean value
|
|
24
|
+
* @experimental
|
|
25
|
+
*/
|
|
26
|
+
export class FlowGraphLogicNotBlock extends FlowGraphUnaryOperationBlock {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(RichTypeBoolean, RichTypeBoolean, (value) => !value);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=flowGraphLogicBlocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphLogicBlocks.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,uCAA0C;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAE/E;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,6BAAwD;IAChG;QACI,KAAK,CAAC,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC;IAC7F,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,6BAAwD;IAC/F;QACI,KAAK,CAAC,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC;IAC7F,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,4BAA8C;IACtF;QACI,KAAK,CAAC,eAAe,EAAE,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;CACJ","sourcesContent":["import { RichTypeBoolean } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport { FlowGraphBinaryOperationBlock } from \"../flowGraphBinaryOperationBlock\";\r\nimport { FlowGraphUnaryOperationBlock } from \"../flowGraphUnaryOperationBlock\";\r\n\r\n/**\r\n * Performs an AND operation on two boolean values.\r\n * @experimental\r\n */\r\nexport class FlowGraphLogicAndBlock extends FlowGraphBinaryOperationBlock<boolean, boolean, boolean> {\r\n constructor() {\r\n super(RichTypeBoolean, RichTypeBoolean, RichTypeBoolean, (left, right) => left && right);\r\n }\r\n}\r\n\r\n/**\r\n * Performs an OR operation on two boolean values.\r\n * @experimental\r\n */\r\nexport class FlowGraphLogicOrBlock extends FlowGraphBinaryOperationBlock<boolean, boolean, boolean> {\r\n constructor() {\r\n super(RichTypeBoolean, RichTypeBoolean, RichTypeBoolean, (left, right) => left || right);\r\n }\r\n}\r\n\r\n/**\r\n * Performs a NOT operation on a boolean value\r\n * @experimental\r\n */\r\nexport class FlowGraphLogicNotBlock extends FlowGraphUnaryOperationBlock<boolean, boolean> {\r\n constructor() {\r\n super(RichTypeBoolean, RichTypeBoolean, (value) => !value);\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { FlowGraphBlock } from "../../../flowGraphBlock";
|
|
2
|
+
import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock";
|
|
3
|
+
import { FlowGraphConstantOperationBlock } from "../flowGraphConstantOperationBlock";
|
|
4
|
+
import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock";
|
|
5
|
+
import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
|
|
6
|
+
/**
|
|
7
|
+
* Module for all of the number math blocks.
|
|
8
|
+
* @see https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Outputs the addition of the left and right inputs.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export declare class FlowGraphAddNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
15
|
+
constructor();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Outputs the subtraction of the left and right inputs.
|
|
19
|
+
* @experimental
|
|
20
|
+
*/
|
|
21
|
+
export declare class FlowGraphSubtractNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
22
|
+
constructor();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Outputs the multiplication of the left and right inputs.
|
|
26
|
+
* @experimental
|
|
27
|
+
*/
|
|
28
|
+
export declare class FlowGraphMultiplyNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Ouputs the division of the left and right inputs.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
export declare class FlowGraphDivideNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
36
|
+
constructor();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Outputs the modulo of the left and right inputs.
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export declare class FlowGraphModNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
43
|
+
constructor();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Outputs left to the power of right.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
49
|
+
export declare class FlowGraphPowNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
50
|
+
constructor();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Outputs true if the number is NaN, false otherwise.
|
|
54
|
+
* @experimental
|
|
55
|
+
*/
|
|
56
|
+
export declare class FlowGraphIsNaNNumberBlock extends FlowGraphUnaryOperationBlock<number, boolean> {
|
|
57
|
+
constructor();
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Outputs true if the number is infinite, false otherwise.
|
|
61
|
+
* @experimental
|
|
62
|
+
*/
|
|
63
|
+
export declare class FlowGraphIsInfinityNumberBlock extends FlowGraphUnaryOperationBlock<number, boolean> {
|
|
64
|
+
constructor();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Outputs the square root of the input.
|
|
68
|
+
* @experimental
|
|
69
|
+
*/
|
|
70
|
+
export declare class FlowGraphSqrtNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
71
|
+
constructor();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Outputs the absolute value of the input.
|
|
75
|
+
* @experimental
|
|
76
|
+
*/
|
|
77
|
+
export declare class FlowGraphAbsNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
78
|
+
constructor();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Negates the input.
|
|
82
|
+
* @experimental
|
|
83
|
+
*/
|
|
84
|
+
export declare class FlowGraphNegateNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
85
|
+
constructor();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Outputs the floor of the input.
|
|
89
|
+
* @experimental
|
|
90
|
+
*/
|
|
91
|
+
export declare class FlowGraphFloorNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
92
|
+
constructor();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Outputs the ceiling of the input.
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
98
|
+
export declare class FlowGraphCeilNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
99
|
+
constructor();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Rounds the left input to right digits of precision.
|
|
103
|
+
* @see rounding function from: https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
|
|
104
|
+
* @experimental
|
|
105
|
+
*/
|
|
106
|
+
export declare class FlowGraphRoundNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
107
|
+
constructor();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Truncates the input.
|
|
111
|
+
* @experimental
|
|
112
|
+
*/
|
|
113
|
+
export declare class FlowGraphTruncNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
114
|
+
constructor();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Outputs the exponential of the input.
|
|
118
|
+
* @experimental
|
|
119
|
+
*/
|
|
120
|
+
export declare class FlowGraphExpNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
121
|
+
constructor();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Outputs the base 10 logarithm of the input.
|
|
125
|
+
* @experimental
|
|
126
|
+
*/
|
|
127
|
+
export declare class FlowGraphLog10NumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
128
|
+
constructor();
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Outputs the natural logarithm of the input.
|
|
132
|
+
* @experimental
|
|
133
|
+
*/
|
|
134
|
+
export declare class FlowGraphLogNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
135
|
+
constructor();
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Outputs the base 2 logarithm of the input.
|
|
139
|
+
* @experimental
|
|
140
|
+
*/
|
|
141
|
+
export declare class FlowGraphLnNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
142
|
+
constructor();
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Outputs the sine of the input.
|
|
146
|
+
* @experimental
|
|
147
|
+
*/
|
|
148
|
+
export declare class FlowGraphSinNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
149
|
+
constructor();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Outputs the cosine of the input.
|
|
153
|
+
* @experimental
|
|
154
|
+
*/
|
|
155
|
+
export declare class FlowGraphCosNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
156
|
+
constructor();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Outputs the tangent of the input.
|
|
160
|
+
* @experimental
|
|
161
|
+
*/
|
|
162
|
+
export declare class FlowGraphTanNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
163
|
+
constructor();
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Outputs the arcsine of the input.
|
|
167
|
+
* @experimental
|
|
168
|
+
*/
|
|
169
|
+
export declare class FlowGraphASinNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
170
|
+
constructor();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Outputs the arccosine of the input.
|
|
174
|
+
* @experimental
|
|
175
|
+
*/
|
|
176
|
+
export declare class FlowGraphACosNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
177
|
+
constructor();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Outputs the arctangent of the input.
|
|
181
|
+
* @experimental
|
|
182
|
+
*/
|
|
183
|
+
export declare class FlowGraphATanNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
|
|
184
|
+
constructor();
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Outputs the number E.
|
|
188
|
+
* @experimental
|
|
189
|
+
*/
|
|
190
|
+
export declare class FlowGraphENumberBlock extends FlowGraphConstantOperationBlock<number> {
|
|
191
|
+
constructor();
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Outputs the number PI.
|
|
195
|
+
* @experimental
|
|
196
|
+
*/
|
|
197
|
+
export declare class FlowGraphPiNumberBlock extends FlowGraphConstantOperationBlock<number> {
|
|
198
|
+
constructor();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Outputs the arctan2 of the left and right inputs.
|
|
202
|
+
* @experimental
|
|
203
|
+
*/
|
|
204
|
+
export declare class FlowGraphATan2NumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
205
|
+
constructor();
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @experimental
|
|
209
|
+
* Outputs a number between left and right.
|
|
210
|
+
*/
|
|
211
|
+
export declare class FlowGraphRandomNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
212
|
+
constructor();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Outputs the minimum of the left and right inputs.
|
|
216
|
+
* @experimental
|
|
217
|
+
*/
|
|
218
|
+
export declare class FlowGraphMinNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
219
|
+
constructor();
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Outputs the maximum of the left and right inputs.
|
|
223
|
+
* @experimental
|
|
224
|
+
*/
|
|
225
|
+
export declare class FlowGraphMaxNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
|
|
226
|
+
constructor();
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Outputs true if left is equal to right, false otherwise.
|
|
230
|
+
* @experimental
|
|
231
|
+
*/
|
|
232
|
+
export declare class FlowGraphEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
|
|
233
|
+
constructor();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Outputs true if left is greater than right, false otherwise.
|
|
237
|
+
*/
|
|
238
|
+
export declare class FlowGraphGreaterThanNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
|
|
239
|
+
constructor();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Outputs true if left is greater than or equal to right, false otherwise.
|
|
243
|
+
*/
|
|
244
|
+
export declare class FlowGraphGreaterThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
|
|
245
|
+
constructor();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Outputs true if left is less than right, false otherwise.
|
|
249
|
+
*/
|
|
250
|
+
export declare class FlowGraphLessThanNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
|
|
251
|
+
constructor();
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Outputs true if left is less than or equal to right, false otherwise.
|
|
255
|
+
*/
|
|
256
|
+
export declare class FlowGraphLessThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
|
|
257
|
+
constructor();
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Outputs a mix of left and right based on alpha.
|
|
261
|
+
* @experimental
|
|
262
|
+
*/
|
|
263
|
+
export declare class FlowGraphMixNumberBlock extends FlowGraphBlock {
|
|
264
|
+
leftInput: FlowGraphDataConnection<number>;
|
|
265
|
+
rightInput: FlowGraphDataConnection<number>;
|
|
266
|
+
alphaInput: FlowGraphDataConnection<number>;
|
|
267
|
+
resultOutput: FlowGraphDataConnection<number>;
|
|
268
|
+
constructor();
|
|
269
|
+
_updateOutputs(): void;
|
|
270
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { FlowGraphBlock } from "../../../flowGraphBlock.js";
|
|
2
|
+
import { RichTypeBoolean, RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
3
|
+
import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock.js";
|
|
4
|
+
import { FlowGraphConstantOperationBlock } from "../flowGraphConstantOperationBlock.js";
|
|
5
|
+
import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock.js";
|
|
6
|
+
/**
|
|
7
|
+
* Module for all of the number math blocks.
|
|
8
|
+
* @see https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Outputs the addition of the left and right inputs.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
14
|
+
export class FlowGraphAddNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left + right);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Outputs the subtraction of the left and right inputs.
|
|
21
|
+
* @experimental
|
|
22
|
+
*/
|
|
23
|
+
export class FlowGraphSubtractNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left - right);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Outputs the multiplication of the left and right inputs.
|
|
30
|
+
* @experimental
|
|
31
|
+
*/
|
|
32
|
+
export class FlowGraphMultiplyNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left * right);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Ouputs the division of the left and right inputs.
|
|
39
|
+
* @experimental
|
|
40
|
+
*/
|
|
41
|
+
export class FlowGraphDivideNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left / right);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Outputs the modulo of the left and right inputs.
|
|
48
|
+
* @experimental
|
|
49
|
+
*/
|
|
50
|
+
export class FlowGraphModNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left % right);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Outputs left to the power of right.
|
|
57
|
+
* @experimental
|
|
58
|
+
*/
|
|
59
|
+
export class FlowGraphPowNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
60
|
+
constructor() {
|
|
61
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.pow(left, right));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Outputs true if the number is NaN, false otherwise.
|
|
66
|
+
* @experimental
|
|
67
|
+
*/
|
|
68
|
+
export class FlowGraphIsNaNNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
69
|
+
constructor() {
|
|
70
|
+
super(RichTypeNumber, RichTypeBoolean, (input) => isNaN(input));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Outputs true if the number is infinite, false otherwise.
|
|
75
|
+
* @experimental
|
|
76
|
+
*/
|
|
77
|
+
export class FlowGraphIsInfinityNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
78
|
+
constructor() {
|
|
79
|
+
super(RichTypeNumber, RichTypeBoolean, (input) => !isFinite(input));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Outputs the square root of the input.
|
|
84
|
+
* @experimental
|
|
85
|
+
*/
|
|
86
|
+
export class FlowGraphSqrtNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
87
|
+
constructor() {
|
|
88
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.sqrt(input));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Outputs the absolute value of the input.
|
|
93
|
+
* @experimental
|
|
94
|
+
*/
|
|
95
|
+
export class FlowGraphAbsNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
96
|
+
constructor() {
|
|
97
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.abs(input));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Negates the input.
|
|
102
|
+
* @experimental
|
|
103
|
+
*/
|
|
104
|
+
export class FlowGraphNegateNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
105
|
+
constructor() {
|
|
106
|
+
super(RichTypeNumber, RichTypeNumber, (input) => -input);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Outputs the floor of the input.
|
|
111
|
+
* @experimental
|
|
112
|
+
*/
|
|
113
|
+
export class FlowGraphFloorNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
114
|
+
constructor() {
|
|
115
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.floor(input));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Outputs the ceiling of the input.
|
|
120
|
+
* @experimental
|
|
121
|
+
*/
|
|
122
|
+
export class FlowGraphCeilNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
123
|
+
constructor() {
|
|
124
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.ceil(input));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Rounds the left input to right digits of precision.
|
|
129
|
+
* @see rounding function from: https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
|
|
130
|
+
* @experimental
|
|
131
|
+
*/
|
|
132
|
+
export class FlowGraphRoundNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
133
|
+
constructor() {
|
|
134
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (input, digits) => Math.round(input / Math.pow(10, digits)) / Math.pow(10, digits));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Truncates the input.
|
|
139
|
+
* @experimental
|
|
140
|
+
*/
|
|
141
|
+
export class FlowGraphTruncNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
142
|
+
constructor() {
|
|
143
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.trunc(input));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Outputs the exponential of the input.
|
|
148
|
+
* @experimental
|
|
149
|
+
*/
|
|
150
|
+
export class FlowGraphExpNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
151
|
+
constructor() {
|
|
152
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.exp(input));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Outputs the base 10 logarithm of the input.
|
|
157
|
+
* @experimental
|
|
158
|
+
*/
|
|
159
|
+
export class FlowGraphLog10NumberBlock extends FlowGraphUnaryOperationBlock {
|
|
160
|
+
constructor() {
|
|
161
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.log10(input));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Outputs the natural logarithm of the input.
|
|
166
|
+
* @experimental
|
|
167
|
+
*/
|
|
168
|
+
export class FlowGraphLogNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
169
|
+
constructor() {
|
|
170
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.log(input));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Outputs the base 2 logarithm of the input.
|
|
175
|
+
* @experimental
|
|
176
|
+
*/
|
|
177
|
+
export class FlowGraphLnNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
178
|
+
constructor() {
|
|
179
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.log(input) / Math.LN2);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Outputs the sine of the input.
|
|
184
|
+
* @experimental
|
|
185
|
+
*/
|
|
186
|
+
export class FlowGraphSinNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
187
|
+
constructor() {
|
|
188
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.sin(input));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Outputs the cosine of the input.
|
|
193
|
+
* @experimental
|
|
194
|
+
*/
|
|
195
|
+
export class FlowGraphCosNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
196
|
+
constructor() {
|
|
197
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.cos(input));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Outputs the tangent of the input.
|
|
202
|
+
* @experimental
|
|
203
|
+
*/
|
|
204
|
+
export class FlowGraphTanNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
205
|
+
constructor() {
|
|
206
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.tan(input));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Outputs the arcsine of the input.
|
|
211
|
+
* @experimental
|
|
212
|
+
*/
|
|
213
|
+
export class FlowGraphASinNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
214
|
+
constructor() {
|
|
215
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.asin(input));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Outputs the arccosine of the input.
|
|
220
|
+
* @experimental
|
|
221
|
+
*/
|
|
222
|
+
export class FlowGraphACosNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
223
|
+
constructor() {
|
|
224
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.acos(input));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Outputs the arctangent of the input.
|
|
229
|
+
* @experimental
|
|
230
|
+
*/
|
|
231
|
+
export class FlowGraphATanNumberBlock extends FlowGraphUnaryOperationBlock {
|
|
232
|
+
constructor() {
|
|
233
|
+
super(RichTypeNumber, RichTypeNumber, (input) => Math.atan(input));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Outputs the number E.
|
|
238
|
+
* @experimental
|
|
239
|
+
*/
|
|
240
|
+
export class FlowGraphENumberBlock extends FlowGraphConstantOperationBlock {
|
|
241
|
+
constructor() {
|
|
242
|
+
super(RichTypeNumber, () => Math.E);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Outputs the number PI.
|
|
247
|
+
* @experimental
|
|
248
|
+
*/
|
|
249
|
+
export class FlowGraphPiNumberBlock extends FlowGraphConstantOperationBlock {
|
|
250
|
+
constructor() {
|
|
251
|
+
super(RichTypeNumber, () => Math.PI);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Outputs the arctan2 of the left and right inputs.
|
|
256
|
+
* @experimental
|
|
257
|
+
*/
|
|
258
|
+
export class FlowGraphATan2NumberBlock extends FlowGraphBinaryOperationBlock {
|
|
259
|
+
constructor() {
|
|
260
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.atan2(left, right));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @experimental
|
|
265
|
+
* Outputs a number between left and right.
|
|
266
|
+
*/
|
|
267
|
+
export class FlowGraphRandomNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
268
|
+
constructor() {
|
|
269
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left + Math.random() * (right - left));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Outputs the minimum of the left and right inputs.
|
|
274
|
+
* @experimental
|
|
275
|
+
*/
|
|
276
|
+
export class FlowGraphMinNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
277
|
+
constructor() {
|
|
278
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.min(left, right));
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Outputs the maximum of the left and right inputs.
|
|
283
|
+
* @experimental
|
|
284
|
+
*/
|
|
285
|
+
export class FlowGraphMaxNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
286
|
+
constructor() {
|
|
287
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.max(left, right));
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Outputs true if left is equal to right, false otherwise.
|
|
292
|
+
* @experimental
|
|
293
|
+
*/
|
|
294
|
+
export class FlowGraphEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
295
|
+
constructor() {
|
|
296
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left === right);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Outputs true if left is greater than right, false otherwise.
|
|
301
|
+
*/
|
|
302
|
+
export class FlowGraphGreaterThanNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
303
|
+
constructor() {
|
|
304
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left > right);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Outputs true if left is greater than or equal to right, false otherwise.
|
|
309
|
+
*/
|
|
310
|
+
export class FlowGraphGreaterThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
311
|
+
constructor() {
|
|
312
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left >= right);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Outputs true if left is less than right, false otherwise.
|
|
317
|
+
*/
|
|
318
|
+
export class FlowGraphLessThanNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
319
|
+
constructor() {
|
|
320
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left < right);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Outputs true if left is less than or equal to right, false otherwise.
|
|
325
|
+
*/
|
|
326
|
+
export class FlowGraphLessThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
|
|
327
|
+
constructor() {
|
|
328
|
+
super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left <= right);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Outputs a mix of left and right based on alpha.
|
|
333
|
+
* @experimental
|
|
334
|
+
*/
|
|
335
|
+
export class FlowGraphMixNumberBlock extends FlowGraphBlock {
|
|
336
|
+
constructor() {
|
|
337
|
+
super();
|
|
338
|
+
this.leftInput = this._registerDataInput("leftInput", RichTypeNumber);
|
|
339
|
+
this.rightInput = this._registerDataInput("rightInput", RichTypeNumber);
|
|
340
|
+
this.alphaInput = this._registerDataInput("alphaInput", RichTypeNumber);
|
|
341
|
+
this.resultOutput = this._registerDataOutput("resultOutput", RichTypeNumber);
|
|
342
|
+
}
|
|
343
|
+
_updateOutputs() {
|
|
344
|
+
this.resultOutput.value = this.leftInput.value + (this.rightInput.value - this.leftInput.value) * this.alphaInput.value;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=flowGraphNumberMathBlocks.js.map
|