action-engine-js 1.0.0 → 1.0.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/LICENSE +52 -45
- package/README.md +79 -2
- package/actionengine/3rdparty/goblin/goblin.js +9608 -9608
- package/actionengine/core/app.js +429 -429
- package/actionengine/input/actionscrollablearea.js +1405 -1405
- package/actionengine/input/inputhandler.js +1646 -1646
- package/actionengine/network/ACTIONNETREADME.md +810 -810
- package/actionengine/network/client/ActionNetManager.js +802 -802
- package/actionengine/network/client/ActionNetManagerGUI.js +1709 -1709
- package/actionengine/network/client/ActionNetManagerP2P.js +1537 -1537
- package/actionengine/network/client/SyncSystem.js +422 -422
- package/actionengine/network/p2p/ActionNetPeer.js +142 -142
- package/actionengine/network/p2p/ActionNetTrackerClient.js +622 -623
- package/actionengine/network/p2p/DataConnection.js +282 -282
- package/actionengine/network/p2p/README.md +510 -510
- package/actionengine/network/p2p/example.html +502 -502
- package/dist/action-engine.min.js +2171 -6
- package/package.json +35 -35
- /package/actionengine/math/{viewfrustum.js → ViewFrustum.js} +0 -0
package/LICENSE
CHANGED
|
@@ -1,45 +1,52 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Tomobobo710
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
This project includes GoblinPhysics, licensed under the Zlib License:
|
|
26
|
-
|
|
27
|
-
Copyright (c) 2012 Chandler Prall
|
|
28
|
-
|
|
29
|
-
This software is provided 'as-is', without any express or implied
|
|
30
|
-
warranty. In no event will the authors be held liable for any damages
|
|
31
|
-
arising from the use of this software.
|
|
32
|
-
|
|
33
|
-
Permission is granted to anyone to use this software for any purpose,
|
|
34
|
-
including commercial applications, and to alter it and redistribute it
|
|
35
|
-
freely, subject to the following restrictions:
|
|
36
|
-
|
|
37
|
-
1. The origin of this software must not be misrepresented; you must not
|
|
38
|
-
claim that you wrote the original software. If you use this software
|
|
39
|
-
in a product, an acknowledgment in the product documentation would be
|
|
40
|
-
appreciated but is not required.
|
|
41
|
-
2. Altered source versions must be plainly marked as such, and must not be
|
|
42
|
-
misrepresented as being the original software.
|
|
43
|
-
3. This notice may not be removed or altered from any source distribution.
|
|
44
|
-
|
|
45
|
-
Repository: https://github.com/chandlerprall/GoblinPhysics
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tomobobo710
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
This project includes GoblinPhysics, licensed under the Zlib License:
|
|
26
|
+
|
|
27
|
+
Copyright (c) 2012 Chandler Prall
|
|
28
|
+
|
|
29
|
+
This software is provided 'as-is', without any express or implied
|
|
30
|
+
warranty. In no event will the authors be held liable for any damages
|
|
31
|
+
arising from the use of this software.
|
|
32
|
+
|
|
33
|
+
Permission is granted to anyone to use this software for any purpose,
|
|
34
|
+
including commercial applications, and to alter it and redistribute it
|
|
35
|
+
freely, subject to the following restrictions:
|
|
36
|
+
|
|
37
|
+
1. The origin of this software must not be misrepresented; you must not
|
|
38
|
+
claim that you wrote the original software. If you use this software
|
|
39
|
+
in a product, an acknowledgment in the product documentation would be
|
|
40
|
+
appreciated but is not required.
|
|
41
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
|
42
|
+
misrepresented as being the original software.
|
|
43
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
44
|
+
|
|
45
|
+
Repository: https://github.com/chandlerprall/GoblinPhysics
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
This project includes TimGM6mb soundfont
|
|
50
|
+
Source: https://www.timbrechbill.com/saxguru/Timidity.php
|
|
51
|
+
Author: Tim Brechbill
|
|
52
|
+
Status: Free to use
|
package/README.md
CHANGED
|
@@ -19,6 +19,72 @@ Action Engine simplifies game creation by handling all the tedious infrastructur
|
|
|
19
19
|
|
|
20
20
|
## Quick Start
|
|
21
21
|
|
|
22
|
+
### Installation
|
|
23
|
+
|
|
24
|
+
**Option 1: CDN (instant, no build step)**
|
|
25
|
+
```html
|
|
26
|
+
<!DOCTYPE html>
|
|
27
|
+
<html>
|
|
28
|
+
<head>
|
|
29
|
+
<meta charset="UTF-8" />
|
|
30
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
31
|
+
<title>My Game</title>
|
|
32
|
+
<style>
|
|
33
|
+
html, body {
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
background: #0a0a2a;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
42
|
+
</head>
|
|
43
|
+
<body>
|
|
44
|
+
<div id="appContainer">
|
|
45
|
+
<div id="UIControlsContainer"></div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<script src="https://unpkg.com/action-engine-js@latest/dist/action-engine.min.js"></script>
|
|
49
|
+
<script src="game.js"></script>
|
|
50
|
+
</body>
|
|
51
|
+
</html>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Option 2: npm (for bundlers)**
|
|
55
|
+
```bash
|
|
56
|
+
npm install action-engine-js
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<!DOCTYPE html>
|
|
61
|
+
<html>
|
|
62
|
+
<head>
|
|
63
|
+
<meta charset="UTF-8" />
|
|
64
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
65
|
+
<title>My Game</title>
|
|
66
|
+
<style>
|
|
67
|
+
html, body {
|
|
68
|
+
margin: 0;
|
|
69
|
+
padding: 0;
|
|
70
|
+
background: #0a0a2a;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
76
|
+
</head>
|
|
77
|
+
<body>
|
|
78
|
+
<div id="appContainer">
|
|
79
|
+
<div id="UIControlsContainer"></div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<script src="node_modules/action-engine-js/dist/action-engine.min.js"></script>
|
|
83
|
+
<script src="game.js"></script>
|
|
84
|
+
</body>
|
|
85
|
+
</html>
|
|
86
|
+
```
|
|
87
|
+
|
|
22
88
|
### Create a Game Class
|
|
23
89
|
|
|
24
90
|
```javascript
|
|
@@ -295,7 +361,7 @@ action_update(deltaTime) {
|
|
|
295
361
|
// Move up
|
|
296
362
|
}
|
|
297
363
|
|
|
298
|
-
if (this.input.
|
|
364
|
+
if (this.input.isKeyJustPressed("Action1")) {
|
|
299
365
|
this.player.jump();
|
|
300
366
|
}
|
|
301
367
|
}
|
|
@@ -343,6 +409,17 @@ this.audio.playSound("kick", {
|
|
|
343
409
|
- ✅ Math utilities (vectors, matrices)
|
|
344
410
|
- ✅ Debug visualization tools
|
|
345
411
|
|
|
412
|
+
## Development
|
|
413
|
+
|
|
414
|
+
To build the minified bundle locally:
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
npm install
|
|
418
|
+
npm run build
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
This generates `dist/action-engine.min.js` from all source files in dependency order.
|
|
422
|
+
|
|
346
423
|
---
|
|
347
424
|
|
|
348
|
-
**Ready to build?** Start with
|
|
425
|
+
**Ready to build?** Start with the HTML template above, create your `game.js`, and you're good to go!
|