mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:13:05 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into blocks
This commit is contained in:
commit
efd25a5e70
17 changed files with 1253 additions and 538 deletions
|
@ -448,8 +448,68 @@ input[type=checkbox]:checked + label:hover {
|
|||
border: 1.5pt solid black;
|
||||
}
|
||||
|
||||
.shape-section, .light-section, .model-section, .web-section, .hyperlink-section, .text-section, .zone-section {
|
||||
display: table;
|
||||
}
|
||||
|
||||
.section-header, .sub-section-header, hr {
|
||||
|
||||
|
||||
#properties-list fieldset {
|
||||
position: relative;
|
||||
/* 0.1px on the top is to prevent margin collapsing between this and it's first child */
|
||||
margin: 21px -21px 0px -21px;
|
||||
padding: 0.1px 21px 0px 21px;
|
||||
border: none;
|
||||
border-top: 1px rgb(90,90,90) solid;
|
||||
box-shadow: 0px -1px 0px rgb(37,37,37);
|
||||
}
|
||||
|
||||
#properties-list fieldset.fstuple, #properties-list fieldset.fsrow {
|
||||
margin-top: 21px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#properties-list > fieldset[data-collapsed="true"] + fieldset {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
#properties-list > fieldset[data-collapsed="true"] > *:not(legend) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#properties-list legend + fieldset {
|
||||
margin-top: 0px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#properties-list > fieldset#properties-header {
|
||||
margin-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#properties-list > fieldset > legend {
|
||||
position: relative;
|
||||
display: table;
|
||||
width: 100%;
|
||||
margin: 21px -21px 0 -21px;
|
||||
padding: 14px 21px 0 21px;
|
||||
font-family: Raleway-Regular;
|
||||
font-size: 12px;
|
||||
color: #afafaf;
|
||||
height: 28px;
|
||||
text-transform: uppercase;
|
||||
outline: none;
|
||||
background-color: #404040;
|
||||
border: none;
|
||||
border-top: 1px rgb(90,90,90) solid;
|
||||
box-shadow: 0 -1px 0 rgb(37,37,37), 0 4px 4px 0 rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
div.section-header, .sub-section-header, hr {
|
||||
display: table;
|
||||
width: 100%;
|
||||
margin: 21px -21px 0 -21px;
|
||||
|
@ -462,16 +522,18 @@ input[type=checkbox]:checked + label:hover {
|
|||
outline: none;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
position: relative;
|
||||
background: #404040 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAqCAIAAAAbNW1vAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAmSURBVChTY1BFAgzhSIDBAQmMcoYHRwIJMCgjAQZ9JMBgBQdWVgBh5XmBV5A2FQAAAABJRU5ErkJggg==) repeat-x top left;
|
||||
|
||||
|
||||
.column .sub-section-header {
|
||||
background-image: none;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.sub-section-header, .no-collapse, hr {
|
||||
background: #404040 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAjSURBVBhXY1RVVf3PgARYjIyMoEwIYHRwcEBRwQSloYCBAQCwjgPMiI7W2QAAAABJRU5ErkJggg==) repeat-x top left;
|
||||
}
|
||||
|
||||
.section-header:first-child {
|
||||
div.section-header:first-child {
|
||||
margin-top: -2px;
|
||||
padding-top: 0;
|
||||
background: none;
|
||||
|
@ -482,7 +544,7 @@ input[type=checkbox]:checked + label:hover {
|
|||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
.section-header span {
|
||||
#properties-list > fieldset > legend span, .section-header span {
|
||||
font-family: HiFi-Glyphs;
|
||||
font-size: 30px;
|
||||
float: right;
|
||||
|
@ -536,6 +598,18 @@ hr {
|
|||
font-size: 13px;
|
||||
}
|
||||
|
||||
.property legend, .number legend {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
font-family: Raleway-SemiBold;
|
||||
font-size: 14px;
|
||||
}
|
||||
.property legend .unit, .number legend .unit {
|
||||
margin-left: 8px;
|
||||
font-family: Raleway-Light;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.value {
|
||||
display: block;
|
||||
min-height: 18px;
|
||||
|
@ -545,6 +619,11 @@ hr {
|
|||
vertical-align: top;
|
||||
width: 48px;
|
||||
}
|
||||
.value legend {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 48px;
|
||||
}
|
||||
.value span {
|
||||
font-family: FiraSans-SemiBold;
|
||||
font-size: 15px;
|
||||
|
@ -572,6 +651,13 @@ hr {
|
|||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.text legend, .url legend, .number legend, .textarea legend, .rgb legend, .xyz legend, .pyr legend, .dropdown legend, .gen legend {
|
||||
float: left;
|
||||
margin-left: 1px;
|
||||
margin-bottom: 3px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.number > input {
|
||||
clear: both;
|
||||
float: left;
|
||||
|
@ -714,6 +800,14 @@ div.refresh input[type="button"] {
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
#property-color-control1 {
|
||||
display: table-cell;
|
||||
float: none;
|
||||
}
|
||||
|
||||
#property-color-control1 + label {
|
||||
border-left: 20px transparent solid;
|
||||
}
|
||||
|
||||
.rgb label {
|
||||
float: left;
|
||||
|
@ -724,6 +818,15 @@ div.refresh input[type="button"] {
|
|||
clear: both;
|
||||
}
|
||||
|
||||
.rgb legend {
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
margin-left: 21px;
|
||||
}
|
||||
.rgb legend + * {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.tuple div {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
@ -813,6 +916,42 @@ tuple, .blue:focus, .tuple .z:focus, .tuple .roll:focus {
|
|||
display: table-cell;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#properties-list fieldset .two-column {
|
||||
padding-top:21px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#properties-list .two-column fieldset {
|
||||
/*display: table-cell;*/
|
||||
width: 50%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#properties-list .two-column fieldset legend {
|
||||
display: table;
|
||||
width: 100%;
|
||||
margin: 21px -21px 0px -21px;
|
||||
padding: 0px 0px 0px 21px;
|
||||
font-family: Raleway-Regular;
|
||||
font-size: 12px;
|
||||
color: #afafaf;
|
||||
height: 28px;
|
||||
text-transform: uppercase;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
fieldset .checkbox-sub-props {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
fieldset .checkbox-sub-props .property:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.column {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
@ -1154,9 +1293,11 @@ th#entity-hasScript {
|
|||
}
|
||||
|
||||
|
||||
#properties-header {
|
||||
#properties-list #properties-header {
|
||||
display: table-row;
|
||||
height: 28px;
|
||||
border-top: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#properties-header .property {
|
||||
|
@ -1261,3 +1402,260 @@ input#reset-to-natural-dimensions {
|
|||
font-size:16px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#properties-list #collision-info > fieldset:first-of-type {
|
||||
border-top: none !important;
|
||||
box-shadow: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#properties-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* ----- Order of Menu items for Primitive ----- */
|
||||
#properties-list.ShapeMenu #general,
|
||||
#properties-list.BoxMenu #general,
|
||||
#properties-list.SphereMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #collision-info,
|
||||
#properties-list.BoxMenu #collision-info,
|
||||
#properties-list.SphereMenu #collision-info {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #physical,
|
||||
#properties-list.BoxMenu #physical,
|
||||
#properties-list.SphereMenu #physical {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #spatial,
|
||||
#properties-list.BoxMenu #spatial,
|
||||
#properties-list.SphereMenu #spatial {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #behavior,
|
||||
#properties-list.BoxMenu #behavior,
|
||||
#properties-list.SphereMenu #behavior {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #hyperlink,
|
||||
#properties-list.BoxMenu #hyperlink,
|
||||
#properties-list.SphereMenu #hyperlink {
|
||||
order: 6;
|
||||
}
|
||||
|
||||
#properties-list.ShapeMenu #light,
|
||||
#properties-list.BoxMenu #light,
|
||||
#properties-list.SphereMenu #light,
|
||||
#properties-list.ShapeMenu #model,
|
||||
#properties-list.BoxMenu #model,
|
||||
#properties-list.SphereMenu #model,
|
||||
#properties-list.ShapeMenu #zone,
|
||||
#properties-list.BoxMenu #zone,
|
||||
#properties-list.SphereMenu #zone,
|
||||
#properties-list.ShapeMenu #text,
|
||||
#properties-list.BoxMenu #text,
|
||||
#properties-list.SphereMenu #text,
|
||||
#properties-list.ShapeMenu #web,
|
||||
#properties-list.BoxMenu #web,
|
||||
#properties-list.SphereMenu #web {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* ----- Order of Menu items for Light ----- */
|
||||
#properties-list.LightMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
#properties-list.LightMenu #light {
|
||||
order: 2;
|
||||
}
|
||||
#properties-list.LightMenu #physical {
|
||||
order: 3;
|
||||
}
|
||||
#properties-list.LightMenu #spatial {
|
||||
order: 4;
|
||||
}
|
||||
#properties-list.LightMenu #behavior {
|
||||
order: 5;
|
||||
}
|
||||
#properties-list.LightMenu #collision-info {
|
||||
order: 6;
|
||||
}
|
||||
#properties-list.LightMenu #hyperlink {
|
||||
order: 7;
|
||||
}
|
||||
/* sections to hide */
|
||||
#properties-list.LightMenu #model,
|
||||
#properties-list.LightMenu #zone,
|
||||
#properties-list.LightMenu #text,
|
||||
#properties-list.LightMenu #web {
|
||||
display: none;
|
||||
}
|
||||
/* items to hide */
|
||||
#properties-list.LightMenu .shape-group.shape-section.property.dropdown,
|
||||
#properties-list.LightMenu color-section.color-control1 {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
/* ----- Order of Menu items for Model ----- */
|
||||
#properties-list.ModelMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
#properties-list.ModelMenu #model {
|
||||
order: 2;
|
||||
}
|
||||
#properties-list.ModelMenu #collision-info {
|
||||
order: 3;
|
||||
}
|
||||
#properties-list.ModelMenu #physical {
|
||||
order: 4;
|
||||
}
|
||||
#properties-list.ModelMenu #spatial {
|
||||
order: 5;
|
||||
}
|
||||
#properties-list.ModelMenu #behavior {
|
||||
order: 6;
|
||||
}
|
||||
#properties-list.ModelMenu #hyperlink {
|
||||
order: 7;
|
||||
}
|
||||
/* sections to hide */
|
||||
#properties-list.ModelMenu #light,
|
||||
#properties-list.ModelMenu #zone,
|
||||
#properties-list.ModelMenu #text,
|
||||
#properties-list.ModelMenu #web {
|
||||
display: none;
|
||||
}
|
||||
/* items to hide */
|
||||
#properties-list.ModelMenu .shape-group.shape-section.property.dropdown,
|
||||
#properties-list.ModelMenu .color-section.color-control1 {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
/* ----- Order of Menu items for Zone ----- */
|
||||
#properties-list.ZoneMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
#properties-list.ZoneMenu #zone {
|
||||
order: 2;
|
||||
}
|
||||
#properties-list.ZoneMenu #physical {
|
||||
order: 3;
|
||||
}
|
||||
#properties-list.ZoneMenu #spatial {
|
||||
order: 4;
|
||||
}
|
||||
#properties-list.ZoneMenu #behavior {
|
||||
order: 5;
|
||||
}
|
||||
#properties-list.ZoneMenu #collision-info {
|
||||
order: 6;
|
||||
}
|
||||
#properties-list.ZoneMenu #hyperlink {
|
||||
order: 7;
|
||||
}
|
||||
/* sections to hide */
|
||||
#properties-list.ZoneMenu #light,
|
||||
#properties-list.ZoneMenu #model,
|
||||
#properties-list.ZoneMenu #text,
|
||||
#properties-list.ZoneMenu #web {
|
||||
display: none;
|
||||
}
|
||||
/* items to hide */
|
||||
#properties-list.ZoneMenu .shape-group.shape-section.property.dropdown,
|
||||
#properties-list.ZoneMenu .color-section.color-control1 {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
/* ----- Order of Menu items for Web ----- */
|
||||
#properties-list.WebMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
#properties-list.WebMenu #web {
|
||||
order: 2;
|
||||
}
|
||||
#properties-list.WebMenu #collision-info {
|
||||
order: 3;
|
||||
}
|
||||
#properties-list.WebMenu #physical {
|
||||
order: 4;
|
||||
}
|
||||
#properties-list.WebMenu #spatial {
|
||||
order: 5;
|
||||
}
|
||||
#properties-list.WebMenu #behavior {
|
||||
order: 6;
|
||||
}
|
||||
#properties-list.WebMenu #hyperlink {
|
||||
order: 7;
|
||||
}
|
||||
/* sections to hide */
|
||||
#properties-list.WebMenu #light,
|
||||
#properties-list.WebMenu #model,
|
||||
#properties-list.WebMenu #zone,
|
||||
#properties-list.WebMenu #text {
|
||||
display: none;
|
||||
}
|
||||
/* items to hide */
|
||||
#properties-list.WebMenu .shape-group.shape-section.property.dropdown,
|
||||
#properties-list.WebMenu .color-section.color-control1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ----- Order of Menu items for Text ----- */
|
||||
#properties-list.TextMenu #general {
|
||||
order: 1;
|
||||
}
|
||||
#properties-list.TextMenu #text {
|
||||
order: 2;
|
||||
}
|
||||
#properties-list.TextMenu #collision-info {
|
||||
order: 3;
|
||||
}
|
||||
#properties-list.TextMenu #physical {
|
||||
order: 4;
|
||||
}
|
||||
#properties-list.TextMenu #spatial {
|
||||
order: 5;
|
||||
}
|
||||
#properties-list.TextMenu #behavior {
|
||||
order: 6;
|
||||
}
|
||||
#properties-list.TextMenu #hyperlink {
|
||||
order: 7;
|
||||
}
|
||||
/* sections to hide */
|
||||
#properties-list.TextMenu #light,
|
||||
#properties-list.TextMenu #model,
|
||||
#properties-list.TextMenu #zone,
|
||||
#properties-list.TextMenu #web {
|
||||
display: none;
|
||||
}
|
||||
/* items to hide */
|
||||
#properties-list.TextMenu .shape-group.shape-section.property.dropdown,
|
||||
#properties-list.TextMenu .color-section.color-control1 {
|
||||
display: none
|
||||
}
|
||||
|
||||
|
||||
/* Currently always hidden */
|
||||
#properties-list #polyvox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.skybox-section {
|
||||
display: none;
|
||||
}
|
|
@ -8,7 +8,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<title>Properties</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="css/edit-style.css">
|
||||
|
@ -22,10 +23,12 @@
|
|||
<script type="text/javascript" src="js/keyboardControl.js"></script>
|
||||
<script type="text/javascript" src="js/entityProperties.js"></script>
|
||||
<script src="js/jsoneditor.min.js"></script>
|
||||
</head>
|
||||
<body onload='loaded();'>
|
||||
</head>
|
||||
|
||||
<body onload='loaded();'>
|
||||
<div id="properties-list">
|
||||
<div id="properties-header">
|
||||
|
||||
<fieldset id="properties-header">
|
||||
<div id="type" class="property value">
|
||||
<span id="type-icon"></span><label id="property-type"><i>No selection</i></label>
|
||||
</div>
|
||||
|
@ -37,8 +40,10 @@
|
|||
<input type="checkbox" id="property-visible">
|
||||
<label for="property-visible"><span></span> Visible</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="general" class="major">
|
||||
<div class="shape-group shape-section property dropdown">
|
||||
<label for="property-shape">Shape</label>
|
||||
<select name="SelectShape" id="property-shape">
|
||||
|
@ -60,195 +65,13 @@
|
|||
<label for="property-name">Name</label>
|
||||
<input type="text" id="property-name">
|
||||
</div>
|
||||
<div class="property text">
|
||||
<label for="property-description">Description</label>
|
||||
<input type="text" id="property-description">
|
||||
</div>
|
||||
|
||||
<div class="property textarea">
|
||||
<label for="property-user-data">User data</label>
|
||||
<br>
|
||||
<div class="row">
|
||||
<input type="button" class="red" id="userdata-clear" value="Clear User Data">
|
||||
<input type="button" class="blue" id="userdata-new-editor" value="Edit as JSON">
|
||||
<input disabled type="button" class="black" id="userdata-save" value="Save User Data">
|
||||
<span id="userdata-saved">Saved!</span>
|
||||
</div>
|
||||
<div id="static-userdata"></div>
|
||||
<div id="userdata-editor"></div>
|
||||
<textarea id="property-user-data"></textarea>
|
||||
</div>
|
||||
<div id="id" class="property value">
|
||||
<label>ID:</label>
|
||||
<input type="text" id="property-id" readonly>
|
||||
</div>
|
||||
<div class="section-header hyperlink-group hyperlink-section">
|
||||
<label>Hyperlink</label><span>M</span>
|
||||
</div>
|
||||
<div class="hyperlink-group hyperlink-section property url">
|
||||
<label for="property-hyperlink-href">Href - hifi://address</label>
|
||||
<input type="text" id="property-hyperlink-href">
|
||||
</div>
|
||||
<div class="section-header spatial-group">
|
||||
<label>Spatial</label><span>M</span>
|
||||
</div>
|
||||
<div class="spatial-group property xyz">
|
||||
<label>Position <span class="unit">m</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-pos-x"><label for="property-pos-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-pos-y"><label for="property-pos-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-pos-z"><label for="property-pos-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group property pyr">
|
||||
<label>Rotation <span class="unit">deg</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="pitch" id="property-rot-x" step="0.1"><label for="property-rot-x">Pitch:</label></div>
|
||||
<div><input type="number" class="yaw" id="property-rot-y" step="0.1"><label for="property-rot-y">Yaw:</label></div>
|
||||
<div><input type="number" class="roll" id="property-rot-z" step="0.1"><label for="property-rot-z">Roll:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group property xyz">
|
||||
<label>Dimensions <span class="unit">m</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-dim-x" step="0.1"><label for="property-dim-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-dim-y" step="0.1"><label for="property-dim-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-dim-z" step="0.1"><label for="property-dim-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group property xyz">
|
||||
<label>Registration <span class="unit">(pivot offset as ratio of dimension)</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-reg-x" step="0.1"><label for="property-reg-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-reg-y" step="0.1"><label for="property-reg-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-reg-z" step="0.1"><label for="property-reg-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group property gen">
|
||||
<label>Scale <span class="unit">%</span></label>
|
||||
<div class="row">
|
||||
<input type="number" id="dimension-rescale-pct" value=100>
|
||||
<input type="button" class="blue" id="dimension-rescale-button" value="Rescale">
|
||||
<input type="button" class="red" id="reset-to-natural-dimensions" value="Reset Dimensions">
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group row">
|
||||
<div class="property text">
|
||||
<label for="property-parent-id">Parent ID</label>
|
||||
<input type="text" id="property-parent-id">
|
||||
</div>
|
||||
<div class="property number">
|
||||
<label for="property-parent-joint-index">Parent joint index</label>
|
||||
<input type="number" id="property-parent-joint-index">
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group ">
|
||||
<div class="property text">
|
||||
<label>Align</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="buttons">
|
||||
<input type="button" id="move-selection-to-grid" value="Selection to Grid">
|
||||
<input type="button" id="move-all-to-grid" value="All to Grid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="spatial-group poly-vox-section" />
|
||||
<div class="spatial-group poly-vox-section property xyz">
|
||||
<label>Voxel volume size <span class="unit">m</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-voxel-volume-size-x"><label for="property-voxel-volume-size-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-voxel-volume-size-y"><label for="property-voxel-volume-size-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-voxel-volume-size-z"><label for="property-voxel-volume-size-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property dropdown">
|
||||
<label>Surface extractor</label>
|
||||
<select name="SelectVoxelSurfaceStyle" id="property-voxel-surface-style">
|
||||
<option value="0">Marching cubes</option>
|
||||
<option value="1">Cubic</option>
|
||||
<option value="2">Edged cubic</option>
|
||||
<option value="3">Edged marching cubes</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-x-texture-url">X-axis texture URL</label>
|
||||
<input type="text" id="property-x-texture-url">
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-y-texture-url">Y-axis texture URL</label>
|
||||
<input type="text" id="property-y-texture-url">
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-z-texture-url">Z-axis texture URL</label>
|
||||
<input type="text" id="property-z-texture-url">
|
||||
</div>
|
||||
<div class="section-header physical-group">
|
||||
<label>Physical</label><span>M</span>
|
||||
</div>
|
||||
<div class="physical-group property xyz">
|
||||
<label>Linear velocity <span class="unit">m/s</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-lvel-x"><label for="property-lvel-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-lvel-y"><label for="property-lvel-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-lvel-z"><label for="property-lvel-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="physical-group property number">
|
||||
<label>Linear damping</label>
|
||||
<input type="number" id="property-ldamping">
|
||||
</div>
|
||||
<hr class="physical-group" />
|
||||
<div class="physical-group property pyr">
|
||||
<label>Angular velocity <span class="unit">deg/s</span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="pitch" id="property-avel-x"><label for="property-avel-x">Pitch:</label></div>
|
||||
<div><input type="number" class="yaw" id="property-avel-y"><label for="property-avel-y">Yaw:</label></div>
|
||||
<div><input type="number" class="roll" id="property-avel-z"><label for="property-avel-z">Roll:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="physical-group property number">
|
||||
<label>Angular damping</label>
|
||||
<input type="number" id="property-adamping">
|
||||
</div>
|
||||
<hr class="physical-group" />
|
||||
<div class="physical-group property gen">
|
||||
<div class="tuple">
|
||||
<div><label>Restitution</label><input type="number" id="property-restitution"></div>
|
||||
<div><label>Friction</label><input type="number" id="property-friction"></div>
|
||||
<div><label>Density</label><input type="number" id="property-density"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="physical-group" />
|
||||
<div class="physical-group property xyz">
|
||||
<label>Gravity <span class="unit">m/s<sup>2</sup></span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-grav-x"><label for="property-grav-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-grav-y"><label for="property-grav-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-grav-z"><label for="property-grav-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="physical-group property xyz">
|
||||
<label>Acceleration <span class="unit">m/s<sup>2</sup></span></label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-lacc-x"><label for="property-lacc-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-lacc-y"><label for="property-lacc-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-lacc-z"><label for="property-lacc-z">Z:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="physical-group color-section" />
|
||||
<div class="physical-group color-section property rgb">
|
||||
<div id="property-color" class="color-picker"></div>
|
||||
<div class="physical-group color-section property color-control1">
|
||||
<div class="color-picker" id="property-color-control1"></div>
|
||||
<label>Entity color</label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-color-red"><label for="property-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-color-green"><label for="property-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-color-blue"><label for="property-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-header behavior-group">
|
||||
<label>Behavior</label><span>M</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="collision-info">
|
||||
<fieldset class="minor">
|
||||
<div class="behavior-group property checkbox">
|
||||
<input type="checkbox" id="property-collisionless">
|
||||
<label for="property-collisionless">Collisionless</label>
|
||||
|
@ -257,11 +80,13 @@
|
|||
<input type="checkbox" id="property-dynamic">
|
||||
<label for="property-dynamic">Dynamic</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="behavior-group two-column">
|
||||
<div class="column">
|
||||
<div class="sub-section-header">
|
||||
<span>Collides With</span>
|
||||
</div>
|
||||
<fieldset class="column">
|
||||
<legend class="sub-section-header">
|
||||
Collides With
|
||||
</legend>
|
||||
<div class="checkbox-sub-props">
|
||||
<div class="property checkbox">
|
||||
<input type="checkbox" id="property-collide-static">
|
||||
|
@ -284,11 +109,11 @@
|
|||
<label for="property-collide-otherAvatar">Other avatars</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="sub-section-header">
|
||||
<span>Grabbing</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="column">
|
||||
<legend class="sub-section-header">
|
||||
Grabbing
|
||||
</legend>
|
||||
<div class="checkbox-sub-props">
|
||||
<div class="property checkbox">
|
||||
<input type="checkbox" id="property-grabbable">
|
||||
|
@ -307,7 +132,9 @@
|
|||
<label for="property-ignore-ik">Ignore inverse kinematics</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset style="display:none;">
|
||||
<!-- extra column ------------------------------------------------------------------------------------ -->
|
||||
<div class="column" id="group-cloneable-group" style="display:none;">
|
||||
<div class="sub-section-header">
|
||||
<span>Cloneable Settings</span>
|
||||
|
@ -321,8 +148,174 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<hr class="behavior-group" />
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="physical" class="major">
|
||||
<legend class="section-header physical-group">
|
||||
Physical<span>M</span>
|
||||
</legend>
|
||||
<fieldset class="minor">
|
||||
<fieldset class="physical-group property xyz fstuple">
|
||||
<legend>Linear velocity <span class="unit">m/s</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-lvel-x"><label for="property-lvel-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-lvel-y"><label for="property-lvel-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-lvel-z"><label for="property-lvel-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="physical-group property number">
|
||||
<label>Linear damping</label>
|
||||
<input type="number" id="property-ldamping">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<fieldset class="physical-group property pyr fstuple">
|
||||
<legend>Angular velocity <span class="unit">deg/s</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="pitch" id="property-avel-x"><label for="property-avel-x">Pitch:</label></div>
|
||||
<div><input type="number" class="yaw" id="property-avel-y"><label for="property-avel-y">Yaw:</label></div>
|
||||
<div><input type="number" class="roll" id="property-avel-z"><label for="property-avel-z">Roll:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="physical-group property number">
|
||||
<label>Angular damping</label>
|
||||
<input type="number" id="property-adamping">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="physical-group property gen fstuple">
|
||||
<div class="tuple">
|
||||
<div><label>Restitution</label><input type="number" id="property-restitution"></div>
|
||||
<div><label>Friction</label><input type="number" id="property-friction"></div>
|
||||
<div><label>Density</label><input type="number" id="property-density"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<fieldset class="physical-group property xyz fstuple">
|
||||
<legend>Gravity <span class="unit">m/s<sup>2</sup></span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-grav-x"><label for="property-grav-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-grav-y"><label for="property-grav-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-grav-z"><label for="property-grav-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="physical-group property xyz fstuple">
|
||||
<legend>Acceleration <span class="unit">m/s<sup>2</sup></span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-lacc-x"><label for="property-lacc-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-lacc-y"><label for="property-lacc-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-lacc-z"><label for="property-lacc-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="physical-group color-section property rgb fstuple">
|
||||
<div class="color-picker" id="property-color-control2"></div>
|
||||
<label>Entity color</label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-color-red"><label for="property-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-color-green"><label for="property-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-color-blue"><label for="property-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="spatial" class="major">
|
||||
<legend class="section-header spatial-group">
|
||||
Spatial<span>M</span>
|
||||
</legend>
|
||||
<fieldset class="spatial-group property xyz fstuple">
|
||||
<legend>Position <span class="unit">m</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-pos-x"><label for="property-pos-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-pos-y"><label for="property-pos-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-pos-z"><label for="property-pos-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="spatial-group property pyr fstuple">
|
||||
<legend>Rotation <span class="unit">deg</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="pitch" id="property-rot-x" step="0.1"><label for="property-rot-x">Pitch:</label></div>
|
||||
<div><input type="number" class="yaw" id="property-rot-y" step="0.1"><label for="property-rot-y">Yaw:</label></div>
|
||||
<div><input type="number" class="roll" id="property-rot-z" step="0.1"><label for="property-rot-z">Roll:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="spatial-group property xyz fstuple">
|
||||
<legend>Dimensions <span class="unit">m</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-dim-x" step="0.1"><label for="property-dim-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-dim-y" step="0.1"><label for="property-dim-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-dim-z" step="0.1"><label for="property-dim-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="spatial-group property xyz fstuple">
|
||||
<legend>Registration <span class="unit">(pivot offset as ratio of dimension)</span></legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="x" id="property-reg-x" step="0.1"><label for="property-reg-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-reg-y" step="0.1"><label for="property-reg-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-reg-z" step="0.1"><label for="property-reg-z">Z:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="spatial-group property gen fsrow">
|
||||
<legend>Scale <span class="unit">%</span></legend>
|
||||
<div class="row">
|
||||
<input type="number" id="dimension-rescale-pct" value=100>
|
||||
<input type="button" class="blue" id="dimension-rescale-button" value="Rescale">
|
||||
<input type="button" class="red" id="reset-to-natural-dimensions" value="Reset Dimensions">
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="spatial-group row">
|
||||
<div class="property text">
|
||||
<label for="property-parent-id">Parent ID</label>
|
||||
<input type="text" id="property-parent-id">
|
||||
</div>
|
||||
<div class="property number">
|
||||
<label for="property-parent-joint-index">Parent joint index</label>
|
||||
<input type="number" id="property-parent-joint-index">
|
||||
</div>
|
||||
</div>
|
||||
<div class="spatial-group ">
|
||||
<div class="property text">
|
||||
<label>Align</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="buttons">
|
||||
<input type="button" id="move-selection-to-grid" value="Selection to Grid">
|
||||
<input type="button" id="move-all-to-grid" value="All to Grid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="behavior" class="major">
|
||||
<legend class="section-header behavior-group">
|
||||
Behavior<span>M</span>
|
||||
</legend>
|
||||
<div class="property textarea">
|
||||
<label for="property-user-data">User data</label>
|
||||
<br>
|
||||
<div class="row">
|
||||
<input type="button" class="red" id="userdata-clear" value="Clear User Data">
|
||||
<input type="button" class="blue" id="userdata-new-editor" value="Edit as JSON">
|
||||
<input disabled type="button" class="black" id="userdata-save" value="Save User Data">
|
||||
<span id="userdata-saved">Saved!</span>
|
||||
</div>
|
||||
<div id="static-userdata"></div>
|
||||
<div id="userdata-editor"></div>
|
||||
<textarea id="property-user-data"></textarea>
|
||||
</div>
|
||||
<div id="id" class="property value">
|
||||
<label>ID:</label>
|
||||
<input type="text" id="property-id" readonly>
|
||||
</div>
|
||||
|
||||
<fieldset class="minor">
|
||||
<div class="behavior-group property url ">
|
||||
<label for="property-collision-sound-url">Collision sound URL</label>
|
||||
<input type="text" id="property-collision-sound-url">
|
||||
|
@ -331,14 +324,16 @@
|
|||
<label>Lifetime <span class="unit">s</span></label>
|
||||
<input type="number" id="property-lifetime">
|
||||
</div>
|
||||
<hr class="behavior-group" />
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="behavior-group property url refresh">
|
||||
<input type="hidden" id="property-script-timestamp" class="value">
|
||||
<label for="property-script-url">Script URL</label>
|
||||
<input type="text" id="property-script-url">
|
||||
<input type="button" id="reload-script-button" class="glyph" value="F">
|
||||
</div>
|
||||
<hr class="behavior-group" />
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="behavior-group property url refresh">
|
||||
<label for="property-server-scripts">Server Script URL</label>
|
||||
<input type="text" id="property-server-scripts">
|
||||
|
@ -351,9 +346,65 @@
|
|||
<div class="behavior-group property">
|
||||
<textarea id="server-script-error"></textarea>
|
||||
</div>
|
||||
<div class="section-header model-group model-section zone-section">
|
||||
<label>Model</label><span>M</span>
|
||||
</fieldset>
|
||||
<div class="property text">
|
||||
<label for="property-description">Description</label>
|
||||
<input type="text" id="property-description">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="hyperlink" class="major">
|
||||
<legend class="section-header hyperlink-group hyperlink-section">
|
||||
Hyperlink<span>M</span>
|
||||
</legend>
|
||||
<div class="hyperlink-group hyperlink-section property url">
|
||||
<label for="property-hyperlink-href">Href - hifi://address</label>
|
||||
<input type="text" id="property-hyperlink-href">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
<fieldset id="light" class="major">
|
||||
<legend class="section-header light-group light-section">
|
||||
Light<span>M</span>
|
||||
</legend>
|
||||
<fieldset class="light-group light-section property rgb fstuple">
|
||||
<div class="color-picker" id="property-light-color"></div>
|
||||
<legend>Light color</legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-light-color-red"><label for="property-light-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-light-color-green"><label for="property-light-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-light-color-blue"><label for="property-light-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="light-group light-section property gen fstuple">
|
||||
<div class="tuple">
|
||||
<div><label>Intensity</label><input type="number" id="property-light-intensity" min="0" step="0.1"></div>
|
||||
<div><label>Fall-off radius <span class="unit">m</span></label><input type="number" id="property-light-falloff-radius" min="0" step="0.1"></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="light-group light-section property checkbox">
|
||||
<input type="checkbox" id="property-light-spot-light">
|
||||
<label for="property-light-spot-light">Spotlight</label>
|
||||
</div>
|
||||
<fieldset class="light-group light-section property gen fstuple">
|
||||
<div class="tuple">
|
||||
<div><label>Spotlight exponent</label><input type="number" id="property-light-exponent" step="0.01"></div>
|
||||
<div><label>Spotlight cut-off</label><input type="number" id="property-light-cutoff" step="0.01"></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="model" class="major">
|
||||
<legend class="section-header model-group model-section zone-section">
|
||||
Model<span>M</span>
|
||||
</legend>
|
||||
<fieldset class="minor">
|
||||
<div class="model-group model-section property url ">
|
||||
<label for="property-model-url">Model URL</label>
|
||||
<input type="text" id="property-model-url">
|
||||
|
@ -374,11 +425,13 @@
|
|||
<label for="property-compound-shape-url">Compound shape URL</label>
|
||||
<input type="text" id="property-compound-shape-url">
|
||||
</div>
|
||||
<hr class="model-group model-section" />
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="model-group model-section property url ">
|
||||
<label for="property-model-animation-url">Animation URL</label>
|
||||
<input type="text" id="property-model-animation-url">
|
||||
</div>
|
||||
|
||||
<div class="model-group model-section two-column">
|
||||
<div class="column">
|
||||
<div class="property checkbox">
|
||||
|
@ -413,7 +466,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="model-group model-section" />
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="model-group model-section property textarea">
|
||||
<label for="property-model-textures">Textures</label>
|
||||
<textarea id="property-model-textures"></textarea>
|
||||
|
@ -422,42 +476,15 @@
|
|||
<label for="property-model-original-textures">Original textures</label>
|
||||
<textarea id="property-model-original-textures" readonly></textarea>
|
||||
</div>
|
||||
<div class="section-header text-group text-section">
|
||||
<label>Text</label><span>M</span>
|
||||
</div>
|
||||
<div class="text-group text-section property text">
|
||||
<label for="property-text-text">Text content</label>
|
||||
<input type="text" id="property-text-text">
|
||||
</div>
|
||||
<div class="text-group text-section property checkbox">
|
||||
<input type="checkbox" id="property-text-face-camera">
|
||||
<label for="property-text-face-camera"> Face Camera</label>
|
||||
</div>
|
||||
<div class="text-group text-section property number">
|
||||
<label>Line height <span class="unit">m</span></label>
|
||||
<input type="number" id="property-text-line-height" min="0" step="0.005">
|
||||
</div>
|
||||
<div class="text-group text-section property rgb">
|
||||
<div class="color-picker" id="property-text-text-color"></div>
|
||||
<label>Text color</label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-text-text-color-red"><label for="property-text-text-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-text-text-color-green"><label for="property-text-text-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-text-text-color-blue"><label for="property-text-text-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-group text-section property rgb">
|
||||
<div class="color-picker" id="property-text-background-color"></div>
|
||||
<label>Background color</label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-text-background-color-red"><label for="roperty-text-background-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-text-background-color-green"><label for="property-text-background-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-text-background-color-blue"><label for="property-text-background-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section-header zone-group zone-section">
|
||||
<label>Zone</label><span>M</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="zone" class="major">
|
||||
<legend class="section-header zone-group zone-section">
|
||||
Zone<span>M</span>
|
||||
</legend>
|
||||
<fieldset class="minor">
|
||||
<div class="zone-group zone-section property checkbox">
|
||||
<input type="checkbox" id="property-zone-stage-sun-model-enabled">
|
||||
<label for="property-zone-stage-sun-model-enabled">Enable stage sun model</label>
|
||||
|
@ -470,7 +497,8 @@
|
|||
<input type="checkbox" id="property-zone-ghosting-allowed">
|
||||
<label for="property-zone-ghosting-allowed">Ghosting allowed</label>
|
||||
</div>
|
||||
<hr class="zone-group zone-section">
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<div class="zone-group zone-section property url ">
|
||||
<label for="property-zone-filter-url">Filter URL</label>
|
||||
<input type="text" id="property-zone-filter-url">
|
||||
|
@ -506,30 +534,34 @@
|
|||
<label for="property-zone-key-ambient-url">Ambient URL</label>
|
||||
<input type="text" id="property-zone-key-ambient-url">
|
||||
</div>
|
||||
<div class="sub-section-header zone-group zone-section stage-section">
|
||||
<label>Stage</label>
|
||||
</div>
|
||||
<div class="zone-group zone-section stage-section property gen">
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<legend class="sub-section-header zone-group zone-section stage-section">
|
||||
Stage
|
||||
</legend>
|
||||
<fieldset class="zone-group zone-section stage-section property gen fstuple">
|
||||
<div class="tuple">
|
||||
<div><label>Latitude <span class="unit">deg</span></label><input type="number" id="property-zone-stage-latitude" min="-90" max="90" step="1"></div>
|
||||
<div><label>Longitude <span class="unit">deg</span></label><input type="number" id="property-zone-stage-longitude" min="-180" max="180" step="1"></div>
|
||||
<div><label>Altitude <span class="unit">m</span></label><input type="number" id="property-zone-stage-altitude" step="1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="zone-group zone-section stage-section property checkbox">
|
||||
<input type="checkbox" id="property-zone-stage-automatic-hour-day">
|
||||
<label for="property-zone-stage-automatic-hour-day">Match stage hour and day to location</label>
|
||||
</div>
|
||||
<div class="zone-group zone-section stage-section property gen">
|
||||
<fieldset class="zone-group zone-section stage-section property gen fstuple">
|
||||
<div class="tuple">
|
||||
<div><label>Day of year</label><input type="number" id="property-zone-stage-day" min="0" max="365" step="1"></div>
|
||||
<div><label>Hour</label><input type="number" id="property-zone-stage-hour" min="0" max="24" step="0.5"></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-section-header zone-group zone-section background-section">
|
||||
<label>Background</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset class="minor">
|
||||
<legend class="sub-section-header zone-group zone-section background-section">
|
||||
Background
|
||||
</legend>
|
||||
<div class="zone-group zone-section background-section property dropdown">
|
||||
<label>Background mode</label>
|
||||
<select name="SelectBackgroundMode" id="property-zone-background-mode">
|
||||
|
@ -537,25 +569,69 @@
|
|||
<option value="skybox">Skybox</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="sub-section-header zone-group zone-section skybox-section">
|
||||
<label>Skybox</label>
|
||||
</div>
|
||||
<div class="zone-group zone-section skybox-section property rgb">
|
||||
</fieldset>
|
||||
<fieldset class="minor skybox-section">
|
||||
<legend class="sub-section-header zone-group zone-section skybox-section">
|
||||
Skybox
|
||||
</legend>
|
||||
<fieldset class="zone-group zone-section skybox-section property rgb fstuple">
|
||||
<div class="color-picker" id="property-zone-skybox-color"></div>
|
||||
<label>Skybox color</label>
|
||||
<legend>Skybox color</legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-zone-skybox-color-red"><label for="property-zone-skybox-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-zone-skybox-color-green"><label for="property-zone-skybox-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-zone-skybox-color-blue"><label for="property-zone-skybox-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="zone-group zone-section skybox-section property url ">
|
||||
<label for="property-zone-skybox-url">Skybox URL</label>
|
||||
<input type="text" id="property-zone-skybox-url">
|
||||
</div>
|
||||
<div class="section-header web-group web-section">
|
||||
<label>Web</label><span>M</span>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="text" class="major">
|
||||
<legend class="section-header text-group text-section">
|
||||
Text<span>M</span>
|
||||
</legend>
|
||||
<div class="text-group text-section property text">
|
||||
<label for="property-text-text">Text content</label>
|
||||
<input type="text" id="property-text-text">
|
||||
</div>
|
||||
<div class="text-group text-section property checkbox">
|
||||
<input type="checkbox" id="property-text-face-camera">
|
||||
<label for="property-text-face-camera"> Face Camera</label>
|
||||
</div>
|
||||
<div class="text-group text-section property number">
|
||||
<label>Line height <span class="unit">m</span></label>
|
||||
<input type="number" id="property-text-line-height" min="0" step="0.005">
|
||||
</div>
|
||||
<div class="text-group text-section property rgb">
|
||||
<div class="color-picker" id="property-text-text-color"></div>
|
||||
<label>Text color</label>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-text-text-color-red"><label for="property-text-text-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-text-text-color-green"><label for="property-text-text-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-text-text-color-blue"><label for="property-text-text-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="text-group text-section property rgb fstuple">
|
||||
<div class="color-picker" id="property-text-background-color"></div>
|
||||
<legend>Background color</legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-text-background-color-red"><label for="roperty-text-background-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-text-background-color-green"><label for="property-text-background-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-text-background-color-blue"><label for="property-text-background-color-blue">Blue:</label></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="web" class="major">
|
||||
<legend class="section-header web-group web-section">
|
||||
Web<span>M</span>
|
||||
</legend>
|
||||
<div class="web-group web-section property url ">
|
||||
<label for="property-web-source-url">Source URL</label>
|
||||
<input type="text" id="property-web-source-url">
|
||||
|
@ -564,36 +640,45 @@
|
|||
<label for="property-web-dpi">Resolution (DPI)</label>
|
||||
<input type="number" id="property-web-dpi">
|
||||
</div>
|
||||
<div class="section-header light-group light-section">
|
||||
<label>Light</label><span>M</span>
|
||||
</div>
|
||||
<div class="light-group light-section property rgb">
|
||||
<div class="color-picker" id="property-light-color"></div>
|
||||
<label>Light color</label>
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<fieldset id="polyvox" class="major">
|
||||
<legend class="section-header spatial-group poly-vox-section property xyz">
|
||||
Voxel volume size <span>m</span>
|
||||
</legend>
|
||||
<div class="tuple">
|
||||
<div><input type="number" class="red" id="property-light-color-red"><label for="property-light-color-red">Red:</label></div>
|
||||
<div><input type="number" class="green" id="property-light-color-green"><label for="property-light-color-green">Green:</label></div>
|
||||
<div><input type="number" class="blue" id="property-light-color-blue"><label for="property-light-color-blue">Blue:</label></div>
|
||||
<div><input type="number" class="x" id="property-voxel-volume-size-x"><label for="property-voxel-volume-size-x">X:</label></div>
|
||||
<div><input type="number" class="y" id="property-voxel-volume-size-y"><label for="property-voxel-volume-size-y">Y:</label></div>
|
||||
<div><input type="number" class="z" id="property-voxel-volume-size-z"><label for="property-voxel-volume-size-z">Z:</label></div>
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property dropdown">
|
||||
<label>Surface extractor</label>
|
||||
<select name="SelectVoxelSurfaceStyle" id="property-voxel-surface-style">
|
||||
<option value="0">Marching cubes</option>
|
||||
<option value="1">Cubic</option>
|
||||
<option value="2">Edged cubic</option>
|
||||
<option value="3">Edged marching cubes</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="light-group light-section property gen">
|
||||
<div class="tuple">
|
||||
<div><label>Intensity</label><input type="number" id="property-light-intensity" min="0" step="0.1"></div>
|
||||
<div><label>Fall-off radius <span class="unit">m</span></label><input type="number" id="property-light-falloff-radius" min="0" step="0.1"></div>
|
||||
<div></div>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-x-texture-url">X-axis texture URL</label>
|
||||
<input type="text" id="property-x-texture-url">
|
||||
</div>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-y-texture-url">Y-axis texture URL</label>
|
||||
<input type="text" id="property-y-texture-url">
|
||||
</div>
|
||||
<div class="light-group light-section property checkbox">
|
||||
<input type="checkbox" id="property-light-spot-light">
|
||||
<label for="property-light-spot-light">Spotlight</label>
|
||||
<div class="spatial-group poly-vox-section property url ">
|
||||
<label for="property-z-texture-url">Z-axis texture URL</label>
|
||||
<input type="text" id="property-z-texture-url">
|
||||
</div>
|
||||
<div class="light-group light-section property gen">
|
||||
<div class="tuple">
|
||||
<div><label>Spotlight exponent</label><input type="number" id="property-light-exponent" step="0.01"></div>
|
||||
<div><label>Spotlight cut-off</label><input type="number" id="property-light-cutoff" step="0.01"></div>
|
||||
<div></div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -488,6 +488,7 @@ function loaded() {
|
|||
openEventBridge(function() {
|
||||
|
||||
var allSections = [];
|
||||
var elPropertiesList = document.getElementById("properties-list");
|
||||
var elID = document.getElementById("property-id");
|
||||
var elType = document.getElementById("property-type");
|
||||
var elTypeIcon = document.getElementById("type-icon");
|
||||
|
@ -574,7 +575,8 @@ function loaded() {
|
|||
var elJSONEditor = document.getElementById("userdata-editor");
|
||||
var elNewJSONEditor = document.getElementById('userdata-new-editor');
|
||||
var elColorSections = document.querySelectorAll(".color-section");
|
||||
var elColor = document.getElementById("property-color");
|
||||
var elColorControl1 = document.getElementById("property-color-control1");
|
||||
var elColorControl2 = document.getElementById("property-color-control2");
|
||||
var elColorRed = document.getElementById("property-color-red");
|
||||
var elColorGreen = document.getElementById("property-color-green");
|
||||
var elColorBlue = document.getElementById("property-color-blue");
|
||||
|
@ -688,7 +690,10 @@ function loaded() {
|
|||
data = JSON.parse(data);
|
||||
if (data.type == "server_script_status") {
|
||||
elServerScriptError.value = data.errorInfo;
|
||||
elServerScriptError.style.display = data.errorInfo ? "block" : "none";
|
||||
// If we just set elServerScriptError's diplay to block or none, we still end up with
|
||||
//it's parent contributing 21px bottom padding even when elServerScriptError is display:none.
|
||||
// So set it's parent to block or none
|
||||
elServerScriptError.parentElement.style.display = data.errorInfo ? "block" : "none";
|
||||
if (data.statusRetrieved === false) {
|
||||
elServerScriptStatus.innerText = "Failed to retrieve status";
|
||||
} else if (data.isRunning) {
|
||||
|
@ -714,6 +719,7 @@ function loaded() {
|
|||
elTypeIcon.style.display = "none";
|
||||
elType.innerHTML = "<i>No selection</i>";
|
||||
elID.value = "";
|
||||
elPropertiesList.className = '';
|
||||
disableProperties();
|
||||
} else if (data.selections && data.selections.length > 1) {
|
||||
deleteJSONEditor();
|
||||
|
@ -742,6 +748,7 @@ function loaded() {
|
|||
elType.innerHTML = type + " (" + data.selections.length + ")";
|
||||
elTypeIcon.innerHTML = ICON_FOR_TYPE[type];
|
||||
elTypeIcon.style.display = "inline-block";
|
||||
elPropertiesList.className = '';
|
||||
|
||||
elID.value = "";
|
||||
|
||||
|
@ -758,6 +765,7 @@ function loaded() {
|
|||
lastEntityID = '"' + properties.id + '"';
|
||||
elID.value = properties.id;
|
||||
|
||||
elPropertiesList.className = properties.type + 'Menu';
|
||||
elType.innerHTML = properties.type;
|
||||
elTypeIcon.innerHTML = ICON_FOR_TYPE[properties.type];
|
||||
elTypeIcon.style.display = "inline-block";
|
||||
|
@ -892,48 +900,20 @@ function loaded() {
|
|||
elHyperlinkHref.value = properties.href;
|
||||
elDescription.value = properties.description;
|
||||
|
||||
for (var i = 0; i < allSections.length; i++) {
|
||||
for (var j = 0; j < allSections[i].length; j++) {
|
||||
allSections[i][j].style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < elHyperlinkSections.length; i++) {
|
||||
elHyperlinkSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
if (properties.type == "Shape" || properties.type == "Box" || properties.type == "Sphere") {
|
||||
for (var i = 0; i < elShapeSections.length; i++) {
|
||||
elShapeSections[i].style.display = 'table';
|
||||
}
|
||||
elShape.value = properties.shape;
|
||||
setDropdownText(elShape);
|
||||
|
||||
} else {
|
||||
for (var i = 0; i < elShapeSections.length; i++) {
|
||||
elShapeSections[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (properties.type == "Shape" || properties.type == "Box" || properties.type == "Sphere" || properties.type == "ParticleEffect") {
|
||||
for (var i = 0; i < elColorSections.length; i++) {
|
||||
elColorSections[i].style.display = 'table';
|
||||
}
|
||||
elColorRed.value = properties.color.red;
|
||||
elColorGreen.value = properties.color.green;
|
||||
elColorBlue.value = properties.color.blue;
|
||||
elColor.style.backgroundColor = "rgb(" + properties.color.red + "," + properties.color.green + "," + properties.color.blue + ")";
|
||||
} else {
|
||||
for (var i = 0; i < elColorSections.length; i++) {
|
||||
elColorSections[i].style.display = 'none';
|
||||
}
|
||||
elColorControl1.style.backgroundColor = elColorControl2.style.backgroundColor = "rgb(" + properties.color.red + "," + properties.color.green + "," + properties.color.blue + ")";
|
||||
}
|
||||
|
||||
if (properties.type == "Model") {
|
||||
for (var i = 0; i < elModelSections.length; i++) {
|
||||
elModelSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
elModelURL.value = properties.modelURL;
|
||||
elShapeType.value = properties.shapeType;
|
||||
setDropdownText(elShapeType);
|
||||
|
@ -951,20 +931,9 @@ function loaded() {
|
|||
elModelOriginalTextures.value = properties.originalTextures;
|
||||
setTextareaScrolling(elModelOriginalTextures);
|
||||
} else if (properties.type == "Web") {
|
||||
for (var i = 0; i < elWebSections.length; i++) {
|
||||
elWebSections[i].style.display = 'table';
|
||||
}
|
||||
for (var i = 0; i < elHyperlinkSections.length; i++) {
|
||||
elHyperlinkSections[i].style.display = 'none';
|
||||
}
|
||||
|
||||
elWebSourceURL.value = properties.sourceUrl;
|
||||
elWebDPI.value = properties.dpi;
|
||||
} else if (properties.type == "Text") {
|
||||
for (var i = 0; i < elTextSections.length; i++) {
|
||||
elTextSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
elTextText.value = properties.text;
|
||||
elTextLineHeight.value = properties.lineHeight.toFixed(4);
|
||||
elTextFaceCamera.checked = properties.faceCamera;
|
||||
|
@ -976,10 +945,6 @@ function loaded() {
|
|||
elTextBackgroundColorGreen.value = properties.backgroundColor.green;
|
||||
elTextBackgroundColorBlue.value = properties.backgroundColor.blue;
|
||||
} else if (properties.type == "Light") {
|
||||
for (var i = 0; i < elLightSections.length; i++) {
|
||||
elLightSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
elLightSpotLight.checked = properties.isSpotlight;
|
||||
|
||||
elLightColor.style.backgroundColor = "rgb(" + properties.color.red + "," + properties.color.green + "," + properties.color.blue + ")";
|
||||
|
@ -992,10 +957,6 @@ function loaded() {
|
|||
elLightExponent.value = properties.exponent.toFixed(2);
|
||||
elLightCutoff.value = properties.cutoff.toFixed(2);
|
||||
} else if (properties.type == "Zone") {
|
||||
for (var i = 0; i < elZoneSections.length; i++) {
|
||||
elZoneSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
elZoneStageSunModelEnabled.checked = properties.stage.sunModelEnabled;
|
||||
elZoneKeyLightColor.style.backgroundColor = "rgb(" + properties.keyLight.color.red + "," + properties.keyLight.color.green + "," + properties.keyLight.color.blue + ")";
|
||||
elZoneKeyLightColorRed.value = properties.keyLight.color.red;
|
||||
|
@ -1032,10 +993,6 @@ function loaded() {
|
|||
|
||||
showElements(document.getElementsByClassName('skybox-section'), elZoneBackgroundMode.value == 'skybox');
|
||||
} else if (properties.type == "PolyVox") {
|
||||
for (var i = 0; i < elPolyVoxSections.length; i++) {
|
||||
elPolyVoxSections[i].style.display = 'table';
|
||||
}
|
||||
|
||||
elVoxelVolumeSizeX.value = properties.voxelVolumeSize.x.toFixed(2);
|
||||
elVoxelVolumeSizeY.value = properties.voxelVolumeSize.y.toFixed(2);
|
||||
elVoxelVolumeSizeZ.value = properties.voxelVolumeSize.z.toFixed(2);
|
||||
|
@ -1235,20 +1192,41 @@ function loaded() {
|
|||
elColorRed.addEventListener('change', colorChangeFunction);
|
||||
elColorGreen.addEventListener('change', colorChangeFunction);
|
||||
elColorBlue.addEventListener('change', colorChangeFunction);
|
||||
colorPickers.push($('#property-color').colpick({
|
||||
colorPickers.push($('#property-color-control1').colpick({
|
||||
colorScheme: 'dark',
|
||||
layout: 'hex',
|
||||
color: '000000',
|
||||
onShow: function(colpick) {
|
||||
$('#property-color').attr('active', 'true');
|
||||
$('#property-color-control1').attr('active', 'true');
|
||||
},
|
||||
onHide: function(colpick) {
|
||||
$('#property-color').attr('active', 'false');
|
||||
$('#property-color-control1').attr('active', 'false');
|
||||
},
|
||||
onSubmit: function(hsb, hex, rgb, el) {
|
||||
$(el).css('background-color', '#' + hex);
|
||||
$(el).colpickHide();
|
||||
emitColorPropertyUpdate('color', rgb.r, rgb.g, rgb.b);
|
||||
// Keep the companion control in sync
|
||||
elColorControl2.style.backgroundColor = "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
|
||||
}
|
||||
}));
|
||||
colorPickers.push($('#property-color-control2').colpick({
|
||||
colorScheme: 'dark',
|
||||
layout: 'hex',
|
||||
color: '000000',
|
||||
onShow: function(colpick) {
|
||||
$('#property-color-control2').attr('active', 'true');
|
||||
},
|
||||
onHide: function(colpick) {
|
||||
$('#property-color-control2').attr('active', 'false');
|
||||
},
|
||||
onSubmit: function(hsb, hex, rgb, el) {
|
||||
$(el).css('background-color', '#' + hex);
|
||||
$(el).colpickHide();
|
||||
emitColorPropertyUpdate('color', rgb.r, rgb.g, rgb.b);
|
||||
// Keep the companion control in sync
|
||||
elColorControl1.style.backgroundColor = "rgb(" + rgb.r + "," + rgb.g + "," + rgb.b + ")";
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -1512,11 +1490,9 @@ function loaded() {
|
|||
var elCollapsible = document.getElementsByClassName("section-header");
|
||||
|
||||
var toggleCollapsedEvent = function(event) {
|
||||
var element = event.target;
|
||||
if (element.nodeName !== "DIV") {
|
||||
element = element.parentNode;
|
||||
}
|
||||
var isCollapsed = element.getAttribute("collapsed") !== "true";
|
||||
var element = event.target.parentNode.parentNode;
|
||||
var isCollapsed = element.dataset.collapsed !== "true";
|
||||
element.dataset.collapsed = isCollapsed ? "true" : false
|
||||
element.setAttribute("collapsed", isCollapsed ? "true" : "false");
|
||||
element.getElementsByTagName("span")[0].textContent = isCollapsed ? "L" : "M";
|
||||
};
|
||||
|
|
66
unpublishedScripts/parent-ator/createParentator.js
Normal file
66
unpublishedScripts/parent-ator/createParentator.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
// createParentator.js
|
||||
//
|
||||
// Script Type: Entity Spawner
|
||||
// Created by Jeff Moyes on 6/30/2017
|
||||
// Copyright 2017 High Fidelity, Inc.
|
||||
//
|
||||
// This script creates a gun-looking item that, when tapped on an entity, and then a second entity, sets the second entity as the paernt of the first
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
var scriptURL = Script.resolvePath('parentator.js');
|
||||
var MODEL_URL = Script.resolvePath('resources/Parent-Tool-Production.fbx');
|
||||
var COLLISION_HULL_URL = Script.resolvePath('resources/Parent-Tool-CollisionHull.obj');
|
||||
|
||||
// the fbx model needs to be rotated from where it would naturally face when it first initializes
|
||||
var ROT_Y_180 = {x: 0, y: 1, z: 0, w: 0};
|
||||
var START_ROTATION = Quat.normalize(Quat.multiply(Camera.getOrientation(), ROT_Y_180));
|
||||
var START_POSITION = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, y: 0.5, z: 0 }), Vec3.multiply(0.7, Quat.getForward(Camera.getOrientation())));
|
||||
|
||||
|
||||
|
||||
var parentator = Entities.addEntity({
|
||||
name: "Parent-ator",
|
||||
type: "Model",
|
||||
modelURL: MODEL_URL,
|
||||
shapeType: 'compound',
|
||||
compoundShapeURL: COLLISION_HULL_URL,
|
||||
dynamic: true,
|
||||
damping: 0.9,
|
||||
script: scriptURL,
|
||||
dimensions: {
|
||||
x: 0.1270,
|
||||
y: 0.2715,
|
||||
z: 0.4672
|
||||
},
|
||||
position: START_POSITION,
|
||||
rotation: START_ROTATION,
|
||||
|
||||
|
||||
userData: JSON.stringify({
|
||||
"grabbableKey": {"grabbable": true},
|
||||
"equipHotspots": [
|
||||
{
|
||||
"position": {"x": 0.0, "y": 0.0, "z": -0.170 },
|
||||
"radius": 0.15,
|
||||
"joints":{
|
||||
"RightHand":[
|
||||
{"x":0.05, "y":0.25, "z":0.03},
|
||||
{"x":-0.5, "y":-0.5, "z":-0.5, "w":0.5}
|
||||
],
|
||||
"LeftHand":[
|
||||
{"x":-0.05, "y":0.25, "z":0.03},
|
||||
{"x":-0.5, "y":0.5, "z":0.5, "w":0.5}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
function cleanUp() {
|
||||
Entities.deleteEntity(parentator);
|
||||
}
|
||||
Script.scriptEnding.connect(cleanUp);
|
152
unpublishedScripts/parent-ator/parentator.js
Normal file
152
unpublishedScripts/parent-ator/parentator.js
Normal file
|
@ -0,0 +1,152 @@
|
|||
// parentator.js
|
||||
//
|
||||
// Script Type: Entity
|
||||
// Created by Jeff Moyes on 6/30/2017
|
||||
// Copyright 2017 High Fidelity, Inc.
|
||||
//
|
||||
// This script allows users to parent one object to another via the "parent-ator" entity
|
||||
// (which looks like a purple gun-like object). The user:
|
||||
// 1) equips their avatar with this parent-ator,
|
||||
// 2) taps the end of the parent-ator on an entity (which becomes the child entity), and
|
||||
// 3) taps the end of the parent-ator on a second entity (which becomes the parent entity)
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
|
||||
(function() {
|
||||
var MESSAGE_0_TEXTURE_URL = Script.resolvePath( 'resources/message-0-off.png' );
|
||||
var MESSAGE_1_TEXTURE_URL = Script.resolvePath( 'resources/message-1-start.png' );
|
||||
var MESSAGE_2_TEXTURE_URL = Script.resolvePath( 'resources/message-2-noperms.png' );
|
||||
var MESSAGE_3_TEXTURE_URL = Script.resolvePath( 'resources/message-3-tryagain.png' );
|
||||
var MESSAGE_4_TEXTURE_URL = Script.resolvePath( 'resources/message-4-setparent.png' );
|
||||
var MESSAGE_5_TEXTURE_URL = Script.resolvePath( 'resources/message-5-success.png' );
|
||||
|
||||
var SOUND_1_URL = Script.resolvePath( 'resources/parent-tool-sound1.wav' );
|
||||
var SOUND_2_URL = Script.resolvePath( 'resources/parent-tool-sound2.wav' );
|
||||
var SOUND_ERROR_URL = Script.resolvePath( 'resources/parent-tool-sound-error.wav' );
|
||||
var SOUND_SUCCESS_URL = Script.resolvePath( 'resources/parent-tool-sound-success.wav' );
|
||||
var SOUND_1, SOUND_2, SOUND_ERROR, SOUND_SUCCESS;
|
||||
var childEntityID, parentEntityID;
|
||||
var active = false;
|
||||
|
||||
|
||||
|
||||
|
||||
function Parentator() {
|
||||
return;
|
||||
}
|
||||
|
||||
Parentator.prototype.turnOff = function() {
|
||||
childEntityID = 0;
|
||||
parentEntityID = 0;
|
||||
this.active = false;
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_0_TEXTURE_URL }) });
|
||||
}
|
||||
|
||||
Parentator.prototype.turnOn = function() {
|
||||
childEntityID = 0;
|
||||
parentEntityID = 0;
|
||||
this.active = true;
|
||||
if (Entities.canRez()) {
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_1_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_1 );
|
||||
} else {
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_2_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_ERROR );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Parentator.prototype.preload = function( entityID ) {
|
||||
this.entityID = entityID;
|
||||
SOUND_1 = SoundCache.getSound( SOUND_1_URL );
|
||||
SOUND_2 = SoundCache.getSound( SOUND_2_URL );
|
||||
SOUND_ERROR = SoundCache.getSound( SOUND_ERROR_URL );
|
||||
SOUND_SUCCESS = SoundCache.getSound( SOUND_SUCCESS_URL );
|
||||
|
||||
// Makue sure it's off
|
||||
this.turnOff();
|
||||
}
|
||||
|
||||
Parentator.prototype.startEquip = function( args ) {
|
||||
this.hand = args[0];
|
||||
this.turnOn();
|
||||
}
|
||||
|
||||
|
||||
Parentator.prototype.releaseEquip = function( args ) {
|
||||
this.hand = undefined;
|
||||
this.turnOff();
|
||||
}
|
||||
|
||||
Parentator.prototype.collisionWithEntity = function( parentatorID, collidedID, collisionInfo ) {
|
||||
if ( this.active ) {
|
||||
// We don't want to be able to select Lights, Zone, and Particles but they are not collidable anyway so we don't have to worry about them
|
||||
var collidedEntityProperties = Entities.getEntityProperties( collidedID );
|
||||
|
||||
if ( !Entities.canRez() ) {
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_2_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_ERROR );
|
||||
}
|
||||
|
||||
// User has just reclicked the first entity (or it's 'bounced')
|
||||
if ( childEntityID == collidedID ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( collidedEntityProperties.locked ) {
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_3_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_ERROR );
|
||||
return;
|
||||
}
|
||||
|
||||
// If no entity has been chosen
|
||||
if ( childEntityID == 0 ) {
|
||||
childEntityID = collidedID;
|
||||
|
||||
// if there is a parentID, remove it
|
||||
if ( collidedEntityProperties.parentID != "{00000000-0000-0000-0000-000000000000}" ) {
|
||||
Entities.editEntity( collidedID, { parentID: "{00000000-0000-0000-0000-000000000000}" });
|
||||
}
|
||||
|
||||
if ( collidedEntityProperties.dynamic ) {
|
||||
Entities.editEntity( collidedID, { dynamic: false });
|
||||
}
|
||||
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_4_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_2 );
|
||||
} else {
|
||||
parentEntityID = collidedID;
|
||||
this.setParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Parentator.prototype.setParent = function() {
|
||||
var _this = this;
|
||||
Entities.editEntity( childEntityID, { parentID: parentEntityID });
|
||||
Entities.editEntity( this.entityID, { textures: JSON.stringify({ "texture-message": MESSAGE_5_TEXTURE_URL }) });
|
||||
this.playSoundAtCurrentPosition( SOUND_SUCCESS );
|
||||
Script.setTimeout( function() {
|
||||
_this.turnOn(); // reset
|
||||
}, 5000 );
|
||||
}
|
||||
|
||||
Parentator.prototype.playSoundAtCurrentPosition = function( sound ) {
|
||||
var audioProperties = {
|
||||
volume: 0.3,
|
||||
position: Entities.getEntityProperties( this.entityID ).position,
|
||||
localOnly: true
|
||||
}
|
||||
Audio.playSound( sound, audioProperties );
|
||||
}
|
||||
|
||||
Parentator.prototype.unload = function () {
|
||||
Entities.deleteEntity( this.entityID );
|
||||
}
|
||||
|
||||
// entity scripts always need to return a newly constructed object of our type
|
||||
return new Parentator();
|
||||
});
|
|
@ -0,0 +1,38 @@
|
|||
# Blender v2.78 (sub 5) OBJ File: 'untitled.blend'
|
||||
# www.blender.org
|
||||
mtllib Parent-Tool-CollisionHull.mtl
|
||||
o Cube.001
|
||||
v -0.153045 -0.072355 0.173769
|
||||
v -0.153045 0.040882 0.173769
|
||||
v -0.067387 0.040882 0.029156
|
||||
v -0.067387 -0.072355 0.029156
|
||||
v 0.062301 0.040882 0.029156
|
||||
v 0.062301 -0.072355 0.029156
|
||||
v 0.147960 -0.072355 0.173769
|
||||
v 0.147960 0.040882 0.173769
|
||||
v 0.147960 0.026770 0.337324
|
||||
v 0.147960 -0.047896 0.337324
|
||||
v -0.153045 0.026770 0.337324
|
||||
v -0.153045 -0.047896 0.337324
|
||||
vn -0.8604 0.0000 -0.5096
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -0.9890 0.1479
|
||||
vn 0.0000 0.9963 0.0860
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 -0.0000
|
||||
vn 0.8604 0.0000 -0.5096
|
||||
vn -1.0000 -0.0000 0.0000
|
||||
usemtl None
|
||||
s 1
|
||||
f 1//1 2//1 3//1 4//1
|
||||
f 4//2 3//2 5//2 6//2
|
||||
f 7//3 8//3 9//3 10//3
|
||||
f 10//4 9//4 11//4 12//4
|
||||
f 1//5 7//5 10//5 12//5
|
||||
f 8//6 2//6 11//6 9//6
|
||||
f 5//7 3//7 2//7 8//7
|
||||
f 4//8 6//8 7//8 1//8
|
||||
f 6//9 5//9 8//9 7//9
|
||||
f 12//10 11//10 2//10 1//10
|
Binary file not shown.
BIN
unpublishedScripts/parent-ator/resources/message-0-off.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-0-off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5 KiB |
BIN
unpublishedScripts/parent-ator/resources/message-1-start.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-1-start.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
BIN
unpublishedScripts/parent-ator/resources/message-2-noperms.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-2-noperms.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 80 KiB |
BIN
unpublishedScripts/parent-ator/resources/message-3-tryagain.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-3-tryagain.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
BIN
unpublishedScripts/parent-ator/resources/message-4-setparent.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-4-setparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
BIN
unpublishedScripts/parent-ator/resources/message-5-success.png
Normal file
BIN
unpublishedScripts/parent-ator/resources/message-5-success.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
Binary file not shown.
BIN
unpublishedScripts/parent-ator/resources/parent-tool-sound1.wav
Normal file
BIN
unpublishedScripts/parent-ator/resources/parent-tool-sound1.wav
Normal file
Binary file not shown.
BIN
unpublishedScripts/parent-ator/resources/parent-tool-sound2.wav
Normal file
BIN
unpublishedScripts/parent-ator/resources/parent-tool-sound2.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue