first commit
This commit is contained in:
31
node_modules/framer-motion/dist/es/projection/geometry/copy.mjs
generated
vendored
Normal file
31
node_modules/framer-motion/dist/es/projection/geometry/copy.mjs
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 };
|
||||
Reference in New Issue
Block a user