完成下列功能:
1.板件显示 2.板件选中状态 3.标注显示 4.相机控制.
This commit is contained in:
25
src/RotateUV.ts
Normal file
25
src/RotateUV.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Matrix2 } from './Matrix2';
|
||||
import * as THREE from 'three';
|
||||
|
||||
|
||||
export function RotateUVs(geo: THREE.Geometry)
|
||||
{
|
||||
let roMat = new Matrix2();
|
||||
roMat.set(0, -1,
|
||||
1, 0);
|
||||
|
||||
let addV = new THREE.Vector2(1, 0);
|
||||
|
||||
for (let uvs of geo.faceVertexUvs)
|
||||
{
|
||||
for (let uv of uvs)
|
||||
{
|
||||
for (let v of uv)
|
||||
{
|
||||
roMat.applyVector(v);
|
||||
v.add(addV);
|
||||
}
|
||||
}
|
||||
}
|
||||
geo.uvsNeedUpdate = true;
|
||||
}
|
Reference in New Issue
Block a user