three加载真实职场女性三维模型fbx效果代码
代码语言:html
所属分类:三维
代码描述:three加载真实职场女性三维模型fbx效果代码,该三维模型通过 三维扫描器扫描真实的人构建而成,是一个真人三维模型。皮肤纹理清晰可见。
代码标签: three 加载 真实 职场 女性 三维 模型 fbx
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <style> :root { --themeColor: #0072ff; --secondColor: #00c6ff; } * { margin: 0; padding: 0; } html { background: var(--themeColor); background: -webkit-linear-gradient(to left, var(--themeColor) , var(--secondColor)); background: linear-gradient(to left, var(--themeColor), var(--secondColor)); } body { font-family: Arial, Helvetica, sans-serif; } .loading { position: fixed; height: 100%; width: 100%; left: 0; top: 0; background: #FFFFFF; } .loading .content { height: 330px; width: 540px; position: absolute; top: 50%; left: 50%; margin-top: -165px; margin-left: -270px; } .loading .content .banner { display: inline-block; width: 540px; height: 303px; background: url('//repo.bfw.wiki/bfwrepo/icon/5f7abfbff367a.gif') no-repeat center; background-size: 100% 100%; } .loading .content { text-align: center; font-size: 20px; color: #666666; } .loading .content span { color: var(--themeColor); padding-left: 8px; } </style> </head> <body> <div class="loading" id="loading"> <div class="content"> <i class="banner"></i> <p class="text">加载进度<span id="progress">0%</span></p> </div> <div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.92.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/FBXLoader.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/inflate.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/OrbitControls.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/Stats-16.js"></script> <script> var container, stats, controls, compose; var camera, scene, renderer, light, clickableObjects = []; var clock = new THREE.Clock(); var mixer, mixerArr = [], manMixer; init(); animate(); function init() { container = document.createElement('div'); document.body.appendChild(container); // 场景 scene = new THREE.Scene(); scene.transparent = true; scene.opacity = 0.1; scene.fog = new THREE.Fog(0xa0a0a0, 200, 1000); // 透视相机:视场、长宽比、近面、远面 camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000); camera.position.set(0, 4, 16); camera.lookAt(new THREE.Vector3(0, 0, 0)); // 半球光源:创建室外效果更加自然的光源 light = new THREE.HemisphereLight(0xefefef); light.position.set(0, 20, 0); scene.add(light); // 平行光 light = new THREE.DirectionalLight(0x2d2d2d); light.position.set(0, 20, 10); light.castShadow = true; scene.add(light); // 环境光 var ambientLight = new THREE.AmbientLight(0xffffff, .5); scene.add(ambientLight); // 网格 var grid = new THREE.GridHelper(100, 100, 0xffffff, 0xffffff); grid.position.set(0, -10, 0); grid.material.opacity = 0.3; grid.material..........完整代码请登录后点击上方下载按钮下载查看
网友评论0