melonjs 18.2.2 → 19.0.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/README.md +33 -27
- package/build/application/application.d.ts +85 -13
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +1 -1
- package/build/application/header.d.ts.map +1 -1
- package/build/application/settings.d.ts +20 -7
- package/build/application/settings.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +10 -11
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/geometries/earcut.d.ts.map +1 -1
- package/build/geometries/path2d.d.ts.map +1 -1
- package/build/geometries/rectangle.d.ts.map +1 -1
- package/build/index.d.ts +99 -92
- package/build/index.d.ts.map +1 -1
- package/build/index.js +16586 -13472
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/keyboard.d.ts.map +1 -1
- package/build/input/pointer.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts +6 -0
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/level/level.d.ts +5 -5
- package/build/level/level.d.ts.map +1 -1
- package/build/level/tiled/TMXGroup.d.ts +1 -1
- package/build/level/tiled/TMXLayer.d.ts +4 -4
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +1 -1
- package/build/level/tiled/TMXObjectFactory.d.ts +98 -0
- package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -0
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +7 -3
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts +22 -0
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/factories/shape.d.ts +9 -0
- package/build/level/tiled/factories/shape.d.ts.map +1 -0
- package/build/level/tiled/factories/text.d.ts +8 -0
- package/build/level/tiled/factories/text.d.ts.map +1 -0
- package/build/level/tiled/factories/tile.d.ts +8 -0
- package/build/level/tiled/factories/tile.d.ts.map +1 -0
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +1 -1
- package/build/loader/cache.d.ts +2 -0
- package/build/loader/cache.d.ts.map +1 -1
- package/build/loader/loader.d.ts +60 -0
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +2 -2
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/fetchdata.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +2 -2
- package/build/loader/parsers/mtl.d.ts +11 -0
- package/build/loader/parsers/mtl.d.ts.map +1 -0
- package/build/loader/parsers/obj.d.ts +11 -0
- package/build/loader/parsers/obj.d.ts.map +1 -0
- package/build/loader/parsers/tmx.d.ts +0 -1
- package/build/loader/parsers/tmx.d.ts.map +1 -1
- package/build/loader/parsers/video.d.ts.map +1 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/math.d.ts +12 -0
- package/build/math/math.d.ts.map +1 -1
- package/build/math/matrix2d.d.ts +2 -2
- package/build/math/matrix2d.d.ts.map +1 -1
- package/build/math/matrix3d.d.ts +19 -4
- package/build/math/matrix3d.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +1 -1
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +1 -1
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/math/vertex.d.ts +42 -0
- package/build/math/vertex.d.ts.map +1 -0
- package/build/particles/emitter.d.ts +2 -2
- package/build/particles/particle.d.ts.map +1 -1
- package/build/physics/bounds.d.ts +4 -3
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/collision.d.ts +1 -1
- package/build/physics/detector.d.ts +1 -1
- package/build/physics/quadtree.d.ts.map +1 -1
- package/build/physics/world.d.ts +3 -3
- package/build/physics/world.d.ts.map +1 -1
- package/build/plugin/plugin.d.ts +3 -3
- package/build/renderable/container.d.ts +32 -8
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/draggable.d.ts.map +1 -1
- package/build/renderable/dragndrop.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +7 -0
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +1 -4
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/mesh.d.ts +147 -0
- package/build/renderable/mesh.d.ts.map +1 -0
- package/build/renderable/renderable.d.ts +59 -33
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +2 -2
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +2 -11
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +2 -0
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/glyph.d.ts +1 -1
- package/build/renderable/text/glyph.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +2 -7
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/text/textmetrics.d.ts +2 -0
- package/build/renderable/text/textmetrics.d.ts.map +1 -1
- package/build/renderable/trail.d.ts +120 -0
- package/build/renderable/trail.d.ts.map +1 -0
- package/build/renderable/ui/uibaseelement.d.ts +0 -1
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uitextbutton.d.ts +2 -6
- package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
- package/build/state/stage.d.ts +39 -55
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts +15 -29
- package/build/state/state.d.ts.map +1 -1
- package/build/system/bootstrap.d.ts +13 -0
- package/build/system/bootstrap.d.ts.map +1 -0
- package/build/system/device.d.ts +5 -4
- package/build/system/device.d.ts.map +1 -1
- package/build/system/event.d.ts +26 -6
- package/build/system/event.d.ts.map +1 -1
- package/build/system/eventEmitter.d.ts +4 -4
- package/build/system/eventEmitter.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts +32 -4
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/system/platform.d.ts.map +1 -1
- package/build/system/timer.d.ts.map +1 -1
- package/build/tweens/easing.d.ts +23 -34
- package/build/tweens/easing.d.ts.map +1 -1
- package/build/tweens/interpolation.d.ts +32 -0
- package/build/tweens/interpolation.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +80 -42
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/function.d.ts +1 -1
- package/build/utils/function.d.ts.map +1 -1
- package/build/video/canvas/canvas_renderer.d.ts +34 -10
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/gradient.d.ts +116 -0
- package/build/video/gradient.d.ts.map +1 -0
- package/build/video/renderer.d.ts +60 -6
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +22 -4
- package/build/video/renderstate.d.ts.map +1 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts +3 -1
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +2 -1
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/utils/dash.d.ts +15 -0
- package/build/video/utils/dash.d.ts.map +1 -0
- package/build/video/utils/tessellation.d.ts +29 -0
- package/build/video/utils/tessellation.d.ts.map +1 -0
- package/build/video/video.d.ts +16 -2
- package/build/video/video.d.ts.map +1 -1
- package/build/video/webgl/batchers/material_batcher.d.ts +65 -0
- package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -0
- package/build/video/webgl/batchers/mesh_batcher.d.ts +20 -0
- package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -0
- package/build/video/webgl/batchers/quad_batcher.d.ts +2 -45
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
- package/build/video/webgl/buffer/index.d.ts +5 -0
- package/build/video/webgl/buffer/index.d.ts.map +1 -1
- package/build/video/webgl/buffer/vertex.d.ts +5 -0
- package/build/video/webgl/buffer/vertex.d.ts.map +1 -1
- package/build/video/webgl/effects/blur.d.ts +36 -0
- package/build/video/webgl/effects/blur.d.ts.map +1 -0
- package/build/video/webgl/effects/chromaticAberration.d.ts +39 -0
- package/build/video/webgl/effects/chromaticAberration.d.ts.map +1 -0
- package/build/video/webgl/effects/desaturate.d.ts +32 -0
- package/build/video/webgl/effects/desaturate.d.ts.map +1 -0
- package/build/video/webgl/effects/dissolve.d.ts +42 -0
- package/build/video/webgl/effects/dissolve.d.ts.map +1 -0
- package/build/video/webgl/effects/dropShadow.d.ts +47 -0
- package/build/video/webgl/effects/dropShadow.d.ts.map +1 -0
- package/build/video/webgl/effects/flash.d.ts +46 -0
- package/build/video/webgl/effects/flash.d.ts.map +1 -0
- package/build/video/webgl/effects/glow.d.ts +48 -0
- package/build/video/webgl/effects/glow.d.ts.map +1 -0
- package/build/video/webgl/effects/hologram.d.ts +37 -0
- package/build/video/webgl/effects/hologram.d.ts.map +1 -0
- package/build/video/webgl/effects/invert.d.ts +29 -0
- package/build/video/webgl/effects/invert.d.ts.map +1 -0
- package/build/video/webgl/effects/outline.d.ts +49 -0
- package/build/video/webgl/effects/outline.d.ts.map +1 -0
- package/build/video/webgl/effects/pixelate.d.ts +38 -0
- package/build/video/webgl/effects/pixelate.d.ts.map +1 -0
- package/build/video/webgl/effects/scanline.d.ts +47 -0
- package/build/video/webgl/effects/scanline.d.ts.map +1 -0
- package/build/video/webgl/effects/sepia.d.ts +28 -0
- package/build/video/webgl/effects/sepia.d.ts.map +1 -0
- package/build/video/webgl/effects/tintPulse.d.ts +43 -0
- package/build/video/webgl/effects/tintPulse.d.ts.map +1 -0
- package/build/video/webgl/effects/wave.d.ts +43 -0
- package/build/video/webgl/effects/wave.d.ts.map +1 -0
- package/build/video/webgl/utils/program.d.ts.map +1 -1
- package/build/video/webgl/webgl_renderer.d.ts +40 -15
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/package.json +10 -10
- package/build/system/eventEmitter.spec.d.ts +0 -2
- package/build/system/eventEmitter.spec.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Why melonJS
|
|
|
26
26
|
|
|
27
27
|
melonJS is designed so you can **focus on making games, not on graphics plumbing**.
|
|
28
28
|
|
|
29
|
-
- **Canvas2D-inspired rendering API** — If you've used the HTML5 Canvas, you already know melonJS. The rendering API (`save`, `restore`, `translate`, `rotate`, `setColor`, `fillRect`, ...) follows the same familiar patterns — no render graphs, no shader pipelines, no instruction sets to learn.
|
|
29
|
+
- **[Canvas2D-inspired rendering API](https://github.com/melonjs/melonJS/wiki/Rendering-API)** — If you've used the HTML5 Canvas, you already know melonJS. The rendering API (`save`, `restore`, `translate`, `rotate`, `setColor`, `fillRect`, ...) follows the same familiar patterns — no render graphs, no shader pipelines, no instruction sets to learn.
|
|
30
30
|
|
|
31
31
|
- **True renderer abstraction** — Write your game once, run it on WebGL or Canvas2D with zero code changes. The engine handles all GPU complexity behind a unified API, with automatic fallback when WebGL is not available. Designed to support future backends (WebGPU) without touching game code.
|
|
32
32
|
|
|
@@ -54,6 +54,9 @@ Graphics
|
|
|
54
54
|
- Built-in effects such as tinting, masking and 2D lighting
|
|
55
55
|
- Standard spritesheet, single and multiple Packed Textures support
|
|
56
56
|
- Compressed texture support (DDS, KTX, KTX2, PVR, PKM) with automatic format detection and fallback
|
|
57
|
+
- 3D mesh rendering with OBJ/MTL model loading, perspective projection and hardware depth testing
|
|
58
|
+
- Built-in shader effects (Flash, Outline, Glow, Dissolve, CRT, Hologram, etc.) and custom shader support via `ShaderEffect` for per-sprite fragment effects (WebGL)
|
|
59
|
+
- Trail renderable for fading, tapering ribbons behind moving objects (speed lines, sword slashes, magic trails)
|
|
57
60
|
- System & Bitmap Text
|
|
58
61
|
- Video sprite playback
|
|
59
62
|
|
|
@@ -154,6 +157,10 @@ Examples
|
|
|
154
157
|
* [Hello World](https://melonjs.github.io/melonJS/examples/#/hello-world) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/helloWorld))
|
|
155
158
|
* [Whac-A-Mole](https://melonjs.github.io/melonJS/examples/#/whac-a-mole) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/whac-a-mole))
|
|
156
159
|
* [Compressed Textures](https://melonjs.github.io/melonJS/examples/#/compressed-textures) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/compressedTextures))
|
|
160
|
+
* [3D Mesh](https://melonjs.github.io/melonJS/examples/#/mesh-3d) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/mesh3d))
|
|
161
|
+
* [3D Mesh Material](https://melonjs.github.io/melonJS/examples/#/mesh-3d-material) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/mesh3dMaterial))
|
|
162
|
+
* [Trail](https://melonjs.github.io/melonJS/examples/#/trail) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/trail))
|
|
163
|
+
* [Shader Effects](https://melonjs.github.io/melonJS/examples/#/shader-effects) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/shaderEffects))
|
|
157
164
|
* [Spine](https://melonjs.github.io/melonJS/examples/#/spine) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/spine))
|
|
158
165
|
|
|
159
166
|
Browse all examples [here](https://melonjs.github.io/melonJS/examples/)
|
|
@@ -163,30 +170,29 @@ Browse all examples [here](https://melonjs.github.io/melonJS/examples/)
|
|
|
163
170
|
### Basic Hello World Example
|
|
164
171
|
|
|
165
172
|
```JavaScript
|
|
166
|
-
import
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// set a gray background color
|
|
176
|
-
me.game.world.backgroundColor.parseCSS("#202020");
|
|
177
|
-
|
|
178
|
-
// add a font text display object
|
|
179
|
-
me.game.world.addChild(new me.Text(609, 281, {
|
|
180
|
-
font: "Arial",
|
|
181
|
-
size: 160,
|
|
182
|
-
fillStyle: "#FFFFFF",
|
|
183
|
-
textBaseline : "middle",
|
|
184
|
-
textAlign : "center",
|
|
185
|
-
text : "Hello World !"
|
|
186
|
-
}));
|
|
173
|
+
import { Application, Text } from "https://cdn.jsdelivr.net/npm/melonjs/+esm";
|
|
174
|
+
|
|
175
|
+
// create a new melonJS application
|
|
176
|
+
const app = new Application(1218, 562, {
|
|
177
|
+
parent: "screen",
|
|
178
|
+
scale: "auto",
|
|
179
|
+
backgroundColor: "#202020",
|
|
187
180
|
});
|
|
181
|
+
|
|
182
|
+
// set a gray background color
|
|
183
|
+
app.world.backgroundColor.parseCSS("#202020");
|
|
184
|
+
|
|
185
|
+
// add a font text display object
|
|
186
|
+
app.world.addChild(new Text(609, 281, {
|
|
187
|
+
font: "Arial",
|
|
188
|
+
size: 160,
|
|
189
|
+
fillStyle: "#FFFFFF",
|
|
190
|
+
textBaseline: "middle",
|
|
191
|
+
textAlign: "center",
|
|
192
|
+
text: "Hello World !",
|
|
193
|
+
}));
|
|
188
194
|
```
|
|
189
|
-
> Simple hello world using melonJS
|
|
195
|
+
> Simple hello world using melonJS
|
|
190
196
|
|
|
191
197
|
Documentation
|
|
192
198
|
-------------------------------------------------------------------------------
|
|
@@ -213,17 +219,17 @@ Install via [npm](https://www.npmjs.com/package/melonjs) :
|
|
|
213
219
|
|
|
214
220
|
npm install melonjs
|
|
215
221
|
|
|
216
|
-
Then import
|
|
222
|
+
Then import what you need in your project :
|
|
217
223
|
|
|
218
224
|
```JavaScript
|
|
219
|
-
import
|
|
225
|
+
import { Application, Sprite, loader } from 'melonjs';
|
|
220
226
|
```
|
|
221
227
|
|
|
222
228
|
Or use it directly via [jsDelivr](https://www.jsdelivr.com/package/npm/melonjs) CDN :
|
|
223
229
|
|
|
224
230
|
```html
|
|
225
|
-
<!-- load the ES6 module bundle of melonJS
|
|
226
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/melonjs@
|
|
231
|
+
<!-- load the ES6 module bundle of melonJS v19.x -->
|
|
232
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/melonjs@19/+esm"></script>
|
|
227
233
|
<!-- omit the version completely to get the latest one -->
|
|
228
234
|
<!-- you should NOT use this in production -->
|
|
229
235
|
<script type="module" src="https://cdn.jsdelivr.net/npm/melonjs/+esm"></script>
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import type Camera2d from "./../camera/camera2d.ts";
|
|
2
2
|
import World from "../physics/world.js";
|
|
3
3
|
import type Renderer from "./../video/renderer.js";
|
|
4
|
-
import type { ApplicationSettings } from "./settings.ts";
|
|
4
|
+
import type { ApplicationSettings, ResolvedApplicationSettings } from "./settings.ts";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* The Application class is the main entry point for creating a melonJS game.
|
|
7
|
+
* It initializes the renderer, creates the game world and viewport, registers DOM event
|
|
8
|
+
* listeners (resize, orientation, scroll), and starts the game loop.
|
|
9
|
+
*
|
|
10
|
+
* The Application instance provides access to the core game systems:
|
|
11
|
+
* - {@link Application#renderer renderer} — the active Canvas or WebGL renderer
|
|
12
|
+
* - {@link Application#world world} — the root container for all game objects
|
|
13
|
+
* - {@link Application#viewport viewport} — the default camera / viewport
|
|
14
|
+
*
|
|
15
|
+
* The app instance is automatically passed to {@link Stage#onResetEvent} and
|
|
16
|
+
* {@link Stage#onDestroyEvent}, and is accessible from any renderable via
|
|
17
|
+
* {@link Renderable#parentApp parentApp}.
|
|
7
18
|
* @category Application
|
|
8
|
-
* @
|
|
19
|
+
* @example
|
|
20
|
+
* // create a new melonJS Application
|
|
21
|
+
* const app = new Application(800, 600, {
|
|
22
|
+
* parent: "screen",
|
|
23
|
+
* scaleMethod: "flex-width",
|
|
24
|
+
* renderer: 2, // AUTO
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // add objects to the world
|
|
28
|
+
* app.world.addChild(new Sprite(0, 0, { image: "player" }));
|
|
29
|
+
*
|
|
30
|
+
* // access the viewport
|
|
31
|
+
* app.viewport.follow(player, app.viewport.AXIS.BOTH);
|
|
9
32
|
*/
|
|
10
33
|
export default class Application {
|
|
11
34
|
/**
|
|
@@ -46,20 +69,13 @@ export default class Application {
|
|
|
46
69
|
/**
|
|
47
70
|
* the given settings used when creating this application
|
|
48
71
|
*/
|
|
49
|
-
settings:
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
autoScale: boolean;
|
|
53
|
-
zoomX: number;
|
|
54
|
-
zoomY: number;
|
|
55
|
-
scale: number | "auto";
|
|
56
|
-
};
|
|
72
|
+
settings: ResolvedApplicationSettings;
|
|
57
73
|
/**
|
|
58
74
|
* Specify whether to pause this app when losing focus
|
|
59
75
|
* @default true
|
|
60
76
|
* @example
|
|
61
77
|
* // keep the default game instance running even when losing focus
|
|
62
|
-
*
|
|
78
|
+
* app.pauseOnBlur = false;
|
|
63
79
|
*/
|
|
64
80
|
pauseOnBlur: boolean;
|
|
65
81
|
/**
|
|
@@ -80,14 +96,26 @@ export default class Application {
|
|
|
80
96
|
accumulatorMax: number;
|
|
81
97
|
accumulatorUpdateDelta: number;
|
|
82
98
|
stepSize: number;
|
|
99
|
+
private _onResize?;
|
|
100
|
+
private _onOrientationChange?;
|
|
101
|
+
private _onScroll?;
|
|
83
102
|
updateDelta: number;
|
|
84
103
|
lastUpdateStart: number | null;
|
|
85
104
|
updateAverageDelta: number;
|
|
86
105
|
/**
|
|
106
|
+
* Create and initialize a new melonJS Application.
|
|
107
|
+
* This is the recommended way to start a melonJS game.
|
|
87
108
|
* @param width - The width of the canvas viewport
|
|
88
109
|
* @param height - The height of the canvas viewport
|
|
89
110
|
* @param options - The optional parameters for the application and default renderer
|
|
90
111
|
* @throws {Error} Will throw an exception if it fails to instantiate a renderer
|
|
112
|
+
* @example
|
|
113
|
+
* const app = new Application(1024, 768, {
|
|
114
|
+
* parent: "game-container",
|
|
115
|
+
* scale: "auto",
|
|
116
|
+
* scaleMethod: "fit",
|
|
117
|
+
* renderer: 2, // AUTO
|
|
118
|
+
* });
|
|
91
119
|
*/
|
|
92
120
|
constructor(width: number, height: number, options?: Partial<ApplicationSettings> & {
|
|
93
121
|
legacy?: boolean;
|
|
@@ -116,7 +144,7 @@ export default class Application {
|
|
|
116
144
|
* Additionally the level id will also be passed to the called function.
|
|
117
145
|
* @example
|
|
118
146
|
* // call myFunction () everytime a level is loaded
|
|
119
|
-
*
|
|
147
|
+
* app.onLevelLoaded = this.myFunction.bind(this);
|
|
120
148
|
*/
|
|
121
149
|
onLevelLoaded(): void;
|
|
122
150
|
/**
|
|
@@ -130,10 +158,42 @@ export default class Application {
|
|
|
130
158
|
* @returns the parent HTML element
|
|
131
159
|
*/
|
|
132
160
|
getParentElement(): HTMLElement;
|
|
161
|
+
/**
|
|
162
|
+
* The HTML canvas element associated with this application's renderer.
|
|
163
|
+
* @example
|
|
164
|
+
* // access the canvas DOM element
|
|
165
|
+
* const canvas = app.canvas;
|
|
166
|
+
*/
|
|
167
|
+
get canvas(): HTMLCanvasElement;
|
|
168
|
+
/**
|
|
169
|
+
* Trigger a manual resize of the application canvas to fit the parent element.
|
|
170
|
+
* This is automatically called on window resize/orientation change, but can
|
|
171
|
+
* be called manually if the parent element size changes programmatically.
|
|
172
|
+
* @example
|
|
173
|
+
* // force a resize after changing the parent element dimensions
|
|
174
|
+
* app.resize();
|
|
175
|
+
*/
|
|
176
|
+
resize(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Destroy this application instance and release all associated resources.
|
|
179
|
+
* Removes the canvas from the DOM, destroys the world, and unregisters
|
|
180
|
+
* all event listeners.
|
|
181
|
+
* @param removeCanvas - if true, the canvas element is removed from the DOM (default: true)
|
|
182
|
+
* @example
|
|
183
|
+
* // clean up when done
|
|
184
|
+
* app.destroy();
|
|
185
|
+
*/
|
|
186
|
+
destroy(removeCanvas?: boolean): void;
|
|
133
187
|
/**
|
|
134
188
|
* force the redraw (not update) of all objects
|
|
135
189
|
*/
|
|
136
190
|
repaint(): void;
|
|
191
|
+
/** @ignore */
|
|
192
|
+
_tick(time: number): void;
|
|
193
|
+
/** @ignore */
|
|
194
|
+
_onBlur(): void;
|
|
195
|
+
/** @ignore */
|
|
196
|
+
_onFocus(): void;
|
|
137
197
|
/**
|
|
138
198
|
* update all objects related to this game active scene/stage
|
|
139
199
|
* @param time - current timestamp as provided by the RAF callback
|
|
@@ -144,4 +204,16 @@ export default class Application {
|
|
|
144
204
|
*/
|
|
145
205
|
draw(): void;
|
|
146
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The default game application instance.
|
|
209
|
+
* Set via {@link setDefaultGame} during engine initialization.
|
|
210
|
+
* When using {@link Application} directly, prefer using the app instance
|
|
211
|
+
* (e.g. from {@link Stage#onResetEvent} or {@link Renderable#parentApp}).
|
|
212
|
+
*/
|
|
213
|
+
export declare let game: Application;
|
|
214
|
+
/**
|
|
215
|
+
* Set the default game application instance.
|
|
216
|
+
* @ignore
|
|
217
|
+
*/
|
|
218
|
+
export declare function setDefaultGame(app: Application): void;
|
|
147
219
|
//# sourceMappingURL=application.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AA8BxC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAMnD,OAAO,KAAK,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;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H,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,IAAI;IAyLP;;;OAGG;IACH,KAAK,IAAI,IAAI;IAgBb;;;;OAIG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED;;;;;;OAMG;IACH,aAAa,IAAI,IAAI;IAErB;;;;OAIG;IACH,eAAe,IAAI,IAAI;IAevB;;;OAGG;IACH,gBAAgB,IAAI,WAAW;IAI/B;;;;;OAKG;IACH,IAAI,MAAM,IAAI,iBAAiB,CAE9B;IAED;;;;;;;OAOG;IACH,MAAM,IAAI,IAAI;IAId;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY,GAAE,OAAc,GAAG,IAAI;IAyC3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf,cAAc;IACd,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKzB,cAAc;IACd,OAAO,IAAI,IAAI;IASf,cAAc;IACd,QAAQ,IAAI,IAAI;IAShB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA+C1B;;OAEG;IACH,IAAI,IAAI,IAAI;CAqBZ;AAED;;;;;GAKG;AACH,eAAO,IAAI,IAAI,EAAE,WAAW,CAAC;AAE7B;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,QAE9C"}
|
|
@@ -3,7 +3,6 @@ export declare const defaultApplicationSettings: {
|
|
|
3
3
|
scale: number;
|
|
4
4
|
scaleMethod: "manual";
|
|
5
5
|
preferWebGL1: false;
|
|
6
|
-
depthTest: "sorting";
|
|
7
6
|
powerPreference: "default";
|
|
8
7
|
transparent: false;
|
|
9
8
|
antiAlias: false;
|
|
@@ -14,5 +13,6 @@ export declare const defaultApplicationSettings: {
|
|
|
14
13
|
subPixel: false;
|
|
15
14
|
verbose: false;
|
|
16
15
|
legacy: false;
|
|
16
|
+
backgroundColor: string;
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=defaultApplicationSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA0BpD"}
|
|
@@ -9,7 +9,6 @@ import { ScaleMethod } from "./scaleMethods";
|
|
|
9
9
|
type BlendMode = "normal" | "multiply" | "lighter" | "additive" | "screen";
|
|
10
10
|
type PhysicsType = "builtin" | "none";
|
|
11
11
|
type PowerPreference = "default" | "low-power";
|
|
12
|
-
type DepthTest = "sorting" | "z-buffer";
|
|
13
12
|
export type ApplicationSettings = {
|
|
14
13
|
/**
|
|
15
14
|
* renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class
|
|
@@ -35,11 +34,6 @@ export type ApplicationSettings = {
|
|
|
35
34
|
* @default false
|
|
36
35
|
*/
|
|
37
36
|
preferWebGL1: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* ~Experimental~ the default method to sort object on the z axis in WebGL
|
|
40
|
-
* @default sorting
|
|
41
|
-
*/
|
|
42
|
-
depthTest: DepthTest;
|
|
43
37
|
/**
|
|
44
38
|
* a hint to the user agent indicating what configuration of GPU is suitable for the WebGL context. To be noted that Safari and Chrome (since version 80) both default to "low-power" to save battery life and improve the user experience on these dual-GPU machines.
|
|
45
39
|
* @default default
|
|
@@ -70,6 +64,13 @@ export type ApplicationSettings = {
|
|
|
70
64
|
subPixel: boolean;
|
|
71
65
|
verbose: boolean;
|
|
72
66
|
legacy: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* the CSS background color of the parent element that holds the canvas.
|
|
69
|
+
* Applied during initialization to prevent a white flash before the first render.
|
|
70
|
+
* Set to `"transparent"` to disable, or any valid CSS color value.
|
|
71
|
+
* @default "#000000"
|
|
72
|
+
*/
|
|
73
|
+
backgroundColor: string;
|
|
73
74
|
/**
|
|
74
75
|
* a custom batcher class (WebGL only)
|
|
75
76
|
* @deprecated since 18.1.0 — use `batcher` instead
|
|
@@ -80,11 +81,23 @@ export type ApplicationSettings = {
|
|
|
80
81
|
*/
|
|
81
82
|
batcher?: (new (renderer: any) => Batcher) | undefined;
|
|
82
83
|
} & ({
|
|
83
|
-
parent: HTMLElement;
|
|
84
|
+
parent: string | HTMLElement;
|
|
84
85
|
canvas?: never;
|
|
85
86
|
} | {
|
|
86
87
|
parent?: never;
|
|
87
88
|
canvas: HTMLCanvasElement;
|
|
88
89
|
});
|
|
90
|
+
/**
|
|
91
|
+
* Resolved application settings after init() has processed the input.
|
|
92
|
+
* Includes computed properties not present in the user-facing settings.
|
|
93
|
+
*/
|
|
94
|
+
export type ResolvedApplicationSettings = ApplicationSettings & {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
autoScale: boolean;
|
|
98
|
+
zoomX: number;
|
|
99
|
+
zoomY: number;
|
|
100
|
+
scale: number;
|
|
101
|
+
};
|
|
89
102
|
export {};
|
|
90
103
|
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/application/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAA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C;IACpB,4BAA4B,EAAE,OAAO,CAAC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACvD,GAAG,CACD;IAEA,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAC;CACd,GACD;IACA,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf,MAAM,EAAE,iBAAiB,CAAC;CACzB,CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Rect } from "./../geometries/rectangle.ts";
|
|
2
2
|
import type { Color } from "../math/color.ts";
|
|
3
|
-
import { Matrix2d } from "../math/matrix2d.ts";
|
|
4
3
|
import { Matrix3d } from "../math/matrix3d.ts";
|
|
5
4
|
import { Vector2d } from "../math/vector2d.ts";
|
|
6
5
|
import { Vector3d } from "../math/vector3d.ts";
|
|
@@ -37,7 +36,7 @@ interface FadeState {
|
|
|
37
36
|
* // create a minimap camera in the top-right corner showing the full level
|
|
38
37
|
* const minimap = new Camera2d(0, 0, 180, 100);
|
|
39
38
|
* minimap.name = "minimap";
|
|
40
|
-
* minimap.screenX =
|
|
39
|
+
* minimap.screenX = app.viewport.width - 190;
|
|
41
40
|
* minimap.screenY = 10;
|
|
42
41
|
* minimap.autoResize = false;
|
|
43
42
|
* minimap.setBounds(0, 0, levelWidth, levelHeight);
|
|
@@ -126,7 +125,7 @@ export default class Camera2d extends Renderable {
|
|
|
126
125
|
* the invert camera transform used to unproject points
|
|
127
126
|
* @ignore
|
|
128
127
|
*/
|
|
129
|
-
invCurrentTransform:
|
|
128
|
+
invCurrentTransform: Matrix3d;
|
|
130
129
|
/** offset for shake effect */
|
|
131
130
|
offset: Vector2d;
|
|
132
131
|
/** target to follow */
|
|
@@ -230,11 +229,11 @@ export default class Camera2d extends Renderable {
|
|
|
230
229
|
* set the camera to follow the specified renderable. <br>
|
|
231
230
|
* (this will put the camera center around the given target)
|
|
232
231
|
* @param target - renderable or position vector to follow
|
|
233
|
-
* @param [axis=
|
|
232
|
+
* @param [axis=app.viewport.AXIS.BOTH] - Which axis to follow (see {@link Camera2d.AXIS})
|
|
234
233
|
* @param [damping=1] - default damping value
|
|
235
234
|
* @example
|
|
236
235
|
* // set the camera to follow this renderable on both axis, and enable damping
|
|
237
|
-
*
|
|
236
|
+
* app.viewport.follow(this, app.viewport.AXIS.BOTH, 0.1);
|
|
238
237
|
*/
|
|
239
238
|
follow(target: Renderable | Vector2d | Vector3d, axis?: number, damping?: number): void;
|
|
240
239
|
/**
|
|
@@ -248,7 +247,7 @@ export default class Camera2d extends Renderable {
|
|
|
248
247
|
* @param y - vertical offset
|
|
249
248
|
* @example
|
|
250
249
|
* // Move the camera up by four pixels
|
|
251
|
-
*
|
|
250
|
+
* app.viewport.move(0, -4);
|
|
252
251
|
*/
|
|
253
252
|
move(x: number, y: number): void;
|
|
254
253
|
/**
|
|
@@ -267,12 +266,12 @@ export default class Camera2d extends Renderable {
|
|
|
267
266
|
* @param intensity - maximum offset that the screen can be moved
|
|
268
267
|
* while shaking
|
|
269
268
|
* @param duration - expressed in milliseconds
|
|
270
|
-
* @param [axis=
|
|
269
|
+
* @param [axis=app.viewport.AXIS.BOTH] - specify on which axis to apply the shake effect (see {@link Camera2d.AXIS})
|
|
271
270
|
* @param [onComplete] - callback once shaking effect is over
|
|
272
271
|
* @param [force] - if true this will override the current effect
|
|
273
272
|
* @example
|
|
274
273
|
* // shake it baby !
|
|
275
|
-
*
|
|
274
|
+
* app.viewport.shake(10, 500, app.viewport.AXIS.BOTH);
|
|
276
275
|
*/
|
|
277
276
|
shake(intensity: number, duration: number, axis?: number, onComplete?: () => void, force?: boolean): void;
|
|
278
277
|
/**
|
|
@@ -283,10 +282,10 @@ export default class Camera2d extends Renderable {
|
|
|
283
282
|
* @param [onComplete] - callback once effect is over
|
|
284
283
|
* @example
|
|
285
284
|
* // fade the camera to white upon dying, reload the level, and then fade out back
|
|
286
|
-
*
|
|
285
|
+
* app.viewport.fadeIn("#fff", 150, function() {
|
|
287
286
|
* me.audio.play("die", false);
|
|
288
287
|
* me.level.reload();
|
|
289
|
-
*
|
|
288
|
+
* app.viewport.fadeOut("#fff", 150);
|
|
290
289
|
* });
|
|
291
290
|
*/
|
|
292
291
|
fadeOut(color: Color | string, duration?: number, onComplete?: () => void): void;
|
|
@@ -298,7 +297,7 @@ export default class Camera2d extends Renderable {
|
|
|
298
297
|
* @param [onComplete] - callback once effect is over
|
|
299
298
|
* @example
|
|
300
299
|
* // flash the camera to white for 75ms
|
|
301
|
-
*
|
|
300
|
+
* app.viewport.fadeIn("#FFFFFF", 75);
|
|
302
301
|
*/
|
|
303
302
|
fadeIn(color: Color | string, duration?: number, onComplete?: () => void): void;
|
|
304
303
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera2d.d.ts","sourceRoot":"","sources":["../../src/camera/camera2d.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"camera2d.d.ts","sourceRoot":"","sources":["../../src/camera/camera2d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA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AAa,GACzB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"earcut.d.ts","sourceRoot":"","sources":["../../src/geometries/earcut.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CACrB,IAAI,EAAE,MAAM,EAAE,EACd,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAC7B,GAAG,GAAE,MAAM,GAAG,SAAa,GACzB,MAAM,EAAE,CAqCV;AAwtBD,wBAAgB,UAAU,CACzB,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,UAQX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path2d.d.ts","sourceRoot":"","sources":["../../src/geometries/path2d.js"],"names":[],"mappings":";AAKA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AACH;IACC,0BA0BC;IAzBA;;;OAGG;IACH,QAFU,KAAK,EAAE,CAED;IAEhB;;;;OAIG;IACH,eAHU,MAAM,CAGM;IAGtB,gBAAkB;IAGlB,kBAAiC;IAGjC,iBAAoB;IAOrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,sBALW,MAAM,QA+IhB;IAED;;OAEG;IACH,kBAQC;IAED;;;;OAIG;IACH,kBASC;IAED;;;OAGG;IACH,mBAFa,KAAK,EAAE,CAkCnB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAKhB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAmBhB;IAED;;;;;;;;;OASG;IACH,OAPW,MAAM,KACN,MAAM,UACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,OAAO,QA2DjB;IAED;;;;;;;OAOG;IACH,UANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,QAyDhB;IAED;;;;;;;;;;;OAWG;IACH,WATW,MAAM,KACN,MAAM,WACN,MAAM,WACN,MAAM,YACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,OAAO,QA4EjB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,OACN,MAAM,KACN,MAAM,KACN,MAAM,
|
|
1
|
+
{"version":3,"file":"path2d.d.ts","sourceRoot":"","sources":["../../src/geometries/path2d.js"],"names":[],"mappings":";AAKA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AACH;IACC,0BA0BC;IAzBA;;;OAGG;IACH,QAFU,KAAK,EAAE,CAED;IAEhB;;;;OAIG;IACH,eAHU,MAAM,CAGM;IAGtB,gBAAkB;IAGlB,kBAAiC;IAGjC,iBAAoB;IAOrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,sBALW,MAAM,QA+IhB;IAED;;OAEG;IACH,kBAQC;IAED;;;;OAIG;IACH,kBASC;IAED;;;OAGG;IACH,mBAFa,KAAK,EAAE,CAkCnB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAKhB;IAED;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAmBhB;IAED;;;;;;;;;OASG;IACH,OAPW,MAAM,KACN,MAAM,UACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,OAAO,QA2DjB;IAED;;;;;;;OAOG;IACH,UANW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,UACN,MAAM,QAyDhB;IAED;;;;;;;;;;;OAWG;IACH,WATW,MAAM,KACN,MAAM,WACN,MAAM,WACN,MAAM,YACN,MAAM,cACN,MAAM,YACN,MAAM,kBACN,OAAO,QA4EjB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,OACN,MAAM,KACN,MAAM,KACN,MAAM,QA8BhB;IAED;;;;;;;;OAQG;IACH,oBAPW,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,KACN,MAAM,KACN,MAAM,QA0ChB;IAED;;;;;;OAMG;IACH,QALW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QAgBhB;IAED;;;;;;;OAOG;IACH,aANW,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,UACN,MAAM,QAoBhB;CACD;2BAnqBuB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../src/geometries/rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgB,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAgC,MAAM,cAAc,CAAC;AAErE;;;GAGG;AACH,qBAAa,IAAK,SAAQ,OAAO;IAChC;;OAEG;IACM,IAAI,SAAe;IAE5B;;;;;;OAMG;gBACS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAStD;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../src/geometries/rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAgB,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAgC,MAAM,cAAc,CAAC;AAErE;;;GAGG;AACH,qBAAa,IAAK,SAAQ,OAAO;IAChC;;OAEG;IACM,IAAI,SAAe;IAE5B;;;;;;OAMG;gBACS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAStD;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAUrC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,KAAK,WAGR;IAED;;OAEG;IACH,IAAI,GAAG,WAEN;IAED;;OAEG;IACH,IAAI,MAAM,WAGT;IAED;;OAEG;IACH,IAAI,KAAK,WAER;IACD,IAAI,KAAK,CAAC,KAAK,QAAA,EAId;IAED;;OAEG;I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