|
@@ -432,7 +432,7 @@ document.querySelectorAll('[data-diagram]').forEach((elem) => {
|
|
|
const sceneName = elem.dataset.diagram;
|
|
|
const sceneInitFunction = sceneInitFunctionsByName[sceneName];
|
|
|
const sceneRenderFunction = sceneInitFunction(elem);
|
|
|
- addScene(elem, sceneRenderFunction());
|
|
|
+ addScene(elem, sceneRenderFunction);
|
|
|
});
|
|
|
```
|
|
|
|
|
@@ -684,4 +684,4 @@ The result looks the same
|
|
|
One other advantage to this solution is you could potentially use
|
|
|
[`OffscreenCanvas`](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas)
|
|
|
to render from a web worker and still use this technique. Unfortunately as of July 2020
|
|
|
-`OffscreenCanvas` is only supported by Chrome.
|
|
|
+`OffscreenCanvas` is only supported by Chrome.
|