Graphics Reference
In-Depth Information
}
function hideLightbox() {
var lightBox =
document.getElementById('light');
lightBox.style.display = 'none';
var fadeBox =
document.getElementById('fade');
fadeBox.style.display = 'none'
}
And that is it for this recipe. If we add this to a web page, a browser that supports We-
bGL shows a pop up with WebGL is supported , if no WebGL is available, a pop up
is shown with the text WebGL isn't supported . Besides this approach, you can also
use the detector object provided by Three.js at https://github.com/mrdoob/three.js/
blob/master/examples/js/Detector.js . If you include this file in your JavaScript, you
can detect WebGL by checking the webgl attribute of the Detector object.
Search WWH ::




Custom Search