changeTranslation(c, v)} />
+ )}
@@ -189,10 +235,9 @@ export function Transformation({}: Props) {
- {Array(16).fill(0).map((_, i) =>
- changeMatrix(i, v)} />
- changeMatrix(i, v)} />
-
)}
+ {Array(16).fill(0).map((_, i) =>
+ changeMatrix(i, v)} />
+ )}
@@ -205,6 +250,21 @@ export function Transformation({}: Props) {
}
+interface SliderProps {
+ label?: string
+ value: number
+ onChange?: (value: number) => void
+ min?: number
+ max?: number
+}
+function Slider({ label, value, onChange, min, max }: SliderProps) {
+ return
+ {label && }
+
+
+
+}
+
function formatFloat(x: number) {
return x.toFixed(3).replace(/\.?0+$/, '') + 'f'
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 6cc0f571..4fb0dfde 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -136,6 +136,9 @@
"transformation.right_rotation": "Right rotation",
"transformation.copy_decomposed": "Copy decomposed format",
"transformation.copy_composed": "Copy matrix format",
+ "transformation.rotation_mode": "Format: %0%",
+ "transformation.rotation_mode.quaternion": "Quaternion",
+ "transformation.rotation_mode.axis_angle": "Axis-angle",
"trim_material": "Trim material",
"trim_pattern": "Trim pattern",
"pack_mcmeta": "Pack.mcmeta",
diff --git a/src/styles/global.css b/src/styles/global.css
index 86780f89..19ce75b8 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -584,13 +584,21 @@ main.has-project {
margin-bottom: 2px;
}
+.transformation-input > * + * {
+ margin-left: 8px;
+}
+
+.transformation-input label {
+ color: var(--text-3);
+ font-family: consolas;
+}
+
.transformation-input input[type=number] {
width: 100px;
padding: 3px 6px;
border: none;
border-radius: 3px;
font-size: 14px;
- margin-right: 8px;
background-color: var(--background-2);
color: var(--text-2);
}