|
1 | 1 | import { Matrix3, Matrix4, Mesh, Quad, Renderer, ShaderProgram, Vector, Vertex } from 'deepslate'
|
2 | 2 | import { mat4, quat, vec3 } from 'gl-matrix'
|
3 | 3 | import { useCallback, useMemo, useRef, useState } from 'preact/hooks'
|
| 4 | +import { composeMatrix, svdDecompose } from '../Utils.js' |
4 | 5 | import { Footer, NumberInput, Octicon, RangeInput } from '../components/index.js'
|
5 | 6 | import { InteractiveCanvas3D } from '../components/previews/InteractiveCanvas3D.jsx'
|
6 | 7 | import { useLocale, useTitle } from '../contexts/index.js'
|
7 | 8 | import { useActiveTimeout } from '../hooks/useActiveTimout.js'
|
8 | 9 | import { useAsync } from '../hooks/useAsync.js'
|
9 | 10 | import { loadImage } from '../services/DataFetcher.js'
|
10 |
| -import { composeMatrix, svdDecompose } from '../Utils.js' |
11 | 11 |
|
12 | 12 | const XYZ = ['x', 'y', 'z'] as const
|
13 | 13 | type XYZ = typeof XYZ[number]
|
@@ -163,7 +163,8 @@ export function Transformation({}: Props) {
|
163 | 163 |
|
164 | 164 | const [copiedComposed, setCopiedComposed] = useActiveTimeout()
|
165 | 165 | const onCopyComposed = useCallback(() => {
|
166 |
| - navigator.clipboard.writeText(`[${[...matrix.data].map(formatFloat).join(',')}]`) |
| 166 | + const matrixData = matrix.clone().transpose().data |
| 167 | + navigator.clipboard.writeText(`[${[...matrixData].map(formatFloat).join(',')}]`) |
167 | 168 | .then(() => setCopiedComposed())
|
168 | 169 | }, [matrix, setCopiedComposed])
|
169 | 170 |
|
|
0 commit comments