You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/__test__/Geometry/GeUtils.test.ts

17 lines
597 B

import { getLoocAtUpVec, cZAxis } from "./../../src/Geometry/GeUtils"
import { Vector3 } from "three";
test('getLoocAtUpVec', () =>
{
//俯视图 0,1,0
expect(getLoocAtUpVec(new Vector3(0, 0, 1)) /*?*/).toMatchSnapshot();
//仰视图
expect(getLoocAtUpVec(new Vector3(0, 0, -1)) /*?*/).toMatchSnapshot();
//左视图
expect(getLoocAtUpVec(new Vector3(-1, 0, 0)) /*?*/).toMatchSnapshot();
//右视图
expect(getLoocAtUpVec(new Vector3(1, 0, 0)) /*?*/).toMatchSnapshot();
//前视图
expect(getLoocAtUpVec(new Vector3(0, 1, 0)) /*?*/).toMatchSnapshot();
});