Wick Editor Mod

by Sharxxy

HTML

<!-- Wick Editor CSS -->
    <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/wickEditor.min.css">

    <!-- Editor container -->
    <div id="wick-container" style="width:800px; height:600px;"></div>

    <!-- Wick Editor JS -->
    <script src="https://unpkg.com/[email protected]/dist/wickEditor.min.js"></script>

    <!-- Your custom JS -->

JavaScript

// Wait for the page to load
window.onload = () => {
  const wickEditor = new WickEditor.Editor(document.getElementById('wick-container'), {
      width: 800,
      height: 600
  });

  // Optional: add a spinning circle
  const shape = wickEditor.activeScene.addShape({
    type: 'circle',
    x: 400,
    y: 300,
    radius: 50,
    fillColor: 'red'
  });

  shape.onUpdate = () => {
    shape.rotation += 2; // spin it
  };
};
// Initialise Wick Editor after scripts load
      const wickEditor = new WickEditor.Editor(document.getElementById('wick-container'), {
        width: 800,
        height: 600
      });

      // Add a simple spinning circle
      const shape = wickEditor.activeScene.addShape({
        type: 'circle',
        x: 400,
        y: 300,
        radius: 50,
        fillColor: 'red'
      });

      shape.onUpdate = () => {
        shape.rotation += 2; // spin animation
      };