mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
re add locking/visibility tools to edit.js
This commit is contained in:
parent
b95c81d0ba
commit
795d866da9
3 changed files with 17 additions and 15 deletions
|
@ -50,10 +50,9 @@ selectionManager.addEventListener(function() {
|
|||
lightOverlayManager.updatePositions();
|
||||
});
|
||||
|
||||
var toolIconUrl = Script.resolvePath("assets/images/tools/");
|
||||
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
var toolHeight = 50;
|
||||
var toolWidth = 50;
|
||||
var TOOLBAR_MARGIN_Y = 25;
|
||||
|
||||
var DEGREES_TO_RADIANS = Math.PI / 180.0;
|
||||
var RADIANS_TO_DEGREES = 180.0 / Math.PI;
|
||||
|
@ -106,7 +105,7 @@ IMPORTING_SVO_OVERLAY_HEIGHT = 30;
|
|||
IMPORTING_SVO_OVERLAY_MARGIN = 5;
|
||||
IMPORTING_SVO_OVERLAY_LEFT_MARGIN = 34;
|
||||
var importingSVOImageOverlay = Overlays.addOverlay("image", {
|
||||
imageURL: Script.resolvePath("assets") + "/images/hourglass.svg",
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/hourglass.svg",
|
||||
width: 20,
|
||||
height: 20,
|
||||
alpha: 1.0,
|
||||
|
@ -180,18 +179,15 @@ var toolBar = (function() {
|
|||
newParticleButton
|
||||
|
||||
function initialize() {
|
||||
toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.edit.toolbar", function(windowDimensions, toolbar) {
|
||||
toolBar = new ToolBar(0, 0, ToolBar.VERTICAL, "highfidelity.edit.toolbar", function(windowDimensions, toolbar) {
|
||||
return {
|
||||
x: windowDimensions.x / 2,
|
||||
y: windowDimensions.y
|
||||
x: windowDimensions.x - 8 - toolbar.width,
|
||||
y: (windowDimensions.y - toolbar.height) / 2
|
||||
};
|
||||
}, {
|
||||
x: toolWidth,
|
||||
y: -TOOLBAR_MARGIN_Y - toolHeight
|
||||
});
|
||||
|
||||
activeButton = toolBar.addTool({
|
||||
imageURL: toolIconUrl + "edit-01.svg",
|
||||
imageURL: toolIconUrl + "edit-01.svg",
|
||||
subImage: {
|
||||
x: 0,
|
||||
y: Tool.IMAGE_WIDTH,
|
||||
|
@ -205,7 +201,7 @@ var toolBar = (function() {
|
|||
}, true, false);
|
||||
|
||||
newModelButton = toolBar.addTool({
|
||||
imageURL:toolIconUrl + "model-01.svg",
|
||||
imageURL: toolIconUrl + "model-01.svg",
|
||||
subImage: {
|
||||
x: 0,
|
||||
y: Tool.IMAGE_WIDTH,
|
||||
|
@ -220,7 +216,7 @@ var toolBar = (function() {
|
|||
});
|
||||
|
||||
newCubeButton = toolBar.addTool({
|
||||
imageURL:toolIconUrl + "cube-01.svg",
|
||||
imageURL: toolIconUrl + "cube-01.svg",
|
||||
subImage: {
|
||||
x: 0,
|
||||
y: Tool.IMAGE_WIDTH,
|
||||
|
@ -1864,4 +1860,4 @@ entityListTool.webView.webEventReceived.connect(function(data) {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -378,4 +378,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -59,6 +59,8 @@ EntityListTool = function(opts) {
|
|||
name: properties.name,
|
||||
type: properties.type,
|
||||
url: properties.type == "Model" ? properties.modelURL : "",
|
||||
locked: properties.locked,
|
||||
visible: properties.visible
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -99,6 +101,10 @@ EntityListTool = function(opts) {
|
|||
}
|
||||
} else if (data.type == "delete") {
|
||||
deleteSelectedEntities();
|
||||
} else if (data.type == "toggleLocked") {
|
||||
toggleSelectedEntitiesLocked();
|
||||
} else if (data.type == "toggleVisible") {
|
||||
toggleSelectedEntitiesVisible();
|
||||
} else if (data.type === "radius") {
|
||||
searchRadius = data.radius;
|
||||
that.sendUpdate();
|
||||
|
@ -112,4 +118,4 @@ EntityListTool = function(opts) {
|
|||
});
|
||||
|
||||
return that;
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue