littlejsengine 1.4.7 → 1.4.8

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 CHANGED
@@ -27,7 +27,7 @@ LittleJS is a super lightweight JavaScript game engine with a fast hybrid render
27
27
  - Positional audio effects with [ZzFX](https://killedbyapixel.github.io/ZzFX/) and music with [ZzFXM](https://keithclark.github.io/ZzFXM/), mp3s, or wavs
28
28
  - Input processing system with keyboard, mouse, gamepad, and touch support
29
29
  - Particle effects system (particle editor/designer in progress)
30
- - Medal system tracks and displays achievements with Newgrounds and OS13k integration
30
+ - Medal system tracks and displays achievements with Newgrounds integration
31
31
  - Several easy to understand example projects you can build on
32
32
  - Apply [Shadertoy](https://www.shadertoy.com) compatible shaders for post processinge effects
33
33
  - Debug tools and debug rendering system
@@ -46,6 +46,11 @@ To easily include LittleJS in your game, you can use one of the 3 pre-built js f
46
46
  - [engine.all.release.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.release.js) - The engine optimized for release builds
47
47
  - [engine.all.min.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.min.js) - The engine in release mode and minified
48
48
 
49
+ LittleJS can also be imported as a module. There are two module includes that are automatically built.
50
+
51
+ - [engine.all.module.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.module.js) - The engine exported as a module with debug mode available
52
+ - [engine.all.module.min.js](https://github.com/KilledByAPixel/LittleJS/blob/main/engine/engine.all.module.min.js) - The engine exported as a module in release mode
53
+
49
54
  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.
50
55
 
51
56
  ## Debugging
package/build.bat CHANGED
@@ -33,13 +33,12 @@ rem copy images to build folder
33
33
  copy ..\tiles.png tiles.png
34
34
 
35
35
  rem minify code with closure
36
- move %BUILD_FILENAME% %BUILD_FILENAME%.temp
37
- call npx google-closure-compiler --js=%BUILD_FILENAME%.temp --js_output_file=%BUILD_FILENAME% --compilation_level=ADVANCED --language_out=ECMASCRIPT_2021 --warning_level=VERBOSE --jscomp_off=* --assume_function_wrapper
36
+ move %BUILD_FILENAME% temp_%BUILD_FILENAME%
37
+ call npx google-closure-compiler --js=temp_%BUILD_FILENAME% --js_output_file=%BUILD_FILENAME% --compilation_level=ADVANCED --language_out=ECMASCRIPT_2021 --warning_level=VERBOSE --jscomp_off=* --assume_function_wrapper
38
38
  if %ERRORLEVEL% NEQ 0 (
39
39
  pause
40
40
  exit /b %ERRORLEVEL%
41
41
  )
42
- del %BUILD_FILENAME%.temp
43
42
 
44
43
  rem more minification with uglify or terser (they both do about the same)
45
44
  call npx uglifyjs -o %BUILD_FILENAME% --compress --mangle -- %BUILD_FILENAME%
@@ -63,6 +62,11 @@ echo ^<body^>^<meta charset=utf-8^>^<script^> >> index.html
63
62
  type roadroller_%BUILD_FILENAME% >> index.html
64
63
  echo ^</script^> >> index.html
65
64
 
65
+ rem delete intermediate files
66
+ del %BUILD_FILENAME%
67
+ del temp_%BUILD_FILENAME%
68
+ del roadroller_%BUILD_FILENAME%
69
+
66
70
  rem zip the result, ect is recommended
67
71
  call ..\node_modules\ect-bin\vendor\win32\ect.exe -9 -strip -zip ..\%NAME%.zip index.html tiles.png
68
72
  if %ERRORLEVEL% NEQ 0 (