static
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<!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을 지원하지 않습니다.
|
||||
아래 메서드는 지원 여부를 체크해 가능한지 아닌지 메세지를 띄워줄 것입니다.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js]를 스크립트에 추가하고 무언가를 렌더링하기 전에 아래 코드를 실행해보세요.
|
||||
</p>
|
||||
|
||||
<code>
|
||||
if ( WEBGL.isWebGLAvailable() ) {
|
||||
|
||||
// Initiate function or other initializations here
|
||||
animate();
|
||||
|
||||
} else {
|
||||
|
||||
const warning = WEBGL.getWebGLErrorMessage();
|
||||
document.getElementById( 'container' ).appendChild( warning );
|
||||
|
||||
}
|
||||
</code>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user