Three stores, three importers and three pickers that differ only in their type are one of each (#85)
Refactoring round one: HttpFontStore/HttpSoundStore/HttpTextureStore collapse into a generic HttpFileStore over a FileStore contract; fontImport/soundImport/textureImport share assetImport with an ImportKind per sort; ImagePicker/FontPicker/SoundPicker sit on FilePicker and describe only their row. The group/comment drag logic leaves GraphCanvas for annotationDrag.ts (with its own unit test), declaredRows.ts replaces the duplicated row build in particles.ts and shaders.ts, and dead code in font/sound/compile/emission/transform/actions is gone. README: asset list, check count 958, the two-job CI, the Scenes wiki page. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
15bdfdf07a
commit
cc6db5f350
42 files changed
+1375
-1650
No files matched your search
@@ -58,16 +58,6 @@ export function removeNodes(state: EditorState, assetId: string, nodeIds: readon
|
||||
return commands.length > 0 && state.execute(oneStep(`Delete ${commands.length} nodes`, commands));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a group or comment and leaves every node alone – which is the point, so the caller does
|
||||
* not have to know which of the two lists holds it either.
|
||||
*/
|
||||
export function removeAnnotation(state: EditorState, assetId: string, annotationId: string): boolean {
|
||||
const graph = findGraphAsset(state.project, assetId)?.graph;
|
||||
const found = graph && findAnnotation(graph, annotationId);
|
||||
return Boolean(found) && state.execute(new RemoveAnnotationCommand(assetId, found!.kind, annotationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes everything a graph selection holds – nodes and boxes alike – as one undo step, since one
|
||||
* band caught them and one keypress asked for them to go. Boxes still take none of their nodes.
|
||||
|
||||
Reference in new issue
Block a user