Merge branch 'master' of github.com:highfidelity/hifi into dressing-room

This commit is contained in:
Seth Alves 2016-02-02 09:25:11 -08:00
commit fec479d70a
18 changed files with 425 additions and 181 deletions

View file

@ -64,7 +64,7 @@
function createEmitNumberPropertyUpdateFunction(propertyName) {
return function() {
EventBridge.emitWebEvent(
'{ "type":"update", "properties":{"' + propertyName + '":' + this.value + '}}'
'{ "type":"update", "properties":{"' + propertyName + '":' + parseFloat(this.value).toFixed(2) + '}}'
);
};
}

View file

@ -16,6 +16,7 @@ Windows.Window {
closable: true
visible: false
width: 384; height: 640;
title: "Tools"
property string newTabSource
property alias tabView: tabView
onParentChanged: {

View file

@ -1,21 +1,54 @@
import QtQuick 2.3
import QtQuick.Controls 1.3 as Original
import QtQuick.Controls.Styles 1.3 as OriginalStyles
import "."
import "../styles"
Original.Button {
id: root
property color iconColor: "black"
FontLoader { id: iconFont; source: "../../fonts/fontawesome-webfont.ttf"; }
style: OriginalStyles.ButtonStyle {
label: Text {
renderType: Text.NativeRendering
property real size: 32
SystemPalette { id: palette; colorGroup: SystemPalette.Active }
SystemPalette { id: disabledPalette; colorGroup: SystemPalette.Disabled }
style: OriginalStyles.ButtonStyle {
label: FontAwesome {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.family: iconFont.name
font.pointSize: 20
color: control.enabled ? control.iconColor : "gray"
font.pixelSize: control.size - 4
color: control.enabled ? palette.buttonText : disabledPalette.buttonText
text: control.text
}
}
background: Rectangle {
id: background
implicitWidth: size
implicitHeight: size
border.width: 1
border.color: "black"
radius: 4
color: control.enabled ? palette.button : disabledPalette.button
Connections {
target: control
onActiveFocusChanged: {
if (control.activeFocus) {
pulseAnimation.restart();
} else {
pulseAnimation.stop();
}
background.border.width = 1;
}
}
SequentialAnimation {
id: pulseAnimation;
running: false
NumberAnimation { target: border; property: "width"; to: 3; duration: 500 }
NumberAnimation { target: border; property: "width"; to: 1; duration: 500 }
onStopped: if (control.activeFocus) { start(); }
}
}
}
Keys.onEnterPressed: root.clicked();
Keys.onReturnPressed: root.clicked();
}

View file

@ -230,19 +230,23 @@ FocusScope {
return;
}
var windowRect = targetWindow.framedRect();
var minPosition = Qt.vector2d(-windowRect.x, -windowRect.y);
var maxPosition = Qt.vector2d(desktop.width - windowRect.width, desktop.height - windowRect.height);
var newPosition = Qt.vector2d(targetWindow.x, targetWindow.y);
if (newPosition.x === -1 && newPosition.y === -1) {
// Set initial window position
// newPosition = Utils.randomPosition(minPosition, maxPosition);
console.log("Target has no defined position, putting in center of the screen")
newPosition = Qt.vector2d(desktop.width / 2 - windowRect.width / 2,
desktop.height / 2 - windowRect.height / 2);
// If the window is completely offscreen, reposition it
if ((targetWindow.x > desktop.width || (targetWindow.x + targetWindow.width) < 0) ||
(targetWindow.y > desktop.height || (targetWindow.y + targetWindow.height) < 0)) {
newPosition.x = -1
newPosition.y = -1
}
newPosition = Utils.clampVector(newPosition, minPosition, maxPosition);
if (newPosition.x === -1 && newPosition.y === -1) {
// Set initial window position
// var minPosition = Qt.vector2d(-windowRect.x, -windowRect.y);
// var maxPosition = Qt.vector2d(desktop.width - windowRect.width, desktop.height - windowRect.height);
// newPosition = Utils.clampVector(newPosition, minPosition, maxPosition);
// newPosition = Utils.randomPosition(minPosition, maxPosition);
newPosition = Qt.vector2d(desktop.width / 2 - targetWindow.width / 2,
desktop.height / 2 - targetWindow.height / 2);
}
targetWindow.x = newPosition.x;
targetWindow.y = newPosition.y;
}

View file

@ -55,35 +55,39 @@ ModalWindow {
anchors { left: parent.left; top: parent.top; margins: 8 }
spacing: 8
// FIXME implement back button
// VrControls.FontAwesome {
// id: backButton
// text: "\uf0a8"
// size: currentDirectory.height
// enabled: d.backStack.length != 0
// MouseArea { anchors.fill: parent; onClicked: d.navigateBack() }
// }
VrControls.FontAwesome {
//VrControls.ButtonAwesome {
// id: backButton
// text: "\uf0a8"
// size: currentDirectory.height
// enabled: d.backStack.length != 0
// MouseArea { anchors.fill: parent; onClicked: d.navigateBack() }
//}
VrControls.ButtonAwesome {
id: upButton
enabled: model.parentFolder && model.parentFolder !== ""
text: "\uf0aa"
size: currentDirectory.height
color: enabled ? "black" : "gray"
MouseArea { anchors.fill: parent; onClicked: d.navigateUp() }
size: 32
onClicked: d.navigateUp();
}
VrControls.FontAwesome {
VrControls.ButtonAwesome {
id: homeButton
property var destination: helper.home();
visible: destination ? true : false
enabled: d.homeDestination ? true : false
text: "\uf015"
size: currentDirectory.height
MouseArea { anchors.fill: parent; onClicked: model.folder = parent.destination }
size: 32
onClicked: d.navigateHome();
}
}
TextField {
id: currentDirectory
height: homeButton.height
anchors { left: navControls.right; right: parent.right; top: parent.top; margins: 8 }
property var lastValidFolder: helper.urlToPath(model.folder)
onLastValidFolderChanged: text = lastValidFolder;
verticalAlignment: Text.AlignVCenter
font.pointSize: 14
font.bold: true
// FIXME add support auto-completion
onAccepted: {
@ -93,7 +97,6 @@ ModalWindow {
}
model.folder = helper.pathToUrl(text);
}
}
QtObject {
@ -104,6 +107,7 @@ ModalWindow {
property var backStack: []
property var tableViewConnection: Connections { target: fileTableView; onCurrentRowChanged: d.update(); }
property var modelConnection: Connections { target: model; onFolderChanged: d.update(); }
property var homeDestination: helper.home();
Component.onCompleted: update();
function update() {
@ -127,12 +131,20 @@ ModalWindow {
return true;
}
}
function navigateHome() {
model.folder = homeDestination;
return true;
}
}
FileTableView {
id: fileTableView
anchors { left: parent.left; right: parent.right; top: currentDirectory.bottom; bottom: currentSelection.top; margins: 8 }
onDoubleClicked: navigateToRow(row);
focus: true
Keys.onReturnPressed: navigateToCurrentRow();
Keys.onEnterPressed: navigateToCurrentRow();
model: FolderListModel {
id: model
nameFilters: selectionType.currentFilter
@ -146,6 +158,7 @@ ModalWindow {
upButton.enabled = Qt.binding(function() { return (model.parentFolder && model.parentFolder != "") ? true : false; });
showFiles = !root.selectDirectory
}
onFolderChanged: fileTableView.currentRow = 0;
}
function navigateToRow(row) {
@ -159,10 +172,9 @@ ModalWindow {
var file = model.get(row, "fileURL");
if (isFolder) {
fileTableView.model.folder = file
currentRow = -1;
} else {
root.selectedFile(file);
root.visible = false;
root.destroy();
}
}
}
@ -171,6 +183,7 @@ ModalWindow {
id: currentSelection
anchors { right: root.selectDirectory ? parent.right : selectionType.left; rightMargin: 8; left: parent.left; leftMargin: 8; top: selectionType.top }
readOnly: true
activeFocusOnTab: false
}
FileTypeSelection {
@ -187,17 +200,7 @@ ModalWindow {
anchors.rightMargin: 8
anchors.bottom: parent.bottom
anchors.bottomMargin: 8
layoutDirection: Qt.RightToLeft
spacing: 8
Button {
id: cancelButton
text: "Cancel"
KeyNavigation.up: selectionType
KeyNavigation.left: openButton
KeyNavigation.right: fileTableView.contentItem
Keys.onReturnPressed: { canceled(); root.enabled = false }
onClicked: { canceled(); root.visible = false; }
}
Button {
id: openButton
text: root.selectDirectory ? "Choose" : "Open"
@ -209,12 +212,28 @@ ModalWindow {
KeyNavigation.left: selectionType
KeyNavigation.right: cancelButton
}
Button {
id: cancelButton
text: "Cancel"
KeyNavigation.up: selectionType
KeyNavigation.left: openButton
KeyNavigation.right: fileTableView.contentItem
Keys.onReturnPressed: { canceled(); root.enabled = false }
onClicked: { canceled(); root.visible = false; }
}
}
}
Keys.onPressed: {
if (event.key === Qt.Key_Backspace && d.navigateUp()) {
event.accepted = true
switch (event.key) {
case Qt.Key_Backspace:
event.accepted = d.navigateUp();
break;
case Qt.Key_Home:
event.accepted = d.navigateHome();
break;
}
}
}

View file

@ -71,7 +71,7 @@ ModalWindow {
VrControls.ComboBox {
id: comboBox
focus: items ? true : false
focus: true
visible: items ? true : false
anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter }
model: items ? items : []

View file

@ -10,7 +10,7 @@ TableView {
Text {
x: 3
anchors.verticalCenter: parent.verticalCenter
color: root.activeFocus && styleData.row === root.currentRow ? "yellow" : styleData.textColor
color: styleData.textColor
elide: styleData.elideMode
text: getText();
font.italic: root.model.get(styleData.row, "fileIsDir") ? true : false

View file

@ -7,7 +7,7 @@ PreferencesDialog {
id: root
objectName: "AvatarPreferencesDialog"
title: "Avatar Preferences"
showCategories: [ "Avatar Basics", "Avatar Tuning" ]
showCategories: [ "Avatar Basics", "Avatar Tuning", "Avatar Camera" ]
property var settings: Settings {
category: root.objectName
property alias x: root.x

View file

@ -54,10 +54,10 @@ Frame {
Text {
id: titleText
anchors { left: parent.left; leftMargin: iconSize; right: controlsRow.left; rightMargin: iconSize; top: parent.top; topMargin: iconSize / 2; }
text: window.title
text: window ? window.title : ""
elide: Text.ElideRight
font.bold: true
color: window.focus ? "white" : "gray"
color: (window && window.focus) ? "white" : "gray"
style: Text.Outline;
styleColor: "black"
}

View file

@ -25,7 +25,7 @@ Item {
id: debugZ
visible: DebugQML
text: window ? "Z: " + window.z : ""
y: window.height + 4
y: window ? window.height + 4 : 0
}
function deltaSize(dx, dy) {

View file

@ -6,23 +6,31 @@ import "../controls"
Frame {
id: frame
Rectangle {
Item {
anchors.fill: parent
anchors.margins: -4096
visible: window.visible
color: "#7f7f7f7f";
radius: 3;
Rectangle {
id: background
anchors.fill: parent
anchors.margins: -4096
visible: window.visible
color: "#7f7f7f7f";
radius: 3;
}
Text {
y: -implicitHeight - iconSize / 2
text: window.title
elide: Text.ElideRight
font.bold: true
color: window.focus ? "white" : "gray"
style: Text.Outline;
styleColor: "black"
}
}
Text {
y: -implicitHeight - iconSize / 2
text: window.title
elide: Text.ElideRight
font.bold: true
color: window.focus ? "white" : "gray"
style: Text.Outline;
styleColor: "black"
}
}

View file

@ -250,6 +250,11 @@ Menu::Menu() {
// View > Mini Mirror
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::MiniMirror, 0, false);
// View > Center Player In View
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::CenterPlayerInView,
0, true, qApp, SLOT(rotationModeChanged()),
UNSPECIFIED_POSITION, "Advanced");
// Navigate menu ----------------------------------
MenuWrapper* navigateMenu = addMenu("Navigate");
@ -636,11 +641,6 @@ Menu::Menu() {
addCheckableActionToQMenuAndActionHash(avatarMenu, MenuOption::NamesAboveHeads, 0, true,
NULL, NULL, UNSPECIFIED_POSITION, "Advanced");
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::CenterPlayerInView,
0, false, qApp, SLOT(rotationModeChanged()),
UNSPECIFIED_POSITION, "Advanced");
#endif
}

View file

@ -56,14 +56,15 @@
using namespace std;
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
const float YAW_SPEED = 150.0f; // degrees/sec
const float PITCH_SPEED = 100.0f; // degrees/sec
const float DEFAULT_REAL_WORLD_FIELD_OF_VIEW_DEGREES = 30.0f;
const float MAX_WALKING_SPEED = 2.5f; // human walking speed
const float MAX_BOOST_SPEED = 0.5f * MAX_WALKING_SPEED; // keyboard motor gets additive boost below this speed
const float MIN_AVATAR_SPEED = 0.05f; // speed is set to zero below this
const float YAW_SPEED_DEFAULT = 120.0f; // degrees/sec
const float PITCH_SPEED_DEFAULT = 90.0f; // degrees/sec
// TODO: normalize avatar speed for standard avatar size, then scale all motion logic
// to properly follow avatar size.
float MAX_AVATAR_SPEED = 30.0f;
@ -86,6 +87,8 @@ MyAvatar::MyAvatar(RigPointer rig) :
_isPushing(false),
_isBraking(false),
_boomLength(ZOOM_DEFAULT),
_yawSpeed(YAW_SPEED_DEFAULT),
_pitchSpeed(PITCH_SPEED_DEFAULT),
_thrust(0.0f),
_keyboardMotorVelocity(0.0f),
_keyboardMotorTimescale(DEFAULT_KEYBOARD_MOTOR_TIMESCALE),
@ -1324,7 +1327,7 @@ bool MyAvatar::shouldRenderHead(const RenderArgs* renderArgs) const {
void MyAvatar::updateOrientation(float deltaTime) {
// Smoothly rotate body with arrow keys
float targetSpeed = _driveKeys[YAW] * YAW_SPEED;
float targetSpeed = _driveKeys[YAW] * _yawSpeed;
if (targetSpeed != 0.0f) {
const float ROTATION_RAMP_TIMESCALE = 0.1f;
float blend = deltaTime / ROTATION_RAMP_TIMESCALE;
@ -1360,7 +1363,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
// update body orientation by movement inputs
setOrientation(getOrientation() * glm::quat(glm::radians(glm::vec3(0.0f, totalBodyYaw, 0.0f))));
getHead()->setBasePitch(getHead()->getBasePitch() + _driveKeys[PITCH] * PITCH_SPEED * deltaTime);
getHead()->setBasePitch(getHead()->getBasePitch() + _driveKeys[PITCH] * _pitchSpeed * deltaTime);
if (qApp->getAvatarUpdater()->isHMDMode()) {
glm::quat orientation = glm::quat_cast(getSensorToWorldMatrix()) * getHMDSensorOrientation();

View file

@ -110,10 +110,11 @@ public:
// This is so the correct camera can be used for rendering.
void updateSensorToWorldMatrix();
void setLeanScale(float scale) { _leanScale = scale; }
void setRealWorldFieldOfView(float realWorldFov) { _realWorldFieldOfView.set(realWorldFov); }
void setLeanScale(float scale) { _leanScale = scale; }
float getLeanScale() const { return _leanScale; }
Q_INVOKABLE glm::vec3 getDefaultEyePosition() const;
float getRealWorldFieldOfView() { return _realWorldFieldOfView.get(); }
@ -219,6 +220,12 @@ public:
float getBoomLength() const { return _boomLength; }
void setBoomLength(float boomLength) { _boomLength = boomLength; }
float getPitchSpeed() const { return _pitchSpeed; }
void setPitchSpeed(float speed) { _pitchSpeed = speed; }
float getYawSpeed() const { return _yawSpeed; }
void setYawSpeed(float speed) { _yawSpeed = speed; }
static const float ZOOM_MIN;
static const float ZOOM_MAX;
static const float ZOOM_DEFAULT;
@ -323,6 +330,8 @@ private:
bool _isBraking;
float _boomLength;
float _yawSpeed; // degrees/sec
float _pitchSpeed; // degrees/sec
glm::vec3 _thrust; // impulse accumulator for outside sources

View file

@ -191,6 +191,24 @@ void setupPreferences() {
preferences->addPreference(preference);
}
static const QString AVATAR_CAMERA { "Avatar Camera" };
{
auto getter = [=]()->float { return myAvatar->getPitchSpeed(); };
auto setter = [=](float value) { myAvatar->setPitchSpeed(value); };
auto preference = new SpinnerPreference(AVATAR_CAMERA, "Camera Pitch Speed (degrees/second)", getter, setter);
preference->setMin(1.0f);
preference->setMax(360.0f);
preferences->addPreference(preference);
}
{
auto getter = [=]()->float { return myAvatar->getYawSpeed(); };
auto setter = [=](float value) { myAvatar->setYawSpeed(value); };
auto preference = new SpinnerPreference(AVATAR_CAMERA, "Camera Yaw Speed (degrees/second)", getter, setter);
preference->setMin(1.0f);
preference->setMax(360.0f);
preferences->addPreference(preference);
}
static const QString AUDIO("Audio");
{
auto getter = []()->bool {return DependencyManager::get<AudioClient>()->getReceivedAudioStream().getDynamicJitterBuffers(); };

View file

@ -351,8 +351,12 @@ float OpenGLDisplayPlugin::presentRate() {
}
void OpenGLDisplayPlugin::drawUnitQuad() {
_program->Bind();
_plane->Draw();
try {
_program->Bind();
_plane->Draw();
} catch (const oglplus::Error& error) {
qWarning() << "The present thread encountered an error writing the scene texture to the output: " << error.what();
}
}
void OpenGLDisplayPlugin::enableVsync(bool enable) {

View file

@ -278,7 +278,7 @@
modelURL: modelURL,
position: position,
restitution: 0,
damping:0.5,
damping: 0.5,
collisionSoundURL: "http://hifi-content.s3.amazonaws.com/james/pistol/sounds/drop.wav",
dimensions: {
x: 0.05,
@ -300,18 +300,29 @@
dynamic: true,
userData: JSON.stringify({
grabbableKey: {
spatialKey: {
rightRelativePosition: {
x: 0.03,
y: 0.0,
z: -0.065
},
leftRelativePosition: {
x: -0.03,
y: 0.00,
z: -0.065
},
relativeRotation: Quat.fromPitchYawRollDegrees(90, 90, 0)
wearable: {
joints: {
RightHand: [{
x: 0.07079616189002991,
y: 0.20177987217903137,
z: 0.06374628841876984
}, {
x: -0.5863648653030396,
y: -0.46007341146469116,
z: 0.46949487924575806,
w: -0.4733745753765106
}],
LeftHand: [{
x: 0.1802254319190979,
y: 0.13442856073379517,
z: 0.08504903316497803
}, {
x: 0.2198076844215393,
y: -0.7377811074256897,
z: 0.2780133783817291,
w: 0.574519157409668
}]
}
},
invertSolidWhileHeld: true
},
@ -334,7 +345,7 @@
var BOW_ROTATION = Quat.fromPitchYawRollDegrees(-103.05, -178.60, -87.27);
var MODEL_URL = "https://hifi-public.s3.amazonaws.com/models/bow/new/bow-deadly.fbx";
var COLLISION_HULL_URL = "https://hifi-public.s3.amazonaws.com/models/bow/new/bow_collision_hull.obj";
var BOW_DIMENSIONS = {
x: 0.04,
y: 1.3,
@ -378,19 +389,30 @@
resetMe: true
},
grabbableKey: {
invertSolidWhileHeld: true,
spatialKey: {
rightRelativePosition: {
x: 0.03,
y: 0.08,
z: 0.11
},
leftRelativePosition: {
x: -0.03,
y: 0.08,
z: 0.11
},
relativeRotation: Quat.fromPitchYawRollDegrees(180, 90, 90)
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.03960523009300232,
y: 0.01979270577430725,
z: 0.03294898942112923
}, {
x: -0.7257906794548035,
y: -0.4611682891845703,
z: 0.4436084032058716,
w: -0.25251442193984985
}],
LeftHand: [{
x: 0.0055799782276153564,
y: 0.04354757443070412,
z: 0.05119767785072327
}, {
x: -0.14914104342460632,
y: 0.6448180079460144,
z: -0.2888556718826294,
w: -0.6917579770088196
}]
}
}
})
@ -455,6 +477,7 @@
makeBow();
}
function createFire() {
@ -860,6 +883,30 @@
},
grabbableKey: {
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.0717092975974083,
y: 0.1166968047618866,
z: 0.07085515558719635
}, {
x: -0.7195770740509033,
y: 0.175227552652359,
z: 0.5953742265701294,
w: 0.31150275468826294
}],
LeftHand: [{
x: 0.0806504637002945,
y: 0.09710478782653809,
z: 0.08610185235738754
}, {
x: 0.5630447864532471,
y: -0.2545935809612274,
z: 0.7855332493782043,
w: 0.033170729875564575
}]
}
}
})
});
@ -1231,22 +1278,32 @@
resetMe: true
},
grabbableKey: {
spatialKey: {
rightRelativePosition: {
x: -0.05,
y: .06,
z: 0.05
},
leftRelativePosition: {
x: 0.05,
y: 0.06,
z: 0.05
},
relativeRotation: Quat.fromPitchYawRollDegrees(0, -90, -90)
},
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.1177130937576294,
y: 0.12922893464565277,
z: 0.08307232707738876
}, {
x: 0.4934672713279724,
y: 0.3605862259864807,
z: 0.6394805908203125,
w: -0.4664038419723511
}],
LeftHand: [{
x: 0.09151676297187805,
y: 0.13639454543590546,
z: 0.09354984760284424
}, {
x: -0.19628101587295532,
y: 0.6418180465698242,
z: 0.2830369472503662,
w: 0.6851521730422974
}]
}
}
})
});
}
@ -1280,14 +1337,30 @@
resetMe: true
},
grabbableKey: {
invertSolidWhileHeld: true,
spatialKey: {
relativePosition: {
x: 0,
y: 0.1,
z: 0
},
relativeRotation: Quat.fromPitchYawRollDegrees(0, 0, 90)
invertSolidWhileHeld: true
},
"wearable": {
"joints": {
"RightHand": [{
"x": 0.11421211808919907,
"y": 0.06508062779903412,
"z": 0.06317152827978134
}, {
"x": -0.7886992692947388,
"y": -0.6108893156051636,
"z": -0.05003821849822998,
"w": 0.047579944133758545
}],
"LeftHand": [{
"x": 0.03530977666378021,
"y": 0.11278322339057922,
"z": 0.049768272787332535
}, {
"x": -0.050609711557626724,
"y": -0.11595471203327179,
"z": 0.3554558753967285,
"w": 0.9260908961296082
}]
}
}
})
@ -1595,4 +1668,4 @@
};
// entity scripts always need to return a newly constructed object of our type
return new ResetSwitch();
});
});

View file

@ -284,18 +284,29 @@ MasterReset = function() {
collisionSoundURL: "http://hifi-content.s3.amazonaws.com/james/pistol/sounds/drop.wav",
userData: JSON.stringify({
grabbableKey: {
spatialKey: {
rightRelativePosition: {
x: 0.03,
y: 0.0,
z: -0.065
},
leftRelativePosition: {
x: -0.03,
y: 0.00,
z: -0.065
},
relativeRotation: Quat.fromPitchYawRollDegrees(90, 90, 0)
wearable: {
joints: {
RightHand: [{
x: 0.07079616189002991,
y: 0.20177987217903137,
z: 0.06374628841876984
}, {
x: -0.5863648653030396,
y: -0.46007341146469116,
z: 0.46949487924575806,
w: -0.4733745753765106
}],
LeftHand: [{
x: 0.1802254319190979,
y: 0.13442856073379517,
z: 0.08504903316497803
}, {
x: 0.2198076844215393,
y: -0.7377811074256897,
z: 0.2780133783817291,
w: 0.574519157409668
}]
}
},
invertSolidWhileHeld: true
},
@ -318,7 +329,7 @@ MasterReset = function() {
var BOW_ROTATION = Quat.fromPitchYawRollDegrees(-103.05, -178.60, -87.27);
var MODEL_URL = "https://hifi-public.s3.amazonaws.com/models/bow/new/bow-deadly.fbx";
var COLLISION_HULL_URL = "https://hifi-public.s3.amazonaws.com/models/bow/new/bow_collision_hull.obj";
var BOW_DIMENSIONS = {
x: 0.04,
y: 1.3,
@ -362,19 +373,30 @@ MasterReset = function() {
resetMe: true
},
grabbableKey: {
invertSolidWhileHeld: true,
spatialKey: {
rightRelativePosition: {
x: 0.03,
y: 0.08,
z: 0.11
},
leftRelativePosition: {
x: -0.03,
y: 0.08,
z: 0.11
},
relativeRotation: Quat.fromPitchYawRollDegrees(180, 90, 90)
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.03960523009300232,
y: 0.01979270577430725,
z: 0.03294898942112923
}, {
x: -0.7257906794548035,
y: -0.4611682891845703,
z: 0.4436084032058716,
w: -0.25251442193984985
}],
LeftHand: [{
x: 0.0055799782276153564,
y: 0.04354757443070412,
z: 0.05119767785072327
}, {
x: -0.14914104342460632,
y: 0.6448180079460144,
z: -0.2888556718826294,
w: -0.6917579770088196
}]
}
}
})
@ -848,6 +870,30 @@ MasterReset = function() {
},
grabbableKey: {
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.0717092975974083,
y: 0.1166968047618866,
z: 0.07085515558719635
}, {
x: -0.7195770740509033,
y: 0.175227552652359,
z: 0.5953742265701294,
w: 0.31150275468826294
}],
LeftHand: [{
x: 0.0806504637002945,
y: 0.09710478782653809,
z: 0.08610185235738754
}, {
x: 0.5630447864532471,
y: -0.2545935809612274,
z: 0.7855332493782043,
w: 0.033170729875564575
}]
}
}
})
});
@ -1140,7 +1186,7 @@ MasterReset = function() {
var dice2 = Entities.addEntity(diceProps);
}
function createGates() {
var MODEL_URL = 'http://hifi-public.s3.amazonaws.com/ryan/fence.fbx';
@ -1219,22 +1265,32 @@ MasterReset = function() {
resetMe: true
},
grabbableKey: {
spatialKey: {
rightRelativePosition: {
x: -0.05,
y: .06,
z: 0.05
},
leftRelativePosition: {
x: 0.05,
y: 0.06,
z: 0.05
},
relativeRotation: Quat.fromPitchYawRollDegrees(0, -90, -90)
},
invertSolidWhileHeld: true
},
wearable: {
joints: {
RightHand: [{
x: 0.1177130937576294,
y: 0.12922893464565277,
z: 0.08307232707738876
}, {
x: 0.4934672713279724,
y: 0.3605862259864807,
z: 0.6394805908203125,
w: -0.4664038419723511
}],
LeftHand: [{
x: 0.09151676297187805,
y: 0.13639454543590546,
z: 0.09354984760284424
}, {
x: -0.19628101587295532,
y: 0.6418180465698242,
z: 0.2830369472503662,
w: 0.6851521730422974
}]
}
}
})
});
}
@ -1268,14 +1324,30 @@ MasterReset = function() {
resetMe: true
},
grabbableKey: {
invertSolidWhileHeld: true,
spatialKey: {
relativePosition: {
x: 0,
y: 0.1,
z: 0
},
relativeRotation: Quat.fromPitchYawRollDegrees(0, 0, 90)
invertSolidWhileHeld: true
},
"wearable": {
"joints": {
"RightHand": [{
"x": 0.11421211808919907,
"y": 0.06508062779903412,
"z": 0.06317152827978134
}, {
"x": -0.7886992692947388,
"y": -0.6108893156051636,
"z": -0.05003821849822998,
"w": 0.047579944133758545
}],
"LeftHand": [{
"x": 0.03530977666378021,
"y": 0.11278322339057922,
"z": 0.049768272787332535
}, {
"x": -0.050609711557626724,
"y": -0.11595471203327179,
"z": 0.3554558753967285,
"w": 0.9260908961296082
}]
}
}
})
@ -1578,4 +1650,4 @@ MasterReset = function() {
Script.scriptEnding.connect(cleanup);
}
};
};