mirror of https://gitee.com/cf-fz/WebCAD.git
parent
3fa928b2a5
commit
f4605cf382
@ -0,0 +1,16 @@
|
||||
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();
|
||||
});
|
@ -0,0 +1,41 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`getLoocAtUpVec 1`] = `
|
||||
Vector3 {
|
||||
"x": 0,
|
||||
"y": 1,
|
||||
"z": 0,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`getLoocAtUpVec 2`] = `
|
||||
Vector3 {
|
||||
"x": 0,
|
||||
"y": -1,
|
||||
"z": 0,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`getLoocAtUpVec 3`] = `
|
||||
Vector3 {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 1,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`getLoocAtUpVec 4`] = `
|
||||
Vector3 {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 1,
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`getLoocAtUpVec 5`] = `
|
||||
Vector3 {
|
||||
"x": 0,
|
||||
"y": -0,
|
||||
"z": 1,
|
||||
}
|
||||
`;
|
Loading…
Reference in new issue