This commit is contained in:
2025-08-04 18:57:35 +02:00
parent 8cf6e78a79
commit 9495868c2e
5030 changed files with 518594 additions and 17609 deletions

1
node_modules/pixi.js/lib/utils/misc/NOOP.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const NOOP: () => void;

8
node_modules/pixi.js/lib/utils/misc/NOOP.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
'use strict';
"use strict";
const NOOP = () => {
};
exports.NOOP = NOOP;
//# sourceMappingURL=NOOP.js.map

1
node_modules/pixi.js/lib/utils/misc/NOOP.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"NOOP.js","sources":["../../../src/utils/misc/NOOP.ts"],"sourcesContent":["export const NOOP = () =>\n{\n // empty!\n};\n"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,MACpB;AAEA;;;;"}

6
node_modules/pixi.js/lib/utils/misc/NOOP.mjs generated vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
const NOOP = () => {
};
export { NOOP };
//# sourceMappingURL=NOOP.mjs.map

1
node_modules/pixi.js/lib/utils/misc/NOOP.mjs.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"NOOP.mjs","sources":["../../../src/utils/misc/NOOP.ts"],"sourcesContent":["export const NOOP = () =>\n{\n // empty!\n};\n"],"names":[],"mappings":";AAAO,MAAM,OAAO,MACpB;AAEA;;;;"}

90
node_modules/pixi.js/lib/utils/misc/Transform.d.ts generated vendored Normal file
View File

@@ -0,0 +1,90 @@
import { Matrix } from '../../maths/matrix/Matrix';
import { ObservablePoint } from '../../maths/point/ObservablePoint';
import type { Observer } from '../../maths/point/ObservablePoint';
/**
* Options for the {@link utils.Transform} constructor.
* @memberof utils.Transform
*/
export interface TransformOptions {
/** The matrix to use. */
matrix?: Matrix;
/** The observer to use. */
observer?: {
_onUpdate: (transform: Transform) => void;
};
}
/**
* The Transform class facilitates the manipulation of a 2D transformation matrix through
* user-friendly properties: position, scale, rotation, skew, and pivot.
* @memberof utils
*/
export declare class Transform {
/**
* The local transformation matrix.
* @internal
* @private
*/
_matrix: Matrix;
/** The coordinate of the object relative to the local coordinates of the parent. */
position: ObservablePoint;
/** The scale factor of the object. */
scale: ObservablePoint;
/** The pivot point of the container that it rotates around. */
pivot: ObservablePoint;
/** The skew amount, on the x and y axis. */
skew: ObservablePoint;
/** The rotation amount. */
protected _rotation: number;
/**
* The X-coordinate value of the normalized local X axis,
* the first column of the local transformation matrix without a scale.
*/
protected _cx: number;
/**
* The Y-coordinate value of the normalized local X axis,
* the first column of the local transformation matrix without a scale.
*/
protected _sx: number;
/**
* The X-coordinate value of the normalized local Y axis,
* the second column of the local transformation matrix without a scale.
*/
protected _cy: number;
/**
* The Y-coordinate value of the normalized local Y axis,
* the second column of the local transformation matrix without a scale.
*/
protected _sy: number;
protected dirty: boolean;
protected observer: Observer<Transform>;
/**
* @param options - Options for the transform.
* @param options.matrix - The matrix to use.
* @param options.observer - The observer to use.
*/
constructor({ matrix, observer }?: TransformOptions);
/**
* This matrix is computed by combining this Transforms position, scale, rotation, skew, and pivot
* properties into a single matrix.
* @readonly
*/
get matrix(): Matrix;
/**
* Called when a value changes.
* @param point
* @internal
* @private
*/
_onUpdate(point?: ObservablePoint): void;
/** Called when the skew or the rotation changes. */
protected updateSkew(): void;
toString(): string;
/**
* Decomposes a matrix and sets the transforms properties based on it.
* @param matrix - The matrix to decompose
*/
setFromMatrix(matrix: Matrix): void;
/** The rotation of the object in radians. */
get rotation(): number;
set rotation(value: number);
}

90
node_modules/pixi.js/lib/utils/misc/Transform.js generated vendored Normal file
View File

@@ -0,0 +1,90 @@
'use strict';
var Matrix = require('../../maths/matrix/Matrix.js');
var ObservablePoint = require('../../maths/point/ObservablePoint.js');
"use strict";
class Transform {
/**
* @param options - Options for the transform.
* @param options.matrix - The matrix to use.
* @param options.observer - The observer to use.
*/
constructor({ matrix, observer } = {}) {
this.dirty = true;
this._matrix = matrix ?? new Matrix.Matrix();
this.observer = observer;
this.position = new ObservablePoint.ObservablePoint(this, 0, 0);
this.scale = new ObservablePoint.ObservablePoint(this, 1, 1);
this.pivot = new ObservablePoint.ObservablePoint(this, 0, 0);
this.skew = new ObservablePoint.ObservablePoint(this, 0, 0);
this._rotation = 0;
this._cx = 1;
this._sx = 0;
this._cy = 0;
this._sy = 1;
}
/**
* This matrix is computed by combining this Transforms position, scale, rotation, skew, and pivot
* properties into a single matrix.
* @readonly
*/
get matrix() {
const lt = this._matrix;
if (!this.dirty)
return lt;
lt.a = this._cx * this.scale.x;
lt.b = this._sx * this.scale.x;
lt.c = this._cy * this.scale.y;
lt.d = this._sy * this.scale.y;
lt.tx = this.position.x - (this.pivot.x * lt.a + this.pivot.y * lt.c);
lt.ty = this.position.y - (this.pivot.x * lt.b + this.pivot.y * lt.d);
this.dirty = false;
return lt;
}
/**
* Called when a value changes.
* @param point
* @internal
* @private
*/
_onUpdate(point) {
this.dirty = true;
if (point === this.skew) {
this.updateSkew();
}
this.observer?._onUpdate(this);
}
/** Called when the skew or the rotation changes. */
updateSkew() {
this._cx = Math.cos(this._rotation + this.skew.y);
this._sx = Math.sin(this._rotation + this.skew.y);
this._cy = -Math.sin(this._rotation - this.skew.x);
this._sy = Math.cos(this._rotation - this.skew.x);
this.dirty = true;
}
toString() {
return `[pixi.js/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`;
}
/**
* Decomposes a matrix and sets the transforms properties based on it.
* @param matrix - The matrix to decompose
*/
setFromMatrix(matrix) {
matrix.decompose(this);
this.dirty = true;
}
/** The rotation of the object in radians. */
get rotation() {
return this._rotation;
}
set rotation(value) {
if (this._rotation !== value) {
this._rotation = value;
this._onUpdate(this.skew);
}
}
}
exports.Transform = Transform;
//# sourceMappingURL=Transform.js.map

1
node_modules/pixi.js/lib/utils/misc/Transform.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

88
node_modules/pixi.js/lib/utils/misc/Transform.mjs generated vendored Normal file
View File

@@ -0,0 +1,88 @@
import { Matrix } from '../../maths/matrix/Matrix.mjs';
import { ObservablePoint } from '../../maths/point/ObservablePoint.mjs';
"use strict";
class Transform {
/**
* @param options - Options for the transform.
* @param options.matrix - The matrix to use.
* @param options.observer - The observer to use.
*/
constructor({ matrix, observer } = {}) {
this.dirty = true;
this._matrix = matrix ?? new Matrix();
this.observer = observer;
this.position = new ObservablePoint(this, 0, 0);
this.scale = new ObservablePoint(this, 1, 1);
this.pivot = new ObservablePoint(this, 0, 0);
this.skew = new ObservablePoint(this, 0, 0);
this._rotation = 0;
this._cx = 1;
this._sx = 0;
this._cy = 0;
this._sy = 1;
}
/**
* This matrix is computed by combining this Transforms position, scale, rotation, skew, and pivot
* properties into a single matrix.
* @readonly
*/
get matrix() {
const lt = this._matrix;
if (!this.dirty)
return lt;
lt.a = this._cx * this.scale.x;
lt.b = this._sx * this.scale.x;
lt.c = this._cy * this.scale.y;
lt.d = this._sy * this.scale.y;
lt.tx = this.position.x - (this.pivot.x * lt.a + this.pivot.y * lt.c);
lt.ty = this.position.y - (this.pivot.x * lt.b + this.pivot.y * lt.d);
this.dirty = false;
return lt;
}
/**
* Called when a value changes.
* @param point
* @internal
* @private
*/
_onUpdate(point) {
this.dirty = true;
if (point === this.skew) {
this.updateSkew();
}
this.observer?._onUpdate(this);
}
/** Called when the skew or the rotation changes. */
updateSkew() {
this._cx = Math.cos(this._rotation + this.skew.y);
this._sx = Math.sin(this._rotation + this.skew.y);
this._cy = -Math.sin(this._rotation - this.skew.x);
this._sy = Math.cos(this._rotation - this.skew.x);
this.dirty = true;
}
toString() {
return `[pixi.js/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`;
}
/**
* Decomposes a matrix and sets the transforms properties based on it.
* @param matrix - The matrix to decompose
*/
setFromMatrix(matrix) {
matrix.decompose(this);
this.dirty = true;
}
/** The rotation of the object in radians. */
get rotation() {
return this._rotation;
}
set rotation(value) {
if (this._rotation !== value) {
this._rotation = value;
this._onUpdate(this.skew);
}
}
}
export { Transform };
//# sourceMappingURL=Transform.mjs.map

File diff suppressed because one or more lines are too long