Files
cocos4/playground/sample.html
T
2018-12-19 17:36:36 +08:00

39 lines
819 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>sample</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
background-color: #333;
margin: 0px;
overflow: hidden;
}
.fit {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body class="fit">
<canvas id="canvas" tabindex="-1" class="fit"></canvas>
<script src="../bin/cocos-3d.dev.js"></script>
<!-- <script src="./loadScene.js"></script> -->
<script>
let canvasEL = document.getElementById('canvas');
console.log(canvasEL);
let device = new cc.gfx.GFXWebGLDevice(canvasEL);
console.log(device.getDeviceName());
</script>
</body>
</html>