admin管理员组文章数量:1424458
It seems like Detector.js is used more often when I look around online, but I see that there is also the minified system.min.js file: .js
This may be trivial, but I'm wondering which is proper to use, and why most people seem to be using Detector (from what I've seen, at least). They both seem to do the task.
It seems like Detector.js is used more often when I look around online, but I see that there is also the minified system.min.js file: https://github./mrdoob/system.js
This may be trivial, but I'm wondering which is proper to use, and why most people seem to be using Detector (from what I've seen, at least). They both seem to do the task.
Share Improve this question edited Feb 3, 2014 at 17:08 Quonux 2,9911 gold badge25 silver badges32 bronze badges asked May 12, 2013 at 5:17 dmonopolydmonopoly 3,3315 gold badges36 silver badges53 bronze badges 1- If they both do the same thing, it probably doesn't matter. Just pick one. – icktoofay Commented May 12, 2013 at 5:29
1 Answer
Reset to default 5It appears that System.js and Detector.js both use the same snippet of code for detecting WebGL. Namely:
var supportsWebGL = ( function () { try { return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); } catch( e ) { return false; } } )();
If that's all you need to detect, you could just use that directly.
本文标签: javascriptDetect webgl supportshould we use Detectorjs or systemminjsStack Overflow
版权声明:本文标题:javascript - Detect webgl support, should we use Detector.js or system.min.js? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745376382a2655954.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论