melonjs 18.0.0 → 18.2.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/build/application/application.d.ts +33 -40
- package/build/application/application.d.ts.map +1 -1
- package/build/application/defaultApplicationSettings.d.ts +1 -1
- package/build/application/header.d.ts +3 -7
- package/build/application/header.d.ts.map +1 -1
- package/build/application/resize.d.ts +3 -4
- package/build/application/resize.d.ts.map +1 -1
- package/build/application/settings.d.ts +8 -3
- package/build/application/settings.d.ts.map +1 -1
- package/build/audio/audio.d.ts +179 -128
- package/build/audio/audio.d.ts.map +1 -1
- package/build/camera/camera2d.d.ts +194 -103
- package/build/camera/camera2d.d.ts.map +1 -1
- package/build/geometries/ellipse.d.ts +40 -4
- package/build/geometries/ellipse.d.ts.map +1 -1
- package/build/geometries/line.d.ts +2 -1
- package/build/geometries/line.d.ts.map +1 -1
- package/build/geometries/path2d.d.ts +39 -4
- package/build/geometries/path2d.d.ts.map +1 -1
- package/build/geometries/polygon.d.ts +6 -5
- package/build/geometries/polygon.d.ts.map +1 -1
- package/build/geometries/rectangle.d.ts +1 -0
- package/build/geometries/rectangle.d.ts.map +1 -1
- package/build/geometries/roundrect.d.ts +83 -17
- package/build/geometries/roundrect.d.ts.map +1 -1
- package/build/index.d.ts +18 -16
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5283 -2234
- package/build/index.js.map +4 -4
- package/build/input/gamepad.d.ts +113 -61
- package/build/input/gamepad.d.ts.map +1 -1
- package/build/input/input.d.ts +3 -7
- package/build/input/input.d.ts.map +1 -1
- package/build/input/keyboard.d.ts +6 -0
- package/build/input/keyboard.d.ts.map +1 -1
- package/build/input/pointer.d.ts +25 -51
- package/build/input/pointer.d.ts.map +1 -1
- package/build/input/pointerevent.d.ts +51 -79
- package/build/input/pointerevent.d.ts.map +1 -1
- package/build/lang/console.d.ts.map +1 -1
- package/build/lang/deprecated.d.ts +27 -0
- package/build/lang/deprecated.d.ts.map +1 -1
- package/build/level/tiled/TMXGroup.d.ts +5 -0
- package/build/level/tiled/TMXGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXLayer.d.ts +1 -0
- package/build/level/tiled/TMXLayer.d.ts.map +1 -1
- package/build/level/tiled/TMXObject.d.ts +21 -16
- package/build/level/tiled/TMXObject.d.ts.map +1 -1
- package/build/level/tiled/TMXTile.d.ts +16 -5
- package/build/level/tiled/TMXTile.d.ts.map +1 -1
- package/build/level/tiled/TMXTileMap.d.ts +16 -3
- package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
- package/build/level/tiled/TMXTileset.d.ts +138 -16
- package/build/level/tiled/TMXTileset.d.ts.map +1 -1
- package/build/level/tiled/TMXTilesetGroup.d.ts +1 -0
- package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
- package/build/level/tiled/TMXUtils.d.ts +29 -12
- package/build/level/tiled/TMXUtils.d.ts.map +1 -1
- package/build/level/tiled/constants.d.ts +1 -0
- package/build/level/tiled/constants.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +2 -7
- package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +2 -1
- package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +42 -0
- package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -0
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +2 -7
- package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXRenderer.d.ts +7 -0
- package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts +2 -1
- package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
- package/build/level/tiled/renderer/autodetect.d.ts +2 -1
- package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
- package/build/loader/loader.d.ts +39 -15
- package/build/loader/loader.d.ts.map +1 -1
- package/build/loader/loadingscreen.d.ts +8 -0
- package/build/loader/loadingscreen.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/compressed_image.d.ts +44 -1
- package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts +7 -1
- package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts +7 -1
- package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +7 -1
- package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts +7 -1
- package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts +7 -1
- package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
- package/build/loader/parsers/fontface.d.ts +1 -1
- package/build/loader/parsers/fontface.d.ts.map +1 -1
- package/build/loader/parsers/image.d.ts +6 -1
- package/build/loader/parsers/image.d.ts.map +1 -1
- package/build/math/color.d.ts +2 -1
- package/build/math/color.d.ts.map +1 -1
- package/build/math/matrix2d.d.ts +1 -0
- package/build/math/matrix2d.d.ts.map +1 -1
- package/build/math/matrix3d.d.ts +1 -0
- package/build/math/matrix3d.d.ts.map +1 -1
- package/build/math/observableVector2d.d.ts +3 -2
- package/build/math/observableVector2d.d.ts.map +1 -1
- package/build/math/observableVector3d.d.ts +5 -4
- package/build/math/observableVector3d.d.ts.map +1 -1
- package/build/math/vector2d.d.ts +2 -1
- package/build/math/vector2d.d.ts.map +1 -1
- package/build/math/vector3d.d.ts +4 -3
- package/build/math/vector3d.d.ts.map +1 -1
- package/build/particles/emitter.d.ts +40 -122
- package/build/particles/emitter.d.ts.map +1 -1
- package/build/particles/particle.d.ts +2 -4
- package/build/particles/particle.d.ts.map +1 -1
- package/build/physics/body.d.ts +8 -7
- package/build/physics/body.d.ts.map +1 -1
- package/build/physics/bounds.d.ts +2 -1
- package/build/physics/bounds.d.ts.map +1 -1
- package/build/physics/detector.d.ts.map +1 -1
- package/build/physics/quadtree.d.ts +1 -0
- package/build/physics/quadtree.d.ts.map +1 -1
- package/build/physics/sat.d.ts.map +1 -1
- package/build/physics/world.d.ts +4 -3
- package/build/physics/world.d.ts.map +1 -1
- package/build/plugin/plugin.d.ts +36 -53
- package/build/plugin/plugin.d.ts.map +1 -1
- package/build/polyfill/ellipse.d.ts +2 -0
- package/build/polyfill/ellipse.d.ts.map +1 -0
- package/build/polyfill/index.d.ts +1 -0
- package/build/polyfill/index.d.ts.map +1 -1
- package/build/renderable/collectable.d.ts +1 -0
- package/build/renderable/collectable.d.ts.map +1 -1
- package/build/renderable/colorlayer.d.ts +3 -2
- package/build/renderable/colorlayer.d.ts.map +1 -1
- package/build/renderable/container.d.ts +19 -18
- package/build/renderable/container.d.ts.map +1 -1
- package/build/renderable/draggable.d.ts +1 -0
- package/build/renderable/draggable.d.ts.map +1 -1
- package/build/renderable/entity/entity.d.ts +141 -0
- package/build/renderable/entity/entity.d.ts.map +1 -1
- package/build/renderable/imagelayer.d.ts +3 -2
- package/build/renderable/imagelayer.d.ts.map +1 -1
- package/build/renderable/nineslicesprite.d.ts +4 -3
- package/build/renderable/nineslicesprite.d.ts.map +1 -1
- package/build/renderable/renderable.d.ts +42 -7
- package/build/renderable/renderable.d.ts.map +1 -1
- package/build/renderable/sprite.d.ts +7 -5
- package/build/renderable/sprite.d.ts.map +1 -1
- package/build/renderable/text/bitmaptext.d.ts +3 -2
- package/build/renderable/text/bitmaptext.d.ts.map +1 -1
- package/build/renderable/text/bitmaptextdata.d.ts +4 -0
- package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
- package/build/renderable/text/text.d.ts +2 -1
- package/build/renderable/text/text.d.ts.map +1 -1
- package/build/renderable/trigger.d.ts +1 -0
- package/build/renderable/trigger.d.ts.map +1 -1
- package/build/renderable/ui/uibaseelement.d.ts +47 -33
- package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
- package/build/renderable/ui/uispriteelement.d.ts +54 -43
- package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
- package/build/renderable/ui/uitextbutton.d.ts +70 -75
- package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
- package/build/state/stage.d.ts +2 -1
- package/build/state/stage.d.ts.map +1 -1
- package/build/state/state.d.ts +93 -90
- package/build/state/state.d.ts.map +1 -1
- package/build/system/device.d.ts +33 -3
- package/build/system/device.d.ts.map +1 -1
- package/build/system/dom.d.ts +7 -0
- package/build/system/dom.d.ts.map +1 -1
- package/build/system/event.d.ts +2 -2
- package/build/system/event.d.ts.map +1 -1
- package/build/system/legacy_pool.d.ts.map +1 -1
- package/build/tweens/tween.d.ts +1 -0
- package/build/tweens/tween.d.ts.map +1 -1
- package/build/utils/array.d.ts +2 -2
- package/build/utils/decode.d.ts +35 -0
- package/build/utils/decode.d.ts.map +1 -0
- package/build/utils/function.d.ts +1 -1
- package/build/utils/function.d.ts.map +1 -1
- package/build/utils/utils.d.ts +1 -1
- package/build/utils/utils.d.ts.map +1 -1
- package/build/utils/xml.d.ts +21 -0
- package/build/utils/xml.d.ts.map +1 -0
- package/build/video/canvas/canvas_renderer.d.ts +42 -14
- package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
- package/build/video/renderer.d.ts +39 -8
- package/build/video/renderer.d.ts.map +1 -1
- package/build/video/renderstate.d.ts +85 -0
- package/build/video/renderstate.d.ts.map +1 -0
- package/build/video/rendertarget/canvasrendertarget.d.ts +1 -0
- package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
- package/build/video/texture/atlas.d.ts +44 -5
- package/build/video/texture/atlas.d.ts.map +1 -1
- package/build/video/texture/cache.d.ts +9 -0
- package/build/video/texture/cache.d.ts.map +1 -1
- package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
- package/build/video/webgl/{compositors/compositor.d.ts → batchers/batcher.d.ts} +63 -30
- package/build/video/webgl/batchers/batcher.d.ts.map +1 -0
- package/build/video/webgl/{compositors/primitive_compositor.d.ts → batchers/primitive_batcher.d.ts} +10 -3
- package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -0
- package/build/video/webgl/{compositors/quad_compositor.d.ts → batchers/quad_batcher.d.ts} +6 -5
- package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -0
- package/build/video/webgl/buffer/index.d.ts +49 -0
- package/build/video/webgl/buffer/index.d.ts.map +1 -0
- package/build/video/webgl/buffer/vertex.d.ts +12 -19
- package/build/video/webgl/buffer/vertex.d.ts.map +1 -1
- package/build/video/webgl/glshader.d.ts +3 -2
- package/build/video/webgl/glshader.d.ts.map +1 -1
- package/build/video/webgl/shadereffect.d.ts +72 -0
- package/build/video/webgl/shadereffect.d.ts.map +1 -0
- package/build/video/webgl/webgl_renderer.d.ts +53 -69
- package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
- package/package.json +19 -13
- package/build/video/webgl/compositors/compositor.d.ts.map +0 -1
- package/build/video/webgl/compositors/primitive_compositor.d.ts.map +0 -1
- package/build/video/webgl/compositors/quad_compositor.d.ts.map +0 -1
package/build/loader/loader.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export function setNocache(enable?: boolean): void;
|
|
|
19
19
|
*
|
|
20
20
|
* // Enable withCredentials
|
|
21
21
|
* me.loader.setOptions({ withCredentials: true });
|
|
22
|
+
* @category Assets
|
|
22
23
|
*/
|
|
23
24
|
export function setOptions(options: {
|
|
24
25
|
crossOrigin?: string | undefined;
|
|
@@ -31,13 +32,14 @@ export function setOptions(options: {
|
|
|
31
32
|
* @name setBaseURL
|
|
32
33
|
* @memberof loader
|
|
33
34
|
* @public
|
|
34
|
-
* @param {string} type - "*", "audio", "video", "binary", "image", "json", "js", "tmx", "tsx"
|
|
35
|
+
* @param {string} type - "*", "audio", "video", "binary", "image", "json", "js", "tmx", "tsx", "fontface"
|
|
35
36
|
* @param {string} [url="./"] - default base URL
|
|
36
37
|
* @example
|
|
37
38
|
* // change the base URL relative address for audio assets
|
|
38
39
|
* me.loader.setBaseURL("audio", "data/audio/");
|
|
39
40
|
* // change the base URL absolute address for all object types
|
|
40
41
|
* me.loader.setBaseURL("*", "http://myurl.com/")
|
|
42
|
+
* @category Assets
|
|
41
43
|
*/
|
|
42
44
|
export function setBaseURL(type: string, url?: string): void;
|
|
43
45
|
/**
|
|
@@ -46,7 +48,9 @@ export function setBaseURL(type: string, url?: string): void;
|
|
|
46
48
|
* @memberof loader
|
|
47
49
|
* @property {string} name - name of the asset
|
|
48
50
|
* @property {string} type - the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx"|"tmj"|"tsx"|"tsj"|"fontface"|"video")
|
|
49
|
-
* @property {string} [src] - path and/or file name of the resource (for audio assets only the path is required)
|
|
51
|
+
* @property {string|string[]} [src] - path and/or file name of the resource (for audio assets only the path is required).
|
|
52
|
+
* For image assets, an array of sources can be provided as a fallback chain (e.g. compressed texture formats by priority, with a PNG fallback).
|
|
53
|
+
* The loader will try each source in order and use the first one that loads successfully.
|
|
50
54
|
* @property {string} [data] - TMX data if not provided through a src url
|
|
51
55
|
* @property {boolean} [stream=false] - Set to true to not to wait for large audio or video file to be downloaded before playing.
|
|
52
56
|
* @property {boolean} [autoplay=false] - Set to true to automatically start playing audio or video when loaded or added to a scene (using autoplay might require user iteraction to enable it)
|
|
@@ -60,6 +64,8 @@ export function setBaseURL(type: string, url?: string): void;
|
|
|
60
64
|
* {name: "texture", type:"image", src: "data/gfx/texture.png"}
|
|
61
65
|
* // PNG base64 encoded image
|
|
62
66
|
* {name: "texture", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."}
|
|
67
|
+
* // compressed texture with fallback chain (tries each source in order until one succeeds)
|
|
68
|
+
* {name: "terrain", type:"image", src: ["data/gfx/terrain.astc.ktx", "data/gfx/terrain.dds", "data/gfx/terrain.png"]}
|
|
63
69
|
* // TSX file
|
|
64
70
|
* {name: "meta_tiles", type: "tsx", src: "data/map/meta_tiles.tsx"}
|
|
65
71
|
* // TMX level (XML & JSON)
|
|
@@ -79,7 +85,7 @@ export function setBaseURL(type: string, url?: string): void;
|
|
|
79
85
|
* // JavaScript file
|
|
80
86
|
* {name: "plugin", type: "js", src: "data/js/plugin.js"}
|
|
81
87
|
* // Font Face
|
|
82
|
-
* { name: "'kenpixel'", type: "fontface", src: "
|
|
88
|
+
* { name: "'kenpixel'", type: "fontface", src: "data/font/kenvector_future.woff2" }
|
|
83
89
|
* // video resources
|
|
84
90
|
* {name: "intro", type: "video", src: "data/video/"}
|
|
85
91
|
*/
|
|
@@ -103,6 +109,7 @@ export function setBaseURL(type: string, url?: string): void;
|
|
|
103
109
|
* }
|
|
104
110
|
* // set the parser for the custom format
|
|
105
111
|
* loader.setParser("abc", customAbcParser);
|
|
112
|
+
* @category Assets
|
|
106
113
|
*/
|
|
107
114
|
export function setParser(type: string, parserFn: Function): void;
|
|
108
115
|
/**
|
|
@@ -118,7 +125,9 @@ export function setParser(type: string, parserFn: Function): void;
|
|
|
118
125
|
* // PNG packed texture
|
|
119
126
|
* {name: "texture", type:"image", src: "data/gfx/texture.png"}
|
|
120
127
|
* // PNG base64 encoded image
|
|
121
|
-
* {name: "texture", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."}
|
|
128
|
+
* {name: "texture", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."},
|
|
129
|
+
* // compressed texture with fallback chain (tries each source in order until one succeeds)
|
|
130
|
+
* {name: "terrain", type:"image", src: ["data/gfx/terrain.astc.ktx", "data/gfx/terrain.dds", "data/gfx/terrain.png"]},
|
|
122
131
|
* // TSX file
|
|
123
132
|
* {name: "meta_tiles", type: "tsx", src: "data/map/meta_tiles.tsx"},
|
|
124
133
|
* // TMX level (XML & JSON)
|
|
@@ -138,7 +147,7 @@ export function setParser(type: string, parserFn: Function): void;
|
|
|
138
147
|
* // JavaScript file
|
|
139
148
|
* {name: "plugin", type: "js", src: "data/js/plugin.js"},
|
|
140
149
|
* // Font Face
|
|
141
|
-
* {name: "'kenpixel'", type: "fontface", src: "
|
|
150
|
+
* {name: "'kenpixel'", type: "fontface", src: "data/font/kenvector_future.woff2"},
|
|
142
151
|
* // video resources
|
|
143
152
|
* {name: "intro", type: "video", src: "data/video/"},
|
|
144
153
|
* // base64 encoded video asset
|
|
@@ -147,6 +156,7 @@ export function setParser(type: string, parserFn: Function): void;
|
|
|
147
156
|
* ...
|
|
148
157
|
* // set all resources to be loaded
|
|
149
158
|
* me.loader.preload(game.assets, () => this.loaded());
|
|
159
|
+
* @category Assets
|
|
150
160
|
*/
|
|
151
161
|
export function preload(assets: Asset[], onloadcb?: Function, switchToLoadState?: boolean): void;
|
|
152
162
|
/**
|
|
@@ -176,6 +186,8 @@ export function reload(src: string): void;
|
|
|
176
186
|
* @example
|
|
177
187
|
* // load an image asset
|
|
178
188
|
* me.loader.load({name: "avatar", type:"image", src: "data/avatar.png"}, () => this.onload(), () => this.onerror());
|
|
189
|
+
* // load a compressed texture with fallback chain
|
|
190
|
+
* me.loader.load({name: "terrain", type:"image", src: ["data/gfx/terrain.astc.ktx", "data/gfx/terrain.dds", "data/gfx/terrain.png"]}, () => this.onload());
|
|
179
191
|
* // load a base64 image asset
|
|
180
192
|
* me.loader.load({name: "avatar", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."};
|
|
181
193
|
* // load a base64 video asset
|
|
@@ -192,6 +204,7 @@ export function reload(src: string): void;
|
|
|
192
204
|
* }, function () {
|
|
193
205
|
* me.audio.play("bgmusic");
|
|
194
206
|
* });
|
|
207
|
+
* @category Assets
|
|
195
208
|
*/
|
|
196
209
|
export function load(asset: Asset, onload?: Function, onerror?: Function): number;
|
|
197
210
|
/**
|
|
@@ -200,12 +213,14 @@ export function load(asset: Asset, onload?: Function, onerror?: Function): numbe
|
|
|
200
213
|
* @param {Asset} asset
|
|
201
214
|
* @returns {boolean} true if unloaded
|
|
202
215
|
* @example me.loader.unload({name: "avatar", type:"image"});
|
|
216
|
+
* @category Assets
|
|
203
217
|
*/
|
|
204
218
|
export function unload(asset: Asset): boolean;
|
|
205
219
|
/**
|
|
206
220
|
* unload all resources to free memory
|
|
207
221
|
* @memberof loader
|
|
208
222
|
* @example me.loader.unloadAll();
|
|
223
|
+
* @category Assets
|
|
209
224
|
*/
|
|
210
225
|
export function unloadAll(): void;
|
|
211
226
|
/**
|
|
@@ -213,6 +228,7 @@ export function unloadAll(): void;
|
|
|
213
228
|
* @memberof loader
|
|
214
229
|
* @param {string} elt - name of the tmx/tsx element ("map1");
|
|
215
230
|
* @returns {object} requested element or null if not found
|
|
231
|
+
* @category Assets
|
|
216
232
|
*/
|
|
217
233
|
export function getTMX(elt: string): object;
|
|
218
234
|
/**
|
|
@@ -220,20 +236,23 @@ export function getTMX(elt: string): object;
|
|
|
220
236
|
* @memberof loader
|
|
221
237
|
* @param {string} elt - name of the binary object ("ymTrack");
|
|
222
238
|
* @returns {object} requested element or null if not found
|
|
239
|
+
* @category Assets
|
|
223
240
|
*/
|
|
224
241
|
export function getBinary(elt: string): object;
|
|
225
242
|
/**
|
|
226
243
|
* return the specified Image Object
|
|
227
244
|
* @memberof loader
|
|
228
245
|
* @param {string} image - name of the Image element ("tileset-platformer");
|
|
229
|
-
* @returns {HTMLImageElement} requested element or null if not found
|
|
246
|
+
* @returns {HTMLImageElement|CompressedImage|null} requested element or null if not found
|
|
247
|
+
* @category Assets
|
|
230
248
|
*/
|
|
231
|
-
export function getImage(image: string): HTMLImageElement;
|
|
249
|
+
export function getImage(image: string): HTMLImageElement | CompressedImage | null;
|
|
232
250
|
/**
|
|
233
251
|
* return the specified JSON Object
|
|
234
252
|
* @memberof loader
|
|
235
253
|
* @param {string} elt - name of the json file
|
|
236
254
|
* @returns {JSON}
|
|
255
|
+
* @category Assets
|
|
237
256
|
*/
|
|
238
257
|
export function getJSON(elt: string): JSON;
|
|
239
258
|
/**
|
|
@@ -241,6 +260,7 @@ export function getJSON(elt: string): JSON;
|
|
|
241
260
|
* @memberof loader
|
|
242
261
|
* @param {string} elt - name of the video file
|
|
243
262
|
* @returns {HTMLVideoElement}
|
|
263
|
+
* @category Assets
|
|
244
264
|
*/
|
|
245
265
|
export function getVideo(elt: string): HTMLVideoElement;
|
|
246
266
|
/**
|
|
@@ -248,6 +268,7 @@ export function getVideo(elt: string): HTMLVideoElement;
|
|
|
248
268
|
* @memberof loader
|
|
249
269
|
* @param {string} elt - name of the font file
|
|
250
270
|
* @returns {FontFace}
|
|
271
|
+
* @category Assets
|
|
251
272
|
*/
|
|
252
273
|
export function getFont(elt: string): FontFace;
|
|
253
274
|
/**
|
|
@@ -276,7 +297,7 @@ export const baseURL: {
|
|
|
276
297
|
* // allow for cross-origin texture loading
|
|
277
298
|
* me.loader.crossOrigin = "anonymous";
|
|
278
299
|
*
|
|
279
|
-
* // set all
|
|
300
|
+
* // set all resources to be loaded
|
|
280
301
|
* me.loader.preload(game.resources, () => this.loaded());
|
|
281
302
|
*/
|
|
282
303
|
export let crossOrigin: string;
|
|
@@ -294,7 +315,7 @@ export let crossOrigin: string;
|
|
|
294
315
|
* // enable withCredentials
|
|
295
316
|
* me.loader.withCredentials = true;
|
|
296
317
|
*
|
|
297
|
-
* // set all
|
|
318
|
+
* // set all resources to be loaded
|
|
298
319
|
* me.loader.preload(game.resources, () => this.loaded());
|
|
299
320
|
*/
|
|
300
321
|
export let withCredentials: boolean;
|
|
@@ -303,9 +324,10 @@ export let withCredentials: boolean;
|
|
|
303
324
|
* @default undefined
|
|
304
325
|
* @memberof loader
|
|
305
326
|
* @type {function}
|
|
327
|
+
* @deprecated since 18.2.0 - Use the {@link event.LOADER_COMPLETE} event or the `onloadcb` parameter of {@link loader.preload} instead.
|
|
306
328
|
* @example
|
|
307
|
-
* //
|
|
308
|
-
* me.
|
|
329
|
+
* // use the LOADER_COMPLETE event instead
|
|
330
|
+
* me.event.on(me.event.LOADER_COMPLETE, this.loaded.bind(this));
|
|
309
331
|
*/
|
|
310
332
|
export let onload: Function;
|
|
311
333
|
/**
|
|
@@ -315,9 +337,10 @@ export let onload: Function;
|
|
|
315
337
|
* @default undefined
|
|
316
338
|
* @memberof loader
|
|
317
339
|
* @type {function}
|
|
340
|
+
* @deprecated since 18.2.0 - Use the {@link event.LOADER_PROGRESS} event instead.
|
|
318
341
|
* @example
|
|
319
|
-
* //
|
|
320
|
-
* me.
|
|
342
|
+
* // use the LOADER_PROGRESS event instead
|
|
343
|
+
* me.event.on(me.event.LOADER_PROGRESS, (progress, resource) => this.updateProgress(progress, resource));
|
|
321
344
|
*/
|
|
322
345
|
export let onProgress: Function;
|
|
323
346
|
/**
|
|
@@ -326,9 +349,10 @@ export let onProgress: Function;
|
|
|
326
349
|
* @default undefined
|
|
327
350
|
* @memberof loader
|
|
328
351
|
* @type {function}
|
|
352
|
+
* @deprecated since 18.2.0 - Use the {@link event.LOADER_ERROR} event instead.
|
|
329
353
|
* @example
|
|
330
|
-
* //
|
|
331
|
-
* me.
|
|
354
|
+
* // use the LOADER_ERROR event instead
|
|
355
|
+
* me.event.on(me.event.LOADER_ERROR, (resource) => this.loaderError(resource));
|
|
332
356
|
*/
|
|
333
357
|
export let onError: Function;
|
|
334
358
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"AA8EA;;;GAGG;AACH,mDAEC;AAED
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/loader/loader.js"],"names":[],"mappings":"AA8EA;;;GAGG;AACH,mDAEC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,oCAdG;IAAyB,WAAW;IACV,OAAO;IACP,eAAe;CACzC,QAqBF;AAED;;;;;;;;;;;;;;GAcG;AACH,iCATW,MAAM,QACN,MAAM,QAuBhB;A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Screen extends Stage {
|
|
7
|
+
/**
|
|
8
|
+
* @ignore
|
|
9
|
+
*/
|
|
10
|
+
progressBar: null;
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
logoSprite: null;
|
|
7
15
|
/**
|
|
8
16
|
* call when the loader is resetted
|
|
9
17
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadingscreen.d.ts","sourceRoot":"","sources":["../../src/loader/loadingscreen.js"],"names":[],"mappings":";AAiFA;;;GAGG;AACH;IACC;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"loadingscreen.d.ts","sourceRoot":"","sources":["../../src/loader/loadingscreen.js"],"names":[],"mappings":";AAiFA;;;GAGG;AACH;IACC;;OAEG;IACH,kBAAmB;IAEnB;;OAEG;IACH,iBAAkB;IAElB;;;OAGG;IACH,qBAyBC;IAED;;;OAGG;IACH,uBAaC;CACD;kBA9IiB,qBAAqB"}
|
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
export function parseCompressedImage(arrayBuffer: any, imgExt: any):
|
|
1
|
+
export function parseCompressedImage(arrayBuffer: any, imgExt: any): any;
|
|
2
|
+
export type CompressedTextureLevel = {
|
|
3
|
+
/**
|
|
4
|
+
* - the compressed pixel data for this mip level
|
|
5
|
+
*/
|
|
6
|
+
data: Uint8Array;
|
|
7
|
+
/**
|
|
8
|
+
* - width of this mip level in pixels
|
|
9
|
+
*/
|
|
10
|
+
width: number;
|
|
11
|
+
/**
|
|
12
|
+
* - height of this mip level in pixels
|
|
13
|
+
*/
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* A parsed compressed texture object, returned by the compressed texture parsers (DDS, KTX, KTX2, PVR, PKM).
|
|
18
|
+
*/
|
|
19
|
+
export type CompressedImage = {
|
|
20
|
+
/**
|
|
21
|
+
* - array of mip levels, largest first
|
|
22
|
+
*/
|
|
23
|
+
mipmaps: CompressedTextureLevel[];
|
|
24
|
+
/**
|
|
25
|
+
* - width of the base (largest) mip level in pixels
|
|
26
|
+
*/
|
|
27
|
+
width: number;
|
|
28
|
+
/**
|
|
29
|
+
* - height of the base (largest) mip level in pixels
|
|
30
|
+
*/
|
|
31
|
+
height: number;
|
|
32
|
+
/**
|
|
33
|
+
* - WebGL compressed texture format constant (e.g. 0x83F0 for COMPRESSED_RGB_S3TC_DXT1_EXT)
|
|
34
|
+
*/
|
|
35
|
+
format: number;
|
|
36
|
+
/**
|
|
37
|
+
* - always true
|
|
38
|
+
*/
|
|
39
|
+
compressed: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* - always false (mipmaps are pre-computed)
|
|
42
|
+
*/
|
|
43
|
+
generateMipmap: boolean;
|
|
44
|
+
};
|
|
2
45
|
//# sourceMappingURL=compressed_image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compressed_image.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/compressed_image.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compressed_image.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/compressed_image.js"],"names":[],"mappings":"AAmEA,yEAgDC;;;;;UA1Ga,UAAU;;;;WACV,MAAM;;;;YACN,MAAM;;;;;;;;;aAMN,sBAAsB,EAAE;;;;WACxB,MAAM;;;;YACN,MAAM;;;;YACN,MAAM;;;;gBACN,OAAO;;;;oBACP,OAAO"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parse a DDS compressed texture file.
|
|
3
|
+
* @param {ArrayBuffer} data - the DDS file data
|
|
4
|
+
* @returns {CompressedImage} a compressed texture object with mipmaps, width, height, format
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function parseDDS(data: ArrayBuffer): CompressedImage;
|
|
2
8
|
//# sourceMappingURL=parseDDS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseDDS.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseDDS.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseDDS.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseDDS.js"],"names":[],"mappings":"AAsCA;;;;;GAKG;AACH,+BAJW,WAAW,GACT,eAAe,CAoE3B"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parse a KTX v1 compressed texture file.
|
|
3
|
+
* @param {ArrayBuffer} data - the KTX file data
|
|
4
|
+
* @returns {CompressedImage} a compressed texture object with mipmaps, width, height, format
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function parseKTX(data: ArrayBuffer): CompressedImage;
|
|
2
8
|
//# sourceMappingURL=parseKTX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseKTX.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseKTX.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseKTX.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseKTX.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,+BAJW,WAAW,GACT,eAAe,CA+E3B"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parse a KTX v2 compressed texture file.
|
|
3
|
+
* @param {ArrayBuffer} data - the KTX2 file data
|
|
4
|
+
* @returns {CompressedImage} a compressed texture object with mipmaps, width, height, format
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function parseKTX2(data: ArrayBuffer): CompressedImage;
|
|
2
8
|
//# sourceMappingURL=parseKTX2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseKTX2.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseKTX2.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseKTX2.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parseKTX2.js"],"names":[],"mappings":"AAsEA;;;;;GAKG;AACH,gCAJW,WAAW,GACT,eAAe,CA0E3B"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parse a PKM compressed texture file.
|
|
3
|
+
* @param {ArrayBuffer} data - the raw PKM file data
|
|
4
|
+
* @returns {CompressedImage} a compressed texture object
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function parsePKM(data: ArrayBuffer): CompressedImage;
|
|
2
8
|
//# sourceMappingURL=parsePKM.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsePKM.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parsePKM.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsePKM.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parsePKM.js"],"names":[],"mappings":"AA0CA;;;;;GAKG;AACH,+BAJW,WAAW,GACT,eAAe,CAiD3B"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* parse a PVR v3 compressed texture file
|
|
3
|
+
* @param {ArrayBuffer} data - the PVR file data
|
|
4
|
+
* @returns {CompressedImage} a compressed texture object with mipmaps, width, height, format
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
export function parsePVR(data: ArrayBuffer): CompressedImage;
|
|
2
8
|
//# sourceMappingURL=parsePVR.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsePVR.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parsePVR.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsePVR.d.ts","sourceRoot":"","sources":["../../../../src/loader/parsers/compressed_textures/parsePVR.js"],"names":[],"mappings":"AAmEA;;;;;GAKG;AACH,+BAJW,WAAW,GACT,eAAe,CAqD3B"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @ignore
|
|
8
8
|
* @example
|
|
9
9
|
* preloadFontFace(
|
|
10
|
-
* name: "'kenpixel'", type: "fontface", src: "
|
|
10
|
+
* name: "'kenpixel'", type: "fontface", src: "data/font/kenvector_future.woff2"
|
|
11
11
|
* ]);
|
|
12
12
|
*/
|
|
13
13
|
export function preloadFontFace(data: loader.Asset, onload?: Function, onerror?: Function): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fontface.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/fontface.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fontface.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/fontface.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,sCAVW,MAAM,CAAC,KAAK,0CAGV,MAAM,CAgDlB"}
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
* { name : 'image1', src : 'images/image1.png'},
|
|
12
12
|
* { name : 'image2', src : 'images/image2.png'},
|
|
13
13
|
* { name : 'image3', src : 'images/image3.png'},
|
|
14
|
-
*
|
|
14
|
+
* // compressed texture with fallback chain
|
|
15
|
+
* { name : 'image4', src : [
|
|
16
|
+
* 'images/image4.astc.ktx', // try ASTC first
|
|
17
|
+
* 'images/image4.dds', // then S3TC via DDS
|
|
18
|
+
* 'images/image4.png' // fallback to PNG
|
|
19
|
+
* ]}
|
|
15
20
|
* ]);
|
|
16
21
|
*/
|
|
17
22
|
export function preloadImage(img: loader.Asset, onload?: Function, onerror?: Function, settings?: Object): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/image.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/image.js"],"names":[],"mappings":"AAuDA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,kCAnBW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CA4ClB"}
|
package/build/math/color.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A color manipulation object.
|
|
3
|
+
* @category Math
|
|
3
4
|
*/
|
|
4
5
|
export declare class Color {
|
|
5
6
|
private glArray;
|
|
@@ -161,7 +162,7 @@ export declare class Color {
|
|
|
161
162
|
*/
|
|
162
163
|
toUint32(alpha?: number): number;
|
|
163
164
|
/**
|
|
164
|
-
* return
|
|
165
|
+
* return a Float Array representation of this object
|
|
165
166
|
* @returns A Float Array representation of this color
|
|
166
167
|
*/
|
|
167
168
|
toArray(): Float32Array<ArrayBufferLike>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/math/color.ts"],"names":[],"mappings":"AAqNA
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/math/color.ts"],"names":[],"mappings":"AAqNA;;;GAGG;AACH,qBAAa,KAAK;IACjB,OAAO,CAAC,OAAO,CAAe;IAE9B;;;;;;OAMG;gBACS,CAAC,GAAE,KAAK,GAAG,MAAM,GAAG,MAAU,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,KAAK,SAAM;IAcrE;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,CAAC,WAEJ;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,QAAA,EAEV;IAED;;;OAGG;IACH,IAAI,KAAK,WAER;IAED;;;O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;OAIG;IACH,MAAM,CAAC,KAAK,SAAa;IAIzB;;;OAGG;IACH,KAAK;IAIL;;;;OAIG;IACH,MAAM,CAAC,KAAK,SAAa;CAGzB;AAED,eAAO,MAAM,SAAS,gKAwBpB,CAAC"}
|
package/build/math/matrix2d.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type ConstructorArg = [Matrix2d] | [Matrix3d] | [number, number, number, number,
|
|
|
7
7
|
* a Matrix2d Object.<br>
|
|
8
8
|
* the identity matrix and parameters position : <br>
|
|
9
9
|
* <img src="images/identity-matrix_2x.png"/>
|
|
10
|
+
* @category Math
|
|
10
11
|
*/
|
|
11
12
|
export declare class Matrix2d {
|
|
12
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix2d.d.ts","sourceRoot":"","sources":["../../src/math/matrix2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,KAAK,cAAc,GAChB,CAAC,QAAQ,CAAC,GACV,CAAC,QAAQ,CAAC,GACV,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChD,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxE,CAAC,SAAS,CAAC,GACX,EAAE,CAAC;AAcN
|
|
1
|
+
{"version":3,"file":"matrix2d.d.ts","sourceRoot":"","sources":["../../src/math/matrix2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,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|
/**
|
|
3
3
|
* Represents a point in a 3D coordinate vector that can be observed for changes.
|
|
4
|
+
* @category Math
|
|
4
5
|
*/
|
|
5
6
|
export declare class ObservableVector2d {
|
|
6
7
|
private _callback;
|
|
@@ -69,7 +70,7 @@ export declare class ObservableVector2d {
|
|
|
69
70
|
*/
|
|
70
71
|
add(v: Vector2d | ObservableVector2d): this;
|
|
71
72
|
/**
|
|
72
|
-
*
|
|
73
|
+
* Subtract the passed vector from this vector
|
|
73
74
|
* @param v other vector
|
|
74
75
|
* @returns Reference to this object for method chaining
|
|
75
76
|
*/
|
|
@@ -282,5 +283,5 @@ export declare class ObservableVector2d {
|
|
|
282
283
|
*/
|
|
283
284
|
revoke(): void;
|
|
284
285
|
}
|
|
285
|
-
export declare const observableVector2dPool: import("../system/pool.ts").Pool<ObservableVector2d, [x?: number | undefined, y?: number | undefined, callback?: () => void]>;
|
|
286
|
+
export declare const observableVector2dPool: import("../system/pool.ts").Pool<ObservableVector2d, [x?: number | undefined, y?: number | undefined, callback?: (() => void) | undefined]>;
|
|
286
287
|
//# sourceMappingURL=observableVector2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observableVector2d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector2d.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAezC
|
|
1
|
+
{"version":3,"file":"observableVector2d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector2d.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAezC;;;GAGG;AACH,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,OAAO,CAAa;IAE5B,OAAO,CAAC,eAAe,CAAiB;IAExC;;;;;OAKG;gBACS,CAAC,GAAE,MAAU,EAAE,CAAC,GAAE,MAAU,EAAE,QAAQ,C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,QAAQ;IAIR;;OAEG;IACH,MAAM;CAGN;AAED,eAAO,MAAM,sBAAsB,0HAEgC,IAAI,eAarE,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { Vector2d } from "./vector2d";
|
|
|
3
3
|
import { Vector3d } from "./vector3d";
|
|
4
4
|
/**
|
|
5
5
|
* Represents a point in a 3D coordinate vector that can be observed for changes.
|
|
6
|
+
* @category Math
|
|
6
7
|
*/
|
|
7
8
|
export declare class ObservableVector3d {
|
|
8
9
|
private _callback;
|
|
@@ -76,7 +77,7 @@ export declare class ObservableVector3d {
|
|
|
76
77
|
*/
|
|
77
78
|
add(v: Vector2d | Vector3d | ObservableVector3d): this;
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
+
* Subtract the passed vector from this vector
|
|
80
81
|
* @param v other vector
|
|
81
82
|
* @returns Reference to this object for method chaining
|
|
82
83
|
*/
|
|
@@ -198,10 +199,10 @@ export declare class ObservableVector3d {
|
|
|
198
199
|
/**
|
|
199
200
|
* Rotate this vector (counter-clockwise) by the specified angle (in radians) around the z axis
|
|
200
201
|
* @param angle - The angle to rotate (in radians)
|
|
201
|
-
* @param [v] - an optional point to rotate around
|
|
202
|
+
* @param [v] - an optional point to rotate around
|
|
202
203
|
* @returns Reference to this object for method chaining
|
|
203
204
|
*/
|
|
204
|
-
rotate(angle: number, v?: Vector2d | Point): this;
|
|
205
|
+
rotate(angle: number, v?: Vector2d | Point | Vector3d): this;
|
|
205
206
|
/**
|
|
206
207
|
* return the dot product of this vector and the passed one
|
|
207
208
|
* @param v other vector
|
|
@@ -279,5 +280,5 @@ export declare class ObservableVector3d {
|
|
|
279
280
|
*/
|
|
280
281
|
revoke(): void;
|
|
281
282
|
}
|
|
282
|
-
export declare const observableVector3dPool: import("../system/pool.ts").Pool<ObservableVector3d, [x?: number | undefined, y?: number | undefined, z?: number | undefined, callback?: () => void]>;
|
|
283
|
+
export declare const observableVector3dPool: import("../system/pool.ts").Pool<ObservableVector3d, [x?: number | undefined, y?: number | undefined, z?: number | undefined, callback?: (() => void) | undefined]>;
|
|
283
284
|
//# sourceMappingURL=observableVector3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observableVector3d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector3d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC
|
|
1
|
+
{"version":3,"file":"observableVector3d.d.ts","sourceRoot":"","sources":["../../src/math/observableVector3d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC;;;GAGG;AACH,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,OAAO,CAAa;IAE5B,OAAO,CAAC,eAAe,CAAiB;IAExC;;;;;;OAMG;gBAEF,CAAC,GAAE,MAAU,EACb,CAAC,GAAE,MAAU,EACb,CAAC,GAAE,MAAU,EACb,QAAQ,CAAC,EAAE,MAAM,IAAI;IAuBtB;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI;IAUvB;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI,EAAE,CAAC,SAAI;IAS5B;;OAEG;IACH,IAAI,CAAC,IAQQ,MAAM,CANlB;IAED;;;OAGG;IACH,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAElB;IAED;;OAEG;IACH,IAAI,CAAC,IAQQ,MAAM,CANlB;IAED;;;OAGG;IACH,IAAI,CAAC,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AAI;IAIrB;;;OAGG;IACH,QAAQ;IAIR;;OAEG;IACH,MAAM;CAGN;AAED,eAAO,MAAM,sBAAsB,kJAMhB,IAAI,eAcrB,CAAC"}
|
package/build/math/vector2d.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { XYPoint } from "../utils/types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* a generic 2D Vector Object
|
|
4
|
+
* @category Math
|
|
4
5
|
*/
|
|
5
6
|
export declare class Vector2d {
|
|
6
7
|
x: number;
|
|
@@ -41,7 +42,7 @@ export declare class Vector2d {
|
|
|
41
42
|
*/
|
|
42
43
|
add(v: Vector2d): this;
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* Subtract the passed vector from this vector
|
|
45
46
|
* @param v other vector
|
|
46
47
|
* @returns Reference to this object for method chaining
|
|
47
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector2d.d.ts","sourceRoot":"","sources":["../../src/math/vector2d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C
|
|
1
|
+
{"version":3,"file":"vector2d.d.ts","sourceRoot":"","sources":["../../src/math/vector2d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;;GAGG;AACH,qBAAa,QAAQ;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;gBACS,CAAC,GAAE,MAAM,GAAG,SAAa,EAAE,CAAC,GAAE,MAAM,GAAG,SAAa;IAKhE;;;;OAIG;IACH,YAAY,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI;IAWzB;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAMxB;;;OAGG;IACH,OAAO;IAIP;;;;OAIG;IACH,IAAI,CAAC,CAAC,EAAE,QAAQ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