Ai
7 Star 27 Fork 2

Vticn/DreamFields

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Cameras.ts 927 Bytes
一键复制 编辑 原始数据 按行查看 历史
almighty 提交于 2022-04-24 09:38 +08:00 . 修改项目文档结构
import EventEmitter from './Utils/EventEmitter'
import * as THREE from 'three'
export class Cameras extends EventEmitter {
perspective: THREE.PerspectiveCamera;
orthographic: THREE.OrthographicCamera;
constructor() {
super();
// this.camera = new THREE.PerspectiveCamera( 50, 1, 0.1, 1000 );
this.perspective = new THREE.PerspectiveCamera(50, 1, 0.1, 1000);
this.orthographic = new THREE.OrthographicCamera(- 1.0, 1.0, 1.0, - 1.0, -5000, 5000);
// this.orthographic = new THREE.OrthographicCamera(- 1.0, 1.0, 1.0, - 1.0, -5000, 5000);
// this.orthographic.position.set(0, 0, 1)
// this.orthographic = new THREE.OrthographicCamera(- 1.0, 1.0, 1.0, - 1.0, -Infinity, Infinity);
this.perspective.lookAt(new THREE.Vector3())
}
setInitPosition(camera, posi: THREE.Vector3 = new THREE.Vector3(0, 0, 5)) {
camera.position.copy(posi);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vticn/dream-fields.git
git@gitee.com:vticn/dream-fields.git
vticn
dream-fields
DreamFields
master

搜索帮助