support for recorder (#361)
This commit is contained in:
parent
2cd3bca8db
commit
bd1f5a2b75
@ -16,6 +16,9 @@ namespace pxsim {
|
|||||||
neopixelState: NeoPixelState;
|
neopixelState: NeoPixelState;
|
||||||
fileSystem: FileSystemState;
|
fileSystem: FileSystemState;
|
||||||
|
|
||||||
|
// visual
|
||||||
|
view: SVGElement;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
@ -123,10 +126,14 @@ namespace pxsim {
|
|||||||
}), opts);
|
}), opts);
|
||||||
|
|
||||||
document.body.innerHTML = ""; // clear children
|
document.body.innerHTML = ""; // clear children
|
||||||
document.body.appendChild(viewHost.getView());
|
document.body.appendChild(this.view = viewHost.getView());
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
screenshot(): string {
|
||||||
|
return svg.toDataUri(new XMLSerializer().serializeToString(this.view));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initRuntimeWithDalBoard() {
|
export function initRuntimeWithDalBoard() {
|
||||||
|
Loading…
Reference in New Issue
Block a user