littlejsengine 1.13.1 → 1.14.2
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 +15 -11
- package/copyToGithub.bat +28 -0
- package/dist/littlejs.d.ts +430 -304
- package/dist/littlejs.esm.js +1745 -982
- package/dist/littlejs.esm.min.js +1 -1
- package/dist/littlejs.js +1716 -965
- package/dist/littlejs.min.js +1 -1
- package/dist/littlejs.release.js +1673 -922
- package/examples/box2d/game.js +2 -2
- package/examples/box2d/gameObjects.js +2 -2
- package/examples/box2d/scenes.js +1 -1
- package/examples/breakout/game.js +30 -25
- package/examples/breakoutTutorial/README.md +44 -41
- package/examples/breakoutTutorial/game.js +2 -2
- package/examples/electron/build.bat +7 -0
- package/examples/electron/build.js +124 -0
- package/examples/electron/electron.js +35 -0
- package/examples/electron/game.js +140 -0
- package/examples/electron/index.html +13 -0
- package/examples/electron/package.json +12 -0
- package/examples/electron/tiles.png +0 -0
- package/examples/empty/game.js +1 -0
- package/examples/htmlMenu/game.js +1 -1
- package/examples/index.html +332 -160
- package/examples/module/game.js +5 -2
- package/examples/particles/index.html +12 -3
- package/examples/platformer/gameEffects.js +20 -19
- package/examples/platformer/gameLevel.js +6 -1
- package/examples/shorts/base.html +1 -1
- package/examples/shorts/blending.js +9 -5
- package/examples/shorts/box2d.js +1 -1
- package/examples/shorts/box2dCar.js +1 -1
- package/examples/shorts/clock.js +1 -1
- package/examples/shorts/colors.js +2 -2
- package/examples/shorts/flappyGame.js +2 -1
- package/examples/shorts/helloWorld.js +1 -1
- package/examples/shorts/maze.js +1 -1
- package/examples/shorts/music.js +106 -0
- package/examples/shorts/nineSlice.js +9 -9
- package/examples/shorts/parallax.js +71 -0
- package/examples/shorts/piano.js +9 -10
- package/examples/shorts/postProcess.js +25 -8
- package/examples/shorts/raycasting.js +2 -2
- package/examples/shorts/shapes.js +7 -15
- package/examples/shorts/slidingPuzzle.js +2 -2
- package/examples/shorts/song.mp3 +0 -0
- package/examples/shorts/starfield.js +5 -7
- package/examples/shorts/systemFont.js +1 -1
- package/examples/shorts/uiSystem.js +16 -8
- package/examples/starter/build.js +9 -8
- package/examples/starter/game.js +5 -2
- package/examples/starter/index.html +2 -2
- package/examples/stress/index.html +13 -8
- package/examples/style.css +19 -6
- package/examples/typescript/build.js +1 -1
- package/examples/typescript/game.js +2 -2
- package/examples/typescript/game.ts +5 -2
- package/examples/uiSystem/game.js +13 -12
- package/package.json +2 -2
- package/plugins/box2d.js +24 -97
- package/plugins/drawUtilities.js +29 -23
- package/plugins/newgrounds.js +6 -6
- package/plugins/pluginExport.js +1 -1
- package/plugins/postProcess.js +7 -0
- package/plugins/uiSystem.js +106 -82
- package/plugins/zzfxm.js +10 -10
- package/reference.md +90 -54
- package/src/engine.js +28 -23
- package/src/engineAudio.js +285 -110
- package/src/engineBuild.js +9 -9
- package/src/engineDebug.js +28 -28
- package/src/engineDraw.js +346 -202
- package/src/engineExport.js +28 -16
- package/src/engineInput.js +58 -68
- package/src/engineMedals.js +29 -29
- package/src/engineObject.js +28 -25
- package/src/engineParticles.js +67 -60
- package/src/engineRelease.js +1 -1
- package/src/engineSettings.js +70 -16
- package/src/engineTileLayer.js +34 -34
- package/src/engineUtilities.js +69 -62
- package/src/engineWebGL.js +467 -65
- /package/examples/shorts/{playSound.js → sound.js} +0 -0
package/README.md
CHANGED
|
@@ -36,27 +36,28 @@ LittleJS is a small but powerful game engine with many features and no dependenc
|
|
|
36
36
|
|
|
37
37
|
### ✨ Graphics
|
|
38
38
|
|
|
39
|
-
- Super fast
|
|
40
|
-
-
|
|
41
|
-
- Apply [Shadertoy](https://www.shadertoy.com)
|
|
39
|
+
- Super fast WebGL2 + Canvas2D hybrid rendering
|
|
40
|
+
- 100,000+ sprites at solid 60fps
|
|
41
|
+
- Apply [Shadertoy](https://www.shadertoy.com) style shaders for post-processing effects
|
|
42
42
|
- Robust particle effect system and [effect design tool](https://killedbyapixel.github.io/LittleJS/examples/particles/)
|
|
43
43
|
|
|
44
44
|
### 🔊 Audio
|
|
45
45
|
|
|
46
|
-
- Positional sound effects with
|
|
46
|
+
- Positional sound effects with distance falloff
|
|
47
47
|
- Use [ZzFX](https://killedbyapixel.github.io/ZzFX/) sound effect generator to play sounds without asset files
|
|
48
|
-
- Music with mp3, ogg, wave, or [ZzFXM](https://keithclark.github.io/ZzFXM/)
|
|
48
|
+
- Music and sound with mp3, ogg, wave, or [ZzFXM](https://keithclark.github.io/ZzFXM/)
|
|
49
49
|
|
|
50
50
|
### 🎮 Input
|
|
51
51
|
|
|
52
52
|
- Comprehensive input handling for keyboard, mouse, gamepad, and touch
|
|
53
|
+
- Automatic touch mouse emulation
|
|
53
54
|
- On screen touch gamepad designed for mobile devices
|
|
54
55
|
|
|
55
56
|
### 💥 Physics
|
|
56
57
|
|
|
57
58
|
- Robust arcade physics system with collision handling
|
|
58
|
-
-
|
|
59
|
-
-
|
|
59
|
+
- Box2d fully integrated for more realistic physics
|
|
60
|
+
- Tilemap collision with raycasting
|
|
60
61
|
|
|
61
62
|
### 🚀 Flexibility
|
|
62
63
|
|
|
@@ -65,12 +66,14 @@ LittleJS is a small but powerful game engine with many features and no dependenc
|
|
|
65
66
|
- Ideal for size coding competitions like [Js13kGames](https://js13kgames.com/)
|
|
66
67
|
- Open Source with the [MIT license](https://github.com/KilledByAPixel/LittleJS/blob/main/LICENSE) so it can be used for anything you want forever
|
|
67
68
|
|
|
68
|
-
### 🛠️
|
|
69
|
+
### 🛠️ Developer Tools
|
|
69
70
|
|
|
70
|
-
-
|
|
71
|
-
- 2D vector math library
|
|
71
|
+
- Live example browser with code editor
|
|
72
72
|
- Debug primitive rendering system
|
|
73
|
+
- Screenshot and video capture tools
|
|
74
|
+
- Node.js build system
|
|
73
75
|
- Bitmap font rendering and built in engine font
|
|
76
|
+
- Optimized for AI-assisted development
|
|
74
77
|
- Medal tracking system with [Newgrounds](https://www.newgrounds.com/) support
|
|
75
78
|
|
|
76
79
|
## How To Use LittleJS
|
|
@@ -119,8 +122,9 @@ The starter example project includes a node js file [build.js](https://github.co
|
|
|
119
122
|
Here are a few of the many amazing games created with LittleJS...
|
|
120
123
|
|
|
121
124
|
- [Space Huggers](https://www.newgrounds.com/portal/view/819609) - Rogulike platformer shoot-em-up game with procedural levels. by [KilledByAPixel](https://frankforce.com/)
|
|
122
|
-
- [
|
|
125
|
+
- [L1ttl3 Paws](https://github.com/KilledByAPixel/JS13K2025) - Cat glider with procedural art and levels for JS13K! by [KilledByAPixel](https://frankforce.com/)
|
|
123
126
|
- [The Way of the Dodo](https://js13kgames.com/2024/games/the-way-of-the-dodo) - Single button platformer. JS13k 5th place winner! by [repsej](https://github.com/repsej)
|
|
127
|
+
- [Undergrowth](https://undergrowth.squidband.uk/) - An interactive music videogame for the band Squid. by [KilledByAPixel](https://frankforce.com/)
|
|
124
128
|
- [204Snake!](https://www.newgrounds.com/portal/view/960100) - A puzzle game that combines 2048 with snake. LittleJS Jam 1st place winner! by [Sodoj](https://sodoj.itch.io/) and [Shai-P](https://shai-p.itch.io/)
|
|
125
129
|
- [GATOR](https://www.newgrounds.com/portal/view/960757) - Retro platformer shooter game where you rescue animals. LittleJS Jam 2nd place winner! by [eoinmcg](https://eoinmcg.itch.io/)
|
|
126
130
|
- [A Hedgehog's search](https://willsm1111.itch.io/a-hedgehogs-search) - Adventure game staring a hedgehog. LittleJS Jam 3rd place winner! by [willsm1111](https://willsm1111.itch.io/)
|
package/copyToGithub.bat
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
echo Copying LittleJS files to GitHub repository...
|
|
3
|
+
|
|
4
|
+
REM Set the GitHub repository path (adjust this to your actual GitHub repo location)
|
|
5
|
+
set GITHUB_PATH=C:\dev\GitHub\LittleJS
|
|
6
|
+
|
|
7
|
+
REM Check if GitHub path exists
|
|
8
|
+
if not exist "%GITHUB_PATH%" (
|
|
9
|
+
echo Error: GitHub repository path not found: %GITHUB_PATH%
|
|
10
|
+
echo Please update the GITHUB_PATH variable in this script
|
|
11
|
+
pause
|
|
12
|
+
exit /b 1
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
echo Copying folders and files...
|
|
16
|
+
|
|
17
|
+
REM Copy folders (using /E for subdirectories, /I to create destination, /Y to overwrite)
|
|
18
|
+
xcopy "dist" "%GITHUB_PATH%\dist\" /E /I /Y
|
|
19
|
+
xcopy "examples" "%GITHUB_PATH%\examples\" /E /I /Y
|
|
20
|
+
xcopy "plugins" "%GITHUB_PATH%\plugins\" /E /I /Y
|
|
21
|
+
xcopy "src" "%GITHUB_PATH%\src\" /E /I /Y
|
|
22
|
+
|
|
23
|
+
REM Copy individual files
|
|
24
|
+
copy "jsconfig.json" "%GITHUB_PATH%\" /Y
|
|
25
|
+
copy "package.json" "%GITHUB_PATH%\" /Y
|
|
26
|
+
copy "reference.md" "%GITHUB_PATH%\" /Y
|
|
27
|
+
|
|
28
|
+
echo Copy completed successfully!
|