melonjs 10.9.0 → 10.10.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 +29 -23
- package/dist/melonjs.js +812 -485
- package/dist/melonjs.min.js +4 -4
- package/dist/melonjs.module.d.ts +413 -230
- package/dist/melonjs.module.js +751 -437
- package/package.json +13 -10
- package/src/game.js +2 -2
- package/src/geometries/ellipse.js +16 -16
- package/src/geometries/line.js +4 -4
- package/src/geometries/path2d.js +10 -10
- package/src/geometries/poly.js +23 -23
- package/src/geometries/rectangle.js +22 -22
- package/src/geometries/roundrect.js +6 -6
- package/src/index.js +7 -1
- package/src/lang/deprecated.js +7 -5
- package/src/level/tiled/TMXUtils.js +1 -1
- package/src/loader/loadingscreen.js +16 -5
- package/src/math/color.js +5 -4
- package/src/particles/emitter.js +11 -12
- package/src/renderable/GUI.js +5 -5
- package/src/renderable/container.js +26 -26
- package/src/renderable/imagelayer.js +2 -2
- package/src/renderable/light2d.js +115 -0
- package/src/renderable/renderable.js +21 -20
- package/src/renderable/sprite.js +13 -13
- package/src/state/stage.js +72 -2
- package/src/text/text.js +13 -17
- package/src/video/canvas/canvas_renderer.js +69 -51
- package/src/video/renderer.js +33 -26
- package/src/video/{texture.js → texture/atlas.js} +8 -8
- package/src/video/{texture_cache.js → texture/cache.js} +4 -4
- package/src/video/texture/canvas_texture.js +87 -0
- package/src/video/webgl/webgl_renderer.js +73 -55
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";
|
|
@@ -122,28 +146,7 @@ Documentation :
|
|
|
122
146
|
|
|
123
147
|
* [Online API](http://melonjs.github.io/melonJS/docs/) ([offline](https://github.com/melonjs/melonJS/archive/gh-pages.zip) version under the `docs` directory)
|
|
124
148
|
|
|
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
|
|
135
|
-
-------------------------------------------------------------------------------
|
|
136
|
-
|
|
137
|
-
A few demos of melonJS capabilities :
|
|
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/)
|
|
145
149
|
|
|
146
|
-
More examples are available [here](https://melonjs.github.io/examples/)
|
|
147
150
|
|
|
148
151
|
Download melonJS
|
|
149
152
|
-------------------------------------------------------------------------------
|
|
@@ -199,6 +202,7 @@ The generated library will be available under the `build` directory :
|
|
|
199
202
|
- `melonjs.js` : plain ES5 UMD bundle
|
|
200
203
|
- `melonjs.min.js` : minified ES5 UMD bundle
|
|
201
204
|
- `melonjs.module.js` : plain ES6 module
|
|
205
|
+
- `melonjs.module.d.ts` : typescript declaration for the ES6 Module
|
|
202
206
|
|
|
203
207
|
To run the melonJS test suite simply use the following:
|
|
204
208
|
|
|
@@ -208,6 +212,8 @@ This will run the jasmine spec tests with the output displayed on the shell. Do
|
|
|
208
212
|
note that the latest Chrome version is required, as the test unit will run the
|
|
209
213
|
Browser in a headless mode (in case of failed tests, upgrade your browser).
|
|
210
214
|
|
|
215
|
+
Last but not least, if you really want to contribute, but not sure how, you can
|
|
216
|
+
always check our [discussions](https://github.com/melonjs/melonJS/discussions/categories/ideas) list to get some idea on where to start.
|
|
211
217
|
|
|
212
218
|
Building the documentation
|
|
213
219
|
-------------------------------------------------------------------------------
|