mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-25 08:30:24 +00:00
Inspector: component view part (#55)
This PR allow to send entity components data to typescript with inspector-dom event Event data  Component register example  Read event example  This PR is the first step of new inspector backend logic Next parts is: - Allow to edit components fields - Allow to show asset data (like show Handle<StandartMaterial> data) - Allow to edit asset fields
This commit is contained in:
@@ -40,6 +40,13 @@ export class AppElement extends LitElement {
|
||||
return this;
|
||||
}
|
||||
|
||||
@on("inspector-changed")
|
||||
onInspectorChanged(event: studio.InspectorChanged): void {
|
||||
const data = event.detail ? JSON.parse(event.detail) : null;
|
||||
console.log("Inspector changed:", data);
|
||||
}
|
||||
|
||||
|
||||
@on("scene-saved")
|
||||
async onSceneSaved({ detail: scene }: SceneSavedEvent): Promise<void> {
|
||||
const file = new File([scene], "scene.scn.ron", { type: "text/ron" });
|
||||
|
||||
@@ -1 +1 @@
|
||||
import "./app/app.element";
|
||||
import "./app/app.element";
|
||||
Reference in New Issue
Block a user