littlejsengine 1.18.29 → 1.20.0

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 (51) hide show
  1. package/FAQ.md +841 -815
  2. package/README.md +211 -199
  3. package/dist/littlejs.d.ts +4383 -812
  4. package/dist/littlejs.esm.js +31848 -16680
  5. package/dist/littlejs.esm.min.js +14 -1
  6. package/dist/littlejs.js +31230 -16166
  7. package/dist/littlejs.min.js +13 -1
  8. package/dist/littlejs.release.js +27419 -15457
  9. package/package.json +10 -5
  10. package/plugins/audioEffects.js +375 -0
  11. package/plugins/box2d.js +2516 -2073
  12. package/plugins/drawUtilities.js +206 -31
  13. package/plugins/gltf.js +740 -0
  14. package/plugins/jsconfig.json +19 -0
  15. package/plugins/lightSystem.js +719 -330
  16. package/plugins/math3d.js +911 -0
  17. package/plugins/medalSystem.js +118 -72
  18. package/plugins/newgrounds.js +400 -199
  19. package/plugins/pathFinder.js +208 -175
  20. package/plugins/pluginExport.js +196 -115
  21. package/plugins/postProcess.js +284 -166
  22. package/plugins/render3d.js +4072 -0
  23. package/plugins/render3dDebug.js +109 -0
  24. package/plugins/render3dExtras.js +1754 -0
  25. package/plugins/render3dVoxels.js +502 -0
  26. package/plugins/textureSheet.js +86 -48
  27. package/plugins/threejs.js +183 -158
  28. package/plugins/tweakables.js +411 -0
  29. package/plugins/tweenSystem.js +646 -526
  30. package/plugins/uiSystem.js +2024 -1687
  31. package/plugins/zzfxm.js +8 -15
  32. package/src/engine.js +345 -194
  33. package/src/engineAudio.js +1022 -777
  34. package/src/engineBuild.mjs +289 -253
  35. package/src/engineDebug.js +912 -735
  36. package/src/engineDraw.js +1774 -1510
  37. package/src/engineEditor.js +2431 -0
  38. package/src/engineExport.js +419 -396
  39. package/src/engineInput.js +1462 -1293
  40. package/src/engineLogo.js +4 -3
  41. package/src/engineMath.js +1274 -1183
  42. package/src/engineObject.js +674 -551
  43. package/src/engineParticles.js +583 -532
  44. package/src/engineRelease.js +67 -45
  45. package/src/engineSettings.js +808 -726
  46. package/src/engineTileLayer.js +995 -741
  47. package/src/engineUtilities.js +32 -13
  48. package/src/engineWebGL.js +1162 -941
  49. package/src/jsconfig.json +17 -13
  50. package/plugins/box2d.wasm.js +0 -630
  51. package/plugins/box2d.wasm.wasm +0 -0
@@ -1,45 +1,67 @@
1
- /**
2
- * LittleJS - Release Mode
3
- * - Replaces engineDebug.js in production builds
4
- * - All debug functions are stubbed out as no-ops
5
- * - Removes ASSERT and LOG calls to reduce file size
6
- * - Disables debug overlay, watermark, and visualizations
7
- * - Improves performance by eliminating debug overhead
8
- * - Significantly reduces final bundle size
9
- */
10
-
11
- 'use strict';
12
-
13
- let debugWatermark = 0;
14
- let debugKey = '';
15
- const debug = 0;
16
- const debugOverlay = 0;
17
- const debugPhysics = 0;
18
- const debugParticles = 0;
19
- const debugRaycast = 0;
20
- const debugGamepads = 0;
21
- const debugSound = 0;
22
- const debugPointSize = .5;
23
-
24
- // debug commands are automatically removed from the final build
25
- function ASSERT (){}
26
- function LOG (){}
27
- function debugInit (){}
28
- function debugUpdate (){}
29
- function debugRender (){}
30
- function debugRenderPost (){}
31
- function debugRect (){}
32
- function debugPoly (){}
33
- function debugCircle (){}
34
- function debugPoint (){}
35
- function debugLine (){}
36
- function debugOverlap (){}
37
- function debugText (){}
38
- function debugClear (){}
39
- function debugScreenshot (){}
40
- function debugShowErrors(){}
41
- function debugVideoCaptureIsActive(){ return false; }
42
- function debugVideoCaptureStart (){}
43
- function debugVideoCaptureStop (){}
44
- function debugVideoCaptureUpdate(){}
45
- function debugProtectConstant(o){ return o; }
1
+ /**
2
+ * LittleJS - Release Mode
3
+ * - Replaces engineDebug.js in production builds
4
+ * - All debug functions are stubbed out as no-ops
5
+ * - Removes ASSERT and LOG calls to reduce file size
6
+ * - Disables debug overlay, watermark, and visualizations
7
+ * - Improves performance by eliminating debug overhead
8
+ * - Significantly reduces final bundle size
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ let debugWatermark = 0;
14
+ let debugKey = '';
15
+ let debugKeysAlways = false;
16
+ let debugTweakables = false;
17
+ let debugClearCount = 0;
18
+ const debug = 0;
19
+ const debugOverlay = 0;
20
+ const debugPhysics = 0;
21
+ const debugParticles = 0;
22
+ const debugRaycast = 0;
23
+ const debugGamepads = 0;
24
+ const debugSound = 0;
25
+ const debugPointSize = .5;
26
+
27
+ // debug commands are automatically removed from the final build
28
+ function ASSERT (){}
29
+ function LOG (){}
30
+ function debugInit (){}
31
+ function debugUpdate (){}
32
+ function debugRender (){}
33
+ function debugRenderPost (){}
34
+ function debugRect (){}
35
+ function debugPoly (){}
36
+ function debugCircle (){}
37
+ function debugPoint (){}
38
+ function debugLine (){}
39
+ function debugOverlap (){}
40
+ function debugText (){}
41
+ function debugClear (){}
42
+ function debugScreenshot (){}
43
+ function debugShowErrors(){}
44
+ function setDebugOverlay(){}
45
+ function debugVideoCaptureIsActive(){ return false; }
46
+ function debugVideoCaptureStart (){}
47
+ function debugVideoCaptureStop (){}
48
+ function debugProtectConstant(o){ return o; }
49
+
50
+ // the tweakables and the level editor are debug only
51
+ function tweak(){}
52
+ function tweakButton(){}
53
+ function tweakDivider(){}
54
+ function tweakEngineDefaults(){}
55
+ const levelEditor = {isOpen: false, open(){}, close(){}, onTile: undefined, onRestart: undefined, onPlayFrom: undefined};
56
+ function editorMapRestore(map){ return map; }
57
+ function editorMapLoaded(){}
58
+ function editorJSONFetched(){}
59
+ function editorPreRender(){}
60
+ function editorObjectMade(){}
61
+
62
+ // the 3D debug draws are debug only too
63
+ function debugBox3D(){}
64
+ function debugSphere3D(){}
65
+ function debugLine3D(){}
66
+ function debugPoint3D(){}
67
+ function render3DRenderDebug(){}