melonjs 10.1.1 → 10.2.3
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 +6 -10
- package/dist/melonjs.js +3114 -2866
- package/dist/melonjs.min.js +3 -3
- package/dist/melonjs.module.d.ts +2588 -2498
- package/dist/melonjs.module.js +2694 -2479
- package/package.json +10 -11
- package/src/audio/audio.js +43 -43
- package/src/camera/camera2d.js +52 -74
- package/src/entity/draggable.js +18 -17
- package/src/entity/droptarget.js +19 -18
- package/src/entity/entity.js +22 -26
- package/src/game.js +3 -3
- package/src/index.js +15 -11
- package/src/input/gamepad.js +13 -13
- package/src/input/input.js +1 -1
- package/src/input/keyboard.js +14 -16
- package/src/input/pointer.js +42 -35
- package/src/input/pointerevent.js +25 -33
- package/src/lang/deprecated.js +3 -3
- package/src/level/level.js +24 -16
- package/src/level/tiled/TMXGroup.js +6 -6
- package/src/level/tiled/TMXLayer.js +31 -31
- package/src/level/tiled/TMXObject.js +19 -19
- package/src/level/tiled/TMXTile.js +11 -12
- package/src/level/tiled/TMXTileMap.js +23 -21
- package/src/level/tiled/TMXTileset.js +13 -13
- package/src/level/tiled/TMXTilesetGroup.js +4 -4
- package/src/level/tiled/TMXUtils.js +13 -11
- package/src/level/tiled/renderer/TMXHexagonalRenderer.js +1 -1
- package/src/level/tiled/renderer/TMXIsometricRenderer.js +1 -1
- package/src/level/tiled/renderer/TMXRenderer.js +17 -17
- package/src/loader/loader.js +31 -27
- package/src/loader/loadingscreen.js +44 -75
- package/src/math/color.js +45 -64
- package/src/math/math.js +17 -17
- package/src/math/matrix2.js +46 -46
- package/src/math/matrix3.js +64 -64
- package/src/math/observable_vector2.js +45 -57
- package/src/math/observable_vector3.js +56 -70
- package/src/math/vector2.js +60 -59
- package/src/math/vector3.js +65 -64
- package/src/particles/emitter.js +53 -55
- package/src/particles/particle.js +1 -1
- package/src/physics/body.js +45 -51
- package/src/physics/bounds.js +36 -36
- package/src/physics/collision.js +15 -16
- package/src/physics/detector.js +10 -11
- package/src/physics/quadtree.js +18 -16
- package/src/physics/sat.js +17 -17
- package/src/physics/world.js +12 -10
- package/src/plugin/plugin.js +6 -6
- package/src/renderable/GUI.js +13 -18
- package/src/renderable/collectable.js +3 -3
- package/src/renderable/colorlayer.js +4 -4
- package/src/renderable/container.js +64 -46
- package/src/renderable/imagelayer.js +30 -31
- package/src/renderable/nineslicesprite.js +158 -69
- package/src/renderable/renderable.js +68 -67
- package/src/renderable/sprite.js +57 -43
- package/src/renderable/trigger.js +14 -15
- package/src/shapes/ellipse.js +27 -26
- package/src/shapes/line.js +8 -7
- package/src/shapes/poly.js +33 -31
- package/src/shapes/rectangle.js +50 -96
- package/src/state/stage.js +8 -8
- package/src/state/state.js +56 -56
- package/src/system/device.js +97 -84
- package/src/system/event.js +72 -72
- package/src/system/pooling.js +14 -14
- package/src/system/save.js +6 -3
- package/src/system/timer.js +20 -20
- package/src/text/bitmaptext.js +27 -33
- package/src/text/bitmaptextdata.js +9 -9
- package/src/text/text.js +118 -59
- package/src/tweens/easing.js +4 -4
- package/src/tweens/interpolation.js +4 -4
- package/src/tweens/tween.js +37 -27
- package/src/utils/agent.js +9 -8
- package/src/utils/array.js +4 -4
- package/src/utils/file.js +4 -4
- package/src/utils/function.js +5 -5
- package/src/utils/string.js +12 -12
- package/src/utils/utils.js +19 -19
- package/src/video/canvas/canvas_renderer.js +90 -90
- package/src/video/renderer.js +40 -39
- package/src/video/texture.js +85 -76
- package/src/video/texture_cache.js +11 -0
- package/src/video/video.js +31 -31
- package/src/video/webgl/buffer/vertex.js +9 -1
- package/src/video/webgl/glshader.js +20 -20
- package/src/video/webgl/webgl_compositor.js +47 -46
- package/src/video/webgl/webgl_renderer.js +104 -104
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Graphics
|
|
|
31
31
|
- 2D sprite-based graphic engine
|
|
32
32
|
- Fast WebGL 1 & 2 renderer for desktop and mobile devices with fallback to Canvas rendering
|
|
33
33
|
- High DPI resolution & Canvas advanced auto scaling
|
|
34
|
-
- Sprite with
|
|
34
|
+
- Sprite with 9-slice scaling option, and animation management
|
|
35
35
|
- built-in effects such as tinting and masking
|
|
36
36
|
- Standard spritesheet, single and multiple Packed Textures support
|
|
37
37
|
- System & Bitmap Text
|
|
@@ -90,10 +90,10 @@ Tools integration and usage with melonJS is documented in our [Wiki](https://git
|
|
|
90
90
|
Using melonJS
|
|
91
91
|
-------------------------------------------------------------------------------
|
|
92
92
|
|
|
93
|
-
Basic Example
|
|
93
|
+
Basic [Hello World](https://jsfiddle.net/obiot/4o9f02tc/) Example
|
|
94
94
|
|
|
95
95
|
```JavaScript
|
|
96
|
-
import * as me from "https://
|
|
96
|
+
import * as me from "https://esm.run/melonjs";
|
|
97
97
|
|
|
98
98
|
me.device.onReady(function () {
|
|
99
99
|
// initialize the display canvas once the device/browser is ready
|
|
@@ -170,15 +170,11 @@ If you need to import the ES6 module of melonjs (e.g. for Webpack):
|
|
|
170
170
|
Or can simply be added to your html, using [jsDeliver](https://www.jsdelivr.com/package/npm/melonjs) content delivery network (CDN) :
|
|
171
171
|
|
|
172
172
|
```html
|
|
173
|
-
<!-- load the
|
|
174
|
-
<script src="https://
|
|
175
|
-
<!-- load the ES6 module bundle of melonJS v10.0.0 -->
|
|
176
|
-
<script src="https://cdn.jsdelivr.net/npm/melonjs@10.0.0/dist/melonjs.module.js"></script>
|
|
173
|
+
<!-- load the ES6 module bundle of melonJS v10.0 -->
|
|
174
|
+
<script src="https://esm.run/melonjs@10.0"></script>
|
|
177
175
|
<!-- omit the version completely to get the latest one -->
|
|
178
176
|
<!-- you should NOT use this in production -->
|
|
179
|
-
<script src="https://
|
|
180
|
-
<!-- add ".min" to any JS/CSS file to get a minified version -->
|
|
181
|
-
<script src="https://cdn.jsdelivr.net/npm/melonjs@10.0.0/dist/melonjs.min.js"></script>
|
|
177
|
+
<script src="https://esm.run/melonjs"></script>
|
|
182
178
|
```
|
|
183
179
|
> Note: starting from the 10.0.0 version, the debug plugin is no longer provided as part of the melonJS library release, and has been moved to the official [boilerplate](https://github.com/melonjs/es6-boilerplate)
|
|
184
180
|
|