|
|
@ -73,11 +73,15 @@ export class Path implements ISerialize
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private _RotateCache = new Map<number, Path>();
|
|
|
|
Rotate(rotation: number): Path
|
|
|
|
Rotate(rotation: number): Path
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (rotation === 0) return this;
|
|
|
|
if (rotation === 0) return this;
|
|
|
|
|
|
|
|
if (this._RotateCache.has(rotation))
|
|
|
|
|
|
|
|
return this._RotateCache.get(rotation);
|
|
|
|
let path = new Path();
|
|
|
|
let path = new Path();
|
|
|
|
path.Init(this._OrigionPoints, rotation);
|
|
|
|
path.Init(this._OrigionPoints, rotation);
|
|
|
|
|
|
|
|
this._RotateCache.set(rotation, path);
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|