html5 canvas+three.js绘制3D地球自转动画特效,挺逼真的效果,支持鼠标拖动地球全方位旋转。
查看演示
下载资源:
37
次 下载资源
下载积分:
20
积分
js代码
var canvasBox = document.getElementById("canvasBox")
var W = canvasBox.clientWidth
var H = canvasBox.clientHeight
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight)
}
window.addEventListener('resize', onWindowResize, false)
var num = 0;
var scene, camera, renderer, light;
function intScene() {
scene = new THREE