three实现三维球体贴图滚动动画效果代码

代码语言:html

所属分类:三维

代码描述:three实现三维球体贴图滚动动画效果代码

代码标签: three 三维 球体 贴图 滚动 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">


</head>

<body>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.87.js"></script>


    <script>
        var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 30, window.innerWidth/window.innerHeight, 0.1, 1000 );
var mesh;

var renderer = new THREE.WebGLRenderer({alpha: true});
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

// add icosahedron
var geometry = new THREE.SphereGeometry(24, 32, 32 );
THREE.ImageUtils.crossOrigin = true;
var textureLoader = new THREE.TextureLoader();
textureLoader.crossOrigin = true;
textureLoader.load('//repo.bfw.wiki/bfwrepo/image/5ec0779dc7b4d.png', function(texture) {
  texture.wrapS = texture.wrapT =   THREE.RepeatWrapping;
    texture.repeat.set( 2, 2 );
    var material = new THRE.........完整代码请登录后点击上方下载按钮下载查看

网友评论0