@nodetool-ai/protocol 0.8.2 → 0.8.4-a13.1
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 +1 -1
- package/dist/.nodetool-build-stamp +1 -1
- package/dist/api-schemas/api-error-code.d.ts +9 -1
- package/dist/api-schemas/api-error-code.d.ts.map +1 -1
- package/dist/api-schemas/api-error-code.js +6 -0
- package/dist/api-schemas/api-error-code.js.map +1 -1
- package/dist/api-schemas/app-runs.d.ts +28 -0
- package/dist/api-schemas/app-runs.d.ts.map +1 -1
- package/dist/api-schemas/applications.d.ts +46 -0
- package/dist/api-schemas/applications.d.ts.map +1 -1
- package/dist/api-schemas/applications.js +4 -1
- package/dist/api-schemas/applications.js.map +1 -1
- package/dist/api-schemas/assets.d.ts +7 -0
- package/dist/api-schemas/assets.d.ts.map +1 -1
- package/dist/api-schemas/assets.js +5 -0
- package/dist/api-schemas/assets.js.map +1 -1
- package/dist/api-schemas/jobs.d.ts +7 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -1
- package/dist/api-schemas/messages.d.ts +9 -0
- package/dist/api-schemas/messages.d.ts.map +1 -1
- package/dist/api-schemas/messages.js +10 -0
- package/dist/api-schemas/messages.js.map +1 -1
- package/dist/api-schemas/nodes.d.ts +2 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -1
- package/dist/api-schemas/nodes.js +2 -1
- package/dist/api-schemas/nodes.js.map +1 -1
- package/dist/api-schemas/projects.d.ts +102 -6
- package/dist/api-schemas/projects.d.ts.map +1 -1
- package/dist/api-schemas/projects.js +24 -0
- package/dist/api-schemas/projects.js.map +1 -1
- package/dist/api-schemas/recipes.d.ts +8 -0
- package/dist/api-schemas/recipes.d.ts.map +1 -1
- package/dist/api-schemas/sdk-execution-v1.d.ts +81 -0
- package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -1
- package/dist/api-schemas/sdk-v1-http-operations.d.ts +2 -0
- package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -1
- package/dist/api-schemas/sketch.d.ts +40 -0
- package/dist/api-schemas/sketch.d.ts.map +1 -1
- package/dist/api-schemas/sketch.js +14 -4
- package/dist/api-schemas/sketch.js.map +1 -1
- package/dist/api-schemas/storyboards.d.ts +170 -0
- package/dist/api-schemas/storyboards.d.ts.map +1 -1
- package/dist/api-schemas/storyboards.js +42 -2
- package/dist/api-schemas/storyboards.js.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.d.ts +56 -0
- package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -1
- package/dist/api-schemas/timeline-tool-contracts.js +17 -15
- package/dist/api-schemas/timeline-tool-contracts.js.map +1 -1
- package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -1
- package/dist/api-schemas/timeline-tool-params.js +2 -1
- package/dist/api-schemas/timeline-tool-params.js.map +1 -1
- package/dist/api-schemas/timeline.d.ts +493 -0
- package/dist/api-schemas/timeline.d.ts.map +1 -1
- package/dist/api-schemas/timeline.js +49 -1
- package/dist/api-schemas/timeline.js.map +1 -1
- package/dist/api-schemas/workflows.d.ts +180 -0
- package/dist/api-schemas/workflows.d.ts.map +1 -1
- package/dist/api-schemas/workflows.js +41 -4
- package/dist/api-schemas/workflows.js.map +1 -1
- package/dist/api-types.d.ts +20 -2
- package/dist/api-types.d.ts.map +1 -1
- package/dist/api-types.js +17 -1
- package/dist/api-types.js.map +1 -1
- package/dist/bridge-frames.d.ts +23 -3
- package/dist/bridge-frames.d.ts.map +1 -1
- package/dist/bridge-frames.js +24 -3
- package/dist/bridge-frames.js.map +1 -1
- package/dist/bridge-frames.schema.json +31 -0
- package/dist/bridge-protocol.d.ts +8 -7
- package/dist/bridge-protocol.d.ts.map +1 -1
- package/dist/bridge-protocol.js +8 -7
- package/dist/bridge-protocol.js.map +1 -1
- package/dist/cloud-profile.d.ts +13 -0
- package/dist/cloud-profile.d.ts.map +1 -1
- package/dist/cloud-profile.js +37 -0
- package/dist/cloud-profile.js.map +1 -1
- package/dist/creative.d.ts +4 -0
- package/dist/creative.d.ts.map +1 -1
- package/dist/creative.js.map +1 -1
- package/dist/custom-providers.js +1 -1
- package/dist/custom-providers.js.map +1 -1
- package/dist/example-needs.d.ts +24 -0
- package/dist/example-needs.d.ts.map +1 -0
- package/dist/example-needs.js +64 -0
- package/dist/example-needs.js.map +1 -0
- package/dist/game-asset-catalog.d.ts +129 -0
- package/dist/game-asset-catalog.d.ts.map +1 -0
- package/dist/game-asset-catalog.js +208 -0
- package/dist/game-asset-catalog.js.map +1 -0
- package/dist/game-design.d.ts +18 -0
- package/dist/game-design.d.ts.map +1 -1
- package/dist/game-design.js +148 -0
- package/dist/game-design.js.map +1 -1
- package/dist/game-entity-metadata.d.ts +7 -0
- package/dist/game-entity-metadata.d.ts.map +1 -0
- package/dist/game-entity-metadata.js +42 -0
- package/dist/game-entity-metadata.js.map +1 -0
- package/dist/game-input.d.ts +186 -0
- package/dist/game-input.d.ts.map +1 -0
- package/dist/game-input.js +166 -0
- package/dist/game-input.js.map +1 -0
- package/dist/game-particles.d.ts +388 -0
- package/dist/game-particles.d.ts.map +1 -0
- package/dist/game-particles.js +173 -0
- package/dist/game-particles.js.map +1 -0
- package/dist/game-saves.d.ts +73 -0
- package/dist/game-saves.d.ts.map +1 -0
- package/dist/game-saves.js +87 -0
- package/dist/game-saves.js.map +1 -0
- package/dist/game-screens.d.ts +2031 -0
- package/dist/game-screens.d.ts.map +1 -0
- package/dist/game-screens.js +89 -0
- package/dist/game-screens.js.map +1 -0
- package/dist/game-script-events.d.ts +32 -0
- package/dist/game-script-events.d.ts.map +1 -0
- package/dist/game-script-events.js +32 -0
- package/dist/game-script-events.js.map +1 -0
- package/dist/game-script-params.d.ts +134 -0
- package/dist/game-script-params.d.ts.map +1 -0
- package/dist/game-script-params.js +109 -0
- package/dist/game-script-params.js.map +1 -0
- package/dist/game-slot-prompt.d.ts +6 -1
- package/dist/game-slot-prompt.d.ts.map +1 -1
- package/dist/game-slot-prompt.js +1 -1
- package/dist/game-slot-prompt.js.map +1 -1
- package/dist/game-ui.d.ts +681 -0
- package/dist/game-ui.d.ts.map +1 -0
- package/dist/game-ui.js +215 -0
- package/dist/game-ui.js.map +1 -0
- package/dist/game2d/components/audio.d.ts +144 -0
- package/dist/game2d/components/audio.d.ts.map +1 -0
- package/dist/game2d/components/audio.js +137 -0
- package/dist/game2d/components/audio.js.map +1 -0
- package/dist/game2d/components/audioSource.d.ts +65 -0
- package/dist/game2d/components/audioSource.d.ts.map +1 -1
- package/dist/game2d/components/audioSource.js +44 -1
- package/dist/game2d/components/audioSource.js.map +1 -1
- package/dist/game2d/components/behaviors.d.ts +53 -0
- package/dist/game2d/components/behaviors.d.ts.map +1 -1
- package/dist/game2d/components/behaviors.js +4 -1
- package/dist/game2d/components/behaviors.js.map +1 -1
- package/dist/game2d/components/entity-components.d.ts +149 -0
- package/dist/game2d/components/entity-components.d.ts.map +1 -1
- package/dist/game2d/components/entity-components.js +3 -1
- package/dist/game2d/components/entity-components.js.map +1 -1
- package/dist/game2d/components/music.d.ts +4 -0
- package/dist/game2d/components/music.d.ts.map +1 -1
- package/dist/game2d/components/music.js +12 -1
- package/dist/game2d/components/music.js.map +1 -1
- package/dist/game2d/index.d.ts +2838 -76
- package/dist/game2d/index.d.ts.map +1 -1
- package/dist/game2d/index.js +44 -9
- package/dist/game2d/index.js.map +1 -1
- package/dist/game3d/components/animation-graph.d.ts +336 -0
- package/dist/game3d/components/animation-graph.d.ts.map +1 -0
- package/dist/game3d/components/animation-graph.js +66 -0
- package/dist/game3d/components/animation-graph.js.map +1 -0
- package/dist/game3d/components/animator.d.ts +1 -0
- package/dist/game3d/components/animator.d.ts.map +1 -1
- package/dist/game3d/components/animator.js +2 -1
- package/dist/game3d/components/animator.js.map +1 -1
- package/dist/game3d/components/assets.d.ts +58 -0
- package/dist/game3d/components/assets.d.ts.map +1 -1
- package/dist/game3d/components/assets.js +8 -1
- package/dist/game3d/components/assets.js.map +1 -1
- package/dist/game3d/components/behaviors.d.ts +106 -0
- package/dist/game3d/components/behaviors.d.ts.map +1 -1
- package/dist/game3d/components/collider.d.ts +70 -0
- package/dist/game3d/components/collider.d.ts.map +1 -1
- package/dist/game3d/components/collider.js +10 -2
- package/dist/game3d/components/collider.js.map +1 -1
- package/dist/game3d/components/collision-matrix.d.ts +6 -0
- package/dist/game3d/components/collision-matrix.d.ts.map +1 -0
- package/dist/game3d/components/collision-matrix.js +7 -0
- package/dist/game3d/components/collision-matrix.js.map +1 -0
- package/dist/game3d/components/environment.d.ts +91 -0
- package/dist/game3d/components/environment.d.ts.map +1 -1
- package/dist/game3d/components/environment.js +35 -2
- package/dist/game3d/components/environment.js.map +1 -1
- package/dist/game3d/components/force-command.d.ts +30 -0
- package/dist/game3d/components/force-command.d.ts.map +1 -0
- package/dist/game3d/components/force-command.js +10 -0
- package/dist/game3d/components/force-command.js.map +1 -0
- package/dist/game3d/components/light.d.ts +8 -0
- package/dist/game3d/components/light.d.ts.map +1 -1
- package/dist/game3d/components/light.js +8 -3
- package/dist/game3d/components/light.js.map +1 -1
- package/dist/game3d/components/material.d.ts +66 -0
- package/dist/game3d/components/material.d.ts.map +1 -1
- package/dist/game3d/components/material.js +13 -2
- package/dist/game3d/components/material.js.map +1 -1
- package/dist/game3d/components/model.d.ts +54 -0
- package/dist/game3d/components/model.d.ts.map +1 -1
- package/dist/game3d/components/model.js +1 -0
- package/dist/game3d/components/model.js.map +1 -1
- package/dist/game3d/components/performance.d.ts +30 -0
- package/dist/game3d/components/performance.d.ts.map +1 -0
- package/dist/game3d/components/performance.js +27 -0
- package/dist/game3d/components/performance.js.map +1 -0
- package/dist/game3d/components/physics-material.d.ts +50 -0
- package/dist/game3d/components/physics-material.d.ts.map +1 -0
- package/dist/game3d/components/physics-material.js +20 -0
- package/dist/game3d/components/physics-material.js.map +1 -0
- package/dist/game3d/components/primitive.d.ts +54 -0
- package/dist/game3d/components/primitive.d.ts.map +1 -1
- package/dist/game3d/components/primitive.js +2 -1
- package/dist/game3d/components/primitive.js.map +1 -1
- package/dist/game3d/components/shadows.d.ts +25 -0
- package/dist/game3d/components/shadows.d.ts.map +1 -0
- package/dist/game3d/components/shadows.js +21 -0
- package/dist/game3d/components/shadows.js.map +1 -0
- package/dist/game3d/index.d.ts +10308 -1187
- package/dist/game3d/index.d.ts.map +1 -1
- package/dist/game3d/index.js +73 -21
- package/dist/game3d/index.js.map +1 -1
- package/dist/graph-links.d.ts +37 -0
- package/dist/graph-links.d.ts.map +1 -0
- package/dist/graph-links.js +73 -0
- package/dist/graph-links.js.map +1 -0
- package/dist/graph.d.ts +19 -0
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/messages.d.ts +302 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +7 -1
- package/dist/messages.js.map +1 -1
- package/dist/missing-pack.d.ts +45 -0
- package/dist/missing-pack.d.ts.map +1 -0
- package/dist/missing-pack.js +53 -0
- package/dist/missing-pack.js.map +1 -0
- package/dist/missing-runtime-package.d.ts +63 -1
- package/dist/missing-runtime-package.d.ts.map +1 -1
- package/dist/missing-runtime-package.js +167 -1
- package/dist/missing-runtime-package.js.map +1 -1
- package/dist/native-game-templates.d.ts +21 -0
- package/dist/native-game-templates.d.ts.map +1 -0
- package/dist/native-game-templates.js +32 -0
- package/dist/native-game-templates.js.map +1 -0
- package/dist/nodetool-models.js +2 -2
- package/dist/nodetool-models.js.map +1 -1
- package/dist/one-take.d.ts +134 -0
- package/dist/one-take.d.ts.map +1 -0
- package/dist/one-take.js +207 -0
- package/dist/one-take.js.map +1 -0
- package/dist/processing-messages.schema.json +357 -0
- package/dist/python-packs.d.ts +27 -4
- package/dist/python-packs.d.ts.map +1 -1
- package/dist/python-packs.js +46 -17
- package/dist/python-packs.js.map +1 -1
- package/dist/resource-id.d.ts +10 -0
- package/dist/resource-id.d.ts.map +1 -1
- package/dist/resource-id.js +21 -0
- package/dist/resource-id.js.map +1 -1
- package/dist/run-trace.d.ts +2 -0
- package/dist/run-trace.d.ts.map +1 -1
- package/dist/run-trace.js +29 -3
- package/dist/run-trace.js.map +1 -1
- package/dist/runtime-npm-packages.d.ts +101 -0
- package/dist/runtime-npm-packages.d.ts.map +1 -0
- package/dist/runtime-npm-packages.js +124 -0
- package/dist/runtime-npm-packages.js.map +1 -0
- package/dist/screenplay-authoring.js +1 -1
- package/dist/screenplay-authoring.js.map +1 -1
- package/dist/token-providers.d.ts.map +1 -1
- package/dist/token-providers.js +3 -1
- package/dist/token-providers.js.map +1 -1
- package/dist/workflow-document-revision.d.ts +1 -1
- package/dist/workflow-document-revision.d.ts.map +1 -1
- package/dist/workflow-document-revision.js +14 -1
- package/dist/workflow-document-revision.js.map +1 -1
- package/dist/workflow-plan.d.ts +15 -1
- package/dist/workflow-plan.d.ts.map +1 -1
- package/dist/workflow-plan.js +88 -43
- package/dist/workflow-plan.js.map +1 -1
- package/dist/ws-commands.d.ts +9 -0
- package/dist/ws-commands.d.ts.map +1 -1
- package/dist/ws-commands.js +23 -2
- package/dist/ws-commands.js.map +1 -1
- package/package.json +14 -1
- package/schema/sdk-v1.discovery.schema.json +4 -2
- package/schema/sdk-v1.execution.schema.json +734 -0
- package/schema/sdk-v1.manifest.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** World-space loads accumulated on the script owner for one physics tick. */
|
|
3
|
+
export declare const gameForceScriptCommand3D: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"addForce">;
|
|
5
|
+
force: z.ZodObject<{
|
|
6
|
+
x: z.ZodNumber;
|
|
7
|
+
y: z.ZodNumber;
|
|
8
|
+
z: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11
|
+
kind: z.ZodLiteral<"addTorque">;
|
|
12
|
+
torque: z.ZodObject<{
|
|
13
|
+
x: z.ZodNumber;
|
|
14
|
+
y: z.ZodNumber;
|
|
15
|
+
z: z.ZodNumber;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"addForceAtPoint">;
|
|
19
|
+
force: z.ZodObject<{
|
|
20
|
+
x: z.ZodNumber;
|
|
21
|
+
y: z.ZodNumber;
|
|
22
|
+
z: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
point: z.ZodObject<{
|
|
25
|
+
x: z.ZodNumber;
|
|
26
|
+
y: z.ZodNumber;
|
|
27
|
+
z: z.ZodNumber;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
}, z.core.$strict>], "kind">;
|
|
30
|
+
//# sourceMappingURL=force-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"force-command.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/force-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;4BAInC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const coordinate = z.number().finite().min(-1e6).max(1e6);
|
|
3
|
+
const vector = z.strictObject({ x: coordinate, y: coordinate, z: coordinate });
|
|
4
|
+
/** World-space loads accumulated on the script owner for one physics tick. */
|
|
5
|
+
export const gameForceScriptCommand3D = z.discriminatedUnion("kind", [
|
|
6
|
+
z.strictObject({ kind: z.literal("addForce"), force: vector }),
|
|
7
|
+
z.strictObject({ kind: z.literal("addTorque"), torque: vector }),
|
|
8
|
+
z.strictObject({ kind: z.literal("addForceAtPoint"), force: vector, point: vector })
|
|
9
|
+
]);
|
|
10
|
+
//# sourceMappingURL=force-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"force-command.js","sourceRoot":"","sources":["../../../src/game3d/components/force-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1D,MAAM,MAAM,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AAE/E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACnE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC9D,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAChE,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;CACrF,CAAC,CAAC"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const gameLight3D: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
shadowBias: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
shadowNormalBias: z.ZodOptional<z.ZodNumber>;
|
|
3
5
|
kind: z.ZodLiteral<"directional">;
|
|
4
6
|
color: z.ZodString;
|
|
5
7
|
intensity: z.ZodNumber;
|
|
6
8
|
castShadow: z.ZodDefault<z.ZodBoolean>;
|
|
7
9
|
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
shadowBias: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
shadowNormalBias: z.ZodOptional<z.ZodNumber>;
|
|
8
12
|
kind: z.ZodLiteral<"point">;
|
|
9
13
|
color: z.ZodString;
|
|
10
14
|
intensity: z.ZodNumber;
|
|
11
15
|
range: z.ZodNumber;
|
|
12
16
|
decay: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
castShadow: z.ZodOptional<z.ZodBoolean>;
|
|
13
18
|
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
shadowBias: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
shadowNormalBias: z.ZodOptional<z.ZodNumber>;
|
|
14
21
|
kind: z.ZodLiteral<"spot">;
|
|
15
22
|
color: z.ZodString;
|
|
16
23
|
intensity: z.ZodNumber;
|
|
@@ -18,6 +25,7 @@ export declare const gameLight3D: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
18
25
|
angle: z.ZodNumber;
|
|
19
26
|
penumbra: z.ZodDefault<z.ZodNumber>;
|
|
20
27
|
decay: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
castShadow: z.ZodOptional<z.ZodBoolean>;
|
|
21
29
|
}, z.core.$strict>], "kind">;
|
|
22
30
|
export type GameLight3D = z.infer<typeof gameLight3D>;
|
|
23
31
|
//# sourceMappingURL=light.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAOtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { finite, positive, color } from "./common.js";
|
|
3
|
+
import { gameLightShadowFields3D } from "./shadows.js";
|
|
4
|
+
const localCastShadow = z.boolean().optional()
|
|
5
|
+
.describe("Render shadows from this light. At most 4 point and spot lights cast shadows per scene.");
|
|
3
6
|
export const gameLight3D = z.discriminatedUnion("kind", [
|
|
4
|
-
z.strictObject({ kind: z.literal("directional"), color, intensity: finite.min(0).max(100), castShadow: z.boolean().default(false) }),
|
|
5
|
-
z.strictObject({ kind: z.literal("point"), color, intensity: finite.min(0).max(100), range: positive, decay: finite.min(0).max(4).default(2)
|
|
7
|
+
z.strictObject({ kind: z.literal("directional"), color, intensity: finite.min(0).max(100), castShadow: z.boolean().default(false), ...gameLightShadowFields3D }),
|
|
8
|
+
z.strictObject({ kind: z.literal("point"), color, intensity: finite.min(0).max(100), range: positive, decay: finite.min(0).max(4).default(2),
|
|
9
|
+
castShadow: localCastShadow, ...gameLightShadowFields3D }),
|
|
6
10
|
z.strictObject({ kind: z.literal("spot"), color, intensity: finite.min(0).max(100), range: positive,
|
|
7
|
-
angle: positive.max(Math.PI / 2), penumbra: finite.min(0).max(1).default(0), decay: finite.min(0).max(4).default(2)
|
|
11
|
+
angle: positive.max(Math.PI / 2), penumbra: finite.min(0).max(1).default(0), decay: finite.min(0).max(4).default(2),
|
|
12
|
+
castShadow: localCastShadow, ...gameLightShadowFields3D })
|
|
8
13
|
]);
|
|
9
14
|
//# sourceMappingURL=light.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.js","sourceRoot":"","sources":["../../../src/game3d/components/light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"light.js","sourceRoot":"","sources":["../../../src/game3d/components/light.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAC3C,QAAQ,CAAC,yFAAyF,CAAC,CAAC;AAEvG,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACtD,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,uBAAuB,EAAE,CAAC;IAChK,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1I,UAAU,EAAE,eAAe,EAAE,GAAG,uBAAuB,EAAE,CAAC;IAC5D,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ;QACjG,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACnH,UAAU,EAAE,eAAe,EAAE,GAAG,uBAAuB,EAAE,CAAC;CAC7D,CAAC,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const gameTextureSlot3D: z.ZodObject<{
|
|
3
|
+
assetId: z.ZodString;
|
|
4
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
}, z.core.$strict>>;
|
|
8
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
x: z.ZodNumber;
|
|
10
|
+
y: z.ZodNumber;
|
|
11
|
+
}, z.core.$strict>>;
|
|
12
|
+
}, z.core.$strict>;
|
|
2
13
|
export declare const gameMaterial3D: z.ZodObject<{
|
|
3
14
|
color: z.ZodDefault<z.ZodString>;
|
|
4
15
|
metalness: z.ZodDefault<z.ZodNumber>;
|
|
@@ -11,5 +22,60 @@ export declare const gameMaterial3D: z.ZodObject<{
|
|
|
11
22
|
opaque: "opaque";
|
|
12
23
|
}>>;
|
|
13
24
|
alphaCutoff: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
baseColorTexture: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
assetId: z.ZodString;
|
|
27
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
x: z.ZodNumber;
|
|
29
|
+
y: z.ZodNumber;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
x: z.ZodNumber;
|
|
33
|
+
y: z.ZodNumber;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
normalTexture: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
assetId: z.ZodString;
|
|
38
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
x: z.ZodNumber;
|
|
40
|
+
y: z.ZodNumber;
|
|
41
|
+
}, z.core.$strict>>;
|
|
42
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
x: z.ZodNumber;
|
|
44
|
+
y: z.ZodNumber;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
ormTexture: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
assetId: z.ZodString;
|
|
49
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
x: z.ZodNumber;
|
|
51
|
+
y: z.ZodNumber;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
x: z.ZodNumber;
|
|
55
|
+
y: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>>;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
emissiveTexture: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
assetId: z.ZodString;
|
|
60
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
x: z.ZodNumber;
|
|
62
|
+
y: z.ZodNumber;
|
|
63
|
+
}, z.core.$strict>>;
|
|
64
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
x: z.ZodNumber;
|
|
66
|
+
y: z.ZodNumber;
|
|
67
|
+
}, z.core.$strict>>;
|
|
68
|
+
}, z.core.$strict>>;
|
|
69
|
+
shading: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
standard: "standard";
|
|
71
|
+
toon: "toon";
|
|
72
|
+
}>>;
|
|
73
|
+
toonSteps: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
outline: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
color: z.ZodString;
|
|
76
|
+
width: z.ZodNumber;
|
|
77
|
+
}, z.core.$strict>>;
|
|
14
78
|
}, z.core.$strict>;
|
|
79
|
+
export type GameMaterial3D = z.infer<typeof gameMaterial3D>;
|
|
80
|
+
export type GameTextureSlot3D = z.infer<typeof gameTextureSlot3D>;
|
|
15
81
|
//# sourceMappingURL=material.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAI5B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { finite, color } from "./common.js";
|
|
2
|
+
import { finite, color, id } from "./common.js";
|
|
3
|
+
const tilingAxis = finite.min(0.001).max(1024);
|
|
4
|
+
const offsetAxis = finite.min(-1024).max(1024);
|
|
5
|
+
export const gameTextureSlot3D = z.strictObject({
|
|
6
|
+
assetId: id,
|
|
7
|
+
tiling: z.strictObject({ x: tilingAxis, y: tilingAxis }).optional(),
|
|
8
|
+
offset: z.strictObject({ x: offsetAxis, y: offsetAxis }).optional()
|
|
9
|
+
});
|
|
3
10
|
export const gameMaterial3D = z.strictObject({
|
|
4
11
|
color: color.default("#ffffff"), metalness: finite.min(0).max(1).default(0),
|
|
5
12
|
roughness: finite.min(0).max(1).default(0.8), opacity: finite.min(0).max(1).default(1),
|
|
6
13
|
emissive: color.optional(), alphaMode: z.enum(["opaque", "mask", "blend"]).default("opaque"),
|
|
7
|
-
alphaCutoff: finite.min(0).max(1).default(0.5)
|
|
14
|
+
alphaCutoff: finite.min(0).max(1).default(0.5),
|
|
15
|
+
baseColorTexture: gameTextureSlot3D.optional(), normalTexture: gameTextureSlot3D.optional(),
|
|
16
|
+
ormTexture: gameTextureSlot3D.optional(), emissiveTexture: gameTextureSlot3D.optional(),
|
|
17
|
+
shading: z.enum(["standard", "toon"]).optional(), toonSteps: z.number().int().min(2).max(8).optional(),
|
|
18
|
+
outline: z.strictObject({ color, width: finite.min(0).max(0.1) }).optional()
|
|
8
19
|
});
|
|
9
20
|
//# sourceMappingURL=material.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../../src/game3d/components/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../../src/game3d/components/material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9C,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnE,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3E,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACtF,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC5F,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC9C,gBAAgB,EAAE,iBAAiB,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IAC3F,UAAU,EAAE,iBAAiB,CAAC,QAAQ,EAAE,EAAE,eAAe,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACvF,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtG,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7E,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ export declare const gameModel3D: z.ZodObject<{
|
|
|
4
4
|
nodeId: z.ZodOptional<z.ZodString>;
|
|
5
5
|
castShadow: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
receiveShadow: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
materialId: z.ZodOptional<z.ZodString>;
|
|
7
8
|
material: z.ZodOptional<z.ZodObject<{
|
|
8
9
|
color: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
9
10
|
metalness: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
@@ -16,6 +17,59 @@ export declare const gameModel3D: z.ZodObject<{
|
|
|
16
17
|
opaque: "opaque";
|
|
17
18
|
}>>>;
|
|
18
19
|
alphaCutoff: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
20
|
+
baseColorTexture: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
21
|
+
assetId: z.ZodString;
|
|
22
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
x: z.ZodNumber;
|
|
24
|
+
y: z.ZodNumber;
|
|
25
|
+
}, z.core.$strict>>;
|
|
26
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
x: z.ZodNumber;
|
|
28
|
+
y: z.ZodNumber;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
}, z.core.$strict>>>;
|
|
31
|
+
normalTexture: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
32
|
+
assetId: z.ZodString;
|
|
33
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
x: z.ZodNumber;
|
|
35
|
+
y: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
x: z.ZodNumber;
|
|
39
|
+
y: z.ZodNumber;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
}, z.core.$strict>>>;
|
|
42
|
+
ormTexture: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
43
|
+
assetId: z.ZodString;
|
|
44
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
x: z.ZodNumber;
|
|
46
|
+
y: z.ZodNumber;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
x: z.ZodNumber;
|
|
50
|
+
y: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
}, z.core.$strict>>>;
|
|
53
|
+
emissiveTexture: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
54
|
+
assetId: z.ZodString;
|
|
55
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
x: z.ZodNumber;
|
|
57
|
+
y: z.ZodNumber;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
x: z.ZodNumber;
|
|
61
|
+
y: z.ZodNumber;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
}, z.core.$strict>>>;
|
|
64
|
+
shading: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
standard: "standard";
|
|
66
|
+
toon: "toon";
|
|
67
|
+
}>>>;
|
|
68
|
+
toonSteps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
69
|
+
outline: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
70
|
+
color: z.ZodString;
|
|
71
|
+
width: z.ZodNumber;
|
|
72
|
+
}, z.core.$strict>>>;
|
|
19
73
|
}, z.core.$strict>>;
|
|
20
74
|
}, z.core.$strict>;
|
|
21
75
|
export type GameModel3D = z.infer<typeof gameModel3D>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAItB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { id } from "./common.js";
|
|
|
3
3
|
import { gameMaterial3D } from "./material.js";
|
|
4
4
|
export const gameModel3D = z.strictObject({
|
|
5
5
|
assetId: id, nodeId: id.optional(), castShadow: z.boolean().default(true), receiveShadow: z.boolean().default(true),
|
|
6
|
+
materialId: id.optional(),
|
|
6
7
|
material: gameMaterial3D.partial().optional()
|
|
7
8
|
});
|
|
8
9
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/game3d/components/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACnH,QAAQ,EAAE,cAAc,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/game3d/components/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACnH,UAAU,EAAE,EAAE,CAAC,QAAQ,EAAE;IACzB,QAAQ,EAAE,cAAc,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The largest camera distance, in world units, that a cull setting accepts. */
|
|
3
|
+
export declare const GAME_MAX_CULL_DISTANCE_3D = 100000;
|
|
4
|
+
/** The most cull layers a document declares. */
|
|
5
|
+
export declare const GAME_MAX_CULL_LAYERS_3D = 32;
|
|
6
|
+
export declare const gameRenderCulling3D: z.ZodObject<{
|
|
7
|
+
layer: z.ZodOptional<z.ZodString>;
|
|
8
|
+
maxDistance: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
export type GameRenderCulling3D = z.infer<typeof gameRenderCulling3D>;
|
|
11
|
+
export declare const gameFrameBudgets: z.ZodObject<{
|
|
12
|
+
drawCalls: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
triangles: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
particles: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
voices: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type GameFrameBudgets = z.infer<typeof gameFrameBudgets>;
|
|
18
|
+
export declare const gamePerformance3D: z.ZodObject<{
|
|
19
|
+
cullLayers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
20
|
+
maxDistance: z.ZodNumber;
|
|
21
|
+
}, z.core.$strict>>>;
|
|
22
|
+
budgets: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
drawCalls: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
triangles: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
particles: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
voices: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export type GamePerformance3D = z.infer<typeof gamePerformance3D>;
|
|
30
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,SAAU,CAAC;AAEjD,gDAAgD;AAChD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAO1C,eAAO,MAAM,mBAAmB;;;kBAGyD,CAAC;AAE1F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAItE,eAAO,MAAM,gBAAgB;;;;;kBAKmG,CAAC;AAEjI,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAKmE,CAAC;AAElG,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { id, positive } from "./common.js";
|
|
3
|
+
/** The largest camera distance, in world units, that a cull setting accepts. */
|
|
4
|
+
export const GAME_MAX_CULL_DISTANCE_3D = 100_000;
|
|
5
|
+
/** The most cull layers a document declares. */
|
|
6
|
+
export const GAME_MAX_CULL_LAYERS_3D = 32;
|
|
7
|
+
const cullDistance = positive.max(GAME_MAX_CULL_DISTANCE_3D)
|
|
8
|
+
.describe("Camera distance in world units beyond which the renderer hides the entity. Presentation only: simulation, physics and scripts still run.");
|
|
9
|
+
const cullLayerName = id.max(64);
|
|
10
|
+
export const gameRenderCulling3D = z.strictObject({
|
|
11
|
+
layer: cullLayerName.optional().describe("Cull layer declared in the document's performance.cullLayers. Its maxDistance applies when the entity sets none."),
|
|
12
|
+
maxDistance: cullDistance.optional()
|
|
13
|
+
}).describe("Render-side distance culling for this entity. It never changes simulation.");
|
|
14
|
+
const budget = (maximum) => z.number().int().min(1).max(maximum);
|
|
15
|
+
export const gameFrameBudgets = z.strictObject({
|
|
16
|
+
drawCalls: budget(100_000).optional().describe("Draw calls per rendered frame."),
|
|
17
|
+
triangles: budget(100_000_000).optional().describe("Triangles per rendered frame."),
|
|
18
|
+
particles: budget(1_000_000).optional().describe("Live particles in the scene, as the 3D standalone player and 3D capture count them."),
|
|
19
|
+
voices: budget(1024).optional().describe("Playing audio voices.")
|
|
20
|
+
}).describe("Per-frame budgets. Players warn in the console when a frame exceeds one. Omitted budgets use the player defaults.");
|
|
21
|
+
export const gamePerformance3D = z.strictObject({
|
|
22
|
+
cullLayers: z.record(cullLayerName, z.strictObject({ maxDistance: cullDistance }))
|
|
23
|
+
.refine((layers) => Object.keys(layers).length <= GAME_MAX_CULL_LAYERS_3D, { message: `At most ${GAME_MAX_CULL_LAYERS_3D} cull layers` })
|
|
24
|
+
.optional().describe("Named cull layers. Entities pick one with renderCulling.layer."),
|
|
25
|
+
budgets: gameFrameBudgets.optional()
|
|
26
|
+
}).describe("Presentation-only performance settings: distance culling layers and frame budgets.");
|
|
27
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../../src/game3d/components/performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE3C,gFAAgF;AAChF,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,gDAAgD;AAChD,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC;KACzD,QAAQ,CAAC,0IAA0I,CAAC,CAAC;AAExJ,MAAM,aAAa,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,KAAK,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kHAAkH,CAAC;IAC5J,WAAW,EAAE,YAAY,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC,QAAQ,CAAC,4EAA4E,CAAC,CAAC;AAI1F,MAAM,MAAM,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAChF,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACnF,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qFAAqF,CAAC;IACvI,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CAClE,CAAC,CAAC,QAAQ,CAAC,mHAAmH,CAAC,CAAC;AAIjI,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;SAC/E,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,IAAI,uBAAuB,EAAE,EAAE,OAAO,EAAE,WAAW,uBAAuB,cAAc,EAAE,CAAC;SACxI,QAAQ,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;IACxF,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC,QAAQ,CAAC,oFAAoF,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The most physics materials a 3D document declares. */
|
|
3
|
+
export declare const GAME_MAX_PHYSICS_MATERIALS_3D = 64;
|
|
4
|
+
/**
|
|
5
|
+
* How two touching colliders combine their friction or restitution. The names match
|
|
6
|
+
* Rapier's coefficient combine rules. When the two colliders use different rules, the
|
|
7
|
+
* one later in this list wins: average, min, multiply, max.
|
|
8
|
+
*/
|
|
9
|
+
export declare const gameCombineRule3D: z.ZodEnum<{
|
|
10
|
+
average: "average";
|
|
11
|
+
max: "max";
|
|
12
|
+
min: "min";
|
|
13
|
+
multiply: "multiply";
|
|
14
|
+
}>;
|
|
15
|
+
export type GameCombineRule3D = z.infer<typeof gameCombineRule3D>;
|
|
16
|
+
export declare const gamePhysicsMaterial3D: z.ZodObject<{
|
|
17
|
+
friction: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
restitution: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
frictionCombine: z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
average: "average";
|
|
21
|
+
max: "max";
|
|
22
|
+
min: "min";
|
|
23
|
+
multiply: "multiply";
|
|
24
|
+
}>>;
|
|
25
|
+
restitutionCombine: z.ZodDefault<z.ZodEnum<{
|
|
26
|
+
average: "average";
|
|
27
|
+
max: "max";
|
|
28
|
+
min: "min";
|
|
29
|
+
multiply: "multiply";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export type GamePhysicsMaterial3D = z.infer<typeof gamePhysicsMaterial3D>;
|
|
33
|
+
export declare const gamePhysicsMaterials3D: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
|
+
friction: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
restitution: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
frictionCombine: z.ZodDefault<z.ZodEnum<{
|
|
37
|
+
average: "average";
|
|
38
|
+
max: "max";
|
|
39
|
+
min: "min";
|
|
40
|
+
multiply: "multiply";
|
|
41
|
+
}>>;
|
|
42
|
+
restitutionCombine: z.ZodDefault<z.ZodEnum<{
|
|
43
|
+
average: "average";
|
|
44
|
+
max: "max";
|
|
45
|
+
min: "min";
|
|
46
|
+
multiply: "multiply";
|
|
47
|
+
}>>;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
export type GamePhysicsMaterials3D = z.infer<typeof gamePhysicsMaterials3D>;
|
|
50
|
+
//# sourceMappingURL=physics-material.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physics-material.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/physics-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yDAAyD;AACzD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;EAAgD,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;kBAKkD,CAAC;AAErF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;mBAEgG,CAAC;AAEpI,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { finite, id } from "./common.js";
|
|
3
|
+
/** The most physics materials a 3D document declares. */
|
|
4
|
+
export const GAME_MAX_PHYSICS_MATERIALS_3D = 64;
|
|
5
|
+
/**
|
|
6
|
+
* How two touching colliders combine their friction or restitution. The names match
|
|
7
|
+
* Rapier's coefficient combine rules. When the two colliders use different rules, the
|
|
8
|
+
* one later in this list wins: average, min, multiply, max.
|
|
9
|
+
*/
|
|
10
|
+
export const gameCombineRule3D = z.enum(["average", "min", "multiply", "max"]);
|
|
11
|
+
export const gamePhysicsMaterial3D = z.strictObject({
|
|
12
|
+
friction: finite.min(0).max(4).default(0.5),
|
|
13
|
+
restitution: finite.min(0).max(1).default(0),
|
|
14
|
+
frictionCombine: gameCombineRule3D.default("average"),
|
|
15
|
+
restitutionCombine: gameCombineRule3D.default("average")
|
|
16
|
+
}).describe("Surface response shared by colliders that name it in physicsMaterial.");
|
|
17
|
+
export const gamePhysicsMaterials3D = z.record(id, gamePhysicsMaterial3D)
|
|
18
|
+
.refine((materials) => Object.keys(materials).length <= GAME_MAX_PHYSICS_MATERIALS_3D, { message: `At most ${GAME_MAX_PHYSICS_MATERIALS_3D} physics materials` })
|
|
19
|
+
.describe("Named physics materials. A collider names one in physicsMaterial instead of setting friction and restitution inline.");
|
|
20
|
+
//# sourceMappingURL=physics-material.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physics-material.js","sourceRoot":"","sources":["../../../src/game3d/components/physics-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEzC,yDAAyD;AACzD,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AAI/E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,eAAe,EAAE,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC;IACrD,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC;CACzD,CAAC,CAAC,QAAQ,CAAC,uEAAuE,CAAC,CAAC;AAIrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,qBAAqB,CAAC;KACtE,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,6BAA6B,EAAE,EAAE,OAAO,EAAE,WAAW,6BAA6B,oBAAoB,EAAE,CAAC;KAChK,QAAQ,CAAC,sHAAsH,CAAC,CAAC"}
|
|
@@ -23,7 +23,61 @@ export declare const gamePrimitive3D: z.ZodObject<{
|
|
|
23
23
|
opaque: "opaque";
|
|
24
24
|
}>>;
|
|
25
25
|
alphaCutoff: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
baseColorTexture: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
assetId: z.ZodString;
|
|
28
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
x: z.ZodNumber;
|
|
30
|
+
y: z.ZodNumber;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
x: z.ZodNumber;
|
|
34
|
+
y: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
normalTexture: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
assetId: z.ZodString;
|
|
39
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
x: z.ZodNumber;
|
|
41
|
+
y: z.ZodNumber;
|
|
42
|
+
}, z.core.$strict>>;
|
|
43
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
x: z.ZodNumber;
|
|
45
|
+
y: z.ZodNumber;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
ormTexture: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
assetId: z.ZodString;
|
|
50
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
x: z.ZodNumber;
|
|
52
|
+
y: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
x: z.ZodNumber;
|
|
56
|
+
y: z.ZodNumber;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
emissiveTexture: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
assetId: z.ZodString;
|
|
61
|
+
tiling: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
x: z.ZodNumber;
|
|
63
|
+
y: z.ZodNumber;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
offset: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
x: z.ZodNumber;
|
|
67
|
+
y: z.ZodNumber;
|
|
68
|
+
}, z.core.$strict>>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
shading: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
standard: "standard";
|
|
72
|
+
toon: "toon";
|
|
73
|
+
}>>;
|
|
74
|
+
toonSteps: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
outline: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
color: z.ZodString;
|
|
77
|
+
width: z.ZodNumber;
|
|
78
|
+
}, z.core.$strict>>;
|
|
26
79
|
}, z.core.$strict>>;
|
|
80
|
+
materialId: z.ZodOptional<z.ZodString>;
|
|
27
81
|
castShadow: z.ZodDefault<z.ZodBoolean>;
|
|
28
82
|
receiveShadow: z.ZodDefault<z.ZodBoolean>;
|
|
29
83
|
}, z.core.$strict>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitive.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"primitive.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAM1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { positive } from "./common.js";
|
|
2
|
+
import { positive, id } from "./common.js";
|
|
3
3
|
import { gameMaterial3D } from "./material.js";
|
|
4
4
|
export const gamePrimitive3D = z.strictObject({
|
|
5
5
|
kind: z.enum(["box", "sphere", "capsule", "plane"]),
|
|
6
6
|
dimensions: z.strictObject({ x: positive, y: positive, z: positive }),
|
|
7
7
|
material: gameMaterial3D.default({ color: "#ffffff", metalness: 0, roughness: 0.8, opacity: 1, alphaMode: "opaque", alphaCutoff: 0.5 }),
|
|
8
|
+
materialId: id.optional(),
|
|
8
9
|
castShadow: z.boolean().default(true), receiveShadow: z.boolean().default(true)
|
|
9
10
|
});
|
|
10
11
|
//# sourceMappingURL=primitive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitive.js","sourceRoot":"","sources":["../../../src/game3d/components/primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"primitive.js","sourceRoot":"","sources":["../../../src/game3d/components/primitive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,UAAU,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrE,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;IACvI,UAAU,EAAE,EAAE,CAAC,QAAQ,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAChF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Most point and spot lights that render shadows in one frame. Later lights in scene order render without them. */
|
|
3
|
+
export declare const GAME_LOCAL_SHADOW_LIGHT_BUDGET_3D = 4;
|
|
4
|
+
export declare const gameLightShadowFields3D: {
|
|
5
|
+
shadowBias: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
shadowNormalBias: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
};
|
|
8
|
+
export declare const gameShadowCascades3D: z.ZodObject<{
|
|
9
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
split: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
maxDistance: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type GameShadowCascades3D = z.infer<typeof gameShadowCascades3D>;
|
|
14
|
+
export declare const gameShadowSettings3D: z.ZodObject<{
|
|
15
|
+
enabled: z.ZodBoolean;
|
|
16
|
+
mapSize: z.ZodUnion<readonly [z.ZodLiteral<512>, z.ZodLiteral<1024>, z.ZodLiteral<2048>]>;
|
|
17
|
+
extent: z.ZodNumber;
|
|
18
|
+
cascades: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
count: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
split: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
maxDistance: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strict>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export type GameShadowSettings3D = z.infer<typeof gameShadowSettings3D>;
|
|
25
|
+
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/game3d/components/shadows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,oHAAoH;AACpH,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,eAAO,MAAM,uBAAuB;IAClC,UAAU;IAEV,gBAAgB;CAEjB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;kBAKqF,CAAC;AAEvH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,oBAAoB;;;;;;;;;kBAG/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { finite, positive } from "./common.js";
|
|
3
|
+
/** Most point and spot lights that render shadows in one frame. Later lights in scene order render without them. */
|
|
4
|
+
export const GAME_LOCAL_SHADOW_LIGHT_BUDGET_3D = 4;
|
|
5
|
+
export const gameLightShadowFields3D = {
|
|
6
|
+
shadowBias: finite.min(-0.01).max(0.01).optional()
|
|
7
|
+
.describe("Depth offset for this light's shadow map. Small negative values such as -0.0005 remove shadow acne. Defaults to 0."),
|
|
8
|
+
shadowNormalBias: finite.min(0).max(1).optional()
|
|
9
|
+
.describe("World-unit offset along the surface normal before the shadow lookup. Values such as 0.02 remove acne on slopes. Defaults to 0.")
|
|
10
|
+
};
|
|
11
|
+
export const gameShadowCascades3D = z.strictObject({
|
|
12
|
+
count: z.number().int().min(2).max(4).default(3).describe("Number of shadow maps the directional light splits the view into."),
|
|
13
|
+
split: finite.min(0).max(1).default(0.5)
|
|
14
|
+
.describe("Blend between even splits (0) and logarithmic splits (1). Higher values give nearby cascades more resolution."),
|
|
15
|
+
maxDistance: positive.max(5000).default(200).describe("Camera distance in meters that directional shadows cover.")
|
|
16
|
+
}).describe("Cascaded shadow maps for the shadow-casting directional light. Replaces the single map sized by extent.");
|
|
17
|
+
export const gameShadowSettings3D = z.strictObject({
|
|
18
|
+
enabled: z.boolean(), mapSize: z.union([z.literal(512), z.literal(1024), z.literal(2048)]), extent: positive,
|
|
19
|
+
cascades: gameShadowCascades3D.optional()
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=shadows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.js","sourceRoot":"","sources":["../../../src/game3d/components/shadows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/C,oHAAoH;AACpH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;SAC/C,QAAQ,CAAC,oHAAoH,CAAC;IACjI,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;SAC9C,QAAQ,CAAC,gIAAgI,CAAC;CAC9I,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IAC9H,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;SACrC,QAAQ,CAAC,+GAA+G,CAAC;IAC5H,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,2DAA2D,CAAC;CACnH,CAAC,CAAC,QAAQ,CAAC,yGAAyG,CAAC,CAAC;AAIvH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ;IAC5G,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC"}
|