- 按基础步骤添加场景、相机、控制器、渲染函数
- 加载环境纹理,
- 加载模型
- 添加直线光
视频纹理(底部的圈用mp4的形式)
创建视频
1 | let video = document.createElement("video") |
创建视频纹理
1 | let videoTexture = new THREE>VideoTexture(video) |
创建物体
1 | const videoMesh = new THREE.Mesh(videoPlane,videoMaterial) |
镜面反射
导入库
- import { Relfector } from “three/examples/jsm/objects/Reflector”
添加反射平面
1 | const reflectorGeometry = new THREE.PlaneBufferGeometry(100,100) |