@directivegames/genesys.sdk 3.2.2 → 3.2.5
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 +60 -60
- package/dist/src/asset-pack/eslint.config.js +4 -4
- package/dist/src/core/cli.js +22 -22
- package/dist/src/core/common.js +2 -2
- package/dist/src/core/tools/build-project.js +1 -1
- package/dist/src/core/tools/new-asset-pack.js +1 -1
- package/dist/src/core/tools/new-project.js +1 -1
- package/dist/src/dependencies.js +1 -1
- package/dist/src/electron/backend/tools/const.js +1 -1
- package/dist/src/electron/backend/tools/open-project.js +1 -1
- package/dist/src/templates/eslint.config.js +4 -4
- package/dist/src/templates/scripts/genesys/calc-bounding-box.js +2 -2
- package/dist/src/templates/scripts/genesys/dev/dump-default-scene.js +1 -1
- package/dist/src/templates/scripts/genesys/dev/generate-manifest.js +1 -1
- package/dist/src/templates/scripts/genesys/dev/launcher.js +1 -1
- package/dist/src/templates/scripts/genesys/dev/storage-provider.js +4 -4
- package/dist/src/templates/scripts/genesys/genesys-mcp.js +26 -26
- package/dist/src/templates/scripts/genesys/mcp/doc-tools.js +2 -2
- package/dist/src/templates/scripts/genesys/mcp/editor-functions.js +5 -5
- package/dist/src/templates/scripts/genesys/mcp/search-actors.js +1 -1
- package/dist/src/templates/scripts/genesys/mcp/search-assets.js +1 -1
- package/dist/src/templates/scripts/genesys/mcp/utils.js +1 -1
- package/dist/src/templates/scripts/genesys/misc.js +1 -1
- package/dist/src/templates/scripts/genesys/mock.js +1 -1
- package/dist/src/templates/scripts/genesys/place-actors.js +1 -1
- package/dist/src/templates/scripts/genesys/post-install.js +1 -1
- package/dist/src/templates/scripts/genesys/storageProvider.js +2 -2
- package/dist/src/templates/src/index.js +1 -1
- package/dist/src/templates/src/templates/firstPerson/src/game.js +1 -1
- package/dist/src/templates/src/templates/firstPerson/src/player.js +1 -1
- package/dist/src/templates/src/templates/fps/src/game.js +1 -1
- package/dist/src/templates/src/templates/fps/src/player.js +1 -1
- package/dist/src/templates/src/templates/fps/src/weapon.js +1 -1
- package/dist/src/templates/src/templates/freeCamera/src/game.js +1 -1
- package/dist/src/templates/src/templates/freeCamera/src/player.js +1 -1
- package/dist/src/templates/src/templates/sideScroller/src/game.js +1 -1
- package/dist/src/templates/src/templates/sideScroller/src/level-generator.js +1 -1
- package/dist/src/templates/src/templates/sideScroller/src/player.js +1 -1
- package/dist/src/templates/src/templates/thirdPerson/src/game.js +1 -1
- package/dist/src/templates/src/templates/thirdPerson/src/player.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/base-vehicle.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/game.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/mesh-vehicle.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/player.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/primitive-vehicle.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/ui-hints.js +31 -31
- package/dist/src/templates/src/templates/vr-game/src/game.js +1 -1
- package/dist/src/templates/src/templates/vr-game/src/sample-vr-actor.js +1 -1
- package/package.json +176 -176
- package/scripts/post-install.ts +143 -143
- package/src/asset-pack/.gitattributes +88 -88
- package/src/asset-pack/eslint.config.js +45 -45
- package/src/asset-pack/gitignore +11 -11
- package/src/asset-pack/scripts/postinstall.ts +81 -81
- package/src/asset-pack/tsconfig.json +33 -33
- package/src/templates/.cursor/mcp.json +20 -20
- package/src/templates/.cursorignore +2 -2
- package/src/templates/.gitattributes +88 -88
- package/src/templates/.vscode/settings.json +6 -6
- package/src/templates/AGENTS.md +86 -86
- package/src/templates/README.md +24 -24
- package/src/templates/eslint.config.js +45 -45
- package/src/templates/gitignore +11 -11
- package/src/templates/index.html +34 -34
- package/src/templates/pnpm-lock.yaml +3676 -3676
- package/src/templates/scripts/genesys/build-project.ts +51 -51
- package/src/templates/scripts/genesys/calc-bounding-box.ts +272 -272
- package/src/templates/scripts/genesys/common.ts +46 -46
- package/src/templates/scripts/genesys/const.ts +9 -9
- package/src/templates/scripts/genesys/dev/dump-default-scene.ts +11 -11
- package/src/templates/scripts/genesys/dev/generate-manifest.ts +146 -146
- package/src/templates/scripts/genesys/dev/launcher.ts +46 -46
- package/src/templates/scripts/genesys/dev/storage-provider.ts +229 -229
- package/src/templates/scripts/genesys/dev/update-template-scenes.ts +84 -84
- package/src/templates/scripts/genesys/doc-server.ts +16 -16
- package/src/templates/scripts/genesys/genesys-mcp.ts +526 -526
- package/src/templates/scripts/genesys/mcp/doc-tools.ts +86 -86
- package/src/templates/scripts/genesys/mcp/editor-functions.ts +151 -151
- package/src/templates/scripts/genesys/mcp/editor-tools.ts +73 -73
- package/src/templates/scripts/genesys/mcp/get-scene-state.ts +35 -35
- package/src/templates/scripts/genesys/mcp/run-subprocess.ts +30 -30
- package/src/templates/scripts/genesys/mcp/search-actors.ts +858 -858
- package/src/templates/scripts/genesys/mcp/search-assets.ts +380 -380
- package/src/templates/scripts/genesys/mcp/utils.ts +281 -281
- package/src/templates/scripts/genesys/misc.ts +42 -42
- package/src/templates/scripts/genesys/mock.ts +6 -6
- package/src/templates/scripts/genesys/place-actors.ts +179 -179
- package/src/templates/scripts/genesys/post-install.ts +30 -30
- package/src/templates/scripts/genesys/prefab.schema.json +84 -84
- package/src/templates/scripts/genesys/remove-engine-comments.ts +134 -134
- package/src/templates/scripts/genesys/run-mcp-inspector.bat +4 -4
- package/src/templates/scripts/genesys/storageProvider.ts +182 -182
- package/src/templates/scripts/genesys/validate-prefabs.ts +138 -138
- package/src/templates/src/index.ts +22 -22
- package/src/templates/src/templates/firstPerson/assets/default.genesys-scene +165 -165
- package/src/templates/src/templates/firstPerson/src/game.ts +39 -39
- package/src/templates/src/templates/firstPerson/src/player.ts +63 -63
- package/src/templates/src/templates/fps/assets/default.genesys-scene +9459 -9459
- package/src/templates/src/templates/fps/src/game.ts +39 -39
- package/src/templates/src/templates/fps/src/player.ts +69 -69
- package/src/templates/src/templates/fps/src/weapon.ts +54 -54
- package/src/templates/src/templates/freeCamera/assets/default.genesys-scene +165 -165
- package/src/templates/src/templates/freeCamera/src/game.ts +39 -39
- package/src/templates/src/templates/freeCamera/src/player.ts +45 -45
- package/src/templates/src/templates/sideScroller/assets/default.genesys-scene +121 -121
- package/src/templates/src/templates/sideScroller/src/const.ts +45 -45
- package/src/templates/src/templates/sideScroller/src/game.ts +122 -122
- package/src/templates/src/templates/sideScroller/src/level-generator.ts +361 -361
- package/src/templates/src/templates/sideScroller/src/player.ts +125 -125
- package/src/templates/src/templates/thirdPerson/assets/default.genesys-scene +165 -165
- package/src/templates/src/templates/thirdPerson/src/game.ts +39 -39
- package/src/templates/src/templates/thirdPerson/src/player.ts +61 -61
- package/src/templates/src/templates/vehicle/assets/default.genesys-scene +225 -225
- package/src/templates/src/templates/vehicle/src/base-vehicle.ts +145 -145
- package/src/templates/src/templates/vehicle/src/game.ts +43 -43
- package/src/templates/src/templates/vehicle/src/mesh-vehicle.ts +191 -191
- package/src/templates/src/templates/vehicle/src/player.ts +109 -109
- package/src/templates/src/templates/vehicle/src/primitive-vehicle.ts +266 -266
- package/src/templates/src/templates/vehicle/src/ui-hints.ts +101 -101
- package/src/templates/src/templates/vr-game/assets/default.genesys-scene +246 -246
- package/src/templates/src/templates/vr-game/src/auto-imports.ts +1 -1
- package/src/templates/src/templates/vr-game/src/game.ts +66 -66
- package/src/templates/src/templates/vr-game/src/sample-vr-actor.ts +26 -26
- package/src/templates/tsconfig.json +34 -34
- package/src/templates/vite.config.ts +52 -52
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import * as fs from 'fs';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
|
|
7
|
-
// Get the directory of this script
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = path.dirname(__filename);
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Find the parent project root by traversing up from node_modules
|
|
13
|
-
* For pnpm structure like: /project/node_modules/.pnpm/package@version/node_modules/package
|
|
14
|
-
* We want to find: /project
|
|
15
|
-
*/
|
|
16
|
-
function findProjectRoot(): string | null {
|
|
17
|
-
// Split the current directory path into parts
|
|
18
|
-
const parts = __dirname.split(path.sep);
|
|
19
|
-
|
|
20
|
-
// Find the first occurrence of 'node_modules' in the path
|
|
21
|
-
const nodeModulesIndex = parts.indexOf('node_modules');
|
|
22
|
-
|
|
23
|
-
if (nodeModulesIndex > 0) {
|
|
24
|
-
// Take everything before 'node_modules' and join it back
|
|
25
|
-
return parts.slice(0, nodeModulesIndex).join(path.sep);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Only run when installed as a dependency in another project
|
|
32
|
-
// Skip if running in the package's own directory during development
|
|
33
|
-
const isInstalledAsDependency = __dirname.includes('node_modules');
|
|
34
|
-
|
|
35
|
-
if (isInstalledAsDependency) {
|
|
36
|
-
try {
|
|
37
|
-
// Read package.json to get the package name
|
|
38
|
-
const packageJsonPath = path.resolve(__dirname, '../../package.json');
|
|
39
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
40
|
-
const packageName = packageJson.name;
|
|
41
|
-
|
|
42
|
-
// Source: assets folder in this package
|
|
43
|
-
const sourceAssetsDir = path.resolve(__dirname, '../../assets');
|
|
44
|
-
|
|
45
|
-
// Find the parent project root
|
|
46
|
-
const parentProjectRoot = findProjectRoot();
|
|
47
|
-
|
|
48
|
-
if (!parentProjectRoot) {
|
|
49
|
-
console.error('Error: Could not find parent project root');
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Destination: <parent-project>/packs/<package-name>/assets
|
|
54
|
-
const targetPackDir = path.join(parentProjectRoot, 'packs', packageName);
|
|
55
|
-
const targetAssetsDir = path.join(targetPackDir, 'assets');
|
|
56
|
-
|
|
57
|
-
// Check if source assets directory exists
|
|
58
|
-
if (fs.existsSync(sourceAssetsDir)) {
|
|
59
|
-
// Delete target directory if it already exists
|
|
60
|
-
if (fs.existsSync(targetPackDir)) {
|
|
61
|
-
fs.rmSync(targetPackDir, { recursive: true, force: true });
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Create target directory
|
|
65
|
-
fs.mkdirSync(targetPackDir, { recursive: true });
|
|
66
|
-
|
|
67
|
-
// Copy entire assets folder
|
|
68
|
-
fs.cpSync(sourceAssetsDir, targetAssetsDir, { recursive: true });
|
|
69
|
-
|
|
70
|
-
console.log(`✓ Assets from "${packageName}" copied to: ${path.relative(parentProjectRoot, targetPackDir)}`);
|
|
71
|
-
} else {
|
|
72
|
-
console.log(`⚠ No assets folder found in "${packageName}"`);
|
|
73
|
-
}
|
|
74
|
-
} catch (error) {
|
|
75
|
-
console.error('Error during postinstall:', error);
|
|
76
|
-
process.exit(1);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export {};
|
|
81
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
// Get the directory of this script
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Find the parent project root by traversing up from node_modules
|
|
13
|
+
* For pnpm structure like: /project/node_modules/.pnpm/package@version/node_modules/package
|
|
14
|
+
* We want to find: /project
|
|
15
|
+
*/
|
|
16
|
+
function findProjectRoot(): string | null {
|
|
17
|
+
// Split the current directory path into parts
|
|
18
|
+
const parts = __dirname.split(path.sep);
|
|
19
|
+
|
|
20
|
+
// Find the first occurrence of 'node_modules' in the path
|
|
21
|
+
const nodeModulesIndex = parts.indexOf('node_modules');
|
|
22
|
+
|
|
23
|
+
if (nodeModulesIndex > 0) {
|
|
24
|
+
// Take everything before 'node_modules' and join it back
|
|
25
|
+
return parts.slice(0, nodeModulesIndex).join(path.sep);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Only run when installed as a dependency in another project
|
|
32
|
+
// Skip if running in the package's own directory during development
|
|
33
|
+
const isInstalledAsDependency = __dirname.includes('node_modules');
|
|
34
|
+
|
|
35
|
+
if (isInstalledAsDependency) {
|
|
36
|
+
try {
|
|
37
|
+
// Read package.json to get the package name
|
|
38
|
+
const packageJsonPath = path.resolve(__dirname, '../../package.json');
|
|
39
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
40
|
+
const packageName = packageJson.name;
|
|
41
|
+
|
|
42
|
+
// Source: assets folder in this package
|
|
43
|
+
const sourceAssetsDir = path.resolve(__dirname, '../../assets');
|
|
44
|
+
|
|
45
|
+
// Find the parent project root
|
|
46
|
+
const parentProjectRoot = findProjectRoot();
|
|
47
|
+
|
|
48
|
+
if (!parentProjectRoot) {
|
|
49
|
+
console.error('Error: Could not find parent project root');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Destination: <parent-project>/packs/<package-name>/assets
|
|
54
|
+
const targetPackDir = path.join(parentProjectRoot, 'packs', packageName);
|
|
55
|
+
const targetAssetsDir = path.join(targetPackDir, 'assets');
|
|
56
|
+
|
|
57
|
+
// Check if source assets directory exists
|
|
58
|
+
if (fs.existsSync(sourceAssetsDir)) {
|
|
59
|
+
// Delete target directory if it already exists
|
|
60
|
+
if (fs.existsSync(targetPackDir)) {
|
|
61
|
+
fs.rmSync(targetPackDir, { recursive: true, force: true });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Create target directory
|
|
65
|
+
fs.mkdirSync(targetPackDir, { recursive: true });
|
|
66
|
+
|
|
67
|
+
// Copy entire assets folder
|
|
68
|
+
fs.cpSync(sourceAssetsDir, targetAssetsDir, { recursive: true });
|
|
69
|
+
|
|
70
|
+
console.log(`✓ Assets from "${packageName}" copied to: ${path.relative(parentProjectRoot, targetPackDir)}`);
|
|
71
|
+
} else {
|
|
72
|
+
console.log(`⚠ No assets folder found in "${packageName}"`);
|
|
73
|
+
}
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error('Error during postinstall:', error);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {};
|
|
81
|
+
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2021",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": [
|
|
7
|
-
"ES2021",
|
|
8
|
-
"DOM",
|
|
9
|
-
"DOM.Iterable"
|
|
10
|
-
],
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"jsx": "preserve",
|
|
17
|
-
"strict": true,
|
|
18
|
-
"noUnusedLocals": false,
|
|
19
|
-
"noUnusedParameters": false,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"outDir": "./dist",
|
|
22
|
-
"rootDir": ".",
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"inlineSourceMap": true,
|
|
25
|
-
"experimentalDecorators": true,
|
|
26
|
-
"noImplicitOverride": true,
|
|
27
|
-
"noEmit": false,
|
|
28
|
-
"types": ["node"]
|
|
29
|
-
},
|
|
30
|
-
"include": [
|
|
31
|
-
"src/**/*",
|
|
32
|
-
"scripts/**/*"
|
|
33
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2021",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": [
|
|
7
|
+
"ES2021",
|
|
8
|
+
"DOM",
|
|
9
|
+
"DOM.Iterable"
|
|
10
|
+
],
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"jsx": "preserve",
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": false,
|
|
19
|
+
"noUnusedParameters": false,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"outDir": "./dist",
|
|
22
|
+
"rootDir": ".",
|
|
23
|
+
"declaration": true,
|
|
24
|
+
"inlineSourceMap": true,
|
|
25
|
+
"experimentalDecorators": true,
|
|
26
|
+
"noImplicitOverride": true,
|
|
27
|
+
"noEmit": false,
|
|
28
|
+
"types": ["node"]
|
|
29
|
+
},
|
|
30
|
+
"include": [
|
|
31
|
+
"src/**/*",
|
|
32
|
+
"scripts/**/*"
|
|
33
|
+
]
|
|
34
34
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"mcpServers": {},
|
|
3
|
-
"DISABLED_mcpServers": {
|
|
4
|
-
"genesys": {
|
|
5
|
-
"command": "npx",
|
|
6
|
-
"args": [
|
|
7
|
-
"tsx",
|
|
8
|
-
"./scripts/genesys/genesys-mcp.ts",
|
|
9
|
-
"cursor"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"genesys-docs": {
|
|
13
|
-
"command": "npx",
|
|
14
|
-
"args": [
|
|
15
|
-
"tsx",
|
|
16
|
-
"./scripts/genesys/doc-server.ts"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {},
|
|
3
|
+
"DISABLED_mcpServers": {
|
|
4
|
+
"genesys": {
|
|
5
|
+
"command": "npx",
|
|
6
|
+
"args": [
|
|
7
|
+
"tsx",
|
|
8
|
+
"./scripts/genesys/genesys-mcp.ts",
|
|
9
|
+
"cursor"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"genesys-docs": {
|
|
13
|
+
"command": "npx",
|
|
14
|
+
"args": [
|
|
15
|
+
"tsx",
|
|
16
|
+
"./scripts/genesys/doc-server.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!**/.engine/**
|
|
2
|
-
**/.engine/docs/**
|
|
1
|
+
!**/.engine/**
|
|
2
|
+
**/.engine/docs/**
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
# Git LFS tracking for common large file types
|
|
2
|
-
|
|
3
|
-
# 3D Models
|
|
4
|
-
*.fbx filter=lfs diff=lfs merge=lfs -text
|
|
5
|
-
*.obj filter=lfs diff=lfs merge=lfs -text
|
|
6
|
-
*.dae filter=lfs diff=lfs merge=lfs -text
|
|
7
|
-
*.3ds filter=lfs diff=lfs merge=lfs -text
|
|
8
|
-
*.blend filter=lfs diff=lfs merge=lfs -text
|
|
9
|
-
*.max filter=lfs diff=lfs merge=lfs -text
|
|
10
|
-
*.maya filter=lfs diff=lfs merge=lfs -text
|
|
11
|
-
*.mb filter=lfs diff=lfs merge=lfs -text
|
|
12
|
-
*.ma filter=lfs diff=lfs merge=lfs -text
|
|
13
|
-
*.glb filter=lfs diff=lfs merge=lfs -text
|
|
14
|
-
*.gltf filter=lfs diff=lfs merge=lfs -text
|
|
15
|
-
|
|
16
|
-
# Textures and Images
|
|
17
|
-
*.png filter=lfs diff=lfs merge=lfs -text
|
|
18
|
-
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
19
|
-
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
20
|
-
*.tga filter=lfs diff=lfs merge=lfs -text
|
|
21
|
-
*.tiff filter=lfs diff=lfs merge=lfs -text
|
|
22
|
-
*.tif filter=lfs diff=lfs merge=lfs -text
|
|
23
|
-
*.bmp filter=lfs diff=lfs merge=lfs -text
|
|
24
|
-
*.psd filter=lfs diff=lfs merge=lfs -text
|
|
25
|
-
*.exr filter=lfs diff=lfs merge=lfs -text
|
|
26
|
-
*.hdr filter=lfs diff=lfs merge=lfs -text
|
|
27
|
-
*.dds filter=lfs diff=lfs merge=lfs -text
|
|
28
|
-
*.ktx filter=lfs diff=lfs merge=lfs -text
|
|
29
|
-
*.ktx2 filter=lfs diff=lfs merge=lfs -text
|
|
30
|
-
|
|
31
|
-
# Audio Files
|
|
32
|
-
*.wav filter=lfs diff=lfs merge=lfs -text
|
|
33
|
-
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
34
|
-
*.ogg filter=lfs diff=lfs merge=lfs -text
|
|
35
|
-
*.flac filter=lfs diff=lfs merge=lfs -text
|
|
36
|
-
*.aac filter=lfs diff=lfs merge=lfs -text
|
|
37
|
-
*.m4a filter=lfs diff=lfs merge=lfs -text
|
|
38
|
-
*.wma filter=lfs diff=lfs merge=lfs -text
|
|
39
|
-
*.aiff filter=lfs diff=lfs merge=lfs -text
|
|
40
|
-
|
|
41
|
-
# Video Files
|
|
42
|
-
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
43
|
-
*.mov filter=lfs diff=lfs merge=lfs -text
|
|
44
|
-
*.avi filter=lfs diff=lfs merge=lfs -text
|
|
45
|
-
*.mkv filter=lfs diff=lfs merge=lfs -text
|
|
46
|
-
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
47
|
-
*.wmv filter=lfs diff=lfs merge=lfs -text
|
|
48
|
-
*.flv filter=lfs diff=lfs merge=lfs -text
|
|
49
|
-
|
|
50
|
-
# Fonts
|
|
51
|
-
*.ttf filter=lfs diff=lfs merge=lfs -text
|
|
52
|
-
*.otf filter=lfs diff=lfs merge=lfs -text
|
|
53
|
-
*.woff filter=lfs diff=lfs merge=lfs -text
|
|
54
|
-
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
|
55
|
-
|
|
56
|
-
# Archives and Packages
|
|
57
|
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
|
58
|
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
59
|
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
|
60
|
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
|
61
|
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
|
62
|
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
63
|
-
|
|
64
|
-
# Game Engine Specific Files
|
|
65
|
-
*.unity filter=lfs diff=lfs merge=lfs -text
|
|
66
|
-
*.unitypackage filter=lfs diff=lfs merge=lfs -text
|
|
67
|
-
*.asset filter=lfs diff=lfs merge=lfs -text
|
|
68
|
-
*.prefab filter=lfs diff=lfs merge=lfs -text
|
|
69
|
-
|
|
70
|
-
# Document Files (large ones)
|
|
71
|
-
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
72
|
-
*.doc filter=lfs diff=lfs merge=lfs -text
|
|
73
|
-
*.docx filter=lfs diff=lfs merge=lfs -text
|
|
74
|
-
*.ppt filter=lfs diff=lfs merge=lfs -text
|
|
75
|
-
*.pptx filter=lfs diff=lfs merge=lfs -text
|
|
76
|
-
|
|
77
|
-
# Binary executables and libraries
|
|
78
|
-
*.exe filter=lfs diff=lfs merge=lfs -text
|
|
79
|
-
*.dll filter=lfs diff=lfs merge=lfs -text
|
|
80
|
-
*.so filter=lfs diff=lfs merge=lfs -text
|
|
81
|
-
*.dylib filter=lfs diff=lfs merge=lfs -text
|
|
82
|
-
*.a filter=lfs diff=lfs merge=lfs -text
|
|
83
|
-
*.lib filter=lfs diff=lfs merge=lfs -text
|
|
84
|
-
|
|
85
|
-
# Data files
|
|
86
|
-
*.dat filter=lfs diff=lfs merge=lfs -text
|
|
87
|
-
*.data filter=lfs diff=lfs merge=lfs -text
|
|
88
|
-
*.cache filter=lfs diff=lfs merge=lfs -text
|
|
1
|
+
# Git LFS tracking for common large file types
|
|
2
|
+
|
|
3
|
+
# 3D Models
|
|
4
|
+
*.fbx filter=lfs diff=lfs merge=lfs -text
|
|
5
|
+
*.obj filter=lfs diff=lfs merge=lfs -text
|
|
6
|
+
*.dae filter=lfs diff=lfs merge=lfs -text
|
|
7
|
+
*.3ds filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
*.blend filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
*.max filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
*.maya filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
*.mb filter=lfs diff=lfs merge=lfs -text
|
|
12
|
+
*.ma filter=lfs diff=lfs merge=lfs -text
|
|
13
|
+
*.glb filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
*.gltf filter=lfs diff=lfs merge=lfs -text
|
|
15
|
+
|
|
16
|
+
# Textures and Images
|
|
17
|
+
*.png filter=lfs diff=lfs merge=lfs -text
|
|
18
|
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
19
|
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
*.tga filter=lfs diff=lfs merge=lfs -text
|
|
21
|
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
|
22
|
+
*.tif filter=lfs diff=lfs merge=lfs -text
|
|
23
|
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
|
24
|
+
*.psd filter=lfs diff=lfs merge=lfs -text
|
|
25
|
+
*.exr filter=lfs diff=lfs merge=lfs -text
|
|
26
|
+
*.hdr filter=lfs diff=lfs merge=lfs -text
|
|
27
|
+
*.dds filter=lfs diff=lfs merge=lfs -text
|
|
28
|
+
*.ktx filter=lfs diff=lfs merge=lfs -text
|
|
29
|
+
*.ktx2 filter=lfs diff=lfs merge=lfs -text
|
|
30
|
+
|
|
31
|
+
# Audio Files
|
|
32
|
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
|
33
|
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
34
|
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
|
35
|
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
|
36
|
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
|
37
|
+
*.m4a filter=lfs diff=lfs merge=lfs -text
|
|
38
|
+
*.wma filter=lfs diff=lfs merge=lfs -text
|
|
39
|
+
*.aiff filter=lfs diff=lfs merge=lfs -text
|
|
40
|
+
|
|
41
|
+
# Video Files
|
|
42
|
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
43
|
+
*.mov filter=lfs diff=lfs merge=lfs -text
|
|
44
|
+
*.avi filter=lfs diff=lfs merge=lfs -text
|
|
45
|
+
*.mkv filter=lfs diff=lfs merge=lfs -text
|
|
46
|
+
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
47
|
+
*.wmv filter=lfs diff=lfs merge=lfs -text
|
|
48
|
+
*.flv filter=lfs diff=lfs merge=lfs -text
|
|
49
|
+
|
|
50
|
+
# Fonts
|
|
51
|
+
*.ttf filter=lfs diff=lfs merge=lfs -text
|
|
52
|
+
*.otf filter=lfs diff=lfs merge=lfs -text
|
|
53
|
+
*.woff filter=lfs diff=lfs merge=lfs -text
|
|
54
|
+
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
|
55
|
+
|
|
56
|
+
# Archives and Packages
|
|
57
|
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
|
58
|
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
59
|
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
|
60
|
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
|
61
|
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
|
62
|
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
63
|
+
|
|
64
|
+
# Game Engine Specific Files
|
|
65
|
+
*.unity filter=lfs diff=lfs merge=lfs -text
|
|
66
|
+
*.unitypackage filter=lfs diff=lfs merge=lfs -text
|
|
67
|
+
*.asset filter=lfs diff=lfs merge=lfs -text
|
|
68
|
+
*.prefab filter=lfs diff=lfs merge=lfs -text
|
|
69
|
+
|
|
70
|
+
# Document Files (large ones)
|
|
71
|
+
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
72
|
+
*.doc filter=lfs diff=lfs merge=lfs -text
|
|
73
|
+
*.docx filter=lfs diff=lfs merge=lfs -text
|
|
74
|
+
*.ppt filter=lfs diff=lfs merge=lfs -text
|
|
75
|
+
*.pptx filter=lfs diff=lfs merge=lfs -text
|
|
76
|
+
|
|
77
|
+
# Binary executables and libraries
|
|
78
|
+
*.exe filter=lfs diff=lfs merge=lfs -text
|
|
79
|
+
*.dll filter=lfs diff=lfs merge=lfs -text
|
|
80
|
+
*.so filter=lfs diff=lfs merge=lfs -text
|
|
81
|
+
*.dylib filter=lfs diff=lfs merge=lfs -text
|
|
82
|
+
*.a filter=lfs diff=lfs merge=lfs -text
|
|
83
|
+
*.lib filter=lfs diff=lfs merge=lfs -text
|
|
84
|
+
|
|
85
|
+
# Data files
|
|
86
|
+
*.dat filter=lfs diff=lfs merge=lfs -text
|
|
87
|
+
*.data filter=lfs diff=lfs merge=lfs -text
|
|
88
|
+
*.cache filter=lfs diff=lfs merge=lfs -text
|
|
89
89
|
*.tmp filter=lfs diff=lfs merge=lfs -text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"editor.codeActionsOnSave": {
|
|
3
|
-
"source.fixAll.eslint": "always"
|
|
4
|
-
},
|
|
5
|
-
"eslint.validate": ["javascript", "typescript"]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"editor.codeActionsOnSave": {
|
|
3
|
+
"source.fixAll.eslint": "always"
|
|
4
|
+
},
|
|
5
|
+
"eslint.validate": ["javascript", "typescript"]
|
|
6
|
+
}
|
package/src/templates/AGENTS.md
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
# Assets
|
|
2
|
-
|
|
3
|
-
## Engine Assets
|
|
4
|
-
- The engine's default assets are located in the **`node_modules/genesys.js/assets`** directory.
|
|
5
|
-
- To reference these assets in your code, replace the **`node_modules/genesys.js`** prefix with **`@engine`** in the asset path.
|
|
6
|
-
|
|
7
|
-
**Example:**
|
|
8
|
-
If an asset is located at:
|
|
9
|
-
`node_modules/genesys.js/assets/models/SM_Monkey.glb`
|
|
10
|
-
Then the corresponding URL should be:
|
|
11
|
-
`@engine/assets/models/SM_Monkey.glb`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Project Assets
|
|
15
|
-
- The project's assets are located in the **`/assets`** directory.
|
|
16
|
-
- To reference these assets in your code, use the **fully qualified path** with **`@project`** prefix.
|
|
17
|
-
|
|
18
|
-
**Example:**
|
|
19
|
-
If an asset is located at:
|
|
20
|
-
`/assets/models/tiger.glb`
|
|
21
|
-
Then the corresponding URL should be:
|
|
22
|
-
`@project/assets/models/tiger.glb`
|
|
23
|
-
|
|
24
|
-
**Important:** Always use the complete path with `@project/assets/` prefix rather than relative paths. This ensures compatibility with publishing tools and build processes. You should **never** construct a project path programmatically.
|
|
25
|
-
|
|
26
|
-
## Resolve Asset Paths
|
|
27
|
-
- Using asset paths containing `@engine` or `@project` in raw html will not work out of the box as the browser doesn't know how to resolve them.
|
|
28
|
-
The solution is to resolve them using **`ENGINE.resolveAssetPathsInText`** first.
|
|
29
|
-
Example:
|
|
30
|
-
```
|
|
31
|
-
const htmlString = '...<img src="@engine/assets/textures/Checkerboard.png">...'
|
|
32
|
-
const resolvedHtml = await ENGINE.resolveAssetPathsInText(htmlString);
|
|
33
|
-
// then use resolvedHtml as normal
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Prefabs
|
|
37
|
-
- Prefabs are json files stored within /assets/prefabs, with the suffix .prefab.json.
|
|
38
|
-
- Prefabs can be validated via `pnpm validate-prefabs`.
|
|
39
|
-
- When referencing classes in prefab, use the appropriate prefix.
|
|
40
|
-
Engine classes **must** be referenced as `ENGINE.{class name}`, example: `ENGINE.Actor`, `ENGINE.SceneComponent`.
|
|
41
|
-
Custom game classes **must** be referenced as `GAME.{class name}`, example: `GAME.MyCustomActor`, `GAME.MyCustomComponent`.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
# Coding Rules
|
|
46
|
-
|
|
47
|
-
**CRITICAL**: Never edit `auto-imports.ts` - This file is automatically generated by the build pipeline to register all @ENGINE.GameClass() decorated classes. Any manual changes will be overwritten and may break the build system. Classes with proper @ENGINE.GameClass() decorators are automatically discovered and imported.
|
|
48
|
-
|
|
49
|
-
## General Guidelines
|
|
50
|
-
- Before implementing, take a hard look of the engine and figure out what can be used to implement the user's requirement. **Do not** reinvent wheels. When using the search tool, expand the search parameters with similar keywords.
|
|
51
|
-
- Work **WITH** the engine architecture, **NOT** against it.
|
|
52
|
-
- Try to find and use appropriate art assets as needed if the user does not specify. Check both engine and project assets for something that fits the feature.
|
|
53
|
-
- You **should avoid** writing **monolithic code** — do not place all logic, definitions, and configurations into a single file.
|
|
54
|
-
Instead, structure your code into modular, reusable, and maintainable components.
|
|
55
|
-
- Custom actor and component classes **must not** be registered as **`EngineClass`**, use **`GameClass`** instead.
|
|
56
|
-
- **Do not** create documentation or test/example code unless specifically asked to.
|
|
57
|
-
- Be **very brief** on the summary when the implementation is completed.
|
|
58
|
-
|
|
59
|
-
## UI
|
|
60
|
-
- Any HTML UI you create **MUST NOT** be added to the document root directly. Add them to the game UI container, which can be accessed through `world.gameContainer`.
|
|
61
|
-
|
|
62
|
-
## Testing Constraints
|
|
63
|
-
- You may **only** use `pnpm build` to verify code compilation.
|
|
64
|
-
- You **must** use `pnpm lint` to detect and auto-fix linting issues.
|
|
65
|
-
- Do **not** run `pnpm test`, `pnpm dev`, or `pnpm start` — these commands are **not supported**.
|
|
66
|
-
- All testing is the responsibility of the user.
|
|
67
|
-
You are encouraged to:
|
|
68
|
-
- Recommend suitable testing approaches.
|
|
69
|
-
- Collaborate with the user to evaluate test results.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Prompt Handling & Clarification
|
|
73
|
-
|
|
74
|
-
Before implementing any user request, you **must** interpret the prompt, identify ambiguities, and either:
|
|
75
|
-
- State clear assumptions **before** coding, or
|
|
76
|
-
- Ask the user targeted clarification questions.
|
|
77
|
-
|
|
78
|
-
### Required Steps
|
|
79
|
-
1. **Understand intent** — Restate what the user is asking in your own words.
|
|
80
|
-
2. **Identify ambiguities** — Look for vague or overloaded terms.
|
|
81
|
-
3. **Clarify or assume** —
|
|
82
|
-
- If unclear, ask specific, short questions to confirm meaning.
|
|
83
|
-
- If the user cannot clarify, proceed with explicit, written assumptions.
|
|
84
|
-
4. **Confirm scope** — Specify what systems, assets, or files you will change.
|
|
85
|
-
|
|
86
|
-
This process **prevents incorrect implementations** when user wording is incomplete or ambiguous.
|
|
1
|
+
# Assets
|
|
2
|
+
|
|
3
|
+
## Engine Assets
|
|
4
|
+
- The engine's default assets are located in the **`node_modules/@directivegames/genesys.js/assets`** directory.
|
|
5
|
+
- To reference these assets in your code, replace the **`node_modules/@directivegames/genesys.js`** prefix with **`@engine`** in the asset path.
|
|
6
|
+
|
|
7
|
+
**Example:**
|
|
8
|
+
If an asset is located at:
|
|
9
|
+
`node_modules/@directivegames/genesys.js/assets/models/SM_Monkey.glb`
|
|
10
|
+
Then the corresponding URL should be:
|
|
11
|
+
`@engine/assets/models/SM_Monkey.glb`
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Project Assets
|
|
15
|
+
- The project's assets are located in the **`/assets`** directory.
|
|
16
|
+
- To reference these assets in your code, use the **fully qualified path** with **`@project`** prefix.
|
|
17
|
+
|
|
18
|
+
**Example:**
|
|
19
|
+
If an asset is located at:
|
|
20
|
+
`/assets/models/tiger.glb`
|
|
21
|
+
Then the corresponding URL should be:
|
|
22
|
+
`@project/assets/models/tiger.glb`
|
|
23
|
+
|
|
24
|
+
**Important:** Always use the complete path with `@project/assets/` prefix rather than relative paths. This ensures compatibility with publishing tools and build processes. You should **never** construct a project path programmatically.
|
|
25
|
+
|
|
26
|
+
## Resolve Asset Paths
|
|
27
|
+
- Using asset paths containing `@engine` or `@project` in raw html will not work out of the box as the browser doesn't know how to resolve them.
|
|
28
|
+
The solution is to resolve them using **`ENGINE.resolveAssetPathsInText`** first.
|
|
29
|
+
Example:
|
|
30
|
+
```
|
|
31
|
+
const htmlString = '...<img src="@engine/assets/textures/Checkerboard.png">...'
|
|
32
|
+
const resolvedHtml = await ENGINE.resolveAssetPathsInText(htmlString);
|
|
33
|
+
// then use resolvedHtml as normal
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Prefabs
|
|
37
|
+
- Prefabs are json files stored within /assets/prefabs, with the suffix .prefab.json.
|
|
38
|
+
- Prefabs can be validated via `pnpm validate-prefabs`.
|
|
39
|
+
- When referencing classes in prefab, use the appropriate prefix.
|
|
40
|
+
Engine classes **must** be referenced as `ENGINE.{class name}`, example: `ENGINE.Actor`, `ENGINE.SceneComponent`.
|
|
41
|
+
Custom game classes **must** be referenced as `GAME.{class name}`, example: `GAME.MyCustomActor`, `GAME.MyCustomComponent`.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# Coding Rules
|
|
46
|
+
|
|
47
|
+
**CRITICAL**: Never edit `auto-imports.ts` - This file is automatically generated by the build pipeline to register all @ENGINE.GameClass() decorated classes. Any manual changes will be overwritten and may break the build system. Classes with proper @ENGINE.GameClass() decorators are automatically discovered and imported.
|
|
48
|
+
|
|
49
|
+
## General Guidelines
|
|
50
|
+
- Before implementing, take a hard look of the engine and figure out what can be used to implement the user's requirement. **Do not** reinvent wheels. When using the search tool, expand the search parameters with similar keywords.
|
|
51
|
+
- Work **WITH** the engine architecture, **NOT** against it.
|
|
52
|
+
- Try to find and use appropriate art assets as needed if the user does not specify. Check both engine and project assets for something that fits the feature.
|
|
53
|
+
- You **should avoid** writing **monolithic code** — do not place all logic, definitions, and configurations into a single file.
|
|
54
|
+
Instead, structure your code into modular, reusable, and maintainable components.
|
|
55
|
+
- Custom actor and component classes **must not** be registered as **`EngineClass`**, use **`GameClass`** instead.
|
|
56
|
+
- **Do not** create documentation or test/example code unless specifically asked to.
|
|
57
|
+
- Be **very brief** on the summary when the implementation is completed.
|
|
58
|
+
|
|
59
|
+
## UI
|
|
60
|
+
- Any HTML UI you create **MUST NOT** be added to the document root directly. Add them to the game UI container, which can be accessed through `world.gameContainer`.
|
|
61
|
+
|
|
62
|
+
## Testing Constraints
|
|
63
|
+
- You may **only** use `pnpm build` to verify code compilation.
|
|
64
|
+
- You **must** use `pnpm lint` to detect and auto-fix linting issues.
|
|
65
|
+
- Do **not** run `pnpm test`, `pnpm dev`, or `pnpm start` — these commands are **not supported**.
|
|
66
|
+
- All testing is the responsibility of the user.
|
|
67
|
+
You are encouraged to:
|
|
68
|
+
- Recommend suitable testing approaches.
|
|
69
|
+
- Collaborate with the user to evaluate test results.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Prompt Handling & Clarification
|
|
73
|
+
|
|
74
|
+
Before implementing any user request, you **must** interpret the prompt, identify ambiguities, and either:
|
|
75
|
+
- State clear assumptions **before** coding, or
|
|
76
|
+
- Ask the user targeted clarification questions.
|
|
77
|
+
|
|
78
|
+
### Required Steps
|
|
79
|
+
1. **Understand intent** — Restate what the user is asking in your own words.
|
|
80
|
+
2. **Identify ambiguities** — Look for vague or overloaded terms.
|
|
81
|
+
3. **Clarify or assume** —
|
|
82
|
+
- If unclear, ask specific, short questions to confirm meaning.
|
|
83
|
+
- If the user cannot clarify, proceed with explicit, written assumptions.
|
|
84
|
+
4. **Confirm scope** — Specify what systems, assets, or files you will change.
|
|
85
|
+
|
|
86
|
+
This process **prevents incorrect implementations** when user wording is incomplete or ambiguous.
|