three+jquery实现第一人称视角爬楼梯天梯动画效果代码
代码语言:html
所属分类:动画
代码描述:three+jquery实现第一人称视角爬楼梯天梯动画效果代码
代码标签: three jquery 第一人称 视角 爬楼梯 天梯 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { margin: 0; background: #000; } </style> </head> <body> <!-- partial:index.partial.html --> <div id="container"> </div> <!-- partial --> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.2.11.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.58.js"></script> <script > var $container = $('#container'); var renderer = new THREE.WebGLRenderer({antialias: true}); var camera = new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,0.1,10000); var scene = new THREE.Scene(); scene.add(camera); renderer.setSize(window.innerWidth, window.innerHeight); $container.append(renderer.domElement); ///////////////////////////////////////// // camera settings camera.position.y = 800; // create the materials var normalMaterial = new THREE.MeshNormalMaterial({}); var phongMaterial = new THREE.MeshPhongMaterial({ color : 0xffffff, ambiant : 0xffffff, specular : 0xFFFFFF, shininess : 70 }); var wallMat = new THREE.MeshPhongMaterial({ color : 0xdd7000, ambiant : 0xE30075, specular : 0xccccFF, shininess : 50 }); // create the Lights var Lum = new THREE.PointLight( 0xE80C7A, 1.1); Lum.position.x = -400; Lum.position.y = 200; Lum.position.z = -200; var Lum2 = new THREE.PointLight( 0xFF8000, 1.1 ); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0