|
|
@ -1,7 +1,6 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { reactive } from "vue"; |
|
|
import { reactive } from "vue"; |
|
|
import { ElInputNumber, useFormItem } from "element-plus"; |
|
|
import { ElInputNumber, useFormItem } from "element-plus"; |
|
|
import { Typeof } from "@ease-forge/shared"; |
|
|
|
|
|
import { renderIcon } from "@/utils/webutils.js"; |
|
|
import { renderIcon } from "@/utils/webutils.js"; |
|
|
|
|
|
|
|
|
defineOptions({ |
|
|
defineOptions({ |
|
|
@ -69,9 +68,9 @@ function getPosition(idx: 0 | 1 | 2) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function getRotation(idx: 0 | 1 | 2) { |
|
|
function getRotation(idx: 0 | 1 | 2) { |
|
|
const radian = props.modelValue?.[1]?.[idx]; |
|
|
return props.modelValue?.[1]?.[idx]; |
|
|
if (Typeof.noValue(radian)) return; |
|
|
// if (Typeof.noValue(radian)) return; |
|
|
return Math.round(radian * 180 / Math.PI); |
|
|
// return Math.round(radian * 180 / Math.PI); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function getScale(idx: 0 | 1 | 2) { |
|
|
function getScale(idx: 0 | 1 | 2) { |
|
|
@ -79,8 +78,9 @@ function getScale(idx: 0 | 1 | 2) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function calcRotation(rotation?: number) { |
|
|
function calcRotation(rotation?: number) { |
|
|
if (Typeof.noValue(rotation)) return; |
|
|
return rotation; |
|
|
return rotation * Math.PI / 180; |
|
|
// if (Typeof.noValue(rotation)) return; |
|
|
|
|
|
// return rotation * Math.PI / 180; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
interface TransformEditorExpose { |
|
|
interface TransformEditorExpose { |
|
|
|