@kite3d/engine 0.16.0 → 0.18.0
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/generatorParams.d.ts +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1278 -1176
- package/dist/index.js.map +1 -1
- package/dist/plugins/GeneratorComponent.d.ts +5 -1
- package/dist/projectFormat.js +70 -53
- package/dist/projectFormat.js.map +1 -1
- package/dist/runtime/projectFormat.d.ts +4 -0
- package/dist/runtime.js +7617 -7503
- package/dist/runtime.js.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/generatorParams.ts +182 -0
- package/src/index.ts +1 -0
- package/src/plugins/GeneratorComponent.ts +12 -0
- package/src/runtime/createGame.ts +2 -18
- package/src/runtime/projectFormat.ts +28 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const generatorParamTypes: readonly ["boolean", "number", "integer", "string", "select", "vector", "color", "json"];
|
|
2
|
+
export type GeneratorParamType = typeof generatorParamTypes[number];
|
|
3
|
+
export type GeneratorParamOption = string | number | {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export interface GeneratorParamDefinition {
|
|
8
|
+
type?: GeneratorParamType;
|
|
9
|
+
label?: string;
|
|
10
|
+
help?: string;
|
|
11
|
+
default?: unknown;
|
|
12
|
+
options?: GeneratorParamOption[];
|
|
13
|
+
min?: number;
|
|
14
|
+
max?: number;
|
|
15
|
+
step?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface GeneratorParamSchemaEntry extends Omit<GeneratorParamDefinition, 'type'> {
|
|
18
|
+
type: GeneratorParamType;
|
|
19
|
+
}
|
|
20
|
+
export type GeneratorParamSchema = Record<string, GeneratorParamSchemaEntry>;
|
|
21
|
+
export declare function parseGeneratorParamsSchema(exported: unknown, module: string, warn?: (message: string) => void): GeneratorParamSchema;
|
|
22
|
+
export declare function inferGeneratorParam(value: unknown): GeneratorParamSchemaEntry;
|
|
23
|
+
export declare function validateGeneratorParam(value: unknown, entry: GeneratorParamSchemaEntry): string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './paths.ts';
|
|
|
7
7
|
export * from './sceneSerialization.ts';
|
|
8
8
|
export * from './authoring.ts';
|
|
9
9
|
export * from './authoringValidation.ts';
|
|
10
|
+
export * from './generatorParams.ts';
|
|
10
11
|
export * from './plugins/HtmlUiComponent.ts';
|
|
11
12
|
export * from './plugins/GeneratorComponent.ts';
|
|
12
13
|
export * from './plugins/cannon/CannonPhysicsPlugin.ts';
|