editor.js 474 B

12345678910111213
  1. import { EditorView } from './viewer/EditorView.js';
  2. import { CanvasRenderer } from './libraries/CanvasRenderer.js';
  3. document.addEventListener("DOMContentLoaded", () => {
  4. let viewer = document.getElementById('viewer');
  5. let renderer = new CanvasRenderer();
  6. let view = new EditorView();
  7. view.init().then(() => {
  8. renderer.init(viewer,view);
  9. renderer.start();
  10. setInterval(() => {view.update(1000/60);}, Math.floor(1000/60));
  11. });
  12. });