MediaWiki:Gadget-WebGL2.js: Difference between revisions
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); }); });" |
No edit summary |
||
| Line 1: | Line 1: | ||
$(function() { | $(function() { | ||
console.log("WebGL2 Test"); | |||
$('.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); | |||
}); | |||
}); | }); | ||
Revision as of 19:05, 31 January 2026
$(function() {
console.log("WebGL2 Test");
$('.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);
});
});