decord/source/6499_transformRotationProps.js
2026-08-24 06:08:38 +00:00

46 lines
1.8 KiB
JavaScript

// Module ID: 6499
// Function ID: 6500
// Name: transformRotationProps
// Dependencies: [6476, 6491, 6467]
// Module 6499 (transformRotationProps)
import ComposedGestureName from "ComposedGestureName" /* 6467 */;
import isGestureEnabled from "isGestureEnabled" /* 6476 */;
import useGesture from "useGesture" /* 6491 */;
require = arg1;
const dependencyMap = arg6;
function transformRotationProps(arg0) {
arg0.changeEventCalculator = isGestureEnabled.getChangeEventCalculator(diffCalculator);
arg0.fillInDefaultValues = fillInDefaultValues;
return arg0;
}
function diffCalculator(rotation, rotation2) {
rotation = rotation.rotation;
if (rotation2) {
let rotationChange = rotation - rotation2.rotation;
} else {
rotationChange = rotation;
}
return { rotationChange };
}
diffCalculator.__closure = {};
diffCalculator.__workletHash = 14071129947311;
diffCalculator.__initData = { code: "function diffCalculator_Pnpm_useRotationGestureTs1(current,previous){return{rotationChange:previous?current.rotation-previous.rotation:current.rotation};}" };
function fillInDefaultValues(arg0) {
arg0.rotationChange = 0;
}
fillInDefaultValues.__closure = {};
fillInDefaultValues.__workletHash = 2470118803733;
fillInDefaultValues.__initData = { code: "function fillInDefaultValues_Pnpm_useRotationGestureTs2(event){event.rotationChange=0;}" };
const map = new Map();
let closure_6 = {};
arg5.useRotationGesture = function useRotationGesture(gestureHandlerProps) {
let tmp = gestureHandlerProps;
if (gestureHandlerProps === undefined) {
tmp = closure_6;
}
const clonedAndRemappedConfig = isGestureEnabled.useClonedAndRemappedConfig(tmp, map, transformRotationProps);
const obj = isGestureEnabled;
return useGesture.useGesture(ComposedGestureName.SingleGestureName.Rotation, clonedAndRemappedConfig);
};