@flashist/flibs 0.0.239 → 0.0.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/geom/pixijs/Point.d.ts +6 -2
- package/geom/pixijs/Point.js +38 -1
- package/geom/pixijs/Point.js.map +1 -1
- package/package.json +1 -1
package/geom/pixijs/Point.d.ts
CHANGED
package/geom/pixijs/Point.js
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { Point as PixiPoint } from "pixi.js";
|
|
2
17
|
// import Point = PIXI.Point;
|
|
18
|
+
var Point = /** @class */ (function (_super) {
|
|
19
|
+
__extends(Point, _super);
|
|
20
|
+
function Point() {
|
|
21
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
Point.prototype.subtract = function (point) {
|
|
24
|
+
return new Point(this.x - point.x, this.y - point.y);
|
|
25
|
+
};
|
|
26
|
+
Point.prototype.add = function (point) {
|
|
27
|
+
return new Point(this.x + point.x, this.y + point.y);
|
|
28
|
+
};
|
|
29
|
+
Point.prototype.normalize = function (length) {
|
|
30
|
+
if (length === void 0) { length = 1; }
|
|
31
|
+
var magnitude = Math.sqrt(this.x * this.x + this.y * this.y);
|
|
32
|
+
if (magnitude != 0) {
|
|
33
|
+
this.x *= length / magnitude;
|
|
34
|
+
this.y *= length / magnitude;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return Point;
|
|
38
|
+
}(PixiPoint));
|
|
3
39
|
export { Point };
|
|
40
|
+
;
|
|
4
41
|
//# sourceMappingURL=Point.js.map
|
package/geom/pixijs/Point.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../src/geom/pixijs/Point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../src/geom/pixijs/Point.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,SAAS,CAAC;AAC3C,6BAA6B;AAC7B;IAA2B,yBAAS;IAApC;;IAsBA,CAAC;IArBG,wBAAQ,GAAR,UAAS,KAAY;QACjB,OAAO,IAAI,KAAK,CAChB,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAChB,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CACf,CAAA;IACL,CAAC;IAED,mBAAG,GAAH,UAAI,KAAY;QACZ,OAAO,IAAI,KAAK,CACZ,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAChB,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CACnB,CAAA;IACL,CAAC;IAED,yBAAS,GAAT,UAAU,MAAkB;QAAlB,uBAAA,EAAA,UAAkB;QACxB,IAAI,SAAS,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACrE,IAAI,SAAS,IAAI,CAAC,EAAE;YAChB,IAAI,CAAC,CAAC,IAAI,MAAM,GAAG,SAAS,CAAC;YAC7B,IAAI,CAAC,CAAC,IAAI,MAAM,GAAG,SAAS,CAAC;SAChC;IACL,CAAC;IACL,YAAC;AAAD,CAAC,AAtBD,CAA2B,SAAS,GAsBnC;;AAAA,CAAC"}
|