littlejsengine 1.4.91 → 1.5.1
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 +1 -0
- package/build.bat +4 -6
- package/engine/engine.all.js +202 -105
- package/engine/engine.all.min.js +1 -1
- package/engine/engine.all.module.js +385 -181
- package/engine/engine.all.module.min.js +1 -1
- package/engine/engine.all.release.js +192 -100
- package/engine/engine.js +47 -16
- package/engine/engineAudio.js +14 -1
- package/engine/engineBuild.bat +8 -8
- package/engine/engineDebug.js +10 -5
- package/engine/engineDraw.js +25 -27
- package/engine/engineExport.js +183 -76
- package/engine/engineInput.js +6 -1
- package/engine/engineMedals.js +1 -0
- package/engine/engineObject.js +11 -9
- package/engine/engineParticles.js +5 -5
- package/engine/engineSettings.js +46 -20
- package/engine/engineTileLayer.js +13 -12
- package/engine/engineUtilities.js +13 -7
- package/engine/engineWebGL.js +11 -2
- package/engine/index.d.ts +1788 -1700
- package/examples/breakout/game.js +3 -1
- package/examples/breakout/index.html +4 -4
- package/examples/empty/index.html +1 -4
- package/examples/module/game.js +1 -4
- package/examples/module/index.html +2 -2
- package/examples/particles/index.html +2 -2
- package/examples/platformer/game.js +2 -0
- package/examples/platformer/gameObjects.js +3 -3
- package/examples/platformer/index.html +7 -7
- package/examples/puzzle/index.html +3 -3
- package/examples/stress/index.html +5 -5
- package/examples/typescript/build.bat +14 -0
- package/examples/typescript/game.js +89 -0
- package/examples/typescript/game.ts +117 -0
- package/examples/typescript/index.html +9 -0
- package/examples/typescript/tiles.png +0 -0
- package/examples/typescript/tsconfig.json +8 -0
- package/index.html +14 -14
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ LittleJS is a super lightweight JavaScript game engine with a fast hybrid render
|
|
|
37
37
|
- Easily build a Windows executable with [Electron](https://www.electronjs.org/) for distribution on platforms like Steam
|
|
38
38
|
- Open Source with the [MIT license](https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE) so it can be used for anything you want
|
|
39
39
|
- Can be imported as a JavaScript module and includes [an example module project](https://killedbyapixel.github.io/LittleJS/examples/module)
|
|
40
|
+
- Compatible with TypeScript and includes [an example TS project](https://killedbyapixel.github.io/LittleJS/examples/typescript)
|
|
40
41
|
|
|
41
42
|
## Builds
|
|
42
43
|
|
package/build.bat
CHANGED
|
@@ -39,6 +39,7 @@ if %ERRORLEVEL% NEQ 0 (
|
|
|
39
39
|
pause
|
|
40
40
|
exit /b %ERRORLEVEL%
|
|
41
41
|
)
|
|
42
|
+
del temp_%BUILD_FILENAME%
|
|
42
43
|
|
|
43
44
|
rem more minification with uglify or terser (they both do about the same)
|
|
44
45
|
call npx uglifyjs -o %BUILD_FILENAME% --compress --mangle -- %BUILD_FILENAME%
|
|
@@ -49,8 +50,7 @@ if %ERRORLEVEL% NEQ 0 (
|
|
|
49
50
|
)
|
|
50
51
|
|
|
51
52
|
rem roadroller compresses the code better then zip
|
|
52
|
-
|
|
53
|
-
call npx roadroller roadroller_%BUILD_FILENAME% -o roadroller_%BUILD_FILENAME%
|
|
53
|
+
call npx roadroller %BUILD_FILENAME% -o %BUILD_FILENAME%
|
|
54
54
|
if %ERRORLEVEL% NEQ 0 (
|
|
55
55
|
pause
|
|
56
56
|
exit /b %ERRORLEVEL%
|
|
@@ -58,14 +58,12 @@ if %ERRORLEVEL% NEQ 0 (
|
|
|
58
58
|
|
|
59
59
|
rem build the html, you can add html header and footers here
|
|
60
60
|
rem type ..\header.html >> index.html
|
|
61
|
-
echo ^<body^>^<
|
|
62
|
-
type
|
|
61
|
+
echo ^<body^>^<script^> >> index.html
|
|
62
|
+
type %BUILD_FILENAME% >> index.html
|
|
63
63
|
echo ^</script^> >> index.html
|
|
64
64
|
|
|
65
65
|
rem delete intermediate files
|
|
66
66
|
del %BUILD_FILENAME%
|
|
67
|
-
del temp_%BUILD_FILENAME%
|
|
68
|
-
del roadroller_%BUILD_FILENAME%
|
|
69
67
|
|
|
70
68
|
rem zip the result, ect is recommended
|
|
71
69
|
call ..\node_modules\ect-bin\vendor\win32\ect.exe -9 -strip -zip ..\%NAME%.zip index.html tiles.png
|