123456789101112131415161718192021222324252627282930313233 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <base href="../../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1><br />
- <p>
- 虽然这个问题现在已经变得越来越小,但不得不说,有的设备或者浏览器到现在仍然不支持WebGL。
- 以下的方法可以帮助你检测当前用户所使用的环境是否支持WebGL,倘若不支持,将向用户显示一条信息。
- </p>
- <p>
- 请把[link:https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js]引入到你的文件,并在尝试开始渲染之前先运行该文件。
- </p>
- <code>
- if (Detector.webgl) {
- // Initiate function or other initializations here
- animate();
- } else {
- var warning = Detector.getWebGLErrorMessage();
- document.getElementById('container').appendChild(warning);
- }
- </code>
- </body>
- </html>
|