Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
32 lines
767 B
Plaintext
32 lines
767 B
Plaintext
/**
|
|
* Reset an axis to the provided origin box.
|
|
*
|
|
* This is a mutative operation.
|
|
*/
|
|
function copyAxisInto(axis, originAxis) {
|
|
axis.min = originAxis.min;
|
|
axis.max = originAxis.max;
|
|
}
|
|
/**
|
|
* Reset a box to the provided origin box.
|
|
*
|
|
* This is a mutative operation.
|
|
*/
|
|
function copyBoxInto(box, originBox) {
|
|
copyAxisInto(box.x, originBox.x);
|
|
copyAxisInto(box.y, originBox.y);
|
|
}
|
|
/**
|
|
* Reset a delta to the provided origin box.
|
|
*
|
|
* This is a mutative operation.
|
|
*/
|
|
function copyAxisDeltaInto(delta, originDelta) {
|
|
delta.translate = originDelta.translate;
|
|
delta.scale = originDelta.scale;
|
|
delta.originPoint = originDelta.originPoint;
|
|
delta.origin = originDelta.origin;
|
|
}
|
|
|
|
export { copyAxisDeltaInto, copyAxisInto, copyBoxInto };
|