mage-engine 3.25.0 → 3.25.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/.claude/worktrees/fix-onstart-error-handling/.github/workflows/test.yml +29 -0
- package/.claude/worktrees/fix-onstart-error-handling/.nvmrc +1 -0
- package/.claude/worktrees/fix-onstart-error-handling/.prettierrc.js +20 -0
- package/.claude/worktrees/fix-onstart-error-handling/LICENSE +35 -0
- package/.claude/worktrees/fix-onstart-error-handling/README.md +56 -0
- package/.claude/worktrees/fix-onstart-error-handling/__mocks__/three.js +178 -0
- package/.claude/worktrees/fix-onstart-error-handling/dist/ammo.js +991 -0
- package/.claude/worktrees/fix-onstart-error-handling/eslint.config.js +73 -0
- package/.claude/worktrees/fix-onstart-error-handling/jest.config.js +31 -0
- package/.claude/worktrees/fix-onstart-error-handling/package.json +96 -0
- package/dist/mage.js +1278 -1201
- package/eslint.config.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const eslint = require("@eslint/js");
|
|
2
|
+
const prettier = require("eslint-plugin-prettier/recommended");
|
|
3
|
+
const globals = require("globals");
|
|
4
|
+
|
|
5
|
+
module.exports = [
|
|
6
|
+
{
|
|
7
|
+
ignores: [
|
|
8
|
+
"dist/",
|
|
9
|
+
"node_modules/",
|
|
10
|
+
"__mocks__/",
|
|
11
|
+
"config/",
|
|
12
|
+
"src/loaders/ColladaLoader.js",
|
|
13
|
+
"src/loaders/GLTFLoader.js",
|
|
14
|
+
"src/loaders/FBXLoader.js",
|
|
15
|
+
"src/lib/fflate.js",
|
|
16
|
+
"src/models/SkeletonUtils.js",
|
|
17
|
+
"src/controls/Orbit.js",
|
|
18
|
+
"src/controls/Transform.js",
|
|
19
|
+
"src/controls/TransformGizmo.js",
|
|
20
|
+
"src/fx/materials/Ocean.js",
|
|
21
|
+
"src/fx/materials/Water.old.js",
|
|
22
|
+
"src/fx/materials/Mirror.js",
|
|
23
|
+
"src/scripts/builtin/SmoothCameraFollow.js",
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
eslint.configs.recommended,
|
|
27
|
+
prettier,
|
|
28
|
+
{
|
|
29
|
+
languageOptions: {
|
|
30
|
+
ecmaVersion: 2022,
|
|
31
|
+
sourceType: "module",
|
|
32
|
+
globals: {
|
|
33
|
+
...globals.browser,
|
|
34
|
+
requestNextFrame: "readonly",
|
|
35
|
+
global: "readonly",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
rules: {
|
|
39
|
+
"no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
|
40
|
+
"no-console": "off",
|
|
41
|
+
"no-dupe-class-members": "warn",
|
|
42
|
+
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
43
|
+
"prettier/prettier": ["error", { endOfLine: "auto" }],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
files: ["**/__tests__/**/*.js", "**/*.test.js"],
|
|
48
|
+
languageOptions: {
|
|
49
|
+
globals: {
|
|
50
|
+
...globals.jest,
|
|
51
|
+
...globals.commonjs,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
files: ["src/physics/worker/**/*.js"],
|
|
57
|
+
languageOptions: {
|
|
58
|
+
globals: {
|
|
59
|
+
Ammo: "readonly",
|
|
60
|
+
postMessage: "readonly",
|
|
61
|
+
importScripts: "readonly",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
files: ["src/lib/features.js"],
|
|
67
|
+
languageOptions: {
|
|
68
|
+
globals: {
|
|
69
|
+
ActiveXObject: "readonly",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
roots: ["<rootDir>/src"],
|
|
5
|
+
|
|
6
|
+
testMatch: [
|
|
7
|
+
"**/__tests__/**/*.test.js",
|
|
8
|
+
"**/*.test.js",
|
|
9
|
+
],
|
|
10
|
+
|
|
11
|
+
transform: {
|
|
12
|
+
"^.+\\.js$": "babel-jest",
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
transformIgnorePatterns: [
|
|
16
|
+
"/node_modules/(?!three/)",
|
|
17
|
+
],
|
|
18
|
+
|
|
19
|
+
collectCoverageFrom: [
|
|
20
|
+
"src/lib/**/*.js",
|
|
21
|
+
"src/entities/**/*.js",
|
|
22
|
+
"src/models/**/*.js",
|
|
23
|
+
"src/physics/**/*.js",
|
|
24
|
+
"src/images/**/*.js",
|
|
25
|
+
"!src/lib/fflate.js",
|
|
26
|
+
"!src/lib/workers.js",
|
|
27
|
+
"!src/physics/worker/index.js",
|
|
28
|
+
],
|
|
29
|
+
|
|
30
|
+
testEnvironment: "node",
|
|
31
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mage-engine",
|
|
3
|
+
"version": "3.25.1",
|
|
4
|
+
"description": "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.",
|
|
5
|
+
"main": "dist/mage.js",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Marco Stagni",
|
|
8
|
+
"email": "marco@mage.studio"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"preversion": "npm test",
|
|
12
|
+
"version": "npm run build",
|
|
13
|
+
"dev": "concurrently 'npm:build:live' 'npm:start'",
|
|
14
|
+
"start": "http-server ./ -p 8085",
|
|
15
|
+
"postversion:push": "git push --no-verify && git push --tags --no-verify",
|
|
16
|
+
"postversion": "npm run postversion:push && npm publish",
|
|
17
|
+
"prebuild": "rimraf dist/mage.js",
|
|
18
|
+
"build": "rollup --config config/index.js",
|
|
19
|
+
"build:live": "rollup --config config/index.js --watch",
|
|
20
|
+
"test": "jest",
|
|
21
|
+
"test:watch": "jest --watch",
|
|
22
|
+
"test:coverage": "jest --coverage",
|
|
23
|
+
"lint": "eslint src",
|
|
24
|
+
"lint:fix": "eslint src --fix"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git://github.com/MageStudio/Mage.git"
|
|
29
|
+
},
|
|
30
|
+
"license": "BSD-3-Clause",
|
|
31
|
+
"keywords": [
|
|
32
|
+
"mage",
|
|
33
|
+
"marco",
|
|
34
|
+
"stagni",
|
|
35
|
+
"three.js",
|
|
36
|
+
"webgl",
|
|
37
|
+
"game",
|
|
38
|
+
"engine",
|
|
39
|
+
"game engine",
|
|
40
|
+
"javascript",
|
|
41
|
+
"browser",
|
|
42
|
+
"shader"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@babel/plugin-transform-classes": "^7.9.5",
|
|
46
|
+
"@babel/plugin-transform-runtime": "7.5.0",
|
|
47
|
+
"@babel/runtime": "7.5.0",
|
|
48
|
+
"between.js": "0.1.2-fix.2",
|
|
49
|
+
"hotkeys-js": "^3.13.7",
|
|
50
|
+
"html-to-image": "^1.9.0",
|
|
51
|
+
"html2canvas": "^1.4.1",
|
|
52
|
+
"inferno": "7.3.2",
|
|
53
|
+
"inferno-create-element": "7.3.3",
|
|
54
|
+
"inferno-redux": "7.4.2",
|
|
55
|
+
"redux": "4.0.5",
|
|
56
|
+
"redux-thunk": "^2.3.0",
|
|
57
|
+
"rxjs": "6.5.3",
|
|
58
|
+
"three": "0.126.0",
|
|
59
|
+
"three.proton": "npm:three.proton.js@0.2.3",
|
|
60
|
+
"vivifyjs": "*",
|
|
61
|
+
"whatwg-fetch": "3.0.0",
|
|
62
|
+
"xstate": "^4.8.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@babel/cli": "7.17.3",
|
|
66
|
+
"@babel/core": "^7.29.0",
|
|
67
|
+
"@babel/node": "7.16.8",
|
|
68
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
69
|
+
"@babel/polyfill": "7.12.1",
|
|
70
|
+
"@babel/preset-env": "^7.29.0",
|
|
71
|
+
"@babel/register": "7.17.0",
|
|
72
|
+
"@eslint/js": "^9.39.3",
|
|
73
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
74
|
+
"@rollup/plugin-commonjs": "21.0.2",
|
|
75
|
+
"@rollup/plugin-json": "4.1.0",
|
|
76
|
+
"@rollup/plugin-node-resolve": "13.1.3",
|
|
77
|
+
"@rollup/plugin-replace": "^2.3.4",
|
|
78
|
+
"babel-jest": "^29.7.0",
|
|
79
|
+
"babel-loader": "8.2.3",
|
|
80
|
+
"babel-plugin-inferno": "6.3.0",
|
|
81
|
+
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
82
|
+
"concurrently": "^5.3.0",
|
|
83
|
+
"eslint": "^9.39.3",
|
|
84
|
+
"eslint-config-prettier": "^10.1.8",
|
|
85
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
86
|
+
"globals": "^17.4.0",
|
|
87
|
+
"http-server": "^0.12.3",
|
|
88
|
+
"jest": "^29.7.0",
|
|
89
|
+
"madge": "^5.0.1",
|
|
90
|
+
"prettier": "^3.8.1",
|
|
91
|
+
"rimraf": "^3.0.0",
|
|
92
|
+
"rollup": "2.69.0",
|
|
93
|
+
"rollup-plugin-terser": "7.0.2",
|
|
94
|
+
"rollup-plugin-web-worker-loader": "1.6.1"
|
|
95
|
+
}
|
|
96
|
+
}
|