From 988ac3a750fabf9910b48fe2478a13c1650137ce Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 19 Oct 2021 14:58:38 +0200 Subject: Update examples --- examples/shaders/loader.html | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'examples/shaders/loader.html') diff --git a/examples/shaders/loader.html b/examples/shaders/loader.html index 7f740c8..8cb42dd 100644 --- a/examples/shaders/loader.html +++ b/examples/shaders/loader.html @@ -80,27 +80,19 @@ $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); - // Quick hack for some examples not working on web - if (name == "shaders_raymarching") - { - $('#eximage').append(' '); - } - else - { - // #eximage filling code: canvas sample and image - $('#eximage').append( - '' + - ' ' + - ''); - - Module.canvas = document.getElementById('canvas'); - Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); - - var jsUrl = name + '.js'; + // #eximage filling code: canvas sample and image + $('#eximage').append( + '' + + ' ' + + ''); - // Run emscripten example - $.getScript(jsUrl, function() {}); - } + Module.canvas = document.getElementById('canvas'); + Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false); + + var jsUrl = name + '.js'; + + // Run emscripten example + $.getScript(jsUrl, function() {}); }); -- cgit v1.2.3