随笔分类 - three.js
three.js 引用外部模型,并使用其绑定的动画(梳理)
摘要:1. 各元素绑定规则 页面元素,渲染器,场景,灯光,相机,控制器,模型 页面元素获取 const container = document.getElementById("container"); 渲染器 -> 页面元素 container.appendChild(this.renderer.dom
阅读全文
three.js 简单方块绘制
摘要:<template> <div> <div id="container"></div> </div> </template> <script> import * as Three from 'three' import { DoubleSide, TextureLoader } from 'thre
阅读全文
three.js 引用外部模型,并使用其绑定的动画(代码)
摘要:<template> <div id="container"> <!-- <img src="/models/yunlog.png" alt /> --> <button @click="dispose('robot')"> 模型切换 </button> <button @click="change
阅读全文
three.js纹理贴图不显示
摘要:1、材质问题, 比如MeshNormalMaterial材质不可以 2、引入图片问题 //这种引入方式不可以 loader.load('./ylj.jpg', function(texture) {} //这种引入方式可以: var ylj = require('./ylj.jpg') loader
阅读全文