mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 20:07:07 +02:00
Add Create Child Entities
Add Create Child Entities
This commit is contained in:
parent
999475aca7
commit
074381d336
1 changed files with 8 additions and 4 deletions
|
@ -542,7 +542,7 @@
|
|||
localOnly: false
|
||||
},
|
||||
};
|
||||
|
||||
var fcreateNewEntity;
|
||||
var toolBar = (function () {
|
||||
var EDIT_SETTING = "io.highfidelity.isEditing"; // for communication with other scripts
|
||||
var that = {},
|
||||
|
@ -552,7 +552,7 @@
|
|||
dialogWindow = null,
|
||||
tablet = null;
|
||||
|
||||
function createNewEntity(requestedProperties) {
|
||||
function createNewEntity(requestedProperties, entityHostType="domain") {
|
||||
var dimensions = requestedProperties.dimensions ? requestedProperties.dimensions : DEFAULT_DIMENSIONS;
|
||||
var position = createApp.getPositionToCreateEntity();
|
||||
var entityID = null;
|
||||
|
@ -632,7 +632,7 @@
|
|||
properties.visible = false;
|
||||
}
|
||||
|
||||
entityID = Entities.addEntity(properties);
|
||||
entityID = Entities.addEntity(properties, entityHostType);
|
||||
|
||||
var dimensionsCheckCallback = function(){
|
||||
// Adjust position of entity per bounding box after it has been created and auto-resized.
|
||||
|
@ -711,7 +711,9 @@
|
|||
|
||||
return entityID;
|
||||
}
|
||||
|
||||
|
||||
fcreateNewEntity = createNewEntity;
|
||||
|
||||
function closeExistingDialogWindow() {
|
||||
if (dialogWindow) {
|
||||
dialogWindow.close();
|
||||
|
@ -2986,6 +2988,8 @@
|
|||
});
|
||||
} else if (data.type === "specificEntityNavigation") {
|
||||
selectionManager.setSelections([data.id], this);
|
||||
} else if (data.type === "createChildEntity") {
|
||||
fcreateNewEntity(data.properties, data.entityHostType);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue