@directivegames/genesys.sdk 3.2.2 → 3.2.4

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 (82) hide show
  1. package/README.md +60 -60
  2. package/dist/src/core/cli.js +22 -22
  3. package/dist/src/templates/scripts/genesys/genesys-mcp.js +25 -25
  4. package/dist/src/templates/scripts/genesys/mcp/editor-functions.js +4 -4
  5. package/dist/src/templates/src/templates/vehicle/src/ui-hints.js +30 -30
  6. package/package.json +176 -176
  7. package/scripts/post-install.ts +143 -143
  8. package/src/asset-pack/.gitattributes +88 -88
  9. package/src/asset-pack/eslint.config.js +45 -45
  10. package/src/asset-pack/gitignore +11 -11
  11. package/src/asset-pack/scripts/postinstall.ts +81 -81
  12. package/src/asset-pack/tsconfig.json +33 -33
  13. package/src/templates/.cursor/mcp.json +20 -20
  14. package/src/templates/.cursorignore +2 -2
  15. package/src/templates/.gitattributes +88 -88
  16. package/src/templates/.vscode/settings.json +6 -6
  17. package/src/templates/AGENTS.md +86 -86
  18. package/src/templates/README.md +24 -24
  19. package/src/templates/eslint.config.js +45 -45
  20. package/src/templates/gitignore +11 -11
  21. package/src/templates/index.html +34 -34
  22. package/src/templates/pnpm-lock.yaml +3676 -3676
  23. package/src/templates/scripts/genesys/build-project.ts +51 -51
  24. package/src/templates/scripts/genesys/calc-bounding-box.ts +272 -272
  25. package/src/templates/scripts/genesys/common.ts +46 -46
  26. package/src/templates/scripts/genesys/const.ts +9 -9
  27. package/src/templates/scripts/genesys/dev/dump-default-scene.ts +11 -11
  28. package/src/templates/scripts/genesys/dev/generate-manifest.ts +146 -146
  29. package/src/templates/scripts/genesys/dev/launcher.ts +46 -46
  30. package/src/templates/scripts/genesys/dev/storage-provider.ts +229 -229
  31. package/src/templates/scripts/genesys/dev/update-template-scenes.ts +84 -84
  32. package/src/templates/scripts/genesys/doc-server.ts +16 -16
  33. package/src/templates/scripts/genesys/genesys-mcp.ts +526 -526
  34. package/src/templates/scripts/genesys/mcp/doc-tools.ts +86 -86
  35. package/src/templates/scripts/genesys/mcp/editor-functions.ts +151 -151
  36. package/src/templates/scripts/genesys/mcp/editor-tools.ts +73 -73
  37. package/src/templates/scripts/genesys/mcp/get-scene-state.ts +35 -35
  38. package/src/templates/scripts/genesys/mcp/run-subprocess.ts +30 -30
  39. package/src/templates/scripts/genesys/mcp/search-actors.ts +858 -858
  40. package/src/templates/scripts/genesys/mcp/search-assets.ts +380 -380
  41. package/src/templates/scripts/genesys/mcp/utils.ts +281 -281
  42. package/src/templates/scripts/genesys/misc.ts +42 -42
  43. package/src/templates/scripts/genesys/mock.ts +6 -6
  44. package/src/templates/scripts/genesys/place-actors.ts +179 -179
  45. package/src/templates/scripts/genesys/post-install.ts +30 -30
  46. package/src/templates/scripts/genesys/prefab.schema.json +84 -84
  47. package/src/templates/scripts/genesys/remove-engine-comments.ts +134 -134
  48. package/src/templates/scripts/genesys/run-mcp-inspector.bat +4 -4
  49. package/src/templates/scripts/genesys/storageProvider.ts +182 -182
  50. package/src/templates/scripts/genesys/validate-prefabs.ts +138 -138
  51. package/src/templates/src/index.ts +22 -22
  52. package/src/templates/src/templates/firstPerson/assets/default.genesys-scene +165 -165
  53. package/src/templates/src/templates/firstPerson/src/game.ts +39 -39
  54. package/src/templates/src/templates/firstPerson/src/player.ts +63 -63
  55. package/src/templates/src/templates/fps/assets/default.genesys-scene +9459 -9459
  56. package/src/templates/src/templates/fps/src/game.ts +39 -39
  57. package/src/templates/src/templates/fps/src/player.ts +69 -69
  58. package/src/templates/src/templates/fps/src/weapon.ts +54 -54
  59. package/src/templates/src/templates/freeCamera/assets/default.genesys-scene +165 -165
  60. package/src/templates/src/templates/freeCamera/src/game.ts +39 -39
  61. package/src/templates/src/templates/freeCamera/src/player.ts +45 -45
  62. package/src/templates/src/templates/sideScroller/assets/default.genesys-scene +121 -121
  63. package/src/templates/src/templates/sideScroller/src/const.ts +45 -45
  64. package/src/templates/src/templates/sideScroller/src/game.ts +122 -122
  65. package/src/templates/src/templates/sideScroller/src/level-generator.ts +361 -361
  66. package/src/templates/src/templates/sideScroller/src/player.ts +125 -125
  67. package/src/templates/src/templates/thirdPerson/assets/default.genesys-scene +165 -165
  68. package/src/templates/src/templates/thirdPerson/src/game.ts +39 -39
  69. package/src/templates/src/templates/thirdPerson/src/player.ts +61 -61
  70. package/src/templates/src/templates/vehicle/assets/default.genesys-scene +225 -225
  71. package/src/templates/src/templates/vehicle/src/base-vehicle.ts +145 -145
  72. package/src/templates/src/templates/vehicle/src/game.ts +43 -43
  73. package/src/templates/src/templates/vehicle/src/mesh-vehicle.ts +191 -191
  74. package/src/templates/src/templates/vehicle/src/player.ts +109 -109
  75. package/src/templates/src/templates/vehicle/src/primitive-vehicle.ts +266 -266
  76. package/src/templates/src/templates/vehicle/src/ui-hints.ts +101 -101
  77. package/src/templates/src/templates/vr-game/assets/default.genesys-scene +246 -246
  78. package/src/templates/src/templates/vr-game/src/auto-imports.ts +1 -1
  79. package/src/templates/src/templates/vr-game/src/game.ts +66 -66
  80. package/src/templates/src/templates/vr-game/src/sample-vr-actor.ts +26 -26
  81. package/src/templates/tsconfig.json +34 -34
  82. package/src/templates/vite.config.ts +52 -52
@@ -1,179 +1,179 @@
1
- import * as ENGINE from 'genesys.js';
2
- import * as THREE from 'three';
3
-
4
- import { ThreeEulerSchema, ThreeVector3Schema } from './mcp/search-actors.js';
5
- import { loadWorld, registerGameClassesIfAnyNotRegistered } from './mcp/utils.js';
6
- import { mockBrowserEnvironment } from './mock.js';
7
-
8
- import '../src/game.js';
9
-
10
-
11
- mockBrowserEnvironment();
12
-
13
- function convertConstructorParams(value: any): any {
14
- // If not an object, return as is
15
- if (!value || typeof value !== 'object') {
16
- return value;
17
- }
18
-
19
- // Check if it's a Vector3
20
- const vector3Result = ThreeVector3Schema.safeParse(value);
21
- if (vector3Result.success) {
22
- return new THREE.Vector3(
23
- vector3Result.data.x,
24
- vector3Result.data.y,
25
- vector3Result.data.z
26
- );
27
- }
28
-
29
- // Check if it's an Euler
30
- const eulerResult = ThreeEulerSchema.safeParse(value);
31
- if (eulerResult.success) {
32
- return new THREE.Euler(
33
- eulerResult.data.x,
34
- eulerResult.data.y,
35
- eulerResult.data.z
36
- );
37
- }
38
-
39
- // Handle arrays
40
- if (Array.isArray(value)) {
41
- return value.map(convertConstructorParams);
42
- }
43
-
44
- // Handle objects
45
- const result: Record<string, any> = {};
46
- for (const [key, val] of Object.entries(value)) {
47
- result[key] = convertConstructorParams(val);
48
- }
49
- return result;
50
- }
51
-
52
-
53
- export async function placePrimitive(args: {
54
- sceneName: string;
55
- primitiveActors: ENGINE.WorldCommands.PrimitiveActorArgs[];
56
- }): Promise<string[]> {
57
-
58
- using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
59
-
60
- const actors = ENGINE.WorldCommands.placePrimitives({
61
- world: worldResource.world,
62
- primitiveActors: args.primitiveActors,
63
- });
64
-
65
- return actors.map(actor => actor.uuid);
66
- }
67
-
68
-
69
- export async function removeActors(args: {
70
- sceneName: string;
71
- actorIds: string[];
72
- }) {
73
- using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
74
-
75
- ENGINE.WorldCommands.removeActorsByUuids({
76
- world: worldResource.world,
77
- actorIds: args.actorIds,
78
- });
79
- }
80
-
81
- export async function addGltf(args: {
82
- sceneName: string;
83
- gltfs: ENGINE.WorldCommands.GltfArgs[];
84
- }) {
85
- using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
86
-
87
- const actors = await ENGINE.WorldCommands.placeGltfs({
88
- world: worldResource.world,
89
- gltfs: args.gltfs
90
- });
91
-
92
- return actors.map(actor => actor.uuid);
93
- }
94
-
95
- export async function placePrefab(args: {
96
- sceneName: string;
97
- prefabs: ENGINE.WorldCommands.PrefabArgs[];
98
- }) {
99
- using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
100
-
101
- const actors = await ENGINE.WorldCommands.placePrefabs({
102
- world: worldResource.world,
103
- prefabs: args.prefabs
104
- });
105
-
106
- return actors.map(actor => actor.uuid);
107
- }
108
-
109
- export async function placeJsClassActor(args: {
110
- sceneName: string;
111
- jsClasses: {
112
- className: string;
113
- constructorParams?: Record<string, any>[]
114
- actorInfo?: ENGINE.WorldCommands.ActorMiscInfo;
115
- }[]
116
- }): Promise<string[]> {
117
- await registerGameClassesIfAnyNotRegistered(
118
- args.jsClasses.map(jsClass => jsClass.className)
119
- );
120
- using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
121
-
122
- const actors: ENGINE.Actor[] = [];
123
-
124
- for (const { className, constructorParams, actorInfo } of args.jsClasses) {
125
- try {
126
- // Convert constructor parameters if they exist
127
- const convertedParams = constructorParams ? convertConstructorParams(constructorParams) : [];
128
-
129
- const actor = ENGINE.ClassRegistry.constructObject(className, false, ...convertedParams);
130
- if (actorInfo) {
131
- Object.assign(actor.editorData, actorInfo);
132
- }
133
- actors.push(actor);
134
- } catch (e) {
135
- console.error(`Error constructing object ${className}`, e);
136
- }
137
- }
138
-
139
- worldResource.world.addActors(...actors);
140
- return actors.map(actor => actor.uuid);
141
- }
142
-
143
-
144
- export async function updateActors(args: {
145
- sceneName: string;
146
- actorsToUpdate: {
147
- uuid: string;
148
- transform?: ENGINE.WorldCommands.Transform;
149
- actorInfo?: ENGINE.WorldCommands.ActorMiscInfo;
150
- }[];
151
- }): Promise<number> {
152
- const readonly = args.actorsToUpdate.length == 0;
153
- using worldResource = await loadWorld(args.sceneName, { readonly, skipLoadingGLTF: true });
154
- let count = 0;
155
-
156
- for (const { uuid, transform, actorInfo } of args.actorsToUpdate) {
157
- const actor = worldResource.world.getActorByUuid(uuid);
158
- if (!actor) {
159
- continue;
160
- }
161
- if (transform) {
162
- if (transform.position) {
163
- actor.setWorldPosition(transform.position);
164
- }
165
- if (transform.rotation) {
166
- actor.setWorldRotation(transform.rotation);
167
- }
168
- if (transform.scale) {
169
- actor.setWorldScale(transform.scale);
170
- }
171
- if (actorInfo) {
172
- Object.assign(actor.editorData, actorInfo);
173
- }
174
- }
175
- count += 1;
176
- }
177
- return count;
178
- }
179
-
1
+ import * as ENGINE from 'genesys.js';
2
+ import * as THREE from 'three';
3
+
4
+ import { ThreeEulerSchema, ThreeVector3Schema } from './mcp/search-actors.js';
5
+ import { loadWorld, registerGameClassesIfAnyNotRegistered } from './mcp/utils.js';
6
+ import { mockBrowserEnvironment } from './mock.js';
7
+
8
+ import '../src/game.js';
9
+
10
+
11
+ mockBrowserEnvironment();
12
+
13
+ function convertConstructorParams(value: any): any {
14
+ // If not an object, return as is
15
+ if (!value || typeof value !== 'object') {
16
+ return value;
17
+ }
18
+
19
+ // Check if it's a Vector3
20
+ const vector3Result = ThreeVector3Schema.safeParse(value);
21
+ if (vector3Result.success) {
22
+ return new THREE.Vector3(
23
+ vector3Result.data.x,
24
+ vector3Result.data.y,
25
+ vector3Result.data.z
26
+ );
27
+ }
28
+
29
+ // Check if it's an Euler
30
+ const eulerResult = ThreeEulerSchema.safeParse(value);
31
+ if (eulerResult.success) {
32
+ return new THREE.Euler(
33
+ eulerResult.data.x,
34
+ eulerResult.data.y,
35
+ eulerResult.data.z
36
+ );
37
+ }
38
+
39
+ // Handle arrays
40
+ if (Array.isArray(value)) {
41
+ return value.map(convertConstructorParams);
42
+ }
43
+
44
+ // Handle objects
45
+ const result: Record<string, any> = {};
46
+ for (const [key, val] of Object.entries(value)) {
47
+ result[key] = convertConstructorParams(val);
48
+ }
49
+ return result;
50
+ }
51
+
52
+
53
+ export async function placePrimitive(args: {
54
+ sceneName: string;
55
+ primitiveActors: ENGINE.WorldCommands.PrimitiveActorArgs[];
56
+ }): Promise<string[]> {
57
+
58
+ using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
59
+
60
+ const actors = ENGINE.WorldCommands.placePrimitives({
61
+ world: worldResource.world,
62
+ primitiveActors: args.primitiveActors,
63
+ });
64
+
65
+ return actors.map(actor => actor.uuid);
66
+ }
67
+
68
+
69
+ export async function removeActors(args: {
70
+ sceneName: string;
71
+ actorIds: string[];
72
+ }) {
73
+ using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
74
+
75
+ ENGINE.WorldCommands.removeActorsByUuids({
76
+ world: worldResource.world,
77
+ actorIds: args.actorIds,
78
+ });
79
+ }
80
+
81
+ export async function addGltf(args: {
82
+ sceneName: string;
83
+ gltfs: ENGINE.WorldCommands.GltfArgs[];
84
+ }) {
85
+ using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
86
+
87
+ const actors = await ENGINE.WorldCommands.placeGltfs({
88
+ world: worldResource.world,
89
+ gltfs: args.gltfs
90
+ });
91
+
92
+ return actors.map(actor => actor.uuid);
93
+ }
94
+
95
+ export async function placePrefab(args: {
96
+ sceneName: string;
97
+ prefabs: ENGINE.WorldCommands.PrefabArgs[];
98
+ }) {
99
+ using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
100
+
101
+ const actors = await ENGINE.WorldCommands.placePrefabs({
102
+ world: worldResource.world,
103
+ prefabs: args.prefabs
104
+ });
105
+
106
+ return actors.map(actor => actor.uuid);
107
+ }
108
+
109
+ export async function placeJsClassActor(args: {
110
+ sceneName: string;
111
+ jsClasses: {
112
+ className: string;
113
+ constructorParams?: Record<string, any>[]
114
+ actorInfo?: ENGINE.WorldCommands.ActorMiscInfo;
115
+ }[]
116
+ }): Promise<string[]> {
117
+ await registerGameClassesIfAnyNotRegistered(
118
+ args.jsClasses.map(jsClass => jsClass.className)
119
+ );
120
+ using worldResource = await loadWorld(args.sceneName, { skipLoadingGLTF: true });
121
+
122
+ const actors: ENGINE.Actor[] = [];
123
+
124
+ for (const { className, constructorParams, actorInfo } of args.jsClasses) {
125
+ try {
126
+ // Convert constructor parameters if they exist
127
+ const convertedParams = constructorParams ? convertConstructorParams(constructorParams) : [];
128
+
129
+ const actor = ENGINE.ClassRegistry.constructObject(className, false, ...convertedParams);
130
+ if (actorInfo) {
131
+ Object.assign(actor.editorData, actorInfo);
132
+ }
133
+ actors.push(actor);
134
+ } catch (e) {
135
+ console.error(`Error constructing object ${className}`, e);
136
+ }
137
+ }
138
+
139
+ worldResource.world.addActors(...actors);
140
+ return actors.map(actor => actor.uuid);
141
+ }
142
+
143
+
144
+ export async function updateActors(args: {
145
+ sceneName: string;
146
+ actorsToUpdate: {
147
+ uuid: string;
148
+ transform?: ENGINE.WorldCommands.Transform;
149
+ actorInfo?: ENGINE.WorldCommands.ActorMiscInfo;
150
+ }[];
151
+ }): Promise<number> {
152
+ const readonly = args.actorsToUpdate.length == 0;
153
+ using worldResource = await loadWorld(args.sceneName, { readonly, skipLoadingGLTF: true });
154
+ let count = 0;
155
+
156
+ for (const { uuid, transform, actorInfo } of args.actorsToUpdate) {
157
+ const actor = worldResource.world.getActorByUuid(uuid);
158
+ if (!actor) {
159
+ continue;
160
+ }
161
+ if (transform) {
162
+ if (transform.position) {
163
+ actor.setWorldPosition(transform.position);
164
+ }
165
+ if (transform.rotation) {
166
+ actor.setWorldRotation(transform.rotation);
167
+ }
168
+ if (transform.scale) {
169
+ actor.setWorldScale(transform.scale);
170
+ }
171
+ if (actorInfo) {
172
+ Object.assign(actor.editorData, actorInfo);
173
+ }
174
+ }
175
+ count += 1;
176
+ }
177
+ return count;
178
+ }
179
+
@@ -1,30 +1,30 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- import { getProjectRoot } from './common.js';
5
-
6
-
7
- async function main() {
8
- const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/genesys.js');
9
- if (!fs.existsSync(engineInstallFolder)) {
10
- return;
11
- }
12
- const copiedEngineFolder = path.join(getProjectRoot(), '.engine');
13
- if (fs.existsSync(copiedEngineFolder)) {
14
- fs.rmdirSync(copiedEngineFolder, { recursive: true });
15
- }
16
- fs.mkdirSync(copiedEngineFolder, { recursive: true });
17
-
18
- const foldersToCopy: string[] = [
19
- 'games/examples',
20
- 'src',
21
- 'docs',
22
- ];
23
- for (const folder of foldersToCopy) {
24
- const engineFolderPath = path.join(engineInstallFolder, folder);
25
- const localFolderPath = path.join(copiedEngineFolder, folder);
26
- fs.cpSync(engineFolderPath, localFolderPath, { recursive: true });
27
- }
28
- }
29
-
30
- main();
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+
4
+ import { getProjectRoot } from './common.js';
5
+
6
+
7
+ async function main() {
8
+ const engineInstallFolder = path.join(getProjectRoot(), 'node_modules/genesys.js');
9
+ if (!fs.existsSync(engineInstallFolder)) {
10
+ return;
11
+ }
12
+ const copiedEngineFolder = path.join(getProjectRoot(), '.engine');
13
+ if (fs.existsSync(copiedEngineFolder)) {
14
+ fs.rmdirSync(copiedEngineFolder, { recursive: true });
15
+ }
16
+ fs.mkdirSync(copiedEngineFolder, { recursive: true });
17
+
18
+ const foldersToCopy: string[] = [
19
+ 'games/examples',
20
+ 'src',
21
+ 'docs',
22
+ ];
23
+ for (const folder of foldersToCopy) {
24
+ const engineFolderPath = path.join(engineInstallFolder, folder);
25
+ const localFolderPath = path.join(copiedEngineFolder, folder);
26
+ fs.cpSync(engineFolderPath, localFolderPath, { recursive: true });
27
+ }
28
+ }
29
+
30
+ main();
@@ -1,85 +1,85 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema",
3
- "$id": "genesys.js.prefab.schema.json",
4
- "type": "object",
5
- "properties": {
6
- "$version": {
7
- "type": "integer"
8
- },
9
- "class": {
10
- "$ref": "class_string"
11
- },
12
- "ctor": {
13
- "$ref": "actor_ctor"
14
- },
15
- "properties": {
16
- "$ref": "actor_properties"
17
- }
18
- },
19
- "definitions": {
20
- "actor_ctor": {
21
- "type": "object",
22
- "properties": {
23
- "rootComponent": {
24
- "$ref": "component"
25
- }
26
- }
27
- },
28
- "actor_properties": {
29
- "type": "object"
30
- },
31
- "component_ctor": {
32
- "type": "object"
33
- },
34
- "component_properties": {
35
- "type": "object",
36
- "properties": {
37
- "position": {
38
- "$ref": "type_vector3"
39
- },
40
- "rotation": {
41
- "$ref": "type_euler"
42
- },
43
- "scale": {
44
- "$ref": "type_euler"
45
- }
46
- }
47
- },
48
- "type_vector3": {
49
- "type": "array",
50
- "minItems": 4,
51
- "maxItems": 4,
52
- "examples": [[0, 0, 0, "v"]]
53
- },
54
- "type_euler": {
55
- "type": "array",
56
- "minItems": 4,
57
- "maxItems": 4,
58
- "examples": [[0, 0, 0, "e"]]
59
- },
60
- "component": {
61
- "type": "object",
62
- "properties": {
63
- "class": {
64
- "$ref": "class_string"
65
- },
66
- "ctor": {
67
- "$ref": "component_ctor"
68
- },
69
- "properties": {
70
- "$ref": "component_properties"
71
- },
72
- "children": {
73
- "type": "array",
74
- "items": {
75
- "$ref": "component"
76
- }
77
- }
78
- }
79
- },
80
- "class_string": {
81
- "type": "string",
82
- "pattern": "(GAME|ENGINE)\\..*"
83
- }
84
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft-07/schema",
3
+ "$id": "genesys.js.prefab.schema.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "$version": {
7
+ "type": "integer"
8
+ },
9
+ "class": {
10
+ "$ref": "class_string"
11
+ },
12
+ "ctor": {
13
+ "$ref": "actor_ctor"
14
+ },
15
+ "properties": {
16
+ "$ref": "actor_properties"
17
+ }
18
+ },
19
+ "definitions": {
20
+ "actor_ctor": {
21
+ "type": "object",
22
+ "properties": {
23
+ "rootComponent": {
24
+ "$ref": "component"
25
+ }
26
+ }
27
+ },
28
+ "actor_properties": {
29
+ "type": "object"
30
+ },
31
+ "component_ctor": {
32
+ "type": "object"
33
+ },
34
+ "component_properties": {
35
+ "type": "object",
36
+ "properties": {
37
+ "position": {
38
+ "$ref": "type_vector3"
39
+ },
40
+ "rotation": {
41
+ "$ref": "type_euler"
42
+ },
43
+ "scale": {
44
+ "$ref": "type_euler"
45
+ }
46
+ }
47
+ },
48
+ "type_vector3": {
49
+ "type": "array",
50
+ "minItems": 4,
51
+ "maxItems": 4,
52
+ "examples": [[0, 0, 0, "v"]]
53
+ },
54
+ "type_euler": {
55
+ "type": "array",
56
+ "minItems": 4,
57
+ "maxItems": 4,
58
+ "examples": [[0, 0, 0, "e"]]
59
+ },
60
+ "component": {
61
+ "type": "object",
62
+ "properties": {
63
+ "class": {
64
+ "$ref": "class_string"
65
+ },
66
+ "ctor": {
67
+ "$ref": "component_ctor"
68
+ },
69
+ "properties": {
70
+ "$ref": "component_properties"
71
+ },
72
+ "children": {
73
+ "type": "array",
74
+ "items": {
75
+ "$ref": "component"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "class_string": {
81
+ "type": "string",
82
+ "pattern": "(GAME|ENGINE)\\..*"
83
+ }
84
+ }
85
85
  }