123456789101112131415161718192021222324252627282930313233 |
- <!DOCTYPE html>
- <html lang="ko">
- <head>
- <meta charset="utf-8">
- <base href="../../../" />
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>WebGL 호환성 검사([name])</h1>
- <p>
- 아마 거의 문제가 되지 않을테지만, 몇몇 디바이스나 브라우저는 아직 WebGL 2을 지원하지 않습니다.
- 아래 메서드는 지원 여부를 체크해 가능한지 아닌지 메세지를 띄워줄 것입니다.
- WebGL 지원 감지 모듈을 가져오고 렌더링을 시도하기 전에 다음을 실행하십시오.
- </p>
- <code>
- import WebGL from 'three/addons/capabilities/WebGL.js';
- if ( WebGL.isWebGL2Available() ) {
- // Initiate function or other initializations here
- animate();
- } else {
- const warning = WebGL.getWebGL2ErrorMessage();
- document.getElementById( 'container' ).appendChild( warning );
- }
- </code>
- </body>
- </html>
|