@bitbybit-dev/base 1.2.0-rc.2 → 1.3.0-rc.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/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/inputs/base-inputs.d.ts +13 -12
- package/lib/api/inputs/color-inputs.d.ts +97 -48
- package/lib/api/inputs/color-inputs.js +95 -46
- package/lib/api/inputs/dates-inputs.d.ts +67 -26
- package/lib/api/inputs/dates-inputs.js +57 -16
- package/lib/api/inputs/io-inputs.d.ts +13 -15
- package/lib/api/inputs/io-inputs.js +7 -8
- package/lib/api/inputs/line-inputs.d.ts +88 -33
- package/lib/api/inputs/line-inputs.js +61 -11
- package/lib/api/inputs/lists-inputs.d.ts +207 -96
- package/lib/api/inputs/lists-inputs.js +153 -45
- package/lib/api/inputs/logic-inputs.d.ts +52 -22
- package/lib/api/inputs/logic-inputs.js +41 -12
- package/lib/api/inputs/math-inputs.d.ts +113 -52
- package/lib/api/inputs/math-inputs.js +112 -51
- package/lib/api/inputs/mesh-inputs.d.ts +30 -11
- package/lib/api/inputs/mesh-inputs.js +21 -3
- package/lib/api/inputs/point-inputs.d.ts +240 -107
- package/lib/api/inputs/point-inputs.js +199 -73
- package/lib/api/inputs/polyline-inputs.d.ts +68 -28
- package/lib/api/inputs/polyline-inputs.js +48 -13
- package/lib/api/inputs/text-inputs.d.ts +117 -46
- package/lib/api/inputs/text-inputs.js +111 -41
- package/lib/api/inputs/transforms-inputs.d.ts +65 -23
- package/lib/api/inputs/transforms-inputs.js +64 -22
- package/lib/api/inputs/vector-inputs.d.ts +154 -76
- package/lib/api/inputs/vector-inputs.js +132 -57
- package/lib/api/models/point/hex-grid-data.d.ts +1 -1
- package/lib/api/models/point/hex-grid-data.js +1 -1
- package/lib/api/services/color.d.ts +149 -70
- package/lib/api/services/color.js +149 -70
- package/lib/api/services/dates.d.ts +313 -150
- package/lib/api/services/dates.js +313 -150
- package/lib/api/services/line.d.ts +138 -68
- package/lib/api/services/line.js +138 -68
- package/lib/api/services/lists.d.ts +357 -177
- package/lib/api/services/lists.js +357 -177
- package/lib/api/services/logic.d.ts +98 -45
- package/lib/api/services/logic.js +98 -45
- package/lib/api/services/math.d.ts +363 -211
- package/lib/api/services/math.js +363 -211
- package/lib/api/services/mesh.d.ts +73 -31
- package/lib/api/services/mesh.js +73 -31
- package/lib/api/services/point.d.ts +367 -147
- package/lib/api/services/point.js +367 -147
- package/lib/api/services/polyline.d.ts +146 -71
- package/lib/api/services/polyline.js +146 -71
- package/lib/api/services/text.d.ts +320 -165
- package/lib/api/services/text.js +320 -165
- package/lib/api/services/transforms.d.ts +145 -58
- package/lib/api/services/transforms.js +145 -58
- package/lib/api/services/vector.d.ts +381 -156
- package/lib/api/services/vector.js +381 -156
- package/package.json +1 -1
|
@@ -85,10 +85,13 @@ export declare namespace Math {
|
|
|
85
85
|
easeOutBounce = "easeOutBounce",
|
|
86
86
|
easeInOutBounce = "easeInOutBounce"
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* A number and a divisor for `math.modulus`, which gives the remainder of the division.
|
|
90
|
+
*/
|
|
88
91
|
class ModulusDto {
|
|
89
92
|
constructor(number?: number, modulus?: number);
|
|
90
93
|
/**
|
|
91
|
-
*
|
|
94
|
+
* The number to divide.
|
|
92
95
|
* @default 1
|
|
93
96
|
* @minimum -Infinity
|
|
94
97
|
* @maximum Infinity
|
|
@@ -96,18 +99,22 @@ export declare namespace Math {
|
|
|
96
99
|
*/
|
|
97
100
|
number: number;
|
|
98
101
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @default
|
|
102
|
+
* The number to divide by; the remainder is smaller than it.
|
|
103
|
+
* @default 2
|
|
101
104
|
* @minimum -Infinity
|
|
102
105
|
* @maximum Infinity
|
|
103
106
|
* @step 0.1
|
|
104
107
|
*/
|
|
105
108
|
modulus: number;
|
|
106
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* One number for the single-number methods of `math`: `sqrt`, `abs`, `sin`, `degToRad` and the
|
|
112
|
+
* rest.
|
|
113
|
+
*/
|
|
107
114
|
class NumberDto {
|
|
108
115
|
constructor(number?: number);
|
|
109
116
|
/**
|
|
110
|
-
*
|
|
117
|
+
* The number the method works on; for the trigonometric methods an angle in radians.
|
|
111
118
|
* @default 1
|
|
112
119
|
* @minimum -Infinity
|
|
113
120
|
* @maximum Infinity
|
|
@@ -115,10 +122,13 @@ export declare namespace Math {
|
|
|
115
122
|
*/
|
|
116
123
|
number: number;
|
|
117
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* A value between 0 and 1, a target range and an easing curve for `math.ease`.
|
|
127
|
+
*/
|
|
118
128
|
class EaseDto {
|
|
119
129
|
constructor(x?: number);
|
|
120
130
|
/**
|
|
121
|
-
*
|
|
131
|
+
* The position along the curve, from 0 at `min` to 1 at `max`.
|
|
122
132
|
* @default 0.5
|
|
123
133
|
* @minimum 0
|
|
124
134
|
* @maximum 1
|
|
@@ -126,7 +136,7 @@ export declare namespace Math {
|
|
|
126
136
|
*/
|
|
127
137
|
x: number;
|
|
128
138
|
/**
|
|
129
|
-
*
|
|
139
|
+
* The value at the start of the curve.
|
|
130
140
|
* @default 0
|
|
131
141
|
* @minimum -Infinity
|
|
132
142
|
* @maximum Infinity
|
|
@@ -134,7 +144,7 @@ export declare namespace Math {
|
|
|
134
144
|
*/
|
|
135
145
|
min: number;
|
|
136
146
|
/**
|
|
137
|
-
*
|
|
147
|
+
* The value at the end of the curve.
|
|
138
148
|
* @default 1
|
|
139
149
|
* @minimum -Infinity
|
|
140
150
|
* @maximum Infinity
|
|
@@ -142,15 +152,19 @@ export declare namespace Math {
|
|
|
142
152
|
*/
|
|
143
153
|
max: number;
|
|
144
154
|
/**
|
|
145
|
-
*
|
|
155
|
+
* The easing curve: `easeIn` starts slowly, `easeOut` ends slowly, `easeInOut` does both,
|
|
156
|
+
* in sine, quadratic, cubic and other strengths.
|
|
146
157
|
* @default easeInSine
|
|
147
158
|
*/
|
|
148
159
|
ease: easeEnum;
|
|
149
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* A number and a precision for `math.roundToDecimals` and `math.roundAndRemoveTrailingZeros`.
|
|
163
|
+
*/
|
|
150
164
|
class RoundToDecimalsDto {
|
|
151
165
|
constructor(number?: number, decimalPlaces?: number);
|
|
152
166
|
/**
|
|
153
|
-
*
|
|
167
|
+
* The number to round; it is not changed, a rounded copy is returned.
|
|
154
168
|
* @default 1.123456
|
|
155
169
|
* @minimum -Infinity
|
|
156
170
|
* @maximum Infinity
|
|
@@ -158,7 +172,7 @@ export declare namespace Math {
|
|
|
158
172
|
*/
|
|
159
173
|
number: number;
|
|
160
174
|
/**
|
|
161
|
-
*
|
|
175
|
+
* How many digits to keep after the decimal point; 0 rounds to a whole number.
|
|
162
176
|
* @default 2
|
|
163
177
|
* @minimum -Infinity
|
|
164
178
|
* @maximum Infinity
|
|
@@ -166,10 +180,13 @@ export declare namespace Math {
|
|
|
166
180
|
*/
|
|
167
181
|
decimalPlaces: number;
|
|
168
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Two numbers and the arithmetic operation `math.twoNrOperation` applies to them.
|
|
185
|
+
*/
|
|
169
186
|
class ActionOnTwoNumbersDto {
|
|
170
187
|
constructor(first?: number, second?: number, operation?: mathTwoNrOperatorEnum);
|
|
171
188
|
/**
|
|
172
|
-
*
|
|
189
|
+
* The first operand: the number subtracted from, divided, or raised to a power.
|
|
173
190
|
* @default 1
|
|
174
191
|
* @minimum -Infinity
|
|
175
192
|
* @maximum Infinity
|
|
@@ -177,7 +194,7 @@ export declare namespace Math {
|
|
|
177
194
|
*/
|
|
178
195
|
first: number;
|
|
179
196
|
/**
|
|
180
|
-
*
|
|
197
|
+
* The second operand: the number subtracted, divided by, or used as the exponent.
|
|
181
198
|
* @default 1
|
|
182
199
|
* @minimum -Infinity
|
|
183
200
|
* @maximum Infinity
|
|
@@ -185,15 +202,18 @@ export declare namespace Math {
|
|
|
185
202
|
*/
|
|
186
203
|
second: number;
|
|
187
204
|
/**
|
|
188
|
-
*
|
|
205
|
+
* The operation to apply to `first` and `second`, in that order
|
|
189
206
|
* @default add
|
|
190
207
|
*/
|
|
191
208
|
operation: mathTwoNrOperatorEnum;
|
|
192
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Two numbers for `math.add`, `math.subtract`, `math.multiply`, `math.divide` and `math.power`.
|
|
212
|
+
*/
|
|
193
213
|
class TwoNumbersDto {
|
|
194
214
|
constructor(first?: number, second?: number);
|
|
195
215
|
/**
|
|
196
|
-
*
|
|
216
|
+
* The first operand: the number subtracted from, divided, or raised to a power.
|
|
197
217
|
* @default 1
|
|
198
218
|
* @minimum -Infinity
|
|
199
219
|
* @maximum Infinity
|
|
@@ -201,7 +221,7 @@ export declare namespace Math {
|
|
|
201
221
|
*/
|
|
202
222
|
first: number;
|
|
203
223
|
/**
|
|
204
|
-
*
|
|
224
|
+
* The second operand: the number subtracted, divided by, or used as the exponent.
|
|
205
225
|
* @default 2
|
|
206
226
|
* @minimum -Infinity
|
|
207
227
|
* @maximum Infinity
|
|
@@ -209,10 +229,13 @@ export declare namespace Math {
|
|
|
209
229
|
*/
|
|
210
230
|
second: number;
|
|
211
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* One number and the operation `math.oneNrOperation` applies to it.
|
|
234
|
+
*/
|
|
212
235
|
class ActionOnOneNumberDto {
|
|
213
236
|
constructor(number?: number, operation?: mathOneNrOperatorEnum);
|
|
214
237
|
/**
|
|
215
|
-
*
|
|
238
|
+
* The number the operation works on; for the trigonometric operations an angle in radians.
|
|
216
239
|
* @default 1
|
|
217
240
|
* @minimum -Infinity
|
|
218
241
|
* @maximum Infinity
|
|
@@ -220,15 +243,18 @@ export declare namespace Math {
|
|
|
220
243
|
*/
|
|
221
244
|
number: number;
|
|
222
245
|
/**
|
|
223
|
-
*
|
|
246
|
+
* The operation to apply to `number`
|
|
224
247
|
* @default absolute
|
|
225
248
|
*/
|
|
226
249
|
operation: mathOneNrOperatorEnum;
|
|
227
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* A number, the range it is in and the range `math.remap` maps it to.
|
|
253
|
+
*/
|
|
228
254
|
class RemapNumberDto {
|
|
229
255
|
constructor(number?: number, fromLow?: number, fromHigh?: number, toLow?: number, toHigh?: number);
|
|
230
256
|
/**
|
|
231
|
-
*
|
|
257
|
+
* The number to map.
|
|
232
258
|
* @default 0.5
|
|
233
259
|
* @minimum -Infinity
|
|
234
260
|
* @maximum Infinity
|
|
@@ -236,7 +262,7 @@ export declare namespace Math {
|
|
|
236
262
|
*/
|
|
237
263
|
number: number;
|
|
238
264
|
/**
|
|
239
|
-
*
|
|
265
|
+
* The low end of the range the number is in.
|
|
240
266
|
* @default 0
|
|
241
267
|
* @minimum -Infinity
|
|
242
268
|
* @maximum Infinity
|
|
@@ -244,15 +270,15 @@ export declare namespace Math {
|
|
|
244
270
|
*/
|
|
245
271
|
fromLow: number;
|
|
246
272
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
273
|
+
* The high end of the range the number is in.
|
|
274
|
+
* @default 1
|
|
275
|
+
* @minimum -Infinity
|
|
276
|
+
* @maximum Infinity
|
|
277
|
+
* @step 0.1
|
|
278
|
+
*/
|
|
253
279
|
fromHigh: number;
|
|
254
280
|
/**
|
|
255
|
-
*
|
|
281
|
+
* The low end of the range to map to; `fromLow` lands here.
|
|
256
282
|
* @default 1
|
|
257
283
|
* @minimum -Infinity
|
|
258
284
|
* @maximum Infinity
|
|
@@ -260,7 +286,7 @@ export declare namespace Math {
|
|
|
260
286
|
*/
|
|
261
287
|
toLow: number;
|
|
262
288
|
/**
|
|
263
|
-
*
|
|
289
|
+
* The high end of the range to map to; `fromHigh` lands here.
|
|
264
290
|
* @default 2
|
|
265
291
|
* @minimum -Infinity
|
|
266
292
|
* @maximum Infinity
|
|
@@ -268,10 +294,14 @@ export declare namespace Math {
|
|
|
268
294
|
*/
|
|
269
295
|
toHigh: number;
|
|
270
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* The range `math.randomNumber` picks a value from; `low` can be picked, `high` is never quite
|
|
299
|
+
* reached.
|
|
300
|
+
*/
|
|
271
301
|
class RandomNumberDto {
|
|
272
302
|
constructor(low?: number, high?: number);
|
|
273
303
|
/**
|
|
274
|
-
*
|
|
304
|
+
* The smallest value that can be picked.
|
|
275
305
|
* @default 0
|
|
276
306
|
* @minimum -Infinity
|
|
277
307
|
* @maximum Infinity
|
|
@@ -279,7 +309,7 @@ export declare namespace Math {
|
|
|
279
309
|
*/
|
|
280
310
|
low: number;
|
|
281
311
|
/**
|
|
282
|
-
*
|
|
312
|
+
* The top of the range; values get close to it but never reach it.
|
|
283
313
|
* @default 1
|
|
284
314
|
* @minimum -Infinity
|
|
285
315
|
* @maximum Infinity
|
|
@@ -287,10 +317,14 @@ export declare namespace Math {
|
|
|
287
317
|
*/
|
|
288
318
|
high: number;
|
|
289
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* The range and the count for `math.randomNumbers`; `low` can be picked, `high` is never quite
|
|
322
|
+
* reached.
|
|
323
|
+
*/
|
|
290
324
|
class RandomNumbersDto {
|
|
291
325
|
constructor(low?: number, high?: number, count?: number);
|
|
292
326
|
/**
|
|
293
|
-
*
|
|
327
|
+
* The smallest value that can be picked.
|
|
294
328
|
* @default 0
|
|
295
329
|
* @minimum -Infinity
|
|
296
330
|
* @maximum Infinity
|
|
@@ -298,7 +332,7 @@ export declare namespace Math {
|
|
|
298
332
|
*/
|
|
299
333
|
low: number;
|
|
300
334
|
/**
|
|
301
|
-
*
|
|
335
|
+
* The top of the range; values get close to it but never reach it.
|
|
302
336
|
* @default 1
|
|
303
337
|
* @minimum -Infinity
|
|
304
338
|
* @maximum Infinity
|
|
@@ -306,7 +340,7 @@ export declare namespace Math {
|
|
|
306
340
|
*/
|
|
307
341
|
high: number;
|
|
308
342
|
/**
|
|
309
|
-
*
|
|
343
|
+
* How many random numbers to produce.
|
|
310
344
|
* @default 10
|
|
311
345
|
* @minimum -Infinity
|
|
312
346
|
* @maximum Infinity
|
|
@@ -314,10 +348,13 @@ export declare namespace Math {
|
|
|
314
348
|
*/
|
|
315
349
|
count: number;
|
|
316
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* A number and a precision for `math.toFixed`, which formats it as text.
|
|
353
|
+
*/
|
|
317
354
|
class ToFixedDto {
|
|
318
355
|
constructor(number?: number, decimalPlaces?: number);
|
|
319
356
|
/**
|
|
320
|
-
*
|
|
357
|
+
* The number to format.
|
|
321
358
|
* @default undefined
|
|
322
359
|
* @minimum -Infinity
|
|
323
360
|
* @maximum Infinity
|
|
@@ -325,7 +362,7 @@ export declare namespace Math {
|
|
|
325
362
|
*/
|
|
326
363
|
number: number;
|
|
327
364
|
/**
|
|
328
|
-
*
|
|
365
|
+
* How many digits to show after the decimal point, padding with zeros.
|
|
329
366
|
* @default 2
|
|
330
367
|
* @minimum -Infinity
|
|
331
368
|
* @maximum Infinity
|
|
@@ -333,10 +370,13 @@ export declare namespace Math {
|
|
|
333
370
|
*/
|
|
334
371
|
decimalPlaces: number;
|
|
335
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* A number and the range `math.clamp` keeps it within.
|
|
375
|
+
*/
|
|
336
376
|
class ClampDto {
|
|
337
377
|
constructor(number?: number, min?: number, max?: number);
|
|
338
378
|
/**
|
|
339
|
-
*
|
|
379
|
+
* The number to limit.
|
|
340
380
|
* @default 0.5
|
|
341
381
|
* @minimum -Infinity
|
|
342
382
|
* @maximum Infinity
|
|
@@ -344,7 +384,7 @@ export declare namespace Math {
|
|
|
344
384
|
*/
|
|
345
385
|
number: number;
|
|
346
386
|
/**
|
|
347
|
-
*
|
|
387
|
+
* The lowest value allowed; anything below becomes this.
|
|
348
388
|
* @default 0
|
|
349
389
|
* @minimum -Infinity
|
|
350
390
|
* @maximum Infinity
|
|
@@ -352,7 +392,7 @@ export declare namespace Math {
|
|
|
352
392
|
*/
|
|
353
393
|
min: number;
|
|
354
394
|
/**
|
|
355
|
-
*
|
|
395
|
+
* The highest value allowed; anything above becomes this.
|
|
356
396
|
* @default 1
|
|
357
397
|
* @minimum -Infinity
|
|
358
398
|
* @maximum Infinity
|
|
@@ -360,10 +400,13 @@ export declare namespace Math {
|
|
|
360
400
|
*/
|
|
361
401
|
max: number;
|
|
362
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* A start, an end and a fraction for `math.lerp`, which blends between them.
|
|
405
|
+
*/
|
|
363
406
|
class LerpDto {
|
|
364
407
|
constructor(start?: number, end?: number, t?: number);
|
|
365
408
|
/**
|
|
366
|
-
*
|
|
409
|
+
* The value at fraction 0.
|
|
367
410
|
* @default 0
|
|
368
411
|
* @minimum -Infinity
|
|
369
412
|
* @maximum Infinity
|
|
@@ -371,7 +414,7 @@ export declare namespace Math {
|
|
|
371
414
|
*/
|
|
372
415
|
start: number;
|
|
373
416
|
/**
|
|
374
|
-
*
|
|
417
|
+
* The value at fraction 1.
|
|
375
418
|
* @default 1
|
|
376
419
|
* @minimum -Infinity
|
|
377
420
|
* @maximum Infinity
|
|
@@ -379,7 +422,7 @@ export declare namespace Math {
|
|
|
379
422
|
*/
|
|
380
423
|
end: number;
|
|
381
424
|
/**
|
|
382
|
-
*
|
|
425
|
+
* How far from start to end, from 0 to 1; values outside that range extrapolate.
|
|
383
426
|
* @default 0.5
|
|
384
427
|
* @minimum -Infinity
|
|
385
428
|
* @maximum Infinity
|
|
@@ -387,10 +430,14 @@ export declare namespace Math {
|
|
|
387
430
|
*/
|
|
388
431
|
t: number;
|
|
389
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* A start, an end and a value for `math.inverseLerp`, which finds the value's fraction between
|
|
435
|
+
* them.
|
|
436
|
+
*/
|
|
390
437
|
class InverseLerpDto {
|
|
391
438
|
constructor(start?: number, end?: number, value?: number);
|
|
392
439
|
/**
|
|
393
|
-
*
|
|
440
|
+
* The value that counts as fraction 0.
|
|
394
441
|
* @default 0
|
|
395
442
|
* @minimum -Infinity
|
|
396
443
|
* @maximum Infinity
|
|
@@ -398,7 +445,7 @@ export declare namespace Math {
|
|
|
398
445
|
*/
|
|
399
446
|
start: number;
|
|
400
447
|
/**
|
|
401
|
-
*
|
|
448
|
+
* The value that counts as fraction 1.
|
|
402
449
|
* @default 1
|
|
403
450
|
* @minimum -Infinity
|
|
404
451
|
* @maximum Infinity
|
|
@@ -406,7 +453,7 @@ export declare namespace Math {
|
|
|
406
453
|
*/
|
|
407
454
|
end: number;
|
|
408
455
|
/**
|
|
409
|
-
*
|
|
456
|
+
* The value to locate between start and end.
|
|
410
457
|
* @default 0.5
|
|
411
458
|
* @minimum -Infinity
|
|
412
459
|
* @maximum Infinity
|
|
@@ -414,10 +461,13 @@ export declare namespace Math {
|
|
|
414
461
|
*/
|
|
415
462
|
value: number;
|
|
416
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* A number and the range `math.wrap` cycles it into.
|
|
466
|
+
*/
|
|
417
467
|
class WrapDto {
|
|
418
468
|
constructor(number?: number, min?: number, max?: number);
|
|
419
469
|
/**
|
|
420
|
-
*
|
|
470
|
+
* The number to wrap; it may be far outside the range.
|
|
421
471
|
* @default 1.5
|
|
422
472
|
* @minimum -Infinity
|
|
423
473
|
* @maximum Infinity
|
|
@@ -425,7 +475,7 @@ export declare namespace Math {
|
|
|
425
475
|
*/
|
|
426
476
|
number: number;
|
|
427
477
|
/**
|
|
428
|
-
*
|
|
478
|
+
* The start of the range, included in the result.
|
|
429
479
|
* @default 0
|
|
430
480
|
* @minimum -Infinity
|
|
431
481
|
* @maximum Infinity
|
|
@@ -433,7 +483,7 @@ export declare namespace Math {
|
|
|
433
483
|
*/
|
|
434
484
|
min: number;
|
|
435
485
|
/**
|
|
436
|
-
*
|
|
486
|
+
* The end of the range, not included: a number reaching it comes back in at `min`.
|
|
437
487
|
* @default 1
|
|
438
488
|
* @minimum -Infinity
|
|
439
489
|
* @maximum Infinity
|
|
@@ -441,10 +491,14 @@ export declare namespace Math {
|
|
|
441
491
|
*/
|
|
442
492
|
max: number;
|
|
443
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* A running value and a length for `math.pingPong`, which bounces the value between 0 and the
|
|
496
|
+
* length.
|
|
497
|
+
*/
|
|
444
498
|
class PingPongDto {
|
|
445
499
|
constructor(t?: number, length?: number);
|
|
446
500
|
/**
|
|
447
|
-
*
|
|
501
|
+
* The running value, such as elapsed time; it may grow without limit.
|
|
448
502
|
* @default 0.5
|
|
449
503
|
* @minimum -Infinity
|
|
450
504
|
* @maximum Infinity
|
|
@@ -452,7 +506,7 @@ export declare namespace Math {
|
|
|
452
506
|
*/
|
|
453
507
|
t: number;
|
|
454
508
|
/**
|
|
455
|
-
*
|
|
509
|
+
* The turning point: the result rises to it, then falls back to 0.
|
|
456
510
|
* @default 1
|
|
457
511
|
* @minimum -Infinity
|
|
458
512
|
* @maximum Infinity
|
|
@@ -460,10 +514,13 @@ export declare namespace Math {
|
|
|
460
514
|
*/
|
|
461
515
|
length: number;
|
|
462
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* A current value, a target and a step limit for `math.moveTowards`.
|
|
519
|
+
*/
|
|
463
520
|
class MoveTowardsDto {
|
|
464
521
|
constructor(current?: number, target?: number, maxDelta?: number);
|
|
465
522
|
/**
|
|
466
|
-
*
|
|
523
|
+
* The value to move.
|
|
467
524
|
* @default 0
|
|
468
525
|
* @minimum -Infinity
|
|
469
526
|
* @maximum Infinity
|
|
@@ -471,7 +528,7 @@ export declare namespace Math {
|
|
|
471
528
|
*/
|
|
472
529
|
current: number;
|
|
473
530
|
/**
|
|
474
|
-
*
|
|
531
|
+
* The value to move toward; it is never overshot.
|
|
475
532
|
* @default 1
|
|
476
533
|
* @minimum -Infinity
|
|
477
534
|
* @maximum Infinity
|
|
@@ -479,7 +536,7 @@ export declare namespace Math {
|
|
|
479
536
|
*/
|
|
480
537
|
target: number;
|
|
481
538
|
/**
|
|
482
|
-
*
|
|
539
|
+
* The largest change allowed in one step.
|
|
483
540
|
* @default 0.1
|
|
484
541
|
* @minimum -Infinity
|
|
485
542
|
* @maximum Infinity
|
|
@@ -487,10 +544,14 @@ export declare namespace Math {
|
|
|
487
544
|
*/
|
|
488
545
|
maxDelta: number;
|
|
489
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* An expression written as text for `math.evalArithmetic`.
|
|
549
|
+
*/
|
|
490
550
|
class EvalArithmeticDto {
|
|
491
551
|
constructor(expression?: string);
|
|
492
552
|
/**
|
|
493
|
-
*
|
|
553
|
+
* The expression: numbers, `+`, `-`, the multiplication sign, `/`, parentheses and spaces,
|
|
554
|
+
* such as `(3 + 2) / 4`.
|
|
494
555
|
* @default 1+1
|
|
495
556
|
*/
|
|
496
557
|
expression: string;
|