0.0.24 • Published 2 years ago

three-is v0.0.24

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

three-is

在 typescript 使用 three.js 时的类型守卫

import {isOrthographicCamera, isPerspectiveCamera} from "three-is";
import * as THREE from "three";

const camera: THREE.PerspectiveCamera | THREE.OrthographicCamera = new THREE.OrthographicCamera()

if (isOrthographicCamera(camera)) {
    // 为正交
} else if (isPerspectiveCamera(camera)) {
    // 为透视
}
0.0.24

2 years ago

0.0.23

2 years ago

0.0.21

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago