Files
cocos4/playground/simple.html
T
Huabing.Xu b717d9148f Renderer (#3282)
* add renderer to ccgame, add camera component

* apply stash

* fix predefine.js

* add renderable and rendersystem

* fix format

* fix debug

* fix run errors

* renderer can clear now
2018-09-19 19:24:16 +08:00

43 lines
958 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>spec-scroll-view</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>
function onStart() {
//todo initialization
let scene = new cc.Scene();
let node = new cc.Node();
scene.addChild(node);
let comp = node.addComponent('CameraComponent');
cc.director.runSceneImmediate(scene);
};
cc.game.run({id:'canvas'}, onStart);
</script>
</body>
</html>