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.
Files changed (83) hide show
  1. package/README.md +15 -11
  2. package/copyToGithub.bat +28 -0
  3. package/dist/littlejs.d.ts +430 -304
  4. package/dist/littlejs.esm.js +1745 -982
  5. package/dist/littlejs.esm.min.js +1 -1
  6. package/dist/littlejs.js +1716 -965
  7. package/dist/littlejs.min.js +1 -1
  8. package/dist/littlejs.release.js +1673 -922
  9. package/examples/box2d/game.js +2 -2
  10. package/examples/box2d/gameObjects.js +2 -2
  11. package/examples/box2d/scenes.js +1 -1
  12. package/examples/breakout/game.js +30 -25
  13. package/examples/breakoutTutorial/README.md +44 -41
  14. package/examples/breakoutTutorial/game.js +2 -2
  15. package/examples/electron/build.bat +7 -0
  16. package/examples/electron/build.js +124 -0
  17. package/examples/electron/electron.js +35 -0
  18. package/examples/electron/game.js +140 -0
  19. package/examples/electron/index.html +13 -0
  20. package/examples/electron/package.json +12 -0
  21. package/examples/electron/tiles.png +0 -0
  22. package/examples/empty/game.js +1 -0
  23. package/examples/htmlMenu/game.js +1 -1
  24. package/examples/index.html +332 -160
  25. package/examples/module/game.js +5 -2
  26. package/examples/particles/index.html +12 -3
  27. package/examples/platformer/gameEffects.js +20 -19
  28. package/examples/platformer/gameLevel.js +6 -1
  29. package/examples/shorts/base.html +1 -1
  30. package/examples/shorts/blending.js +9 -5
  31. package/examples/shorts/box2d.js +1 -1
  32. package/examples/shorts/box2dCar.js +1 -1
  33. package/examples/shorts/clock.js +1 -1
  34. package/examples/shorts/colors.js +2 -2
  35. package/examples/shorts/flappyGame.js +2 -1
  36. package/examples/shorts/helloWorld.js +1 -1
  37. package/examples/shorts/maze.js +1 -1
  38. package/examples/shorts/music.js +106 -0
  39. package/examples/shorts/nineSlice.js +9 -9
  40. package/examples/shorts/parallax.js +71 -0
  41. package/examples/shorts/piano.js +9 -10
  42. package/examples/shorts/postProcess.js +25 -8
  43. package/examples/shorts/raycasting.js +2 -2
  44. package/examples/shorts/shapes.js +7 -15
  45. package/examples/shorts/slidingPuzzle.js +2 -2
  46. package/examples/shorts/song.mp3 +0 -0
  47. package/examples/shorts/starfield.js +5 -7
  48. package/examples/shorts/systemFont.js +1 -1
  49. package/examples/shorts/uiSystem.js +16 -8
  50. package/examples/starter/build.js +9 -8
  51. package/examples/starter/game.js +5 -2
  52. package/examples/starter/index.html +2 -2
  53. package/examples/stress/index.html +13 -8
  54. package/examples/style.css +19 -6
  55. package/examples/typescript/build.js +1 -1
  56. package/examples/typescript/game.js +2 -2
  57. package/examples/typescript/game.ts +5 -2
  58. package/examples/uiSystem/game.js +13 -12
  59. package/package.json +2 -2
  60. package/plugins/box2d.js +24 -97
  61. package/plugins/drawUtilities.js +29 -23
  62. package/plugins/newgrounds.js +6 -6
  63. package/plugins/pluginExport.js +1 -1
  64. package/plugins/postProcess.js +7 -0
  65. package/plugins/uiSystem.js +106 -82
  66. package/plugins/zzfxm.js +10 -10
  67. package/reference.md +90 -54
  68. package/src/engine.js +28 -23
  69. package/src/engineAudio.js +285 -110
  70. package/src/engineBuild.js +9 -9
  71. package/src/engineDebug.js +28 -28
  72. package/src/engineDraw.js +346 -202
  73. package/src/engineExport.js +28 -16
  74. package/src/engineInput.js +58 -68
  75. package/src/engineMedals.js +29 -29
  76. package/src/engineObject.js +28 -25
  77. package/src/engineParticles.js +67 -60
  78. package/src/engineRelease.js +1 -1
  79. package/src/engineSettings.js +70 -16
  80. package/src/engineTileLayer.js +34 -34
  81. package/src/engineUtilities.js +69 -62
  82. package/src/engineWebGL.js +467 -65
  83. /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 sprite and tile map rendering engine with WebGL2
40
- - Update and render 100,000+ sprites at a solid 60fps
41
- - Apply [Shadertoy](https://www.shadertoy.com) compatible shaders for post-processing effects
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 wave files, mp3s, or ZzFX
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
- - Very fast collision and raycasting for tile maps
59
- - Full Box2d support using [super fast wasm build of box2d.js](https://github.com/kripken/box2d.js/)
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
- ### 🛠️ And more...
69
+ ### 🛠️ Developer Tools
69
70
 
70
- - Node.js build system
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
- - [Undergrowth](https://undergrowth.squidband.uk/) - An interactive music videogame for the band Squid. by [KilledByAPixel](https://frankforce.com/)
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/)
@@ -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!