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