mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:03:26 +02:00
Update general layout of Physics options
This commit is contained in:
parent
666c163637
commit
33765e14fa
4 changed files with 92 additions and 64 deletions
12
scripts/vr-edit/assets/tools/physics/presets-label.svg
Normal file
12
scripts/vr-edit/assets/tools/physics/presets-label.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.6 KiB |
12
scripts/vr-edit/assets/tools/physics/properties-label.svg
Normal file
12
scripts/vr-edit/assets/tools/physics/properties-label.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.5 KiB |
|
@ -540,7 +540,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
"picklistItem": {
|
||||
overlay: "cube",
|
||||
properties: {
|
||||
dimensions: { x: 0.06, y: 0.02, z: 0.01 },
|
||||
dimensions: { x: 0.1416, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: Vec3.ZERO,
|
||||
localRotation: Quat.ZERO,
|
||||
color: { red: 100, green: 100, blue: 100 },
|
||||
|
@ -1009,20 +1009,37 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
],
|
||||
physicsOptions: [
|
||||
{
|
||||
id: "propertiesLabel",
|
||||
type: "label",
|
||||
id: "physicsPropertiesLabel",
|
||||
type: "image",
|
||||
properties: {
|
||||
text: "PROPERTIES",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: -0.031, y: 0.0475, z: 0.0075}
|
||||
color: UIT.colors.white,
|
||||
url: "../assets/tools/physics/properties-label.svg",
|
||||
scale: 0.0376,
|
||||
localPosition: {
|
||||
x: -UIT.dimensions.panel.x / 2 + UIT.dimensions.leftMargin + 0.0376 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - UIT.dimensions.topMargin - 0.0047 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "physicsRule1",
|
||||
type: "horizontalRule",
|
||||
properties: {
|
||||
dimensions: { x: 0.0668, y: 0.001 },
|
||||
localPosition: {
|
||||
x: -UIT.dimensions.panel.x / 2 + UIT.dimensions.leftMargin + 0.0668 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - 0.0199,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "gravityToggle",
|
||||
type: "toggleButton",
|
||||
properties: {
|
||||
localPosition: { x: -0.0325, y: 0.03, z: 0.005 },
|
||||
dimensions: { x: 0.03, y: 0.02, z: 0.01 }
|
||||
dimensions: { x: 0.0668, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: -0.0748, y: 0.0480, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 },
|
||||
},
|
||||
label: "GRAVITY",
|
||||
setting: {
|
||||
|
@ -1038,8 +1055,8 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
id: "grabToggle",
|
||||
type: "toggleButton",
|
||||
properties: {
|
||||
localPosition: { x: -0.0325, y: 0.005, z: 0.005 },
|
||||
dimensions: { x: 0.03, y: 0.02, z: 0.01 }
|
||||
dimensions: { x: 0.0668, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: -0.0748, y: 0.0120, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 },
|
||||
},
|
||||
label: " GRAB",
|
||||
setting: {
|
||||
|
@ -1055,8 +1072,8 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
id: "collideToggle",
|
||||
type: "toggleButton",
|
||||
properties: {
|
||||
localPosition: { x: -0.0325, y: -0.02, z: 0.005 },
|
||||
dimensions: { x: 0.03, y: 0.02, z: 0.01 }
|
||||
dimensions: { x: 0.0668, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: -0.0748, y: -0.0240, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 },
|
||||
},
|
||||
label: "COLLIDE",
|
||||
setting: {
|
||||
|
@ -1070,20 +1087,41 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
},
|
||||
|
||||
{
|
||||
id: "propertiesLabel",
|
||||
type: "label",
|
||||
id: "physicsPresetsLabel",
|
||||
type: "image",
|
||||
properties: {
|
||||
text: "PRESETS",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: 0.002, y: 0.0475, z: 0.0075 }
|
||||
color: UIT.colors.white,
|
||||
url: "../assets/tools/physics/presets-label.svg",
|
||||
scale: 0.0270,
|
||||
localPosition: {
|
||||
x: UIT.dimensions.panel.x / 2 - UIT.dimensions.rightMargin - 0.1416 + 0.0270 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - UIT.dimensions.topMargin - 0.0047 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "physicsRule2",
|
||||
type: "horizontalRule",
|
||||
properties: {
|
||||
dimensions: { x: 0.1416, y: 0.001 },
|
||||
localPosition: {
|
||||
x: UIT.dimensions.panel.x / 2 - UIT.dimensions.rightMargin - 0.1416 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - 0.0199,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "presets",
|
||||
type: "picklist",
|
||||
properties: {
|
||||
localPosition: { x: 0.016, y: 0.03, z: 0.005 },
|
||||
dimensions: { x: 0.06, y: 0.02, z: 0.01 }
|
||||
dimensions: { x: 0.1416, y: 0.0280, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: {
|
||||
x: UIT.dimensions.panel.x / 2 - UIT.dimensions.rightMargin - 0.1416 / 2,
|
||||
y: 0.0480,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
},
|
||||
label: "DEFAULT",
|
||||
setting: {
|
||||
|
@ -1158,12 +1196,13 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
label: "BALLOON",
|
||||
command: { method: "pickPhysicsPreset" }
|
||||
},
|
||||
|
||||
{
|
||||
id: "gravitySlider",
|
||||
type: "barSlider",
|
||||
properties: {
|
||||
localPosition: { x: -0.007, y: -0.016, z: 0.005 },
|
||||
dimensions: { x: 0.014, y: 0.06, z: 0.01 }
|
||||
dimensions: { x: 0.0294, y: 0.1000, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: -0.0187, y: -0.0240, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 }
|
||||
},
|
||||
setting: {
|
||||
key: "VREdit.physicsTool.gravity",
|
||||
|
@ -1174,22 +1213,13 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
method: "setGravity"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "gravityLabel",
|
||||
type: "label",
|
||||
properties: {
|
||||
text: "GRAVITY",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: -0.003, y: -0.052, z: 0.0075 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "bounceSlider",
|
||||
type: "barSlider",
|
||||
properties: {
|
||||
localPosition: { x: 0.009, y: -0.016, z: 0.005 },
|
||||
dimensions: { x: 0.014, y: 0.06, z: 0.01 }
|
||||
},
|
||||
dimensions: { x: 0.0294, y: 0.1000, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: 0.0187, y: -0.0240, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 }
|
||||
},
|
||||
setting: {
|
||||
key: "VREdit.physicsTool.bounce",
|
||||
defaultValue: 0.5,
|
||||
|
@ -1199,21 +1229,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
method: "setBounce"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "bounceLabel",
|
||||
type: "label",
|
||||
properties: {
|
||||
text: "BOUNCE",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: 0.015, y: -0.057, z: 0.0075 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "dampingSlider",
|
||||
type: "barSlider",
|
||||
properties: {
|
||||
localPosition: { x: 0.024, y: -0.016, z: 0.005 },
|
||||
dimensions: { x: 0.014, y: 0.06, z: 0.01 }
|
||||
dimensions: { x: 0.0294, y: 0.1000, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: 0.0561, y: -0.0240, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 }
|
||||
},
|
||||
setting: {
|
||||
key: "VREdit.physicsTool.damping",
|
||||
|
@ -1224,21 +1245,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
method: "setDamping"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "dampingLabel",
|
||||
type: "label",
|
||||
properties: {
|
||||
text: "DAMPING",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: 0.030, y: -0.052, z: 0.0075 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "densitySlider",
|
||||
type: "barSlider",
|
||||
properties: {
|
||||
localPosition: { x: 0.039, y: -0.016, z: 0.005 },
|
||||
dimensions: { x: 0.014, y: 0.06, z: 0.01 }
|
||||
dimensions: { x: 0.0294, y: 0.1000, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: { x: 0.0935, y: -0.0240, z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2 }
|
||||
},
|
||||
setting: {
|
||||
key: "VREdit.physicsTool.density",
|
||||
|
@ -1248,15 +1260,6 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
command: {
|
||||
method: "setDensity"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "densityLabel",
|
||||
type: "label",
|
||||
properties: {
|
||||
text: "DENSITY",
|
||||
lineHeight: 0.0045,
|
||||
localPosition: { x: 0.045, y: -0.057, z: 0.0075 }
|
||||
}
|
||||
}
|
||||
],
|
||||
deleteOptions: [
|
||||
|
|
|
@ -38,6 +38,7 @@ UIT = (function () {
|
|||
|
||||
topMargin: 0.010,
|
||||
leftMargin: 0.0118,
|
||||
rightMargin: 0.0118,
|
||||
|
||||
header: { x: 0.24, y: 0.048, z: 0.012 },
|
||||
headerHeading: { x: 0.24, y: 0.044, z: 0.012 },
|
||||
|
|
Loading…
Reference in a new issue