@skenora/editor 0.1.2
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 +51 -0
- package/dist/commands/annotation-commands.d.ts +12 -0
- package/dist/commands/annotation-commands.d.ts.map +1 -0
- package/dist/commands/annotation-commands.js +37 -0
- package/dist/commands/annotation-commands.js.map +1 -0
- package/dist/commands/camera-entity-commands.d.ts +12 -0
- package/dist/commands/camera-entity-commands.d.ts.map +1 -0
- package/dist/commands/camera-entity-commands.js +60 -0
- package/dist/commands/camera-entity-commands.js.map +1 -0
- package/dist/commands/camera-path-commands.d.ts +9 -0
- package/dist/commands/camera-path-commands.d.ts.map +1 -0
- package/dist/commands/camera-path-commands.js +95 -0
- package/dist/commands/camera-path-commands.js.map +1 -0
- package/dist/commands/flow-commands.d.ts +10 -0
- package/dist/commands/flow-commands.d.ts.map +1 -0
- package/dist/commands/flow-commands.js +86 -0
- package/dist/commands/flow-commands.js.map +1 -0
- package/dist/commands/geometry-commands.d.ts +8 -0
- package/dist/commands/geometry-commands.d.ts.map +1 -0
- package/dist/commands/geometry-commands.js +85 -0
- package/dist/commands/geometry-commands.js.map +1 -0
- package/dist/commands/material-assignment.d.ts +7 -0
- package/dist/commands/material-assignment.d.ts.map +1 -0
- package/dist/commands/material-assignment.js +69 -0
- package/dist/commands/material-assignment.js.map +1 -0
- package/dist/commands/material-commands.d.ts +13 -0
- package/dist/commands/material-commands.d.ts.map +1 -0
- package/dist/commands/material-commands.js +182 -0
- package/dist/commands/material-commands.js.map +1 -0
- package/dist/commands/model-import-commands.d.ts +6 -0
- package/dist/commands/model-import-commands.d.ts.map +1 -0
- package/dist/commands/model-import-commands.js +120 -0
- package/dist/commands/model-import-commands.js.map +1 -0
- package/dist/commands/particle-commands.d.ts +13 -0
- package/dist/commands/particle-commands.d.ts.map +1 -0
- package/dist/commands/particle-commands.js +47 -0
- package/dist/commands/particle-commands.js.map +1 -0
- package/dist/commands/primitive-commands.d.ts +18 -0
- package/dist/commands/primitive-commands.d.ts.map +1 -0
- package/dist/commands/primitive-commands.js +24 -0
- package/dist/commands/primitive-commands.js.map +1 -0
- package/dist/commands/procedural-commands.d.ts +13 -0
- package/dist/commands/procedural-commands.d.ts.map +1 -0
- package/dist/commands/procedural-commands.js +20 -0
- package/dist/commands/procedural-commands.js.map +1 -0
- package/dist/commands/scene-commands.d.ts +16 -0
- package/dist/commands/scene-commands.d.ts.map +1 -0
- package/dist/commands/scene-commands.js +146 -0
- package/dist/commands/scene-commands.js.map +1 -0
- package/dist/commands/shape-commands.d.ts +24 -0
- package/dist/commands/shape-commands.d.ts.map +1 -0
- package/dist/commands/shape-commands.js +95 -0
- package/dist/commands/shape-commands.js.map +1 -0
- package/dist/commands/texture-animation-commands.d.ts +5 -0
- package/dist/commands/texture-animation-commands.d.ts.map +1 -0
- package/dist/commands/texture-animation-commands.js +23 -0
- package/dist/commands/texture-animation-commands.js.map +1 -0
- package/dist/core/candidate-commit.d.ts +59 -0
- package/dist/core/candidate-commit.d.ts.map +1 -0
- package/dist/core/candidate-commit.js +54 -0
- package/dist/core/candidate-commit.js.map +1 -0
- package/dist/core/commands.d.ts +20 -0
- package/dist/core/commands.d.ts.map +1 -0
- package/dist/core/commands.js +282 -0
- package/dist/core/commands.js.map +1 -0
- package/dist/core/editor-session.d.ts +92 -0
- package/dist/core/editor-session.d.ts.map +1 -0
- package/dist/core/editor-session.js +496 -0
- package/dist/core/editor-session.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/properties/property-descriptors.d.ts +58 -0
- package/dist/properties/property-descriptors.d.ts.map +1 -0
- package/dist/properties/property-descriptors.js +832 -0
- package/dist/properties/property-descriptors.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AuthoredPbrMaterial, type MaterialBindingRecord } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
/** Create an owned definition; validation and history remain Editor-owned. */
|
|
4
|
+
export declare function createMaterialCommand(definition: Readonly<AuthoredPbrMaterial>): EditorCommand;
|
|
5
|
+
/** Upsert one explicit binding without retargeting the material's other uses. */
|
|
6
|
+
export declare function bindMaterialCommand(binding: Readonly<MaterialBindingRecord>): EditorCommand;
|
|
7
|
+
export declare function removeMaterialBindingCommand(bindingId: string): EditorCommand;
|
|
8
|
+
export declare function assignMaterialCommand(entityId: string, materialId: string): EditorCommand;
|
|
9
|
+
export declare function unassignMaterialCommand(entityId: string, materialId: string): EditorCommand;
|
|
10
|
+
export declare function duplicateMaterialCommand(materialId: string, nextId: string, targetEntityId?: string): EditorCommand;
|
|
11
|
+
export declare function removeMaterialCommand(materialId: string): EditorCommand;
|
|
12
|
+
export declare function retargetMaterialCommand(materialId: string, targetEntityId: string | null, targetName?: string): EditorCommand;
|
|
13
|
+
//# sourceMappingURL=material-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-commands.d.ts","sourceRoot":"","sources":["../../src/commands/material-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMvE,8EAA8E;AAC9E,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACxC,aAAa,CAkBf;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GACvC,aAAa,CAoBf;AAED,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAiB7E;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,aAAa,CAqCf;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,aAAa,CAUf;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,MAAM,GACtB,aAAa,CA0Cf;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CA8BvE;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,UAAU,CAAC,EAAE,MAAM,GAClB,aAAa,CAsBf"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { getMaterialBindingsForMaterial, toMaterialDefinition, createMaterialBindingId, } from "@skenora/contracts";
|
|
2
|
+
import { createCommandId } from "../core/commands.js";
|
|
3
|
+
import { synchronizeMaterialBindings, unassignMaterialBinding, } from "./material-assignment.js";
|
|
4
|
+
/** Create an owned definition; validation and history remain Editor-owned. */
|
|
5
|
+
export function createMaterialCommand(definition) {
|
|
6
|
+
const value = structuredClone(definition);
|
|
7
|
+
return {
|
|
8
|
+
id: createCommandId("create-material"),
|
|
9
|
+
label: "Create material",
|
|
10
|
+
createPatches(document) {
|
|
11
|
+
if (document.materials[value.id])
|
|
12
|
+
throw new Error(`Material already exists: ${value.id}`);
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
op: "set",
|
|
16
|
+
path: ["materials", value.id],
|
|
17
|
+
value,
|
|
18
|
+
previousValue: undefined,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** Upsert one explicit binding without retargeting the material's other uses. */
|
|
25
|
+
export function bindMaterialCommand(binding) {
|
|
26
|
+
const value = structuredClone(binding);
|
|
27
|
+
return {
|
|
28
|
+
id: createCommandId("bind-material"),
|
|
29
|
+
label: "Bind material slot",
|
|
30
|
+
createPatches(document) {
|
|
31
|
+
if (!document.materials[value.materialId]?.creation)
|
|
32
|
+
throw new Error("Explicit binding commands require an owned material");
|
|
33
|
+
if (!document.entities[value.entityId])
|
|
34
|
+
throw new Error(`Entity not found: ${value.entityId}`);
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
op: "set",
|
|
38
|
+
path: ["materialBindings", value.id],
|
|
39
|
+
value,
|
|
40
|
+
previousValue: document.materialBindings[value.id],
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function removeMaterialBindingCommand(bindingId) {
|
|
47
|
+
return {
|
|
48
|
+
id: createCommandId("remove-material-binding"),
|
|
49
|
+
label: "Remove material binding",
|
|
50
|
+
createPatches(document) {
|
|
51
|
+
const previousValue = document.materialBindings[bindingId];
|
|
52
|
+
return previousValue
|
|
53
|
+
? [
|
|
54
|
+
{
|
|
55
|
+
op: "delete",
|
|
56
|
+
path: ["materialBindings", bindingId],
|
|
57
|
+
previousValue,
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
: [];
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function assignMaterialCommand(entityId, materialId) {
|
|
65
|
+
return {
|
|
66
|
+
id: createCommandId("assign-material"),
|
|
67
|
+
label: "Assign material",
|
|
68
|
+
createPatches(document) {
|
|
69
|
+
const entity = document.entities[entityId];
|
|
70
|
+
if (!entity)
|
|
71
|
+
throw new Error(`Entity not found: ${entityId}`);
|
|
72
|
+
if (!document.materials[materialId]) {
|
|
73
|
+
throw new Error(`Material not found: ${materialId}`);
|
|
74
|
+
}
|
|
75
|
+
if (document.materials[materialId].creation) {
|
|
76
|
+
const existing = getMaterialBindingsForMaterial(document, materialId).find((binding) => binding.entityId === entityId && binding.target === undefined);
|
|
77
|
+
if (existing)
|
|
78
|
+
return [];
|
|
79
|
+
const id = createMaterialBindingId(materialId, entityId, undefined, new Set(Object.keys(document.materialBindings)));
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
op: "set",
|
|
83
|
+
path: ["materialBindings", id],
|
|
84
|
+
value: { id, materialId, entityId },
|
|
85
|
+
previousValue: undefined,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
return synchronizeMaterialBindings(document, [materialId], entityId);
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export function unassignMaterialCommand(entityId, materialId) {
|
|
94
|
+
return {
|
|
95
|
+
id: createCommandId("unassign-material"),
|
|
96
|
+
label: "Unassign material",
|
|
97
|
+
createPatches(document) {
|
|
98
|
+
const entity = document.entities[entityId];
|
|
99
|
+
if (!entity)
|
|
100
|
+
throw new Error(`Entity not found: ${entityId}`);
|
|
101
|
+
return unassignMaterialBinding(document, materialId, entityId);
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export function duplicateMaterialCommand(materialId, nextId, targetEntityId) {
|
|
106
|
+
return {
|
|
107
|
+
id: createCommandId("duplicate-material"),
|
|
108
|
+
label: "Duplicate material",
|
|
109
|
+
createPatches(document) {
|
|
110
|
+
const source = document.materials[materialId];
|
|
111
|
+
if (!source)
|
|
112
|
+
throw new Error(`Material not found: ${materialId}`);
|
|
113
|
+
if (document.materials[nextId]) {
|
|
114
|
+
throw new Error(`Material already exists: ${nextId}`);
|
|
115
|
+
}
|
|
116
|
+
if (targetEntityId && !document.entities[targetEntityId]) {
|
|
117
|
+
throw new Error(`Target entity not found: ${targetEntityId}`);
|
|
118
|
+
}
|
|
119
|
+
const copy = {
|
|
120
|
+
...toMaterialDefinition(source),
|
|
121
|
+
id: nextId,
|
|
122
|
+
};
|
|
123
|
+
const patches = [
|
|
124
|
+
{
|
|
125
|
+
op: "set",
|
|
126
|
+
path: ["materials", nextId],
|
|
127
|
+
value: copy,
|
|
128
|
+
previousValue: undefined,
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
if (targetEntityId) {
|
|
132
|
+
const targetName = getMaterialBindingsForMaterial(document, materialId)[0]?.targetName;
|
|
133
|
+
patches.push(...synchronizeMaterialBindings(document, [nextId], targetEntityId, targetName ? { [nextId]: targetName } : {}));
|
|
134
|
+
}
|
|
135
|
+
return patches;
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export function removeMaterialCommand(materialId) {
|
|
140
|
+
return {
|
|
141
|
+
id: createCommandId("remove-material"),
|
|
142
|
+
label: "Remove material",
|
|
143
|
+
createPatches(document) {
|
|
144
|
+
const material = document.materials[materialId];
|
|
145
|
+
if (!material)
|
|
146
|
+
return [];
|
|
147
|
+
const binding = getMaterialBindingsForMaterial(document, materialId)[0];
|
|
148
|
+
if (binding) {
|
|
149
|
+
throw new Error(`Material is still assigned to entity ${binding.entityId}: ${materialId}`);
|
|
150
|
+
}
|
|
151
|
+
const animation = Object.values(document.textureAnimations).find((item) => item.materialId === materialId);
|
|
152
|
+
if (animation) {
|
|
153
|
+
throw new Error(`Material is still used by texture animation ${animation.id}: ${materialId}`);
|
|
154
|
+
}
|
|
155
|
+
return [
|
|
156
|
+
{
|
|
157
|
+
op: "delete",
|
|
158
|
+
path: ["materials", materialId],
|
|
159
|
+
previousValue: material,
|
|
160
|
+
},
|
|
161
|
+
];
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export function retargetMaterialCommand(materialId, targetEntityId, targetName) {
|
|
166
|
+
return {
|
|
167
|
+
id: createCommandId("retarget-material"),
|
|
168
|
+
label: "Retarget material",
|
|
169
|
+
createPatches(document) {
|
|
170
|
+
const material = document.materials[materialId];
|
|
171
|
+
if (!material)
|
|
172
|
+
throw new Error(`Material not found: ${materialId}`);
|
|
173
|
+
if (material.creation)
|
|
174
|
+
throw new Error("Use bindMaterialCommand to retarget a specific owned-material binding");
|
|
175
|
+
if (targetEntityId && !document.entities[targetEntityId]) {
|
|
176
|
+
throw new Error(`Target entity not found: ${targetEntityId}`);
|
|
177
|
+
}
|
|
178
|
+
return synchronizeMaterialBindings(document, [materialId], targetEntityId, targetName === undefined ? {} : { [materialId]: targetName });
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=material-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-commands.js","sourceRoot":"","sources":["../../src/commands/material-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,oBAAoB,EACpB,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAsB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAE/B,8EAA8E;AAC9E,MAAM,UAAU,qBAAqB,CACnC,UAAyC;IAEzC,MAAM,KAAK,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO;QACL,EAAE,EAAE,eAAe,CAAC,iBAAiB,CAAC;QACtC,KAAK,EAAE,iBAAiB;QACxB,aAAa,CAAC,QAAQ;YACpB,IAAI,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YAC1D,OAAO;gBACL;oBACE,EAAE,EAAE,KAAK;oBACT,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;oBAC7B,KAAK;oBACL,aAAa,EAAE,SAAS;iBACzB;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,mBAAmB,CACjC,OAAwC;IAExC,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO;QACL,EAAE,EAAE,eAAe,CAAC,eAAe,CAAC;QACpC,KAAK,EAAE,oBAAoB;QAC3B,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uBAAuB,CACrC,UAAkB,EAClB,cAA6B,EAC7B,UAAmB;IAEnB,OAAO;QACL,EAAE,EAAE,eAAe,CAAC,mBAAmB,CAAC;QACxC,KAAK,EAAE,mBAAmB;QAC1B,aAAa,CAAC,QAAQ;YACpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAChD,IAAI,CAAC,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;YACpE,IAAI,QAAQ,CAAC,QAAQ;gBACnB,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;YACJ,IAAI,cAAc,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;gBACzD,MAAM,IAAI,KAAK,CAAC,4BAA4B,cAAc,EAAE,CAAC,CAAC;YAChE,CAAC;YACD,OAAO,2BAA2B,CAChC,QAAQ,EACR,CAAC,UAAU,CAAC,EACZ,cAAc,EACd,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,CAC7D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type AssetReference, type MaterialOverride, type SourceNodeDescriptor } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
export declare function importModelCommand(asset: AssetReference, entityId: string, name?: string): EditorCommand;
|
|
4
|
+
export declare function materializeModelMaterialsCommand(entityId: string, materials: readonly MaterialOverride[]): EditorCommand;
|
|
5
|
+
export declare function materializeModelNodesCommand(modelEntityId: string, descriptors: readonly SourceNodeDescriptor[], createId?: (modelEntityId: string, sourceNodeId: string) => string): EditorCommand;
|
|
6
|
+
//# sourceMappingURL=model-import-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-import-commands.d.ts","sourceRoot":"","sources":["../../src/commands/model-import-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGvE,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,SAAyB,GAC5B,aAAa,CA0Cf;AAED,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,gBAAgB,EAAE,GACrC,aAAa,CAkCf;AAED,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,SAAS,oBAAoB,EAAE,EAC5C,QAAQ,GAAE,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,MAGzB,GACjC,aAAa,CAyCf"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { createIdentityTransform, toMaterialDefinition, } from "@skenora/contracts";
|
|
2
|
+
import { createCommandId } from "../core/commands.js";
|
|
3
|
+
import { synchronizeMaterialBindings } from "./material-assignment.js";
|
|
4
|
+
export function importModelCommand(asset, entityId, name = asset.label ?? "Model") {
|
|
5
|
+
return {
|
|
6
|
+
id: createCommandId("import-model"),
|
|
7
|
+
label: `Import ${name}`,
|
|
8
|
+
createPatches(document) {
|
|
9
|
+
if (asset.kind !== "model")
|
|
10
|
+
throw new Error("Imported asset must be a model");
|
|
11
|
+
if (document.entities[entityId]) {
|
|
12
|
+
throw new Error(`Entity already exists: ${entityId}`);
|
|
13
|
+
}
|
|
14
|
+
const entity = {
|
|
15
|
+
id: entityId,
|
|
16
|
+
name,
|
|
17
|
+
type: "model",
|
|
18
|
+
parentId: null,
|
|
19
|
+
enabled: true,
|
|
20
|
+
visible: true,
|
|
21
|
+
transform: createIdentityTransform(),
|
|
22
|
+
assetId: asset.id,
|
|
23
|
+
};
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
op: "set",
|
|
27
|
+
path: ["assets", asset.id],
|
|
28
|
+
value: asset,
|
|
29
|
+
previousValue: document.assets[asset.id],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
op: "set",
|
|
33
|
+
path: ["entities", entityId],
|
|
34
|
+
value: entity,
|
|
35
|
+
previousValue: undefined,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
op: "set",
|
|
39
|
+
path: ["rootEntityIds"],
|
|
40
|
+
value: [...document.rootEntityIds, entityId],
|
|
41
|
+
previousValue: document.rootEntityIds,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function materializeModelMaterialsCommand(entityId, materials) {
|
|
48
|
+
return {
|
|
49
|
+
id: createCommandId("materialize-materials"),
|
|
50
|
+
label: "Materialize model materials",
|
|
51
|
+
createPatches(document) {
|
|
52
|
+
const entity = document.entities[entityId];
|
|
53
|
+
if (!entity)
|
|
54
|
+
throw new Error(`Entity not found: ${entityId}`);
|
|
55
|
+
const materialIds = new Set();
|
|
56
|
+
const targetNames = {};
|
|
57
|
+
const ownedMaterials = materials.map((material) => {
|
|
58
|
+
if (!material.id)
|
|
59
|
+
throw new Error("Material id is required");
|
|
60
|
+
if (materialIds.has(material.id)) {
|
|
61
|
+
throw new Error(`Duplicate material id: ${material.id}`);
|
|
62
|
+
}
|
|
63
|
+
materialIds.add(material.id);
|
|
64
|
+
targetNames[material.id] = material.targetName;
|
|
65
|
+
return toMaterialDefinition(material);
|
|
66
|
+
});
|
|
67
|
+
return [
|
|
68
|
+
...synchronizeMaterialBindings(document, [...materialIds], entityId, targetNames),
|
|
69
|
+
...ownedMaterials.map((material) => ({
|
|
70
|
+
op: "set",
|
|
71
|
+
path: ["materials", material.id],
|
|
72
|
+
value: material,
|
|
73
|
+
previousValue: document.materials[material.id],
|
|
74
|
+
})),
|
|
75
|
+
];
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export function materializeModelNodesCommand(modelEntityId, descriptors, createId = (rootEntityId, sourceId) => `${rootEntityId}:${sourceId}`) {
|
|
80
|
+
return {
|
|
81
|
+
id: createCommandId("materialize-model"),
|
|
82
|
+
label: "Materialize model nodes",
|
|
83
|
+
createPatches(document) {
|
|
84
|
+
const model = document.entities[modelEntityId];
|
|
85
|
+
if (!model || model.type !== "model") {
|
|
86
|
+
throw new Error(`Model entity not found: ${modelEntityId}`);
|
|
87
|
+
}
|
|
88
|
+
const entityIds = new Map(descriptors.map((descriptor) => [
|
|
89
|
+
descriptor.nodeId,
|
|
90
|
+
createId(modelEntityId, descriptor.nodeId),
|
|
91
|
+
]));
|
|
92
|
+
const patches = [];
|
|
93
|
+
for (const descriptor of descriptors) {
|
|
94
|
+
const entityId = entityIds.get(descriptor.nodeId);
|
|
95
|
+
if (!entityId || document.entities[entityId])
|
|
96
|
+
continue;
|
|
97
|
+
const entity = {
|
|
98
|
+
id: entityId,
|
|
99
|
+
name: descriptor.name,
|
|
100
|
+
type: descriptor.type,
|
|
101
|
+
parentId: descriptor.parentNodeId
|
|
102
|
+
? (entityIds.get(descriptor.parentNodeId) ?? modelEntityId)
|
|
103
|
+
: modelEntityId,
|
|
104
|
+
enabled: true,
|
|
105
|
+
visible: true,
|
|
106
|
+
transform: descriptor.transform,
|
|
107
|
+
sourceNode: descriptor.nodeId,
|
|
108
|
+
};
|
|
109
|
+
patches.push({
|
|
110
|
+
op: "set",
|
|
111
|
+
path: ["entities", entityId],
|
|
112
|
+
value: entity,
|
|
113
|
+
previousValue: undefined,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return patches;
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=model-import-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|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AAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAClD,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;oBAAE,SAAS;gBACvD,MAAM,MAAM,GAAiB;oBAC3B,EAAE,EAAE,QAAQ;oBACZ,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,QAAQ,EAAE,UAAU,CAAC,YAAY;wBAC/B,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC;wBAC3D,CAAC,CAAC,aAAa;oBACjB,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,IAAI;oBACb,SAAS,EAAE,UAAU,CAAC,SAAS;oBAC/B,UAAU,EAAE,UAAU,CAAC,MAAM;iBAC9B,CAAC;gBACF,OAAO,CAAC,IAAI,CAAC;oBACX,EAAE,EAAE,KAAK;oBACT,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;oBAC5B,KAAK,EAAE,MAAM;oBACb,aAAa,EAAE,SAAS;iBACzB,CAAC,CAAC;YACL,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ParticleEntityProperties, type TransformValue } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
export interface ParticleOptions {
|
|
4
|
+
id: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
parentId?: string | null;
|
|
7
|
+
transform?: TransformValue;
|
|
8
|
+
properties?: Partial<ParticleEntityProperties>;
|
|
9
|
+
}
|
|
10
|
+
export declare function createParticleCommand(options: ParticleOptions): EditorCommand;
|
|
11
|
+
export declare function updateParticlePropertiesCommand(entityId: string, properties: Partial<ParticleEntityProperties>): EditorCommand;
|
|
12
|
+
export declare function setParticleGradientsCommand<K extends keyof NonNullable<ParticleEntityProperties["gradients"]>>(entityId: string, kind: K, gradients: NonNullable<ParticleEntityProperties["gradients"]>[K]): EditorCommand;
|
|
13
|
+
//# sourceMappingURL=particle-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"particle-commands.d.ts","sourceRoot":"","sources":["../../src/commands/particle-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAChD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CA2B7E;AAED,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC5C,aAAa,CAgBf;AAED,wBAAgB,2BAA2B,CACzC,CAAC,SAAS,MAAM,WAAW,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC,EAElE,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,CAAC,EACP,SAAS,EAAE,WAAW,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAC/D,aAAa,CAMf"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createIdentityTransform, } from "@skenora/contracts";
|
|
2
|
+
import { addEntityCommand, createCommandId, setPropertyCommand, } from "../core/commands.js";
|
|
3
|
+
export function createParticleCommand(options) {
|
|
4
|
+
const defaults = {
|
|
5
|
+
emitter: "point",
|
|
6
|
+
capacity: 2_000,
|
|
7
|
+
emitRate: 100,
|
|
8
|
+
minLifeTime: 0.5,
|
|
9
|
+
maxLifeTime: 2,
|
|
10
|
+
minSize: 0.05,
|
|
11
|
+
maxSize: 0.15,
|
|
12
|
+
minEmitPower: 0.5,
|
|
13
|
+
maxEmitPower: 1.5,
|
|
14
|
+
gravity: { x: 0, y: -0.5, z: 0 },
|
|
15
|
+
color1: { r: 1, g: 1, b: 1 },
|
|
16
|
+
color2: { r: 0.4, g: 0.65, b: 1 },
|
|
17
|
+
autoStart: true,
|
|
18
|
+
};
|
|
19
|
+
const entity = {
|
|
20
|
+
id: options.id,
|
|
21
|
+
name: options.name ?? "Particle system",
|
|
22
|
+
type: "particle",
|
|
23
|
+
parentId: options.parentId ?? null,
|
|
24
|
+
enabled: true,
|
|
25
|
+
visible: true,
|
|
26
|
+
transform: options.transform ?? createIdentityTransform(),
|
|
27
|
+
properties: { ...defaults, ...options.properties },
|
|
28
|
+
};
|
|
29
|
+
return addEntityCommand(entity);
|
|
30
|
+
}
|
|
31
|
+
export function updateParticlePropertiesCommand(entityId, properties) {
|
|
32
|
+
return {
|
|
33
|
+
id: createCommandId("particle-properties"),
|
|
34
|
+
label: "Update particle properties",
|
|
35
|
+
createPatches(document) {
|
|
36
|
+
const entity = document.entities[entityId];
|
|
37
|
+
if (!entity || entity.type !== "particle") {
|
|
38
|
+
throw new Error(`Particle entity not found: ${entityId}`);
|
|
39
|
+
}
|
|
40
|
+
return setPropertyCommand(["entities", entityId, "properties"], { ...entity.properties, ...properties }, "Update particle properties").createPatches(document);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function setParticleGradientsCommand(entityId, kind, gradients) {
|
|
45
|
+
return setPropertyCommand(["entities", entityId, "properties", "gradients", kind], gradients, `Update particle ${kind} gradients`);
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=particle-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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AC;AAClC,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,QAAgB,EAChB,UAA6C;IAE7C,OAAO;QACL,EAAE,EAAE,eAAe,CAAC,qBAAqB,CAAC;QAC1C,KAAK,EAAE,4BAA4B;QACnC,aAAa,CAAC,QAAQ;YACpB,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBAC1C,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,EAAE,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO,kBAAkB,CACvB,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,EACpC,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE,GAAG,UAAU,EAAE,EACvC,4BAA4B,CAC7B,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CAGzC,QAAgB,EAChB,IAAO,EACP,SAAgE;IAEhE,OAAO,kBAAkB,CACvB,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,CAAC,EACvD,SAAS,EACT,mBAAmB,IAAI,YAAY,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Color3Value, type TransformValue } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
export type PrimitiveKind = "box" | "sphere" | "plane" | "cylinder" | "torus";
|
|
4
|
+
export interface PrimitiveOptions {
|
|
5
|
+
id: string;
|
|
6
|
+
kind: PrimitiveKind;
|
|
7
|
+
name?: string;
|
|
8
|
+
parentId?: string | null;
|
|
9
|
+
transform?: TransformValue;
|
|
10
|
+
size?: number;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
depth?: number;
|
|
14
|
+
diameter?: number;
|
|
15
|
+
color?: Color3Value;
|
|
16
|
+
}
|
|
17
|
+
export declare function createPrimitiveCommand(options: PrimitiveOptions): EditorCommand;
|
|
18
|
+
//# sourceMappingURL=primitive-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitive-commands.d.ts","sourceRoot":"","sources":["../../src/commands/primitive-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;AAE9E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,GACxB,aAAa,CAoBf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createIdentityTransform, } from "@skenora/contracts";
|
|
2
|
+
import { addEntityCommand } from "../core/commands.js";
|
|
3
|
+
export function createPrimitiveCommand(options) {
|
|
4
|
+
const entity = {
|
|
5
|
+
id: options.id,
|
|
6
|
+
name: options.name ?? options.kind,
|
|
7
|
+
type: "primitive",
|
|
8
|
+
parentId: options.parentId ?? null,
|
|
9
|
+
enabled: true,
|
|
10
|
+
visible: true,
|
|
11
|
+
transform: options.transform ?? createIdentityTransform(),
|
|
12
|
+
properties: {
|
|
13
|
+
primitive: options.kind,
|
|
14
|
+
size: options.size ?? 1,
|
|
15
|
+
...(options.width === undefined ? {} : { width: options.width }),
|
|
16
|
+
...(options.height === undefined ? {} : { height: options.height }),
|
|
17
|
+
...(options.depth === undefined ? {} : { depth: options.depth }),
|
|
18
|
+
...(options.diameter === undefined ? {} : { diameter: options.diameter }),
|
|
19
|
+
color: options.color ?? { r: 0.7, g: 0.72, b: 0.76 },
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
return addEntityCommand(entity);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=primitive-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitive-commands.js","sourceRoot":"","sources":["../../src/commands/primitive-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAC;AAkBxE,MAAM,UAAU,sBAAsB,CACpC,OAAyB;IAEzB,MAAM,MAAM,GAAiB;QAC3B,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI;QAClC,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;QAClC,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,uBAAuB,EAAE;QACzD,UAAU,EAAE;YACV,SAAS,EAAE,OAAO,CAAC,IAAI;YACvB,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;YACvB,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;YAChE,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;YACnE,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;YAChE,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;YACzE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;SACrD;KACF,CAAC;IACF,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Color3Value, type ProceduralGeometryProgram, type TransformValue } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
export interface ProceduralEntityOptions {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly program: ProceduralGeometryProgram;
|
|
6
|
+
readonly name?: string;
|
|
7
|
+
readonly parentId?: string | null;
|
|
8
|
+
readonly transform?: TransformValue;
|
|
9
|
+
readonly color?: Color3Value;
|
|
10
|
+
}
|
|
11
|
+
/** Create one undoable SceneDocument mutation; compilation stays in Runtime. */
|
|
12
|
+
export declare function createProceduralEntityCommand(options: ProceduralEntityOptions): EditorCommand;
|
|
13
|
+
//# sourceMappingURL=procedural-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedural-commands.d.ts","sourceRoot":"","sources":["../../src/commands/procedural-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAC5C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED,gFAAgF;AAChF,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uBAAuB,GAC/B,aAAa,CAef"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createIdentityTransform, } from "@skenora/contracts";
|
|
2
|
+
import { addEntityCommand } from "../core/commands.js";
|
|
3
|
+
/** Create one undoable SceneDocument mutation; compilation stays in Runtime. */
|
|
4
|
+
export function createProceduralEntityCommand(options) {
|
|
5
|
+
const entity = {
|
|
6
|
+
id: options.id,
|
|
7
|
+
name: options.name ?? "Procedural geometry",
|
|
8
|
+
type: "procedural",
|
|
9
|
+
parentId: options.parentId ?? null,
|
|
10
|
+
enabled: true,
|
|
11
|
+
visible: true,
|
|
12
|
+
transform: options.transform ?? createIdentityTransform(),
|
|
13
|
+
properties: {
|
|
14
|
+
program: structuredClone(options.program),
|
|
15
|
+
color: options.color ?? { r: 0.7, g: 0.72, b: 0.76 },
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
return addEntityCommand(entity);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=procedural-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedural-commands.js","sourceRoot":"","sources":["../../src/commands/procedural-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,GAKxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAC;AAWxE,gFAAgF;AAChF,MAAM,UAAU,6BAA6B,CAC3C,OAAgC;IAEhC,MAAM,MAAM,GAAiB;QAC3B,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,qBAAqB;QAC3C,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;QAClC,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,uBAAuB,EAAE;QACzD,UAAU,EAAE;YACV,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;YACzC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;SACrD;KACF,CAAC;IACF,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AssetReference, EnvironmentConfig, FogConfig, GroundConfig, LightConfig, MaterialOverride, MaterialTextureSlot, PostProcessConfig, TextureReference, ViewportCameraConfig, WeatherConfig } from "@skenora/contracts";
|
|
2
|
+
import { type EditorCommand } from "../core/commands.js";
|
|
3
|
+
export declare function upsertAssetCommand(asset: AssetReference): EditorCommand;
|
|
4
|
+
export declare function removeAssetCommand(assetId: string): EditorCommand;
|
|
5
|
+
export declare function upsertMaterialCommand(material: MaterialOverride): EditorCommand;
|
|
6
|
+
export declare function setViewportCameraCommand(camera: ViewportCameraConfig): EditorCommand;
|
|
7
|
+
export declare function setEnvironmentCommand(environment: EnvironmentConfig): EditorCommand;
|
|
8
|
+
export declare function setGroundCommand(ground: GroundConfig): EditorCommand;
|
|
9
|
+
export declare function setFogCommand(fog: FogConfig): EditorCommand;
|
|
10
|
+
export declare function setWeatherCommand(weather: WeatherConfig): EditorCommand;
|
|
11
|
+
export declare function setPostProcessCommand(postProcess: PostProcessConfig): EditorCommand;
|
|
12
|
+
export declare function upsertLightCommand(light: LightConfig): EditorCommand;
|
|
13
|
+
export declare function setMaterialTextureCommand(materialId: string, slot: MaterialTextureSlot, texture: TextureReference): EditorCommand;
|
|
14
|
+
export declare function removeMaterialTextureCommand(materialId: string, slot: MaterialTextureSlot): EditorCommand;
|
|
15
|
+
export declare function removeLightCommand(lightId: string): EditorCommand;
|
|
16
|
+
//# sourceMappingURL=scene-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene-commands.d.ts","sourceRoot":"","sources":["../../src/commands/scene-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EAEjB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAG1B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,CAEvE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAwCjE;AAaD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,gBAAgB,GACzB,aAAa,CAuCf;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,oBAAoB,GAC3B,aAAa,CAEf;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,iBAAiB,GAC7B,aAAa,CAEf;AAED,wBAAgB,gBAAgB,CAA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