littlejsengine 1.18.1 → 1.18.4

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.
@@ -0,0 +1,17 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v5
12
+ - uses: actions/setup-node@v5
13
+ with:
14
+ node-version: '22'
15
+ - run: npm install
16
+ - run: npm run build
17
+ - run: npm test
package/AI.md CHANGED
@@ -141,6 +141,7 @@ drawEllipse(pos, size, color) // filled ellipse
141
141
 
142
142
  ## Common pitfalls
143
143
 
144
+ - **New public APIs must be added to `src/engineExport.js`** - Variables and functions added to engine source files are accessible in script-tag builds automatically, but the ESM build (`littlejs.esm.js`) and TypeScript definitions (`littlejs.d.ts`) only include what's listed in `engineExport.js`. Plugin exports go in `plugins/pluginExport.js`. Forgetting this means ESM/TS users can't access the new API.
144
145
  - **ASSERT and LOG are stripped in release builds** - Don't rely on side effects
145
146
  - **Don't modify constant colors** - `WHITE`, `BLACK`, `RED`, etc. are frozen; use `.copy()` first
146
147
  - **Time variables are global** - `time`, `frame` update automatically each frame
@@ -155,6 +156,16 @@ drawEllipse(pos, size, color) // filled ellipse
155
156
  npm run build
156
157
  ```
157
158
 
159
+ ### Testing
160
+ ```bash
161
+ npm test
162
+ ```
163
+
164
+ - Tests target `dist/littlejs.esm.js` — rebuild with `npm run build` after changing source.
165
+ - [test/setup.mjs](test/setup.mjs) stubs minimal DOM and enables headless mode. Tests shouldn't call `engineInit`, `render()`, or assume `time` advances.
166
+ - Zero test dependencies — uses Node's built-in `node --test`. Match the style in [test/](test/) when adding new ones.
167
+ - CI runs build + test on every push/PR ([.github/workflows/test.yml](.github/workflows/test.yml)).
168
+
158
169
  ### Debug features
159
170
  - Press `Esc` to toggle debug overlay
160
171
  - Number keys toggle visualizations
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- LittleJS Engine License (MIT License)
1
+ The MIT License
2
2
 
3
3
  Copyright (c) 2021 Frank Force http://www.frankforce.com
4
4
 
@@ -9,35 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- -------------------------------------------------------------------------------
24
-
25
- Box2D License
26
-
27
- Copyright (c) 2006-2013 Erin Catto http://www.gphysics.com
28
-
29
- This software is provided 'as-is', without any express or implied
30
- warranty. In no event will the authors be held liable for any damages
31
- arising from the use of this software.
32
-
33
- Permission is granted to anyone to use this software for any purpose,
34
- including commercial applications, and to alter it and redistribute it
35
- freely, subject to the following restrictions:
36
-
37
- 1. The origin of this software must not be misrepresented; you must not
38
- claim that you wrote the original software. If you use this software
39
- in a product, an acknowledgment in the product documentation would be
40
- appreciated but is not required.
41
- 2. Altered source versions must be plainly marked as such, and must not be
42
- misrepresented as being the original software.
43
- 3. This notice may not be removed or altered from any source distribution.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LittleJS - The Tiny Fast JavaScript Game Engine
2
2
 
3
- <div align='center'>
3
+ <div align='center' markdown='1'>
4
4
 
5
5
  ![LittleJS Logo](examples/logo.png)
6
6
 
@@ -22,7 +22,7 @@ The code is very clean and well documented with many examples to get you started
22
22
 
23
23
  *The Third Annual LittleJS Game Jam will take place From Oct 2 to Nov 2! Unleash your creativity and develop amazing games using the LittleJS game engine. 🕹️🎮 [Sign up today and get more info about the jam on itch.io!](https://itch.io/jam/littlejs-jam)*
24
24
 
25
- <div align='center'>
25
+ <div align='center' markdown='1'>
26
26
 
27
27
  ## [Demos](https://killedbyapixel.github.io/LittleJS/examples) | [Docs](https://killedbyapixel.github.io/LittleJS/docs) | [Trailer](https://youtu.be/chuBzGjv7Ms) | [Discord](https://discord.gg/zb7hcGkyZe) | [FAQ](https://github.com/KilledByAPixel/LittleJS/blob/main/FAQ.md)
28
28
 
@@ -96,7 +96,7 @@ declare module "littlejsengine" {
96
96
  * @type {number}
97
97
  * @memberof Engine */
98
98
  export let time: number;
99
- /** Actual clock time since start in seconds (not affected by pause or frame rate clamping)
99
+ /** Actual clock time since start in seconds (not affected by pause, timescale, or frame rate clamping)
100
100
  * @type {number}
101
101
  * @memberof Engine */
102
102
  export let timeReal: number;
@@ -333,6 +333,14 @@ declare module "littlejsengine" {
333
333
  * @default
334
334
  * @memberof Settings */
335
335
  export let cameraScale: number;
336
+ /** Scale applied to engine time, can be used for slow motion or fast forward
337
+ * - 1 is normal speed, 2 is double speed, 0.5 is half speed
338
+ * - 0 freezes the simulation without setting the paused flag
339
+ * - Should be >= 0; stacks multiplicatively with the debug +/- shortcut
340
+ * @type {number}
341
+ * @default
342
+ * @memberof Settings */
343
+ export let timeScale: number;
336
344
  /** Enable applying color to tiles when using canvas2d
337
345
  * - This is slower but should be the same as WebGL rendering
338
346
  * @type {boolean}
@@ -480,17 +488,21 @@ declare module "littlejsengine" {
480
488
  export let inputWASDEmulateDirection: boolean;
481
489
  /** True if touch gamepad should appear on mobile devices
482
490
  * - Supports left analog stick, 4 face buttons and start button (button 9)
491
+ * - setTouchGamepadButtonCount(1) to use face buttons as right analog stick
492
+ * - Analog stick buttons 10 and 11 are also activated when virtual sticks are touched
493
+
483
494
  * @type {boolean}
484
495
  * @default
485
496
  * @memberof Settings */
486
497
  export let touchGamepadEnable: boolean;
487
498
  /** True if touch gamepad should have start button in the center
499
+ * - Prevents activating if overlappng with virtual stick or buttons if they are enabled
488
500
  * - When the game is paused, any touch will press the button
489
- * - This can function as a way to pause/unpause the game
490
- * @type {boolean}
501
+ * - Set size to enable the center button
502
+ * @type {number}
491
503
  * @default
492
504
  * @memberof Settings */
493
- export let touchGamepadCenterButton: boolean;
505
+ export let touchGamepadCenterButtonSize: number;
494
506
  /** True if touch gamepad should be analog stick or false to use if 8 way dpad
495
507
  * @type {boolean}
496
508
  * @default
@@ -563,6 +575,10 @@ declare module "littlejsengine" {
563
575
  * @param {number} scale
564
576
  * @memberof Settings */
565
577
  export function setCameraScale(scale: number): void;
578
+ /** Set scale applied to engine time
579
+ * @param {number} scale
580
+ * @memberof Settings */
581
+ export function setTimeScale(scale: number): void;
566
582
  /** Set if tiles should be colorized when using canvas2d
567
583
  * This can be slower but results should look nearly identical to WebGL rendering
568
584
  * It can be enabled/disabled at any time
@@ -687,11 +703,12 @@ declare module "littlejsengine" {
687
703
  * @param {boolean} enable
688
704
  * @memberof Settings */
689
705
  export function setTouchGamepadEnable(enable: boolean): void;
690
- /** True if touch gamepad should have start button in the center
691
- * - This can function as a way to pause/unpause the game
692
- * @param {boolean} enable
706
+ /** Set if touch gamepad should have start button in the center
707
+ * - Set size to enable the center button
708
+ * - When the game is paused, any touch will press the button
709
+ * @param {number} size
693
710
  * @memberof Settings */
694
- export function setTouchGamepadCenterButton(enable: boolean): void;
711
+ export function setTouchGamepadCenterButtonSize(size: number): void;
695
712
  /** Set number of buttons on touch gamepad (0-4), if 1 also acts as right analog stick
696
713
  * @param {number} count
697
714
  * @memberof Settings */
@@ -893,6 +910,16 @@ declare module "littlejsengine" {
893
910
  * @return {number}
894
911
  * @memberof Math */
895
912
  export function lerp(valueA: number, valueB: number, percent: number): number;
913
+ /** Gets percent between percentA and percentB and linearly interpolates between lerpA and lerpB
914
+ * A shortcut for lerp(lerpA, lerpB, percent(value, percentA, percentB))
915
+ * @param {number} value
916
+ * @param {number} percentA
917
+ * @param {number} percentB
918
+ * @param {number} lerpA
919
+ * @param {number} lerpB
920
+ * @return {number}
921
+ * @memberof Math */
922
+ export function percentLerp(value: number, percentA: number, percentB: number, lerpA: number, lerpB: number): number;
896
923
  /** Applies smoothstep function to the percentage value
897
924
  * @param {number} percent
898
925
  * @return {number}
@@ -920,6 +947,20 @@ declare module "littlejsengine" {
920
947
  * @return {boolean} - True if intersecting
921
948
  * @memberof Math */
922
949
  export function isIntersecting(start: Vector2, end: Vector2, pos: Vector2, size: Vector2): boolean;
950
+ /**
951
+ * @callback LineTestFunction - Checks if a position is colliding
952
+ * @param {Vector2} pos
953
+ * @memberof Draw
954
+ */
955
+ /**
956
+ * Casts a ray and returns position of the first collision found, or undefined if none are found
957
+ * @param {Vector2} posStart
958
+ * @param {Vector2} posEnd
959
+ * @param {LineTestFunction} testFunction - Check if colliding
960
+ * @param {Vector2} [normal] - Optional vector to store the normal
961
+ * @return {Vector2|undefined} - Position of the collision or undefined if none found
962
+ * @memberof Math */
963
+ export function lineTest(posStart: Vector2, posEnd: Vector2, testFunction: LineTestFunction, normal?: Vector2): Vector2 | undefined;
923
964
  /** Returns an oscillating wave between 0 and amplitude with frequency of 1 Hz by default
924
965
  * @param {number} [frequency] - Frequency of the wave in Hz
925
966
  * @param {number} [amplitude] - Amplitude (max height) of the wave
@@ -1704,6 +1745,21 @@ declare module "littlejsengine" {
1704
1745
  * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} [context]
1705
1746
  * @memberof Draw */
1706
1747
  export function drawRectGradient(pos: Vector2, size?: Vector2, colorTop?: Color, colorBottom?: Color, angle?: number, useWebGL?: boolean, screenSpace?: boolean, context?: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D): void;
1748
+ /** Draw a texture tiled (wrapped) across a rectangle in world space.
1749
+ * Useful for backgrounds, repeating patterns, and seamless fills.
1750
+ * The whole texture is tiled — sub-region (TileInfo) wrapping is not supported.
1751
+ * @param {Vector2} pos - Center of the rect in world space
1752
+ * @param {Vector2} size - Size of the rect in world space
1753
+ * @param {Vector2} wrapCount - How many times the texture repeats (x, y)
1754
+ * @param {TextureInfo|number} [texture=0] - TextureInfo or texture index into textureInfos
1755
+ * @param {Color} [color=WHITE] - Color to modulate with
1756
+ * @param {number} [angle=0] - Angle to rotate by
1757
+ * @param {Color} [additiveColor] - Additive color to be applied if any
1758
+ * @param {boolean} [useWebGL=glEnable] - Use accelerated WebGL rendering?
1759
+ * @param {boolean} [screenSpace=false] - Are pos and size in screen space?
1760
+ * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} [context] - Canvas 2D context to draw to
1761
+ * @memberof Draw */
1762
+ export function drawTextureWrapped(pos: Vector2, size: Vector2, wrapCount: Vector2, texture?: TextureInfo | number, color?: Color, angle?: number, additiveColor?: Color, useWebGL?: boolean, screenSpace?: boolean, context?: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D): void;
1707
1763
  /** Draw connected lines between a series of points
1708
1764
  * @param {Array<Vector2>} points
1709
1765
  * @param {number} [width]
@@ -1914,9 +1970,8 @@ declare module "littlejsengine" {
1914
1970
  /** Set the WebGL texture, called automatically if using multiple textures
1915
1971
  * - This may also flush the gl buffer resulting in more draw calls and worse performance
1916
1972
  * @param {WebGLTexture} texture
1917
- * @param {boolean} [wrap] - Should the texture wrap or clamp
1918
1973
  * @memberof WebGL */
1919
- export function glSetTexture(texture: WebGLTexture, wrap?: boolean): void;
1974
+ export function glSetTexture(texture: WebGLTexture): void;
1920
1975
  /** Compile WebGL shader of the given type, will throw errors if in debug mode
1921
1976
  * @param {string} source
1922
1977
  * @param {number} type
@@ -2160,6 +2215,18 @@ declare module "littlejsengine" {
2160
2215
  * @return {boolean}
2161
2216
  * @memberof Input */
2162
2217
  export function gamepadConnected(gamepad?: number): boolean;
2218
+ /** Pulse a gamepad's vibration hardware using the dual-rumble effect if it exists
2219
+ * Strong magnitude is usually the left side motor, weak magnitude is usually the right side motor
2220
+ * @param {number} [gamepad] - gamepad index
2221
+ * @param {number} [duration] - effect duration in ms
2222
+ * @param {number} [strongMagnitude] - strong (left) motor intensity, 0 to 1
2223
+ * @param {number} [weakMagnitude] - weak (right) motor intensity, 0 to 1
2224
+ * @param {number} [startDelay] - delay in ms before the effect starts
2225
+ * @memberof Input */
2226
+ export function gamepadVibrate(gamepad?: number, duration?: number, strongMagnitude?: number, weakMagnitude?: number, startDelay?: number): void;
2227
+ /** Stop vibration on a gamepad
2228
+ * @memberof Input */
2229
+ export function gamepadVibrateStop(gamepad?: number): void;
2163
2230
  /** Pulse the vibration hardware if it exists
2164
2231
  * @param {number|Array} [pattern] - single value in ms or vibration interval array
2165
2232
  * @memberof Input */
@@ -4844,4 +4911,164 @@ declare module "littlejsengine" {
4844
4911
  * @param {number} [angle] - Angle to rotate by
4845
4912
  * @memberof DrawUtilities */
4846
4913
  export function drawThreeSliceScreen(pos: Vector2, size: Vector2, startTile: TileInfo, borderSize?: number, extraSpace?: number, angle?: number): void;
4914
+ /** A numeric tween: drives a callback with a value interpolated between
4915
+ * `start` and `end` over `duration` seconds. Pauses with the game by default.
4916
+ * @memberof TweenSystem
4917
+ * @example
4918
+ * // Animate a fade-out over 2 seconds with an ease-out sine curve.
4919
+ * new Tween((v) => obj.alpha = v, 1, 0, 2, { ease: Ease.OUT(Ease.SINE) });
4920
+ */
4921
+ export class Tween {
4922
+ /** Create a new tween. The callback fires immediately with `start` so the
4923
+ * target snaps to the start value on the same frame the tween is created.
4924
+ *
4925
+ * `start` and `end` may be numbers, Vector2 instances, Color instances, or
4926
+ * any object exposing a `lerp(other, percent) => sameType` method. The
4927
+ * callback receives the interpolated value (a number, or a fresh instance
4928
+ * for lerp-able types). Both endpoints must be the same type.
4929
+ * @param {function(number|Vector2|Color):void} callback - Called with the interpolated value each frame
4930
+ * @param {number|Vector2|Color} [start=0] - Starting value
4931
+ * @param {number|Vector2|Color} [end=1] - Ending value
4932
+ * @param {number} [duration=1] - Duration in seconds
4933
+ * @param {Object} [options]
4934
+ * @param {function(number):number} [options.ease] - Easing function (defaults to LINEAR)
4935
+ * @param {boolean} [options.useRealTime=false] - Advance even when the game is paused (matches Timer's useRealTime)
4936
+ * @param {boolean} [options.paused=false] - Start in paused state */
4937
+ constructor(callback: (arg0: number | Vector2 | Color) => void, start?: number | Vector2 | Color, end?: number | Vector2 | Color, duration?: number, options?: {
4938
+ ease?: (arg0: number) => number;
4939
+ useRealTime?: boolean;
4940
+ paused?: boolean;
4941
+ });
4942
+ callback: (arg0: number | Vector2 | Color) => void;
4943
+ start: number | Vector2 | Color;
4944
+ end: number | Vector2 | Color;
4945
+ duration: number;
4946
+ life: number;
4947
+ ease: (arg0: number) => number;
4948
+ useRealTime: boolean;
4949
+ paused: boolean;
4950
+ /** @private completion callback set by then(), loop(), pingPong(). */
4951
+ private thenCallback;
4952
+ /** @private remaining iterations including the current run (loop/pingPong only). */
4953
+ private loopRemaining;
4954
+ /** Set the easing curve and return this for chaining.
4955
+ * @param {function(number):number} easeFn
4956
+ * @returns {Tween}
4957
+ * @memberof TweenSystem */
4958
+ setEase(easeFn: (arg0: number) => number): Tween;
4959
+ /** Set a single completion callback. Calling `then` again replaces the
4960
+ * previous callback. Returns this for chaining.
4961
+ *
4962
+ * Calling `then` after `loop` or `pingPong` overrides the loop chain
4963
+ * (last call wins).
4964
+ * @param {function():void} callback
4965
+ * @returns {Tween}
4966
+ * @memberof TweenSystem */
4967
+ then(callback: () => void): Tween;
4968
+ /** Repeat this tween `n` total times. After each iteration finishes, a
4969
+ * fresh tween with the same parameters takes over via the `then` slot.
4970
+ * `loop()` with no argument loops forever.
4971
+ *
4972
+ * Mutually exclusive with `pingPong`; calling either replaces the other,
4973
+ * and calling `then` after either clears the loop (last call wins).
4974
+ * @param {number} [count=Infinity]
4975
+ * @returns {Tween}
4976
+ * @memberof TweenSystem */
4977
+ loop(count?: number): Tween;
4978
+ /** Like `loop`, but swap `start` and `end` between iterations so the value
4979
+ * bounces back and forth. `pingPong()` with no argument bounces forever.
4980
+ *
4981
+ * Mutually exclusive with `loop`; calling either replaces the other, and
4982
+ * calling `then` after either clears the loop (last call wins).
4983
+ * @param {number} [count=Infinity]
4984
+ * @returns {Tween}
4985
+ * @memberof TweenSystem */
4986
+ pingPong(count?: number): Tween;
4987
+ /** Pause this tween. While paused, tweenUpdate skips it.
4988
+ * @memberof TweenSystem */
4989
+ pause(): void;
4990
+ /** Resume a paused tween.
4991
+ * @memberof TweenSystem */
4992
+ resume(): void;
4993
+ /** Reset this tween to the start: life back to duration, pause cleared,
4994
+ * re-added to the active list if previously stopped, and the callback
4995
+ * re-fired with the start value.
4996
+ * @memberof TweenSystem */
4997
+ restart(): void;
4998
+ /** True if this tween is in the active list and not paused.
4999
+ * @returns {boolean}
5000
+ * @memberof TweenSystem */
5001
+ isActive(): boolean;
5002
+ /** Get how far this tween has progressed, from 0 (just started) to 1
5003
+ * (completed). Clamped — overshoot past completion still reads 1.
5004
+ * @returns {number}
5005
+ * @memberof TweenSystem */
5006
+ getPercent(): number;
5007
+ /** Get the current interpolated value (the value most recently passed to
5008
+ * the callback). Returns a number, Vector2, or Color depending on the
5009
+ * tween's start/end types.
5010
+ * @returns {number|Vector2|Color}
5011
+ * @memberof TweenSystem */
5012
+ getValue(): number | Vector2 | Color;
5013
+ /** Compute the interpolated value at the given remaining `life`.
5014
+ * At life === duration the result is `start`; at life === 0 it is `end`.
5015
+ * @param {number} life
5016
+ * @returns {number}
5017
+ * @memberof TweenSystem */
5018
+ interp(life: number): number;
5019
+ /** Remove this tween from the active list and prevent any pending then-callback.
5020
+ * @memberof TweenSystem */
5021
+ stop(): void;
5022
+ }
5023
+ /** Tween a property on an object by dot-path. Returns the underlying Tween
5024
+ * so all chaining methods (`setEase`, `then`, `loop`, `pingPong`, etc.)
5025
+ * remain available.
5026
+ *
5027
+ * `start` and `end` may be numbers, Vector2 instances, Color instances, or
5028
+ * any object with a `lerp(other, percent) => sameType` method.
5029
+ * @param {Object} target - The object whose property is being animated
5030
+ * @param {string} propertyPath - Dot-separated path, e.g. `'pos.x'` or `'color'`
5031
+ * @param {number|Vector2|Color} start - Starting value
5032
+ * @param {number|Vector2|Color} end - Ending value
5033
+ * @param {number} [duration=1] - Duration in seconds
5034
+ * @param {Object} [options] - Same options as the Tween constructor
5035
+ * @returns {Tween}
5036
+ * @memberof TweenSystem
5037
+ * @example
5038
+ * // Numeric: slide an object's x with an ease-out sine curve
5039
+ * tweenProperty(player, 'pos.x', 0, 10, 2).setEase(Ease.OUT(Ease.SINE));
5040
+ * // Vector2: animate a position diagonally
5041
+ * tweenProperty(player, 'pos', vec2(-5, 0), vec2(5, 3), 2);
5042
+ * // Color: pulse between two colors
5043
+ * tweenProperty(sprite, 'color', RED, BLUE, 1).pingPong();
5044
+ */
5045
+ export function tweenProperty(target: any, propertyPath: string, start: number | Vector2 | Color, end: number | Vector2 | Color, duration?: number, options?: any): Tween;
5046
+ /** Stop every active tween and clear their then-callbacks. Useful for resets
5047
+ * on level transitions or when changing scenes.
5048
+ * @memberof TweenSystem */
5049
+ export function tweenStopAll(): void;
5050
+ /** Engine plugin hook: advance every active tween by the appropriate delta.
5051
+ * Called once per render frame by the engine (no arguments). May also be
5052
+ * called explicitly with `(gameDelta, realDelta)` to drive tweens manually
5053
+ * — useful for headless tests or custom replay/scrubbing systems.
5054
+ * @param {number} [gameDelta] - Game-time delta in seconds; default: time - lastTime
5055
+ * @param {number} [realDelta] - Real-time delta in seconds; default: timeReal - lastTimeReal
5056
+ * @memberof TweenSystem */
5057
+ export function tweenUpdate(gameDelta?: number, realDelta?: number): void;
5058
+ export namespace Ease {
5059
+ function LINEAR(x: number): number;
5060
+ function POWER(n: number): (arg0: number) => number;
5061
+ function SINE(x: number): number;
5062
+ function CIRC(x: number): number;
5063
+ function EXPO(x: number): number;
5064
+ function BACK(x: number): number;
5065
+ function ELASTIC(x: number): number;
5066
+ function SPRING(x: number): number;
5067
+ function BOUNCE(x: number): number;
5068
+ function IN(f: (arg0: number) => number): (arg0: number) => number;
5069
+ function OUT(f: (arg0: number) => number): (arg0: number) => number;
5070
+ function IN_OUT(f: (arg0: number) => number): (arg0: number) => number;
5071
+ function PIECEWISE(...fns: ((arg0: number) => number)[]): (arg0: number) => number;
5072
+ function BEZIER(x1: number, y1: number, x2: number, y2: number): (arg0: number) => number;
5073
+ }
4847
5074
  }