mirror of https://gitee.com/cf-fz/WebCAD.git
parent
00f6029cfc
commit
912e13be5a
@ -0,0 +1,38 @@
|
||||
import { observable, runInAction, autorun } from 'mobx';
|
||||
export class CommandStore
|
||||
{
|
||||
@observable commands = ["测试第一条命令!"];
|
||||
@observable scrollTop: number = 0;
|
||||
}
|
||||
|
||||
|
||||
export var commandStore = new CommandStore()
|
||||
autorun(() =>
|
||||
{
|
||||
if (commandStore.commands.length > 10)
|
||||
{
|
||||
commandStore.commands.splice(0, 5);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// import * as THREE from 'three';
|
||||
// static setMouseCoord(p: THREE.Vector3): void
|
||||
// {
|
||||
// let norm = new THREE.Vector3(0, 0, 1);
|
||||
// let plan = new THREE.Plane(norm);
|
||||
// // plan.setFromNormalAndCoplanarPoint
|
||||
|
||||
// // let p2 = p.clone().add(app.m_Viewer.m_Direction.clone().multiplyScalar(1000));
|
||||
// let p2;
|
||||
// let p3 = plan.intersectLine(new THREE.Line3(p, p2));
|
||||
// if (p3)
|
||||
// {
|
||||
// let strarr = [];
|
||||
// p3.toArray().forEach(o =>
|
||||
// {
|
||||
// strarr.push(o.toFixed(3));
|
||||
// })
|
||||
// document.getElementById("MouseCoordinates").innerText = strarr.join(",")
|
||||
// }
|
||||
// }
|
@ -1,25 +0,0 @@
|
||||
import * as THREE from 'three';
|
||||
import { Line } from '../DatabaseServices/Entity';
|
||||
export class UiManage
|
||||
{
|
||||
|
||||
static setMouseCoord(p: THREE.Vector3): void
|
||||
{
|
||||
let norm = new THREE.Vector3(0, 0, 1);
|
||||
let plan = new THREE.Plane(norm);
|
||||
// plan.setFromNormalAndCoplanarPoint
|
||||
|
||||
// let p2 = p.clone().add(app.m_Viewer.m_Direction.clone().multiplyScalar(1000));
|
||||
let p2;
|
||||
let p3 = plan.intersectLine(new THREE.Line3(p, p2));
|
||||
if (p3)
|
||||
{
|
||||
let strarr = [];
|
||||
p3.toArray().forEach(o =>
|
||||
{
|
||||
strarr.push(o.toFixed(3));
|
||||
})
|
||||
document.getElementById("MouseCoordinates").innerText = strarr.join(",")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue