import { Vector2 } from "three"; import { simplify } from "../../src/Geometry/Simplify"; test('路径简化', () => { let path: Vector2[] = []; path.push(new Vector2(0, 0)); path.push(new Vector2(3, 1)); path.push(new Vector2(5, 0)); path.push(new Vector2(10, 0)); path.push(new Vector2(15, 5)); path.push(new Vector2(14.5, 6)); path.push(new Vector2(18, 6)); path.push(new Vector2(28, 6)); path.push(new Vector2(28.3, 6)); let sp = simplify(path, 1.5, false);//? expect(sp).toMatchSnapshot(); });