| 72 | } |
| 73 | |
| 74 | static override async bind(): Promise<void> { |
| 75 | window.addEventListener('resize', () => { |
| 76 | this.engine.element().find('[data-component="canvas-container"][mode="background"], [data-component="canvas-container"][mode="immersive"]').each((canvasContainer: any) => { |
| 77 | const { object } = canvasContainer.props; |
| 78 | if (typeof object.resize === 'function') { |
| 79 | Util.callAsync(object.resize, this.engine, canvasContainer.layers, object.props, object.state, canvasContainer); |
| 80 | } |
| 81 | }); |
| 82 | }); |
| 83 | } |
| 84 | |
| 85 | static override async reset(): Promise<void> { |
| 86 | const promises: Promise<any>[] = []; |