openOutpaint/js/config.js
Victor Seiji Hariki e198cf9af4 allow stamp rotation(drag) and scaling(wheel)
also adds shift as a 'finetune' for wheel. works for dream and stamp. if
shift is pressed, wheel will scale slower (not snapping to 128 for
dream, or 0.1 for stamp)

Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
2023-01-12 23:00:34 -03:00

43 lines
989 B
JavaScript

/**
* This is a file for static unchanging global configurations.
*
* Do NOT confuse with settings, which are modifiable by either the settings menu, or in the application itself.
*/
const config = makeReadOnly(
{
// Grid Size
gridSize: 64,
// Scroll Tick Limit (How much must scroll to reach next tick)
wheelTickSize: 50,
/** Select Tool */
// Handle Draw Size
handleDrawSize: 12,
// Handle Draw Hover Scale
handleDrawHoverScale: 1.3,
// Handle Detect Size
handleDetectSize: 20,
// Rotate Handle Distance (from selection)
rotateHandleDistance: 32,
// Rotation Snapping Distance
rotationSnappingDistance: (10 * Math.PI) / 180,
// Rotation Snapping Angles
rotationSnappingAngles: [
(-Math.PI * 4) / 4,
(-Math.PI * 3) / 4,
(-Math.PI * 2) / 4,
(-Math.PI * 1) / 4,
0,
(Math.PI * 1) / 4,
(Math.PI * 2) / 4,
(Math.PI * 3) / 4,
(Math.PI * 4) / 4,
],
// Endpoint
api: makeReadOnly({path: "/sdapi/v1/"}),
},
"config"
);