three实现三维夜晚地球灯光飞行轨迹效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维夜晚地球灯光飞行轨迹效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html {
background: black;
height: 100%;
overflow: hidden;
}
body {
height: 100%;
margin: 0;
padding: 0;
position: relative;
z-index: 10;
}
canvas {
-webkit-animation: in 2s cubic-bezier(0.23, 1, 0.32, 1) 0.25s backwards;
animation: in 2s cubic-bezier(0.23, 1, 0.32, 1) 0.25s backwards;
background: transparent;
position: absolute;
}
@-webkit-keyframes in {
from {
opacity: 0;
}
}
@keyframes in {
from {
opacity: 0;
}
}
</style>
</head>
<body >
<div id='container'></div>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.75.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/extras.js"></script>
<script >
'use strict';
var Earth = function (el, data) {
let camera, scene, renderer, composer, w, h;
let lines = [],
mouse = {
x: 0,
y: 0 },
mouseOnDown = {
x: 0,
y: 0 },
points = [],
rotation = {
x: Math.PI * 1.9,
y: Math.PI / 6 },
target = {
x: Math.PI * 1.9,
y: Math.PI / 6 },
ta.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0