Add Create Child Entities

Add Create Child Entities
This commit is contained in:
Alezia Kurdis 2025-03-05 22:26:41 -05:00 committed by GitHub
parent 999475aca7
commit 074381d336
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
};