three实现三维粒子人头数字人鼠标交互动画效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维粒子人头数字人鼠标交互动画效果代码
代码标签: three 三维 粒子 人头 数字人 鼠标 交互 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/modernizr.2.8.3.js"></script> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat:400,700'> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Playfair+Display:400italic'> <style> .particlehead { background: black; } h1 { font-size: 31px; color: #202022; font-family: Montserrat, sans-serif; position: absolute; left: 50%; top: 50%; text-transform: uppercase; font-weight: normal; margin-left: -264px; margin-top: -20px; pointer-events: none; } h1 strong { font-weight: 700; } h1 em { font-family: 'Playfair Display', serif; text-transform: lowercase; font-style: italic; } </style> </head> <body> <div class="particlehead"></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.r61.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/OBJLoader.61.js"></script> <script > var site = site || {}; site.window = $(window); site.document = $(document); site.Width = site.window.width(); site.Height = site.window.height(); var Background = function() { }; Background.headparticle = function() { if ( !Modernizr.webgl ) { alert('Your browser dosent support WebGL'); } var camera, scene, renderer; var mouseX = 0, mouseY = 0; var p; var windowHalfX = site.Width / 2; var windowHalfY = site.Height / 2; Background.camera = new THREE.PerspectiveCamera( 35, site.Width / site.Height, 1, 2000 ); Background.camera.position.z = 300; // scene Background.scene = new THREE.Scene(); // texture var manager = new THREE.LoadingManager(); m.........完整代码请登录后点击上方下载按钮下载查看
网友评论0