Jump to content

MediaWiki:Gadget-WebGL2.js

From Apogea Wiki
Revision as of 18:44, 31 January 2026 by Dane (talk | contribs) (Created page with "$(function() { $('.webgl-mount').each(function() { var mount = $(this); var scene = mount.data('scene'); var canvas = document.createElement('canvas'); canvas.width = mount.data('width') || 800; canvas.height = mount.data('height') || 600; canvas.className = 'webgl-canvas'; mount.append(canvas); // Your WebGL initialization here console.log('WebGL canvas created for scene:', scene); }); });")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$(function() {
  $('.webgl-mount').each(function() {
      var mount = $(this);
      var scene = mount.data('scene');

      var canvas = document.createElement('canvas');
      canvas.width = mount.data('width') || 800;
      canvas.height = mount.data('height') || 600;
      canvas.className = 'webgl-canvas';
      mount.append(canvas);

      // Your WebGL initialization here
      console.log('WebGL canvas created for scene:', scene);
  });
});