melonjs 10.8.0 → 10.11.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/LICENSE.md +1 -1
- package/README.md +32 -25
- package/dist/melonjs.js +1833 -2267
- package/dist/melonjs.min.js +4 -4
- package/dist/melonjs.module.d.ts +642 -1416
- package/dist/melonjs.module.js +1778 -2237
- package/package.json +16 -16
- package/src/audio/audio.js +0 -1
- package/src/camera/camera2d.js +1 -16
- package/src/entity/entity.js +1 -4
- package/src/game.js +2 -2
- package/src/geometries/ellipse.js +18 -27
- package/src/geometries/line.js +5 -8
- package/src/geometries/path2d.js +10 -20
- package/src/geometries/poly.js +28 -45
- package/src/geometries/rectangle.js +24 -36
- package/src/geometries/roundrect.js +96 -3
- package/src/index.js +7 -2
- package/src/input/gamepad.js +5 -16
- package/src/input/keyboard.js +1 -9
- package/src/input/pointer.js +0 -1
- package/src/input/pointerevent.js +14 -23
- package/src/lang/deprecated.js +9 -6
- package/src/level/level.js +0 -9
- package/src/level/tiled/TMXGroup.js +0 -4
- package/src/level/tiled/TMXLayer.js +0 -8
- package/src/level/tiled/TMXObject.js +0 -3
- package/src/level/tiled/TMXTile.js +4 -5
- package/src/level/tiled/TMXTileMap.js +1 -7
- package/src/level/tiled/TMXTileset.js +0 -5
- package/src/level/tiled/TMXTilesetGroup.js +1 -4
- package/src/level/tiled/TMXUtils.js +1 -4
- package/src/level/tiled/renderer/TMXHexagonalRenderer.js +2 -3
- package/src/level/tiled/renderer/TMXIsometricRenderer.js +0 -1
- package/src/level/tiled/renderer/TMXRenderer.js +1 -7
- package/src/loader/loader.js +0 -11
- package/src/loader/loadingscreen.js +16 -5
- package/src/math/color.js +10 -30
- package/src/math/math.js +0 -10
- package/src/math/matrix2.js +12 -27
- package/src/math/matrix3.js +1 -22
- package/src/math/observable_vector2.js +0 -29
- package/src/math/observable_vector3.js +0 -29
- package/src/math/vector2.js +3 -40
- package/src/math/vector3.js +4 -41
- package/src/particles/emitter.js +11 -12
- package/src/physics/body.js +1 -1
- package/src/physics/bounds.js +5 -19
- package/src/physics/collision.js +0 -1
- package/src/physics/detector.js +0 -4
- package/src/physics/quadtree.js +0 -7
- package/src/physics/sat.js +3 -3
- package/src/physics/world.js +0 -4
- package/src/plugin/plugin.js +0 -2
- package/src/polyfill/index.js +1 -0
- package/src/polyfill/roundrect.js +237 -0
- package/src/renderable/GUI.js +5 -10
- package/src/renderable/collectable.js +1 -0
- package/src/renderable/container.js +26 -54
- package/src/renderable/dragndrop.js +0 -9
- package/src/renderable/imagelayer.js +3 -7
- package/src/renderable/light2d.js +114 -0
- package/src/renderable/renderable.js +22 -43
- package/src/renderable/sprite.js +13 -25
- package/src/renderable/trigger.js +1 -1
- package/src/state/stage.js +72 -6
- package/src/state/state.js +3 -20
- package/src/system/device.js +14 -53
- package/src/system/event.js +11 -0
- package/src/system/pooling.js +19 -8
- package/src/system/save.js +9 -11
- package/src/system/timer.js +239 -218
- package/src/text/bitmaptextdata.js +1 -4
- package/src/text/glyph.js +2 -2
- package/src/text/text.js +19 -21
- package/src/text/textmetrics.js +0 -2
- package/src/tweens/easing.js +1 -1
- package/src/tweens/interpolation.js +2 -2
- package/src/tweens/tween.js +1 -13
- package/src/utils/agent.js +1 -3
- package/src/utils/array.js +0 -3
- package/src/utils/file.js +0 -2
- package/src/utils/function.js +0 -2
- package/src/utils/string.js +0 -6
- package/src/utils/utils.js +2 -5
- package/src/video/canvas/canvas_renderer.js +76 -103
- package/src/video/renderer.js +43 -50
- package/src/video/{texture.js → texture/atlas.js} +8 -8
- package/src/video/{texture_cache.js → texture/cache.js} +4 -5
- package/src/video/texture/canvas_texture.js +99 -0
- package/src/video/video.js +3 -3
- package/src/video/webgl/glshader.js +0 -5
- package/src/video/webgl/utils/uniforms.js +4 -7
- package/src/video/webgl/webgl_compositor.js +0 -14
- package/src/video/webgl/webgl_renderer.js +73 -97
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -87,10 +87,34 @@ Tools integration
|
|
|
87
87
|
Tools integration and usage with melonJS is documented in our [Wiki](https://github.com/melonjs/melonJS/wiki#third-party-tools-usage).
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
Using melonJS
|
|
90
|
+
# Using melonJS
|
|
91
|
+
|
|
92
|
+
### For your first time using melonJS, use either of these tutorials for setting up the engine. These are where you start.
|
|
93
|
+
|
|
94
|
+
- [Platformer](http://melonjs.github.io/tutorial-platformer/) Step by Step Tutorial.
|
|
95
|
+
- [Space Invaders](http://melonjs.github.io/tutorial-space-invaders/) Step by Step Tutorial.
|
|
96
|
+
|
|
97
|
+
You may find it useful to skim the overview found at the wiki [Details & Usage](https://github.com/melonjs/melonJS/wiki#details--usage)
|
|
98
|
+
|
|
99
|
+
When starting your own projects, checkout our [es6 boilerplate](https://github.com/melonjs/es6-boilerplate)
|
|
100
|
+
|
|
101
|
+
Demos
|
|
91
102
|
-------------------------------------------------------------------------------
|
|
92
103
|
|
|
93
|
-
|
|
104
|
+
A few demos of melonJS capabilities :
|
|
105
|
+
|
|
106
|
+
* [Platformer Demo](https://melonjs.github.io/examples/platformer/)
|
|
107
|
+
* [Isometric Demo](https://melonjs.github.io/examples/isometric_rpg/)
|
|
108
|
+
* [Sprite Demo](https://melonjs.github.io/examples/sprite/)
|
|
109
|
+
* [Masking Demo](https://melonjs.github.io/examples/masking/)
|
|
110
|
+
* [Primitive Drawing Demo](https://melonjs.github.io/examples/graphics/)
|
|
111
|
+
* [UI Demo](https://melonjs.github.io/examples/UI/)
|
|
112
|
+
|
|
113
|
+
More examples are available [here](https://melonjs.github.io/examples/)
|
|
114
|
+
|
|
115
|
+
-------------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
### Basic [Hello World](https://jsfiddle.net/obiot/4o9f02tc/) Example
|
|
94
118
|
|
|
95
119
|
```JavaScript
|
|
96
120
|
import * as me from "https://esm.run/melonjs";
|
|
@@ -118,32 +142,12 @@ me.device.onReady(function () {
|
|
|
118
142
|
```
|
|
119
143
|
> Simple hello world using melonJS 2 (version 10.x or higher)
|
|
120
144
|
|
|
121
|
-
Documentation
|
|
122
|
-
|
|
123
|
-
* [Online API](http://melonjs.github.io/melonJS/docs/) ([offline](https://github.com/melonjs/melonJS/archive/gh-pages.zip) version under the `docs` directory)
|
|
124
|
-
|
|
125
|
-
For your first time using melonJS, follow these tutorials :
|
|
126
|
-
|
|
127
|
-
- [Platformer](http://melonjs.github.io/tutorial-platformer/) Step by Step Tutorial.
|
|
128
|
-
- [Space Invaders](http://melonjs.github.io/tutorial-space-invaders/) Step by Step Tutorial.
|
|
129
|
-
|
|
130
|
-
You may find it useful to skim the overview found at the wiki [Details & Usage](https://github.com/melonjs/melonJS/wiki#details--usage)
|
|
131
|
-
|
|
132
|
-
When starting your own projects, checkout our [es6 boilerplate](https://github.com/melonjs/es6-boilerplate)
|
|
133
|
-
|
|
134
|
-
Demos
|
|
145
|
+
Documentation
|
|
135
146
|
-------------------------------------------------------------------------------
|
|
136
147
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
* [Platformer Demo](https://melonjs.github.io/examples/platformer/)
|
|
140
|
-
* [Isometric Demo](https://melonjs.github.io/examples/isometric_rpg/)
|
|
141
|
-
* [Sprite Demo](https://melonjs.github.io/examples/sprite/)
|
|
142
|
-
* [Masking Demo](https://melonjs.github.io/examples/masking/)
|
|
143
|
-
* [Primitive Drawing Demo](https://melonjs.github.io/examples/graphics/)
|
|
144
|
-
* [UI Demo](https://melonjs.github.io/examples/UI/)
|
|
148
|
+
* [Online API](http://melonjs.github.io/melonJS/docs/)
|
|
149
|
+
* [offline](https://github.com/melonjs/melonJS/archive/gh-pages.zip) version under the `docs` directory)
|
|
145
150
|
|
|
146
|
-
More examples are available [here](https://melonjs.github.io/examples/)
|
|
147
151
|
|
|
148
152
|
Download melonJS
|
|
149
153
|
-------------------------------------------------------------------------------
|
|
@@ -199,6 +203,7 @@ The generated library will be available under the `build` directory :
|
|
|
199
203
|
- `melonjs.js` : plain ES5 UMD bundle
|
|
200
204
|
- `melonjs.min.js` : minified ES5 UMD bundle
|
|
201
205
|
- `melonjs.module.js` : plain ES6 module
|
|
206
|
+
- `melonjs.module.d.ts` : typescript declaration for the ES6 Module
|
|
202
207
|
|
|
203
208
|
To run the melonJS test suite simply use the following:
|
|
204
209
|
|
|
@@ -208,6 +213,8 @@ This will run the jasmine spec tests with the output displayed on the shell. Do
|
|
|
208
213
|
note that the latest Chrome version is required, as the test unit will run the
|
|
209
214
|
Browser in a headless mode (in case of failed tests, upgrade your browser).
|
|
210
215
|
|
|
216
|
+
Last but not least, if you really want to contribute, but not sure how, you can
|
|
217
|
+
always check our [discussions](https://github.com/melonjs/melonJS/discussions/categories/ideas) list to get some idea on where to start.
|
|
211
218
|
|
|
212
219
|
Building the documentation
|
|
213
220
|
-------------------------------------------------------------------------------
|