|
|
@ -43,10 +43,22 @@ function MenubarModels(editor) { |
|
|
|
option.onClick(function () { |
|
|
|
|
|
|
|
// editor.loader.loadFiles( "/editor/models/floor.fbx" );
|
|
|
|
gltfloader.load("/editor/models/camera.gltf", function (object) { |
|
|
|
// gltfloader.load("/editor/models/camera.gltf", function (object) {
|
|
|
|
|
|
|
|
let obj = object.scene.children[0]; |
|
|
|
obj.name = 'camera' + i++ |
|
|
|
// let obj = object.scene.children[0];
|
|
|
|
// obj.name = 'camera' + i++
|
|
|
|
// obj.userData = { type: "camera", name: "camera" }
|
|
|
|
// debugger
|
|
|
|
// // object.url="url"
|
|
|
|
// editor.execute(new AddObjectCommand(editor, obj));
|
|
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
fbxloader.load("/editor/models/camera.fbx", function (object) { |
|
|
|
|
|
|
|
let obj = object.children[0]; |
|
|
|
|
|
|
|
obj.name = '视频监控' + i++ |
|
|
|
obj.userData = { type: "camera", name: "camera" } |
|
|
|
debugger |
|
|
|
// object.url="url"
|
|
|
@ -55,7 +67,6 @@ function MenubarModels(editor) { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
options.add(option); |
|
|
|
|
|
|
|