mirror of https://gitee.com/cf-fz/WebCAD.git
parent
14394b86a3
commit
259e74f63f
@ -0,0 +1,12 @@
|
|||||||
|
import { Command } from "../Editor/CommandMachine";
|
||||||
|
import { app } from '../ApplicationServices/Application';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class ViewToTop implements Command
|
||||||
|
{
|
||||||
|
async exec()
|
||||||
|
{
|
||||||
|
app.m_Viewer.ViewToTop();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
import { Command } from "../Editor/CommandMachine";
|
||||||
|
import { loadFBX } from "../Loader/FBXLoader";
|
||||||
|
import { app } from '../ApplicationServices/Application';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export class Test implements Command
|
||||||
|
{
|
||||||
|
async exec()
|
||||||
|
{
|
||||||
|
let url = "http://localhost:8000/?file=d:\\test.fbx";
|
||||||
|
let fbxState = await loadFBX(url);
|
||||||
|
console.log('fbxState: ', fbxState);
|
||||||
|
|
||||||
|
if (fbxState.State)
|
||||||
|
{
|
||||||
|
app.m_Viewer.m_Scene.add(fbxState.object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue