littlejsengine 1.2.3 → 1.3.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 +4 -3
- package/build.bat +6 -6
- package/buildSetup.bat +7 -0
- package/docs/Audio.html +2268 -0
- package/docs/Color.html +3376 -0
- package/docs/Debug.html +2933 -0
- package/docs/Draw.html +4480 -0
- package/docs/EngineObject.html +4734 -0
- package/docs/FontImage.html +1055 -0
- package/docs/Input.html +2806 -0
- package/docs/Medal.html +1007 -0
- package/docs/Medals.html +628 -0
- package/docs/Music.html +584 -0
- package/docs/Newgrounds.html +1399 -0
- package/docs/Particle.html +4825 -0
- package/docs/ParticleEmitter.html +8099 -0
- package/docs/Random.html +1774 -0
- package/docs/Settings.html +3140 -0
- package/docs/Sound.html +1249 -0
- package/docs/TileCollision.html +1409 -0
- package/docs/TileLayer.html +7310 -0
- package/docs/TileLayerData.html +1052 -0
- package/docs/Timer.html +1295 -0
- package/docs/Utilities.html +3278 -0
- package/docs/Vector2.html +4266 -0
- package/docs/WebGL.html +2307 -0
- package/docs/engine.js.html +443 -0
- package/docs/engineAudio.js.html +627 -0
- package/docs/engineDebug.js.html +554 -0
- package/docs/engineDraw.js.html +539 -0
- package/docs/engineInput.js.html +571 -0
- package/docs/engineMedals.js.html +460 -0
- package/docs/engineObject.js.html +533 -0
- package/docs/engineParticles.js.html +443 -0
- package/docs/engineSettings.js.html +381 -0
- package/docs/engineTileLayer.js.html +503 -0
- package/docs/engineUtilities.js.html +700 -0
- package/docs/engineWebGL.js.html +511 -0
- package/docs/fonts/MavenPro-Regular.ttf +0 -0
- package/docs/fonts/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Muli-Black.ttf +0 -0
- package/docs/fonts/OFL-hind.txt +93 -0
- package/docs/fonts/OFL-montserrat.txt +93 -0
- package/docs/global.html +1771 -0
- package/docs/index.css +6 -0
- package/docs/index.html +267 -0
- package/docs/scripts/fix-code-block.js +53 -0
- package/docs/scripts/fix-navbar.js +25 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/misc.js +217 -0
- package/docs/scripts/resize.js +85 -0
- package/docs/scripts/search.js +83 -0
- package/docs/scripts/third-party/Apache-License-2.0.txt +202 -0
- package/docs/scripts/third-party/fuse.js +9 -0
- package/docs/scripts/third-party/lang-css.js +2 -0
- package/docs/scripts/third-party/prettify.js +28 -0
- package/docs/static/favicon.png +0 -0
- package/docs/static/index.css +4 -0
- package/docs/styles/clean-jsdoc-theme-base.css +393 -0
- package/docs/styles/clean-jsdoc-theme-dark.css +324 -0
- package/docs/styles/clean-jsdoc-theme-light.css +319 -0
- package/docs/styles/reset.css +346 -0
- package/docs/styles/third-party/ionicons.min.css +11 -0
- package/docs/styles/third-party/prettify-jsdoc.css +111 -0
- package/docs/styles/third-party/prettify-tomorrow.css +5 -0
- package/engine/engine.all.js +171 -67
- package/engine/engine.all.min.js +1 -1
- package/engine/engine.all.release.js +162 -53
- package/engine/engine.js +3 -3
- package/engine/engineAudio.js +5 -7
- package/engine/engineBuild.bat +3 -4
- package/engine/engineDebug.js +9 -14
- package/engine/engineDraw.js +32 -13
- package/engine/engineInput.js +5 -1
- package/engine/engineMedals.js +5 -2
- package/engine/engineObject.js +24 -5
- package/engine/engineParticles.js +2 -2
- package/engine/engineSettings.js +5 -0
- package/engine/engineTileLayer.js +11 -10
- package/engine/engineUtilities.js +67 -7
- package/engine/engineWebGL.js +3 -3
- package/engine/index.d.ts +57 -18
- package/examples/breakout/index.html +3 -3
- package/examples/particles/index.html +366 -0
- package/examples/particles/tiles.png +0 -0
- package/examples/platformer/gameEffects.js +6 -6
- package/examples/platformer/index.html +6 -6
- package/examples/puzzle/game.js +4 -2
- package/examples/puzzle/index.html +2 -2
- package/examples/stress/index.html +1 -1
- package/game.js +3 -14
- package/index.html +13 -13
- package/package.json +1 -1
- package/engine/engineBuildSetup.bat +0 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
LittleJS is a super lightweight JavaScript game engine with a fast hybrid rendering system. It provides everything necessary to make amazing games, including rendering, physics, particles, sound effects, music, input handling, and debug tools. LittleJS is designed to be extremely small yet powerful enough for a variety of applications, from game jams to commercial releases. The code is very well documented with a variety of examples to get you started. Choo-Choo! 🚂
|
|
6
6
|
|
|
7
|
-
## [LittleJS Documentation](https://killedbyapixel.github.io/LittleJS/docs) - [LittleJS Trailer](https://youtu.be/chuBzGjv7Ms) - [LittleJS
|
|
7
|
+
## [LittleJS Documentation](https://killedbyapixel.github.io/LittleJS/docs) - [LittleJS Trailer](https://youtu.be/chuBzGjv7Ms) - [LittleJS Discord](https://discord.gg/zb7hcGkyZe)
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
@@ -29,7 +29,8 @@ LittleJS is a super lightweight JavaScript game engine with a fast hybrid render
|
|
|
29
29
|
- Debug tools and debug rendering system
|
|
30
30
|
- [Full documentation](https://killedbyapixel.github.io/LittleJS/docs) automatically generated from the source code block tags with [JSDoc](https://github.com/jsdoc/jsdoc)
|
|
31
31
|
- Build system automatically combines everything, minifies, and removes unused code
|
|
32
|
-
- For size coding competitions like [js13kGames](https://js13kgames.com/), starter project builds to a 7KB zip
|
|
32
|
+
- For size coding competitions like [js13kGames](https://js13kgames.com/), starter project builds to a 7KB zip file
|
|
33
|
+
- (https://github.com/lifthrasiir/roadroller)
|
|
33
34
|
- Easily build a Windows executable with [Electron](https://www.electronjs.org/) for distribution on platforms like Steam
|
|
34
35
|
- Open Source with the [MIT license](https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE) so it can be used for anything you want
|
|
35
36
|
|
|
@@ -41,7 +42,7 @@ To easily include LittleJS in your game, you can use one of the 3 pre-built js f
|
|
|
41
42
|
- [engine.all.release.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.release.js) - The engine optimized for release builds
|
|
42
43
|
- [engine.all.min.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.min.js) - The engine in release mode and minified
|
|
43
44
|
|
|
44
|
-
The hello world example includes a batch file [build.bat](https://github.com/KilledByAPixel/LittleJS/blob/main/build.bat) that compresses everything into a tiny zip file using Google Closure, UglifyJS, Roadroller, and ECT.
|
|
45
|
+
The hello world example includes a batch file [build.bat](https://github.com/KilledByAPixel/LittleJS/blob/main/build.bat) that compresses everything into a tiny zip file using Google Closure, UglifyJS, Roadroller, and ECT. You must run [buildSetup.bat](https://github.com/KilledByAPixel/LittleJS/blob/main/buildSetup.bat) to install the necessary npm dependencies.
|
|
45
46
|
|
|
46
47
|
## Games Made With LittleJS
|
|
47
48
|
|
package/build.bat
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
rem Simple build script for LittleJS by Frank Force
|
|
2
2
|
rem Minfies and combines index.html and index.js and zips the result
|
|
3
|
-
rem Run
|
|
3
|
+
rem Run buildSetup.bat to install required dependencies.
|
|
4
4
|
|
|
5
5
|
set NAME=game
|
|
6
6
|
set BUILD_FOLDER=build
|
|
@@ -34,7 +34,7 @@ copy ..\tiles.png tiles.png
|
|
|
34
34
|
|
|
35
35
|
rem minify code with closure
|
|
36
36
|
move %BUILD_FILENAME% %BUILD_FILENAME%.temp
|
|
37
|
-
call google-closure-compiler --js
|
|
37
|
+
call npx google-closure-compiler --js=%BUILD_FILENAME%.temp --js_output_file=%BUILD_FILENAME% --compilation_level=ADVANCED --language_out=ECMASCRIPT_2019 --warning_level=VERBOSE --jscomp_off=* --assume_function_wrapper
|
|
38
38
|
if %ERRORLEVEL% NEQ 0 (
|
|
39
39
|
pause
|
|
40
40
|
exit /b %ERRORLEVEL%
|
|
@@ -42,16 +42,16 @@ if %ERRORLEVEL% NEQ 0 (
|
|
|
42
42
|
del %BUILD_FILENAME%.temp
|
|
43
43
|
|
|
44
44
|
rem more minification with uglify or terser (they both do about the same)
|
|
45
|
-
call uglifyjs -o %BUILD_FILENAME% --compress --mangle -- %BUILD_FILENAME%
|
|
45
|
+
call npx uglifyjs -o %BUILD_FILENAME% --compress --mangle -- %BUILD_FILENAME%
|
|
46
46
|
rem call terser -o %BUILD_FILENAME% --compress --mangle -- %BUILD_FILENAME%
|
|
47
47
|
if %ERRORLEVEL% NEQ 0 (
|
|
48
48
|
pause
|
|
49
49
|
exit /b %ERRORLEVEL%
|
|
50
50
|
)
|
|
51
51
|
|
|
52
|
-
rem
|
|
52
|
+
rem roadroller compresses the code better then zip
|
|
53
53
|
copy %BUILD_FILENAME% roadroller_%BUILD_FILENAME%
|
|
54
|
-
call roadroller roadroller_%BUILD_FILENAME% -o roadroller_%BUILD_FILENAME%
|
|
54
|
+
call npx roadroller roadroller_%BUILD_FILENAME% -o roadroller_%BUILD_FILENAME%
|
|
55
55
|
if %ERRORLEVEL% NEQ 0 (
|
|
56
56
|
pause
|
|
57
57
|
exit /b %ERRORLEVEL%
|
|
@@ -64,7 +64,7 @@ type roadroller_%BUILD_FILENAME% >> index.html
|
|
|
64
64
|
echo ^</script^> >> index.html
|
|
65
65
|
|
|
66
66
|
rem zip the result, ect is recommended
|
|
67
|
-
call ect -9 -strip -zip ..\%NAME%.zip index.html tiles.png
|
|
67
|
+
call ..\node_modules\ect-bin\vendor\win32\ect.exe -9 -strip -zip ..\%NAME%.zip index.html tiles.png
|
|
68
68
|
if %ERRORLEVEL% NEQ 0 (
|
|
69
69
|
pause
|
|
70
70
|
exit /b %ERRORLEVEL%
|