Initial Grab Clone

This commit is contained in:
Menithal 2017-02-19 18:18:38 +02:00
parent ec07969c0b
commit 9b8503eba5
2 changed files with 24 additions and 4 deletions

View file

@ -61,7 +61,7 @@
<label for="property-description">Description</label> <label for="property-description">Description</label>
<input type="text" id="property-description"> <input type="text" id="property-description">
</div> </div>
<div class="property textarea"> <div class="property textarea">
<label for="property-user-data">User data</label> <label for="property-user-data">User data</label>
<br> <br>
@ -295,12 +295,25 @@
<input type="checkbox" id="property-wants-trigger"> <input type="checkbox" id="property-wants-trigger">
<label for="property-wants-trigger">Triggerable</label> <label for="property-wants-trigger">Triggerable</label>
</div> </div>
<div class="property checkbox">
<input type="checkbox" id="property-cloneable">
<label for="property-grabbable">Cloneable</label>
</div>
<div class="property checkbox"> <div class="property checkbox">
<input type="checkbox" id="property-ignore-ik"> <input type="checkbox" id="property-ignore-ik">
<label for="property-ignore-ik">Ignore inverse kinematics</label> <label for="property-ignore-ik">Ignore inverse kinematics</label>
</div> </div>
</div> </div>
</div> </div>
<div class="column" id="cloneable-group">
<div class="sub-section-header">
<span>Cloneable Settings</span>
</div>
<div class="cloneable-group property gen">
<div><label>Clone Lifetime</label><input type="number" id="property-cloneable-lifetime"></div>
<div><label>Clone Limit</label><input type="number" id="property-cloneable-lifetime"></div>
</div>
</div>
</div> </div>
<hr class="behavior-group" /> <hr class="behavior-group" />
<div class="behavior-group property url "> <div class="behavior-group property url ">

View file

@ -273,7 +273,7 @@ function updateCheckedSubProperty(propertyName, propertyValue, subPropertyElemen
propertyValue += subPropertyString + ','; propertyValue += subPropertyString + ',';
} }
} else { } else {
// We've unchecked, so remove // We've unchecked, so remove
propertyValue = propertyValue.replace(subPropertyString + ",", ""); propertyValue = propertyValue.replace(subPropertyString + ",", "");
} }
@ -584,6 +584,7 @@ function loaded() {
var elCollisionSoundURL = document.getElementById("property-collision-sound-url"); var elCollisionSoundURL = document.getElementById("property-collision-sound-url");
var elGrabbable = document.getElementById("property-grabbable"); var elGrabbable = document.getElementById("property-grabbable");
var elCloneable = document.getElementById("property-cloneable");
var elWantsTrigger = document.getElementById("property-wants-trigger"); var elWantsTrigger = document.getElementById("property-wants-trigger");
var elIgnoreIK = document.getElementById("property-ignore-ik"); var elIgnoreIK = document.getElementById("property-ignore-ik");
@ -780,7 +781,7 @@ function loaded() {
if (lastEntityID !== '"' + properties.id + '"' && lastEntityID !== null && editor !== null) { if (lastEntityID !== '"' + properties.id + '"' && lastEntityID !== null && editor !== null) {
saveJSONUserData(true); saveJSONUserData(true);
} }
//the event bridge and json parsing handle our avatar id string differently. //the event bridge and json parsing handle our avatar id string differently.
lastEntityID = '"' + properties.id + '"'; lastEntityID = '"' + properties.id + '"';
elID.innerHTML = properties.id; elID.innerHTML = properties.id;
@ -1156,6 +1157,12 @@ function loaded() {
elGrabbable.addEventListener('change', function() { elGrabbable.addEventListener('change', function() {
userDataChanger("grabbableKey", "grabbable", elGrabbable, elUserData, properties.dynamic); userDataChanger("grabbableKey", "grabbable", elGrabbable, elUserData, properties.dynamic);
}); });
elCloneable.addEventListener('change', function () {
userDataChanger("grabbableKey", "cloneable", elCloneable, elUserData, false);
if (elCloneable.checked) {
}
});
elWantsTrigger.addEventListener('change', function() { elWantsTrigger.addEventListener('change', function() {
userDataChanger("grabbableKey", "wantsTrigger", elWantsTrigger, elUserData, false); userDataChanger("grabbableKey", "wantsTrigger", elWantsTrigger, elUserData, false);
}); });
@ -1390,7 +1397,7 @@ function loaded() {
elZoneFlyingAllowed.addEventListener('change', createEmitCheckedPropertyUpdateFunction('flyingAllowed')); elZoneFlyingAllowed.addEventListener('change', createEmitCheckedPropertyUpdateFunction('flyingAllowed'));
elZoneGhostingAllowed.addEventListener('change', createEmitCheckedPropertyUpdateFunction('ghostingAllowed')); elZoneGhostingAllowed.addEventListener('change', createEmitCheckedPropertyUpdateFunction('ghostingAllowed'));
elZoneFilterURL.addEventListener('change', createEmitTextPropertyUpdateFunction('filterURL')); elZoneFilterURL.addEventListener('change', createEmitTextPropertyUpdateFunction('filterURL'));
var voxelVolumeSizeChangeFunction = createEmitVec3PropertyUpdateFunction( var voxelVolumeSizeChangeFunction = createEmitVec3PropertyUpdateFunction(
'voxelVolumeSize', elVoxelVolumeSizeX, elVoxelVolumeSizeY, elVoxelVolumeSizeZ); 'voxelVolumeSize', elVoxelVolumeSizeX, elVoxelVolumeSizeY, elVoxelVolumeSizeZ);
elVoxelVolumeSizeX.addEventListener('change', voxelVolumeSizeChangeFunction); elVoxelVolumeSizeX.addEventListener('change', voxelVolumeSizeChangeFunction);