@directivegames/genesys.sdk 3.2.4 → 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/dist/src/asset-pack/eslint.config.js +4 -4
- 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 +1 -1
- package/dist/src/templates/scripts/genesys/mcp/doc-tools.js +2 -2
- package/dist/src/templates/scripts/genesys/mcp/editor-functions.js +1 -1
- 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 +1 -1
- 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 +2 -2
- package/src/asset-pack/eslint.config.js +4 -4
- package/src/templates/AGENTS.md +3 -3
- package/src/templates/README.md +1 -1
- package/src/templates/eslint.config.js +4 -4
- package/src/templates/scripts/genesys/calc-bounding-box.ts +2 -2
- package/src/templates/scripts/genesys/dev/dump-default-scene.ts +1 -1
- package/src/templates/scripts/genesys/dev/generate-manifest.ts +1 -1
- package/src/templates/scripts/genesys/dev/launcher.ts +1 -1
- package/src/templates/scripts/genesys/dev/storage-provider.ts +4 -4
- package/src/templates/scripts/genesys/genesys-mcp.ts +1 -1
- package/src/templates/scripts/genesys/mcp/doc-tools.ts +2 -2
- package/src/templates/scripts/genesys/mcp/editor-functions.ts +1 -1
- package/src/templates/scripts/genesys/mcp/search-actors.ts +1 -1
- package/src/templates/scripts/genesys/mcp/search-assets.ts +1 -1
- package/src/templates/scripts/genesys/mcp/utils.ts +1 -1
- package/src/templates/scripts/genesys/misc.ts +1 -1
- package/src/templates/scripts/genesys/mock.ts +1 -1
- package/src/templates/scripts/genesys/place-actors.ts +1 -1
- package/src/templates/scripts/genesys/post-install.ts +1 -1
- package/src/templates/scripts/genesys/storageProvider.ts +2 -2
- package/src/templates/src/index.ts +1 -1
- package/src/templates/src/templates/firstPerson/src/game.ts +1 -1
- package/src/templates/src/templates/firstPerson/src/player.ts +1 -1
- package/src/templates/src/templates/fps/src/game.ts +1 -1
- package/src/templates/src/templates/fps/src/player.ts +1 -1
- package/src/templates/src/templates/fps/src/weapon.ts +1 -1
- package/src/templates/src/templates/freeCamera/src/game.ts +1 -1
- package/src/templates/src/templates/freeCamera/src/player.ts +1 -1
- package/src/templates/src/templates/sideScroller/src/game.ts +1 -1
- package/src/templates/src/templates/sideScroller/src/level-generator.ts +1 -1
- package/src/templates/src/templates/sideScroller/src/player.ts +1 -1
- package/src/templates/src/templates/thirdPerson/src/game.ts +1 -1
- package/src/templates/src/templates/thirdPerson/src/player.ts +1 -1
- package/src/templates/src/templates/vehicle/src/base-vehicle.ts +1 -1
- package/src/templates/src/templates/vehicle/src/game.ts +1 -1
- package/src/templates/src/templates/vehicle/src/mesh-vehicle.ts +1 -1
- package/src/templates/src/templates/vehicle/src/player.ts +1 -1
- package/src/templates/src/templates/vehicle/src/primitive-vehicle.ts +1 -1
- package/src/templates/src/templates/vehicle/src/ui-hints.ts +1 -1
- package/src/templates/src/templates/vr-game/src/game.ts +1 -1
- package/src/templates/src/templates/vr-game/src/sample-vr-actor.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
|
-
import noDefaultClassFields from './node_modules/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
-
import defaultGetterReturnType from './node_modules/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
-
import noOverrideMethods from './node_modules/genesys.js/eslint-rules/no-override-methods.js';
|
|
2
|
+
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
+
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
+
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
+
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
6
6
|
export default [
|
|
7
7
|
{
|
|
8
8
|
ignores: ['dist/**', '.engine/**', 'node_modules/**']
|
package/dist/src/core/common.js
CHANGED
|
@@ -3,8 +3,8 @@ import fs from 'fs';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { promisify } from 'util';
|
|
6
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
6
7
|
import fixPath from 'fix-path';
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
8
8
|
import { JSDOM } from 'jsdom';
|
|
9
9
|
import { ALL_DEPENDENCIES } from '../dependencies.js';
|
|
10
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -39,7 +39,7 @@ export function checkEngineVersion(engineVersion) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
export function getEngineVersion() {
|
|
42
|
-
return ALL_DEPENDENCIES['genesys.js'];
|
|
42
|
+
return ALL_DEPENDENCIES['@directivegames/genesys.js'];
|
|
43
43
|
}
|
|
44
44
|
export function getAppVersion() {
|
|
45
45
|
const pkg = JSON.parse(fs.readFileSync(path.join(getProjectRoot(), 'package.json'), 'utf8'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import { findFilesByPredicate, getProjectFolderAndFile, runCommandAsync } from '../index.js';
|
|
5
5
|
function getTscBinaryPath(projectFolder, logger) {
|
|
6
6
|
// Look in the project's node_modules for tsc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import { ALL_DEPENDENCIES } from '../../dependencies.js';
|
|
5
5
|
import { copyAsync, existsAsync, getEngineVersion, getProjectRoot, mkdirAsync, readdirAsync, runCommandAsync, writeFileAsync } from '../common.js';
|
|
6
6
|
import { IgnoredFiles } from '../index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import { ALL_DEPENDENCIES } from '../../dependencies.js';
|
|
5
5
|
import { deletedTemplateItems, sharedTemplateItems } from '../../templates/src/index.js';
|
|
6
6
|
import { copyAsync, existsAsync, getEngineVersion, getProjectRoot, mkdirAsync, readdirAsync, runCommandAsync, writeFileAsync } from '../common.js';
|
package/dist/src/dependencies.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
2
3
|
import isDev from 'electron-is-dev';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
4
4
|
// MUST be kept in sync with https://github.com/directivegames/genesys.ai/blob/develop/src/const.ts
|
|
5
5
|
export const GENESYS_URL = 'https://web--genesys-ai.us-central1.hosted.app/dashboard';
|
|
6
6
|
export const GENESYS_LOCAL_URL = 'http://localhost:3000/dashboard';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
3
4
|
import { app, dialog } from 'electron';
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
5
5
|
import { copySharedTemplateToProject, createGenesysProjectFile, getEngineVersion, getProjectFolderAndFile, getProjectNameFromPath, getProjectRoot, IgnoredFiles, projectFiles, runCommandAsync } from '../../../core/index.js';
|
|
6
6
|
import { getTemplatePath as getTemplatePathImpl } from '../../../core/tools/new-project.js';
|
|
7
7
|
import { deletedTemplateItems, sharedTemplateItems } from '../../../templates/src/index.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
|
-
import noDefaultClassFields from './node_modules/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
-
import defaultGetterReturnType from './node_modules/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
-
import noOverrideMethods from './node_modules/genesys.js/eslint-rules/no-override-methods.js';
|
|
2
|
+
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
+
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
+
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
+
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
6
6
|
export default [
|
|
7
7
|
{
|
|
8
8
|
ignores: ['dist/**', '.engine/**', 'node_modules/**']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs, { readFileSync } from 'fs';
|
|
2
2
|
import path, { resolve } from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
|
|
6
6
|
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
@@ -202,4 +202,4 @@ async function fetchBoundingBoxData(manifestFile, gltfPaths) {
|
|
|
202
202
|
}
|
|
203
203
|
// Export the main functions for use as a module
|
|
204
204
|
export { calculateGLBBoundingBox, calculateGLBOriginalBoundingBox, createTransform, degreesToRadians, fetchBoundingBoxData, extractBoundingBoxData, GLBLoadError, BoundingBoxCalculationError };
|
|
205
|
-
export { BoundingBoxSchema } from 'genesys.js';
|
|
205
|
+
export { BoundingBoxSchema } from '@directivegames/genesys.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// pnpm exec tsx ./scripts/genesys/dev/generate-manifest.ts
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import * as path from 'path';
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
4
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
5
5
|
import { ManifestPath } from './storage-provider.js';
|
|
6
6
|
/**
|
|
7
7
|
* Recursively scans a directory and returns file information
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ENGINE from 'genesys.js';
|
|
1
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
2
2
|
import { DevStorageProvider } from './storage-provider.js';
|
|
3
3
|
// Ensure process is available globally with minimal implementation
|
|
4
4
|
if (typeof globalThis.process === 'undefined') {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ENGINE from 'genesys.js';
|
|
1
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
2
2
|
export const ManifestPath = 'dist/file-manifest.json';
|
|
3
3
|
export class DevStorageProvider {
|
|
4
4
|
manifestCache = null;
|
|
@@ -41,17 +41,17 @@ export class DevStorageProvider {
|
|
|
41
41
|
resolvedUrl = path.initialPath.replace(ENGINE.PROJECT_PATH_PREFIX, ENGINE.BUILT_PROJECT_FOLDER);
|
|
42
42
|
}
|
|
43
43
|
else if (path.initialPath.startsWith(ENGINE.ENGINE_PATH_PREFIX)) {
|
|
44
|
-
resolvedUrl = path.initialPath.replace(ENGINE.ENGINE_PATH_PREFIX, '/node_modules/genesys.js');
|
|
44
|
+
resolvedUrl = path.initialPath.replace(ENGINE.ENGINE_PATH_PREFIX, '/node_modules/@directivegames/genesys.js');
|
|
45
45
|
}
|
|
46
46
|
else if (path.initialPath.startsWith('/')) {
|
|
47
|
-
resolvedUrl = `/node_modules/genesys.js${path.initialPath}`;
|
|
47
|
+
resolvedUrl = `/node_modules/@directivegames/genesys.js${path.initialPath}`;
|
|
48
48
|
}
|
|
49
49
|
else if (path.initialPath.startsWith('http') || path.initialPath.startsWith('https')) {
|
|
50
50
|
resolvedUrl = path.initialPath;
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
// Paths without prefix are treated as engine paths
|
|
54
|
-
resolvedUrl = `/node_modules/genesys.js/${path.initialPath}`;
|
|
54
|
+
resolvedUrl = `/node_modules/@directivegames/genesys.js/${path.initialPath}`;
|
|
55
55
|
}
|
|
56
56
|
path.resolvePath(resolvedUrl, ENGINE.AssetPathEncodeState.Unknown);
|
|
57
57
|
return path;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
//
|
|
6
6
|
// for another MCP client (e.g. cline) that wants to use this, the command is: `pnpm exec tsc ./scripts/genesys/genesys-mcp.ts`
|
|
7
7
|
import pathlib from 'path';
|
|
8
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
9
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
9
10
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
|
-
import * as ENGINE from 'genesys.js';
|
|
11
11
|
import * as THREE from 'three';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { ActorInfoSchema, TransformSchema } from './common.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { getProjectRoot } from '../common.js';
|
|
4
|
-
const enginePathName = 'node_modules/genesys.js';
|
|
5
|
-
const docPathName = 'node_modules/genesys.js/docs';
|
|
4
|
+
const enginePathName = 'node_modules/@directivegames/genesys.js';
|
|
5
|
+
const docPathName = 'node_modules/@directivegames/genesys.js/docs';
|
|
6
6
|
const enginePath = path.join(getProjectRoot(), enginePathName);
|
|
7
7
|
const docsPath = path.join(getProjectRoot(), docPathName);
|
|
8
8
|
function listDocs() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import { ModuleKind, ModuleResolutionKind, Project, ScriptTarget } from 'ts-morph';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
5
5
|
import { BoundingBoxSchema, fetchBoundingBoxData } from '../calc-bounding-box.js';
|
|
6
6
|
import { ENGINE_PREFIX, JS_CLASSES_DIR_NAME, PROJECT_PREFIX, SCENE_EXTENSION } from '../const.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { isDev } from '../common.js';
|
|
6
6
|
import { mockBrowserEnvironment } from '../mock.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import * as ENGINE from 'genesys.js';
|
|
2
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
3
3
|
import { getProjectRoot } from './common.js';
|
|
4
4
|
import { isSubclass } from './mcp/utils.js';
|
|
5
5
|
import { fixUpClassName, registerGameClasses } from './mcp/utils.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ENGINE from 'genesys.js';
|
|
1
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import { ThreeEulerSchema, ThreeVector3Schema } from './mcp/search-actors.js';
|
|
4
4
|
import { loadWorld, registerGameClassesIfAnyNotRegistered } from './mcp/utils.js';
|
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { getProjectRoot } from './common.js';
|
|
4
4
|
async function main() {
|
|
5
|
-
const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/genesys.js');
|
|
5
|
+
const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/@directivegames/genesys.js');
|
|
6
6
|
if (!fs.existsSync(engineInstallFolder)) {
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import * as ENGINE from 'genesys.js';
|
|
4
|
-
import { AssetPath, AssetPathEncodeState } from 'genesys.js';
|
|
3
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
4
|
+
import { AssetPath, AssetPathEncodeState } from '@directivegames/genesys.js';
|
|
5
5
|
import { getProjectRoot } from './common.js';
|
|
6
6
|
export class StorageProvider {
|
|
7
7
|
async resolvePath(assetPath, expiry) {
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
/**
|
|
10
10
|
* A first person player class.
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
import { DefaultWeapon } from './weapon.js';
|
|
10
10
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
/**
|
|
10
10
|
* A default weapon class.
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
/**
|
|
10
10
|
* A free camera player class.
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
import { CAMERA_SETTINGS, PLAYER_MOVEMENT } from './const.js';
|
|
10
10
|
// ============================================================================
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
/**
|
|
10
10
|
* A third person player class.
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var MeshVehicle_1;
|
|
8
|
-
import * as ENGINE from 'genesys.js';
|
|
8
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
9
9
|
import * as THREE from 'three';
|
|
10
10
|
import { BaseVehicle } from './base-vehicle.js';
|
|
11
11
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
import * as THREE from 'three';
|
|
9
9
|
import { BaseVehicle } from './base-vehicle.js';
|
|
10
10
|
/**
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var PrimitiveVehicle_1;
|
|
8
|
-
import * as ENGINE from 'genesys.js';
|
|
8
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
9
9
|
import * as THREE from 'three';
|
|
10
10
|
import { BaseVehicle } from './base-vehicle.js';
|
|
11
11
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
/**
|
|
9
9
|
* Dismissable UI component that displays control hints when the game starts
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import * as ENGINE from 'genesys.js';
|
|
7
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
8
8
|
/**
|
|
9
9
|
* Sample VR Actor - A simple actor that can be picked up and manipulated in VR
|
|
10
10
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directivegames/genesys.sdk",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "Genesys SDK - A development toolkit for game development",
|
|
5
5
|
"author": "Directive Games",
|
|
6
6
|
"main": "index.js",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"esbuild": "^0.25.11",
|
|
125
125
|
"express": "^5.1.0",
|
|
126
126
|
"fix-path": "^4.0.0",
|
|
127
|
-
"genesys.js": "^3.1.24",
|
|
127
|
+
"@directivegames/genesys.js": "^3.1.24",
|
|
128
128
|
"jsdom": "^27.0.0",
|
|
129
129
|
"minimatch": "^10.0.1",
|
|
130
130
|
"multer": "^2.0.2",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
|
-
import noDefaultClassFields from './node_modules/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
-
import defaultGetterReturnType from './node_modules/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
-
import noOverrideMethods from './node_modules/genesys.js/eslint-rules/no-override-methods.js';
|
|
2
|
+
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
+
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
+
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
+
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export default [
|
package/src/templates/AGENTS.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Assets
|
|
2
2
|
|
|
3
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.
|
|
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
6
|
|
|
7
7
|
**Example:**
|
|
8
8
|
If an asset is located at:
|
|
9
|
-
`node_modules/genesys.js/assets/models/SM_Monkey.glb`
|
|
9
|
+
`node_modules/@directivegames/genesys.js/assets/models/SM_Monkey.glb`
|
|
10
10
|
Then the corresponding URL should be:
|
|
11
11
|
`@engine/assets/models/SM_Monkey.glb`
|
|
12
12
|
|
package/src/templates/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Root/ (Root Directory)
|
|
4
4
|
├── 📁 .cursor/ # Copied from genesys.sdk/src/templates
|
|
5
5
|
├── 📁 .vscode/ # Copied from genesys.sdk/src/templates
|
|
6
|
-
├── 📁 .engine/ # Various engine files copied from node_modules/genesys.js, by scripts/post-install.ts
|
|
6
|
+
├── 📁 .engine/ # Various engine files copied from node_modules/@directivegames/genesys.js, by scripts/post-install.ts
|
|
7
7
|
├── 📁 assets/ # Game Assets Directory
|
|
8
8
|
│ ├── 📄 default.genesys-scene # Copied from the selected template in genesys.sdk/src/templates/src/templates
|
|
9
9
|
│ ├── 📁 models/ # Empty folder created by genesys.sdk
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
|
-
import noDefaultClassFields from './node_modules/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
-
import defaultGetterReturnType from './node_modules/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
-
import noOverrideMethods from './node_modules/genesys.js/eslint-rules/no-override-methods.js';
|
|
2
|
+
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
|
+
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
+
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
|
+
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export default [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs, { readFileSync } from 'fs';
|
|
2
2
|
import path, { resolve } from 'path';
|
|
3
3
|
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
4
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { MeshoptDecoder } from 'three/examples/jsm/libs/meshopt_decoder.module.js';
|
|
7
7
|
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
@@ -267,6 +267,6 @@ export {
|
|
|
267
267
|
};
|
|
268
268
|
|
|
269
269
|
export type { Transform, ManifestEntry, BoundingBoxManifest };
|
|
270
|
-
export { BoundingBoxSchema } from 'genesys.js';
|
|
270
|
+
export { BoundingBoxSchema } from '@directivegames/genesys.js';
|
|
271
271
|
|
|
272
272
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ENGINE from 'genesys.js';
|
|
1
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
2
2
|
|
|
3
3
|
export type FileManifestItem = Omit<ENGINE.FileItem, 'absolutePath'>;
|
|
4
4
|
|
|
@@ -57,14 +57,14 @@ export class DevStorageProvider implements ENGINE.IStorageProvider {
|
|
|
57
57
|
if (path.initialPath.startsWith(ENGINE.PROJECT_PATH_PREFIX)) {
|
|
58
58
|
resolvedUrl = path.initialPath.replace(ENGINE.PROJECT_PATH_PREFIX, ENGINE.BUILT_PROJECT_FOLDER);
|
|
59
59
|
} else if (path.initialPath.startsWith(ENGINE.ENGINE_PATH_PREFIX)) {
|
|
60
|
-
resolvedUrl = path.initialPath.replace(ENGINE.ENGINE_PATH_PREFIX, '/node_modules/genesys.js');
|
|
60
|
+
resolvedUrl = path.initialPath.replace(ENGINE.ENGINE_PATH_PREFIX, '/node_modules/@directivegames/genesys.js');
|
|
61
61
|
} else if (path.initialPath.startsWith('/')) {
|
|
62
|
-
resolvedUrl = `/node_modules/genesys.js${path.initialPath}`;
|
|
62
|
+
resolvedUrl = `/node_modules/@directivegames/genesys.js${path.initialPath}`;
|
|
63
63
|
} else if (path.initialPath.startsWith('http') || path.initialPath.startsWith('https')) {
|
|
64
64
|
resolvedUrl = path.initialPath;
|
|
65
65
|
} else {
|
|
66
66
|
// Paths without prefix are treated as engine paths
|
|
67
|
-
resolvedUrl = `/node_modules/genesys.js/${path.initialPath}`;
|
|
67
|
+
resolvedUrl = `/node_modules/@directivegames/genesys.js/${path.initialPath}`;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
path.resolvePath(resolvedUrl, ENGINE.AssetPathEncodeState.Unknown);
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
// for another MCP client (e.g. cline) that wants to use this, the command is: `pnpm exec tsc ./scripts/genesys/genesys-mcp.ts`
|
|
7
7
|
import pathlib from 'path';
|
|
8
8
|
|
|
9
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
9
10
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
10
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
|
-
import * as ENGINE from 'genesys.js';
|
|
12
12
|
import * as THREE from 'three';
|
|
13
13
|
import { z } from 'zod';
|
|
14
14
|
|
|
@@ -6,8 +6,8 @@ import { getProjectRoot } from '../common.js';
|
|
|
6
6
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
const enginePathName = 'node_modules/genesys.js';
|
|
10
|
-
const docPathName = 'node_modules/genesys.js/docs';
|
|
9
|
+
const enginePathName = 'node_modules/@directivegames/genesys.js';
|
|
10
|
+
const docPathName = 'node_modules/@directivegames/genesys.js/docs';
|
|
11
11
|
const enginePath = path.join(getProjectRoot(), enginePathName);
|
|
12
12
|
const docsPath = path.join(getProjectRoot(), docPathName);
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
4
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
5
5
|
import { ModuleKind, ModuleResolutionKind, Project, ScriptTarget } from 'ts-morph';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
4
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
5
5
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
6
6
|
|
|
7
7
|
import { BoundingBoxSchema, fetchBoundingBoxData } from '../calc-bounding-box.js';
|
|
@@ -5,7 +5,7 @@ import { getProjectRoot } from './common.js';
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
async function main() {
|
|
8
|
-
const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/genesys.js');
|
|
8
|
+
const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/@directivegames/genesys.js');
|
|
9
9
|
if (!fs.existsSync(engineInstallFolder)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
-
import * as ENGINE from 'genesys.js';
|
|
5
|
-
import { AssetPath, AssetPathEncodeState } from 'genesys.js';
|
|
4
|
+
import * as ENGINE from '@directivegames/genesys.js';
|
|
5
|
+
import { AssetPath, AssetPathEncodeState } from '@directivegames/genesys.js';
|
|
6
6
|
|
|
7
7
|
import { getProjectRoot } from './common.js';
|
|
8
8
|
|