@babylonjs/core 6.33.1 → 6.34.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.
Files changed (175) hide show
  1. package/Animations/animationGroup.js +2 -2
  2. package/Animations/animationGroup.js.map +1 -1
  3. package/Animations/animationGroupMask.d.ts +4 -0
  4. package/Animations/animationGroupMask.js +4 -0
  5. package/Animations/animationGroupMask.js.map +1 -1
  6. package/Compute/computeShader.d.ts +5 -0
  7. package/Compute/computeShader.js +42 -32
  8. package/Compute/computeShader.js.map +1 -1
  9. package/Engines/WebGPU/Extensions/engine.computeShader.js +4 -2
  10. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  11. package/Engines/engine.d.ts +16 -10
  12. package/Engines/thinEngine.js +3 -2
  13. package/Engines/thinEngine.js.map +1 -1
  14. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +296 -0
  15. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +758 -0
  16. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -0
  17. package/FlowGraph/Blocks/Data/Math/index.d.ts +1 -5
  18. package/FlowGraph/Blocks/Data/Math/index.js +1 -5
  19. package/FlowGraph/Blocks/Data/Math/index.js.map +1 -1
  20. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +2 -2
  21. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +3 -3
  22. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  23. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +1 -1
  24. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +3 -3
  25. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  26. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +1 -0
  27. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +5 -0
  28. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  29. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +25 -0
  30. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +22 -0
  31. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -0
  32. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +11 -5
  33. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +12 -6
  34. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  35. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +19 -0
  36. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +22 -0
  37. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -0
  38. package/FlowGraph/Blocks/Data/index.d.ts +1 -0
  39. package/FlowGraph/Blocks/Data/index.js +1 -0
  40. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  41. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +10 -5
  42. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +15 -5
  43. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  44. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +1 -0
  45. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +2 -1
  46. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  47. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +1 -0
  48. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +3 -2
  49. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  50. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +2 -2
  51. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +3 -3
  52. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  53. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +0 -5
  54. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +2 -3
  55. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  56. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +2 -2
  57. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +3 -3
  58. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  59. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +2 -2
  60. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +3 -3
  61. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
  62. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.d.ts +2 -2
  63. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +2 -2
  64. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
  65. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +2 -2
  66. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +3 -3
  67. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  68. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +2 -2
  69. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +3 -3
  70. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  71. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +13 -5
  72. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +14 -12
  73. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  74. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +2 -6
  75. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +3 -4
  76. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  77. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +16 -0
  78. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +26 -0
  79. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -0
  80. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +2 -2
  81. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +3 -3
  82. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  83. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +1 -6
  84. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +4 -4
  85. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
  86. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +2 -2
  87. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +4 -4
  88. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  89. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +3 -2
  90. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +6 -5
  91. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  92. package/FlowGraph/Blocks/Execution/ControlFlow/index.d.ts +1 -0
  93. package/FlowGraph/Blocks/Execution/ControlFlow/index.js +1 -0
  94. package/FlowGraph/Blocks/Execution/ControlFlow/index.js.map +1 -1
  95. package/FlowGraph/Blocks/Execution/{flowGraphLogBlock.d.ts → flowGraphConsoleLogBlock.d.ts} +3 -2
  96. package/FlowGraph/Blocks/Execution/{flowGraphLogBlock.js → flowGraphConsoleLogBlock.js} +7 -6
  97. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -0
  98. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +16 -8
  99. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +17 -10
  100. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
  101. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +4 -3
  102. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +7 -6
  103. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  104. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +12 -7
  105. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +10 -9
  106. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  107. package/FlowGraph/Blocks/Execution/index.d.ts +1 -2
  108. package/FlowGraph/Blocks/Execution/index.js +1 -3
  109. package/FlowGraph/Blocks/Execution/index.js.map +1 -1
  110. package/FlowGraph/flowGraph.d.ts +3 -1
  111. package/FlowGraph/flowGraph.js +6 -2
  112. package/FlowGraph/flowGraph.js.map +1 -1
  113. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +6 -2
  114. package/FlowGraph/flowGraphAsyncExecutionBlock.js +2 -1
  115. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
  116. package/FlowGraph/flowGraphBlock.d.ts +7 -2
  117. package/FlowGraph/flowGraphBlock.js +36 -14
  118. package/FlowGraph/flowGraphBlock.js.map +1 -1
  119. package/FlowGraph/flowGraphContext.d.ts +9 -5
  120. package/FlowGraph/flowGraphContext.js +7 -2
  121. package/FlowGraph/flowGraphContext.js.map +1 -1
  122. package/FlowGraph/flowGraphCoordinator.d.ts +4 -5
  123. package/FlowGraph/flowGraphCoordinator.js +12 -7
  124. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  125. package/FlowGraph/flowGraphEventBlock.js +1 -1
  126. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  127. package/FlowGraph/flowGraphExecutionBlock.d.ts +3 -2
  128. package/FlowGraph/flowGraphExecutionBlock.js +7 -11
  129. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  130. package/FlowGraph/flowGraphPath.d.ts +20 -2
  131. package/FlowGraph/flowGraphPath.js +27 -7
  132. package/FlowGraph/flowGraphPath.js.map +1 -1
  133. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +3 -3
  134. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +3 -3
  135. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
  136. package/FlowGraph/index.d.ts +3 -0
  137. package/FlowGraph/index.js +3 -0
  138. package/FlowGraph/index.js.map +1 -1
  139. package/FlowGraph/serialization.js +20 -6
  140. package/FlowGraph/serialization.js.map +1 -1
  141. package/FlowGraph/typeDefinitions.d.ts +33 -0
  142. package/FlowGraph/typeDefinitions.js +2 -0
  143. package/FlowGraph/typeDefinitions.js.map +1 -0
  144. package/Lights/light.d.ts +15 -0
  145. package/Lights/light.js +18 -0
  146. package/Lights/light.js.map +1 -1
  147. package/Lights/shadowLight.d.ts +18 -1
  148. package/Lights/shadowLight.js +34 -1
  149. package/Lights/shadowLight.js.map +1 -1
  150. package/Meshes/Node/nodeGeometryBlock.js +9 -1
  151. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  152. package/Meshes/abstractMesh.js +3 -1
  153. package/Meshes/abstractMesh.js.map +1 -1
  154. package/XR/features/WebXRMeshDetector.d.ts +14 -2
  155. package/XR/features/WebXRMeshDetector.js +43 -8
  156. package/XR/features/WebXRMeshDetector.js.map +1 -1
  157. package/package.json +1 -1
  158. package/scene.d.ts +1 -2
  159. package/scene.js.map +1 -1
  160. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.d.ts +0 -172
  161. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js +0 -235
  162. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js.map +0 -1
  163. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.d.ts +0 -269
  164. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js +0 -429
  165. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js.map +0 -1
  166. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.d.ts +0 -115
  167. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js +0 -146
  168. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js.map +0 -1
  169. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.d.ts +0 -155
  170. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js +0 -190
  171. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js.map +0 -1
  172. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.d.ts +0 -116
  173. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js +0 -144
  174. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js.map +0 -1
  175. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +0 -1
@@ -1,269 +0,0 @@
1
- import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
2
- import { FlowGraphBlock } from "../../../flowGraphBlock";
3
- import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock";
4
- import { FlowGraphConstantOperationBlock } from "../flowGraphConstantOperationBlock";
5
- import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock";
6
- import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
7
- import type { FlowGraphContext } from "../../../flowGraphContext";
8
- /**
9
- * Outputs the addition of the left and right inputs.
10
- * @experimental
11
- */
12
- export declare class FlowGraphAddNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
13
- constructor(config?: IFlowGraphBlockConfiguration);
14
- }
15
- /**
16
- * Outputs the subtraction of the left and right inputs.
17
- * @experimental
18
- */
19
- export declare class FlowGraphSubtractNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
20
- constructor(config?: IFlowGraphBlockConfiguration);
21
- }
22
- /**
23
- * Outputs the multiplication of the left and right inputs.
24
- * @experimental
25
- */
26
- export declare class FlowGraphMultiplyNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
27
- constructor(config?: IFlowGraphBlockConfiguration);
28
- }
29
- /**
30
- * Ouputs the division of the left and right inputs.
31
- * @experimental
32
- */
33
- export declare class FlowGraphDivideNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
34
- constructor(config?: IFlowGraphBlockConfiguration);
35
- }
36
- /**
37
- * Outputs the modulo of the left and right inputs.
38
- * @experimental
39
- */
40
- export declare class FlowGraphModNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
41
- constructor(config?: IFlowGraphBlockConfiguration);
42
- }
43
- /**
44
- * Outputs left to the power of right.
45
- * @experimental
46
- */
47
- export declare class FlowGraphPowNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
48
- constructor(config?: IFlowGraphBlockConfiguration);
49
- }
50
- /**
51
- * Outputs true if the number is NaN, false otherwise.
52
- * @experimental
53
- */
54
- export declare class FlowGraphIsNaNNumberBlock extends FlowGraphUnaryOperationBlock<number, boolean> {
55
- constructor(config?: IFlowGraphBlockConfiguration);
56
- }
57
- /**
58
- * Outputs true if the number is infinite, false otherwise.
59
- * @experimental
60
- */
61
- export declare class FlowGraphIsInfinityNumberBlock extends FlowGraphUnaryOperationBlock<number, boolean> {
62
- constructor(config?: IFlowGraphBlockConfiguration);
63
- }
64
- /**
65
- * Outputs the square root of the input.
66
- * @experimental
67
- */
68
- export declare class FlowGraphSqrtNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
69
- constructor(config?: IFlowGraphBlockConfiguration);
70
- }
71
- /**
72
- * Outputs the absolute value of the input.
73
- * @experimental
74
- */
75
- export declare class FlowGraphAbsNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
76
- constructor(config?: IFlowGraphBlockConfiguration);
77
- }
78
- /**
79
- * Negates the input.
80
- * @experimental
81
- */
82
- export declare class FlowGraphNegateNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
83
- constructor(config?: IFlowGraphBlockConfiguration);
84
- }
85
- /**
86
- * Outputs the floor of the input.
87
- * @experimental
88
- */
89
- export declare class FlowGraphFloorNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
90
- constructor(config?: IFlowGraphBlockConfiguration);
91
- }
92
- /**
93
- * Outputs the ceiling of the input.
94
- * @experimental
95
- */
96
- export declare class FlowGraphCeilNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
97
- constructor(config?: IFlowGraphBlockConfiguration);
98
- }
99
- /**
100
- * Rounds the left input to right digits of precision.
101
- * @see rounding function from: https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
102
- * @experimental
103
- */
104
- export declare class FlowGraphRoundNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
105
- constructor(config?: IFlowGraphBlockConfiguration);
106
- }
107
- /**
108
- * Truncates the input.
109
- * @experimental
110
- */
111
- export declare class FlowGraphTruncNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
112
- constructor(config?: IFlowGraphBlockConfiguration);
113
- }
114
- /**
115
- * Outputs the exponential of the input.
116
- * @experimental
117
- */
118
- export declare class FlowGraphExpNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
119
- constructor(config?: IFlowGraphBlockConfiguration);
120
- }
121
- /**
122
- * Outputs the base 10 logarithm of the input.
123
- * @experimental
124
- */
125
- export declare class FlowGraphLog10NumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
126
- constructor(config?: IFlowGraphBlockConfiguration);
127
- }
128
- /**
129
- * Outputs the natural logarithm of the input.
130
- * @experimental
131
- */
132
- export declare class FlowGraphLogNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
133
- constructor(config?: IFlowGraphBlockConfiguration);
134
- }
135
- /**
136
- * Outputs the base 2 logarithm of the input.
137
- * @experimental
138
- */
139
- export declare class FlowGraphLnNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
140
- constructor(config?: IFlowGraphBlockConfiguration);
141
- }
142
- /**
143
- * Outputs the sine of the input.
144
- * @experimental
145
- */
146
- export declare class FlowGraphSinNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
147
- constructor(config?: IFlowGraphBlockConfiguration);
148
- }
149
- /**
150
- * Outputs the cosine of the input.
151
- * @experimental
152
- */
153
- export declare class FlowGraphCosNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
154
- constructor(config?: IFlowGraphBlockConfiguration);
155
- }
156
- /**
157
- * Outputs the tangent of the input.
158
- * @experimental
159
- */
160
- export declare class FlowGraphTanNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
161
- constructor(config?: IFlowGraphBlockConfiguration);
162
- }
163
- /**
164
- * Outputs the arcsine of the input.
165
- * @experimental
166
- */
167
- export declare class FlowGraphASinNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
168
- constructor(config?: IFlowGraphBlockConfiguration);
169
- }
170
- /**
171
- * Outputs the arccosine of the input.
172
- * @experimental
173
- */
174
- export declare class FlowGraphACosNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
175
- constructor(config?: IFlowGraphBlockConfiguration);
176
- }
177
- /**
178
- * Outputs the arctangent of the input.
179
- * @experimental
180
- */
181
- export declare class FlowGraphATanNumberBlock extends FlowGraphUnaryOperationBlock<number, number> {
182
- constructor(config?: IFlowGraphBlockConfiguration);
183
- }
184
- /**
185
- * Outputs the number E.
186
- * @experimental
187
- */
188
- export declare class FlowGraphENumberBlock extends FlowGraphConstantOperationBlock<number> {
189
- constructor(config?: IFlowGraphBlockConfiguration);
190
- }
191
- /**
192
- * Outputs the number PI.
193
- * @experimental
194
- */
195
- export declare class FlowGraphPiNumberBlock extends FlowGraphConstantOperationBlock<number> {
196
- constructor(config?: IFlowGraphBlockConfiguration);
197
- }
198
- /**
199
- * Outputs the arctan2 of the left and right inputs.
200
- * @experimental
201
- */
202
- export declare class FlowGraphATan2NumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
203
- constructor(config?: IFlowGraphBlockConfiguration);
204
- }
205
- /**
206
- * @experimental
207
- * Outputs a number between left and right.
208
- */
209
- export declare class FlowGraphRandomNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
210
- constructor(config?: IFlowGraphBlockConfiguration);
211
- }
212
- /**
213
- * Outputs the minimum of the left and right inputs.
214
- * @experimental
215
- */
216
- export declare class FlowGraphMinNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
217
- constructor(config?: IFlowGraphBlockConfiguration);
218
- }
219
- /**
220
- * Outputs the maximum of the left and right inputs.
221
- * @experimental
222
- */
223
- export declare class FlowGraphMaxNumberBlock extends FlowGraphBinaryOperationBlock<number, number, number> {
224
- constructor(config?: IFlowGraphBlockConfiguration);
225
- }
226
- /**
227
- * Outputs true if left is equal to right, false otherwise.
228
- * @experimental
229
- */
230
- export declare class FlowGraphEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
231
- constructor(config?: IFlowGraphBlockConfiguration);
232
- }
233
- /**
234
- * Outputs true if left is greater than right, false otherwise.
235
- */
236
- export declare class FlowGraphGreaterThanNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
237
- constructor(config?: IFlowGraphBlockConfiguration);
238
- }
239
- /**
240
- * Outputs true if left is greater than or equal to right, false otherwise.
241
- */
242
- export declare class FlowGraphGreaterThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
243
- constructor(config?: IFlowGraphBlockConfiguration);
244
- }
245
- /**
246
- * Outputs true if left is less than right, false otherwise.
247
- */
248
- export declare class FlowGraphLessThanNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
249
- constructor(config?: IFlowGraphBlockConfiguration);
250
- }
251
- /**
252
- * Outputs true if left is less than or equal to right, false otherwise.
253
- */
254
- export declare class FlowGraphLessThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock<number, number, boolean> {
255
- constructor(config?: IFlowGraphBlockConfiguration);
256
- }
257
- /**
258
- * Outputs a mix of left and right based on alpha.
259
- * @experimental
260
- */
261
- export declare class FlowGraphMixNumberBlock extends FlowGraphBlock {
262
- leftInput: FlowGraphDataConnection<number>;
263
- rightInput: FlowGraphDataConnection<number>;
264
- alphaInput: FlowGraphDataConnection<number>;
265
- resultOutput: FlowGraphDataConnection<number>;
266
- constructor(config?: IFlowGraphBlockConfiguration);
267
- _updateOutputs(_context: FlowGraphContext): void;
268
- getClassName(): string;
269
- }
@@ -1,429 +0,0 @@
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
- import { RegisterClass } from "../../../../Misc/typeStore.js";
7
- /**
8
- * Module for all of the number math blocks.
9
- * @see https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
10
- */
11
- const ADDNAME = "FGAddNumberBlock";
12
- /**
13
- * Outputs the addition of the left and right inputs.
14
- * @experimental
15
- */
16
- export class FlowGraphAddNumberBlock extends FlowGraphBinaryOperationBlock {
17
- constructor(config) {
18
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left + right, ADDNAME, config);
19
- }
20
- }
21
- RegisterClass(ADDNAME, FlowGraphAddNumberBlock);
22
- const SUBNAME = "FGSubtractNumberBlock";
23
- /**
24
- * Outputs the subtraction of the left and right inputs.
25
- * @experimental
26
- */
27
- export class FlowGraphSubtractNumberBlock extends FlowGraphBinaryOperationBlock {
28
- constructor(config) {
29
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left - right, SUBNAME, config);
30
- }
31
- }
32
- RegisterClass(SUBNAME, FlowGraphSubtractNumberBlock);
33
- const MULTIPLYNAME = "FGMultiplyNumberBlock";
34
- /**
35
- * Outputs the multiplication of the left and right inputs.
36
- * @experimental
37
- */
38
- export class FlowGraphMultiplyNumberBlock extends FlowGraphBinaryOperationBlock {
39
- constructor(config) {
40
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left * right, MULTIPLYNAME, config);
41
- }
42
- }
43
- RegisterClass(MULTIPLYNAME, FlowGraphMultiplyNumberBlock);
44
- const DIVIDENAME = "FGDivideNumberBlock";
45
- /**
46
- * Ouputs the division of the left and right inputs.
47
- * @experimental
48
- */
49
- export class FlowGraphDivideNumberBlock extends FlowGraphBinaryOperationBlock {
50
- constructor(config) {
51
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left / right, DIVIDENAME, config);
52
- }
53
- }
54
- RegisterClass(DIVIDENAME, FlowGraphDivideNumberBlock);
55
- const MODNAME = "FGModNumberBlock";
56
- /**
57
- * Outputs the modulo of the left and right inputs.
58
- * @experimental
59
- */
60
- export class FlowGraphModNumberBlock extends FlowGraphBinaryOperationBlock {
61
- constructor(config) {
62
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left % right, MODNAME, config);
63
- }
64
- }
65
- RegisterClass(MODNAME, FlowGraphModNumberBlock);
66
- const POWNAME = "FGPowNumberBlock";
67
- /**
68
- * Outputs left to the power of right.
69
- * @experimental
70
- */
71
- export class FlowGraphPowNumberBlock extends FlowGraphBinaryOperationBlock {
72
- constructor(config) {
73
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.pow(left, right), POWNAME, config);
74
- }
75
- }
76
- RegisterClass(POWNAME, FlowGraphPowNumberBlock);
77
- const ISNANNAME = "FGIsNaNNumberBlock";
78
- /**
79
- * Outputs true if the number is NaN, false otherwise.
80
- * @experimental
81
- */
82
- export class FlowGraphIsNaNNumberBlock extends FlowGraphUnaryOperationBlock {
83
- constructor(config) {
84
- super(RichTypeNumber, RichTypeBoolean, (input) => isNaN(input), ISNANNAME, config);
85
- }
86
- }
87
- RegisterClass(ISNANNAME, FlowGraphIsNaNNumberBlock);
88
- const ISINFINITENAME = "FGIsInfinityNumberBlock";
89
- /**
90
- * Outputs true if the number is infinite, false otherwise.
91
- * @experimental
92
- */
93
- export class FlowGraphIsInfinityNumberBlock extends FlowGraphUnaryOperationBlock {
94
- constructor(config) {
95
- super(RichTypeNumber, RichTypeBoolean, (input) => !isFinite(input), ISINFINITENAME, config);
96
- }
97
- }
98
- RegisterClass(ISINFINITENAME, FlowGraphIsInfinityNumberBlock);
99
- const SQRTNAME = "FGSqrtNumberBlock";
100
- /**
101
- * Outputs the square root of the input.
102
- * @experimental
103
- */
104
- export class FlowGraphSqrtNumberBlock extends FlowGraphUnaryOperationBlock {
105
- constructor(config) {
106
- super(RichTypeNumber, RichTypeNumber, (input) => Math.sqrt(input), SQRTNAME, config);
107
- }
108
- }
109
- RegisterClass(SQRTNAME, FlowGraphSqrtNumberBlock);
110
- const ABSNAME = "FGAbsNumberBlock";
111
- /**
112
- * Outputs the absolute value of the input.
113
- * @experimental
114
- */
115
- export class FlowGraphAbsNumberBlock extends FlowGraphUnaryOperationBlock {
116
- constructor(config) {
117
- super(RichTypeNumber, RichTypeNumber, (input) => Math.abs(input), ABSNAME, config);
118
- }
119
- }
120
- RegisterClass(ABSNAME, FlowGraphAbsNumberBlock);
121
- const NEGNAME = "FGNegateNumberBlock";
122
- /**
123
- * Negates the input.
124
- * @experimental
125
- */
126
- export class FlowGraphNegateNumberBlock extends FlowGraphUnaryOperationBlock {
127
- constructor(config) {
128
- super(RichTypeNumber, RichTypeNumber, (input) => -input, NEGNAME, config);
129
- }
130
- }
131
- RegisterClass(NEGNAME, FlowGraphNegateNumberBlock);
132
- const FLOORNAME = "FGFloorNumberBlock";
133
- /**
134
- * Outputs the floor of the input.
135
- * @experimental
136
- */
137
- export class FlowGraphFloorNumberBlock extends FlowGraphUnaryOperationBlock {
138
- constructor(config) {
139
- super(RichTypeNumber, RichTypeNumber, (input) => Math.floor(input), FLOORNAME, config);
140
- }
141
- }
142
- RegisterClass(FLOORNAME, FlowGraphFloorNumberBlock);
143
- const CEILNAME = "FGCeilNumberBlock";
144
- /**
145
- * Outputs the ceiling of the input.
146
- * @experimental
147
- */
148
- export class FlowGraphCeilNumberBlock extends FlowGraphUnaryOperationBlock {
149
- constructor(config) {
150
- super(RichTypeNumber, RichTypeNumber, (input) => Math.ceil(input), CEILNAME, config);
151
- }
152
- }
153
- RegisterClass(CEILNAME, FlowGraphCeilNumberBlock);
154
- const ROUNDNAME = "FGRoundNumberBlock";
155
- /**
156
- * Rounds the left input to right digits of precision.
157
- * @see rounding function from: https://docs.google.com/spreadsheets/d/1wSFUFLPpRFVlL-va3YtYC6sepNvPapVawG1-nzoTF34/edit#gid=0
158
- * @experimental
159
- */
160
- export class FlowGraphRoundNumberBlock extends FlowGraphBinaryOperationBlock {
161
- constructor(config) {
162
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (input, digits) => Math.round(input / Math.pow(10, digits)) / Math.pow(10, digits), ROUNDNAME, config);
163
- }
164
- }
165
- RegisterClass(ROUNDNAME, FlowGraphRoundNumberBlock);
166
- const TRUNCNAME = "FGTruncNumberBlock";
167
- /**
168
- * Truncates the input.
169
- * @experimental
170
- */
171
- export class FlowGraphTruncNumberBlock extends FlowGraphUnaryOperationBlock {
172
- constructor(config) {
173
- super(RichTypeNumber, RichTypeNumber, (input) => Math.trunc(input), TRUNCNAME, config);
174
- }
175
- }
176
- RegisterClass(TRUNCNAME, FlowGraphTruncNumberBlock);
177
- const EXPNAME = "FGExpNumberBlock";
178
- /**
179
- * Outputs the exponential of the input.
180
- * @experimental
181
- */
182
- export class FlowGraphExpNumberBlock extends FlowGraphUnaryOperationBlock {
183
- constructor(config) {
184
- super(RichTypeNumber, RichTypeNumber, (input) => Math.exp(input), EXPNAME, config);
185
- }
186
- }
187
- RegisterClass(EXPNAME, FlowGraphExpNumberBlock);
188
- const LOG10NAME = "FGLog10NumberBlock";
189
- /**
190
- * Outputs the base 10 logarithm of the input.
191
- * @experimental
192
- */
193
- export class FlowGraphLog10NumberBlock extends FlowGraphUnaryOperationBlock {
194
- constructor(config) {
195
- super(RichTypeNumber, RichTypeNumber, (input) => Math.log10(input), LOG10NAME, config);
196
- }
197
- }
198
- RegisterClass(LOG10NAME, FlowGraphLog10NumberBlock);
199
- const LOGNAME = "FGLogNumberBlock";
200
- /**
201
- * Outputs the natural logarithm of the input.
202
- * @experimental
203
- */
204
- export class FlowGraphLogNumberBlock extends FlowGraphUnaryOperationBlock {
205
- constructor(config) {
206
- super(RichTypeNumber, RichTypeNumber, (input) => Math.log(input), LOGNAME, config);
207
- }
208
- }
209
- RegisterClass(LOGNAME, FlowGraphLogNumberBlock);
210
- const LNNAME = "FGLnNumberBlock";
211
- /**
212
- * Outputs the base 2 logarithm of the input.
213
- * @experimental
214
- */
215
- export class FlowGraphLnNumberBlock extends FlowGraphUnaryOperationBlock {
216
- constructor(config) {
217
- super(RichTypeNumber, RichTypeNumber, (input) => Math.log(input) / Math.LN2, LNNAME, config);
218
- }
219
- }
220
- RegisterClass(LNNAME, FlowGraphLnNumberBlock);
221
- const SINENAME = "FGSineNumberBlock";
222
- /**
223
- * Outputs the sine of the input.
224
- * @experimental
225
- */
226
- export class FlowGraphSinNumberBlock extends FlowGraphUnaryOperationBlock {
227
- constructor(config) {
228
- super(RichTypeNumber, RichTypeNumber, (input) => Math.sin(input), SINENAME, config);
229
- }
230
- }
231
- RegisterClass(SINENAME, FlowGraphSinNumberBlock);
232
- const COSNAME = "FGCosNumberBlock";
233
- /**
234
- * Outputs the cosine of the input.
235
- * @experimental
236
- */
237
- export class FlowGraphCosNumberBlock extends FlowGraphUnaryOperationBlock {
238
- constructor(config) {
239
- super(RichTypeNumber, RichTypeNumber, (input) => Math.cos(input), COSNAME, config);
240
- }
241
- }
242
- RegisterClass(COSNAME, FlowGraphCosNumberBlock);
243
- const TANNAME = "FGTanNumberBlock";
244
- /**
245
- * Outputs the tangent of the input.
246
- * @experimental
247
- */
248
- export class FlowGraphTanNumberBlock extends FlowGraphUnaryOperationBlock {
249
- constructor(config) {
250
- super(RichTypeNumber, RichTypeNumber, (input) => Math.tan(input), TANNAME, config);
251
- }
252
- }
253
- RegisterClass(TANNAME, FlowGraphTanNumberBlock);
254
- const ASINENAME = "FGASineNumberBlock";
255
- /**
256
- * Outputs the arcsine of the input.
257
- * @experimental
258
- */
259
- export class FlowGraphASinNumberBlock extends FlowGraphUnaryOperationBlock {
260
- constructor(config) {
261
- super(RichTypeNumber, RichTypeNumber, (input) => Math.asin(input), ASINENAME, config);
262
- }
263
- }
264
- RegisterClass(ASINENAME, FlowGraphASinNumberBlock);
265
- const ACOSNAME = "FGACosNumberBlock";
266
- /**
267
- * Outputs the arccosine of the input.
268
- * @experimental
269
- */
270
- export class FlowGraphACosNumberBlock extends FlowGraphUnaryOperationBlock {
271
- constructor(config) {
272
- super(RichTypeNumber, RichTypeNumber, (input) => Math.acos(input), ACOSNAME, config);
273
- }
274
- }
275
- RegisterClass(ACOSNAME, FlowGraphACosNumberBlock);
276
- const ATANNAME = "FGATanNumberBlock";
277
- /**
278
- * Outputs the arctangent of the input.
279
- * @experimental
280
- */
281
- export class FlowGraphATanNumberBlock extends FlowGraphUnaryOperationBlock {
282
- constructor(config) {
283
- super(RichTypeNumber, RichTypeNumber, (input) => Math.atan(input), ATANNAME, config);
284
- }
285
- }
286
- RegisterClass(ATANNAME, FlowGraphATanNumberBlock);
287
- const ENAME = "FGENumberBlock";
288
- /**
289
- * Outputs the number E.
290
- * @experimental
291
- */
292
- export class FlowGraphENumberBlock extends FlowGraphConstantOperationBlock {
293
- constructor(config) {
294
- super(RichTypeNumber, () => Math.E, ENAME, config);
295
- }
296
- }
297
- RegisterClass(ENAME, FlowGraphENumberBlock);
298
- const PINAME = "FGPiNumberBlock";
299
- /**
300
- * Outputs the number PI.
301
- * @experimental
302
- */
303
- export class FlowGraphPiNumberBlock extends FlowGraphConstantOperationBlock {
304
- constructor(config) {
305
- super(RichTypeNumber, () => Math.PI, PINAME, config);
306
- }
307
- }
308
- RegisterClass(PINAME, FlowGraphPiNumberBlock);
309
- const ATAN2NAME = "FGATan2NumberBlock";
310
- /**
311
- * Outputs the arctan2 of the left and right inputs.
312
- * @experimental
313
- */
314
- export class FlowGraphATan2NumberBlock extends FlowGraphBinaryOperationBlock {
315
- constructor(config) {
316
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.atan2(left, right), ATAN2NAME, config);
317
- }
318
- }
319
- RegisterClass(ATAN2NAME, FlowGraphATan2NumberBlock);
320
- const RNDNAME = "FGRandomNumberBlock";
321
- /**
322
- * @experimental
323
- * Outputs a number between left and right.
324
- */
325
- export class FlowGraphRandomNumberBlock extends FlowGraphBinaryOperationBlock {
326
- constructor(config) {
327
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => left + Math.random() * (right - left), RNDNAME, config);
328
- }
329
- }
330
- RegisterClass(RNDNAME, FlowGraphRandomNumberBlock);
331
- const MINNAME = "FGMinNumberBlock";
332
- /**
333
- * Outputs the minimum of the left and right inputs.
334
- * @experimental
335
- */
336
- export class FlowGraphMinNumberBlock extends FlowGraphBinaryOperationBlock {
337
- constructor(config) {
338
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.min(left, right), MINNAME, config);
339
- }
340
- }
341
- RegisterClass(MINNAME, FlowGraphMinNumberBlock);
342
- const MAXNAME = "FGMaxNumberBlock";
343
- /**
344
- * Outputs the maximum of the left and right inputs.
345
- * @experimental
346
- */
347
- export class FlowGraphMaxNumberBlock extends FlowGraphBinaryOperationBlock {
348
- constructor(config) {
349
- super(RichTypeNumber, RichTypeNumber, RichTypeNumber, (left, right) => Math.max(left, right), MAXNAME, config);
350
- }
351
- }
352
- RegisterClass(MAXNAME, FlowGraphMaxNumberBlock);
353
- const EQUALSNAME = "FGEqualsNumberBlock";
354
- /**
355
- * Outputs true if left is equal to right, false otherwise.
356
- * @experimental
357
- */
358
- export class FlowGraphEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
359
- constructor(config) {
360
- super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left === right, EQUALSNAME, config);
361
- }
362
- }
363
- RegisterClass(EQUALSNAME, FlowGraphEqualsNumberBlock);
364
- const GREATERTHANNAME = "FGGreaterThanNumberBlock";
365
- /**
366
- * Outputs true if left is greater than right, false otherwise.
367
- */
368
- export class FlowGraphGreaterThanNumberBlock extends FlowGraphBinaryOperationBlock {
369
- constructor(config) {
370
- super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left > right, GREATERTHANNAME, config);
371
- }
372
- }
373
- RegisterClass(GREATERTHANNAME, FlowGraphGreaterThanNumberBlock);
374
- const GREATEROREQUALNAME = "FGGreaterThanOrEqualsNumberBlock";
375
- /**
376
- * Outputs true if left is greater than or equal to right, false otherwise.
377
- */
378
- export class FlowGraphGreaterThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
379
- constructor(config) {
380
- super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left >= right, GREATEROREQUALNAME, config);
381
- }
382
- }
383
- RegisterClass(GREATEROREQUALNAME, FlowGraphGreaterThanOrEqualsNumberBlock);
384
- const LESSTHANNAME = "FGLessThanNumberBlock";
385
- /**
386
- * Outputs true if left is less than right, false otherwise.
387
- */
388
- export class FlowGraphLessThanNumberBlock extends FlowGraphBinaryOperationBlock {
389
- constructor(config) {
390
- super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left < right, LESSTHANNAME, config);
391
- }
392
- }
393
- RegisterClass(LESSTHANNAME, FlowGraphLessThanNumberBlock);
394
- const LESSOREQUALNAME = "FGLessThanOrEqualsNumberBlock";
395
- /**
396
- * Outputs true if left is less than or equal to right, false otherwise.
397
- */
398
- export class FlowGraphLessThanOrEqualsNumberBlock extends FlowGraphBinaryOperationBlock {
399
- constructor(config) {
400
- super(RichTypeNumber, RichTypeNumber, RichTypeBoolean, (left, right) => left <= right, LESSOREQUALNAME, config);
401
- }
402
- }
403
- RegisterClass(LESSOREQUALNAME, FlowGraphLessThanOrEqualsNumberBlock);
404
- const MIXNAME = "FGMixNumberBlock";
405
- /**
406
- * Outputs a mix of left and right based on alpha.
407
- * @experimental
408
- */
409
- export class FlowGraphMixNumberBlock extends FlowGraphBlock {
410
- constructor(config) {
411
- super(config);
412
- this.leftInput = this.registerDataInput("leftInput", RichTypeNumber);
413
- this.rightInput = this.registerDataInput("rightInput", RichTypeNumber);
414
- this.alphaInput = this.registerDataInput("alphaInput", RichTypeNumber);
415
- this.resultOutput = this.registerDataOutput("resultOutput", RichTypeNumber);
416
- }
417
- _updateOutputs(_context) {
418
- const left = this.leftInput.getValue(_context);
419
- const right = this.rightInput.getValue(_context);
420
- const alpha = this.alphaInput.getValue(_context);
421
- const mix = left + (right - left) * alpha;
422
- this.resultOutput.setValue(mix, _context);
423
- }
424
- getClassName() {
425
- return MIXNAME;
426
- }
427
- }
428
- RegisterClass(MIXNAME, FlowGraphMixNumberBlock);
429
- //# sourceMappingURL=flowGraphNumberMathBlocks.js.map