mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-29 09:08:58 +00:00
Okay, sure
This commit is contained in:
@@ -44,6 +44,17 @@ export class AppElement extends LitElement {
|
||||
super();
|
||||
|
||||
this.#lcmClient.addEventListener("lcm-image-ready", event => {
|
||||
console.log("lcm-image-ready", event.detail);
|
||||
|
||||
const prevUrl = this.outputUrl;
|
||||
this.outputUrl = URL.createObjectURL(event.detail);
|
||||
|
||||
if (prevUrl)
|
||||
URL.revokeObjectURL(prevUrl);
|
||||
});
|
||||
|
||||
this.#lcmClient.addEventListener("lcm-image-url-ready", event => {
|
||||
console.log("lcm-image-url-ready", event.detail);
|
||||
this.outputUrl = event.detail;
|
||||
this.requestUpdate();
|
||||
});
|
||||
@@ -55,6 +66,9 @@ export class AppElement extends LitElement {
|
||||
if (this.inputUrl)
|
||||
URL.revokeObjectURL(this.inputUrl);
|
||||
|
||||
if (this.outputUrl)
|
||||
URL.revokeObjectURL(this.outputUrl);
|
||||
|
||||
super.disconnectedCallback();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user