Merge pull request #12549 from samcake/master-workload

Master workload merge
This commit is contained in:
Sam Gateau 2018-03-02 17:50:53 -08:00 committed by GitHub
commit bc44b142d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 188 additions and 72 deletions

View file

@ -34,7 +34,7 @@ Item {
height: parent.height height: parent.height
} }
FontLoader { id: ralewayRegular; source: pathToFonts + "fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
Timer { Timer {
id: updateList id: updateList

View file

@ -109,7 +109,7 @@ CheckBox {
contentItem: Text { contentItem: Text {
id: root id: root
FontLoader { id: ralewaySemiBold; source: pathToFonts + "fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
font.pixelSize: hifi.fontSizes.inputLabel font.pixelSize: hifi.fontSizes.inputLabel
font.family: ralewaySemiBold.name font.family: ralewaySemiBold.name
text: checkBox.text text: checkBox.text

View file

@ -125,7 +125,7 @@ Rectangle {
TextInput { TextInput {
id: mirrorText id: mirrorText
visible: showMirrorText visible: showMirrorText
FontLoader { id: font; source: "../../fonts/FiraSans-Regular.ttf"; } FontLoader { id: font; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
font.family: font.name font.family: font.name
font.pixelSize: 20 font.pixelSize: 20
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@ -165,7 +165,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: 0 anchors.bottomMargin: 0
FontLoader { id: hiFiGlyphs; source: pathToFonts + "fonts/hifi-glyphs.ttf"; } FontLoader { id: hiFiGlyphs; source: "qrc:/fonts/hifi-glyphs.ttf"; }
Column { Column {
id: columnAlpha id: columnAlpha

View file

@ -25,7 +25,7 @@ SpinBox {
property color colorLabelInside: hifi.colors.white property color colorLabelInside: hifi.colors.white
property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0) property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0)
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
font.family: firaSansSemiBold.name font.family: firaSansSemiBold.name
font.pixelSize: hifi.fontSizes.textFieldInput font.pixelSize: hifi.fontSizes.textFieldInput
height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control. height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control.

View file

@ -17,7 +17,7 @@ TextEdit {
property real size: 32 property real size: 32
FontLoader { id: ralewaySemiBold; source: "../../fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
font.family: ralewaySemiBold.name font.family: ralewaySemiBold.name
font.pointSize: size font.pointSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -34,8 +34,8 @@ TextField {
placeholderText: textField.placeholderText placeholderText: textField.placeholderText
FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
FontLoader { id: hifiGlyphs; source: "../../fonts/hifi-glyphs.ttf"; } FontLoader { id: hifiGlyphs; source: "qrc:/fonts/hifi-glyphs.ttf"; }
font.family: firaSansRegular.name font.family: firaSansRegular.name
font.pixelSize: hifi.fontSizes.textFieldInput font.pixelSize: hifi.fontSizes.textFieldInput
height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered. height: implicitHeight + 3 // Make surrounding box higher so that highlight is vertically centered.

View file

@ -0,0 +1,33 @@
module controlsUit
AttachmentsTable 1.0 AttachmentsTable.qml
BaseWebView 1.0 BaseWebView.qml
Button 1.0 Button.qml
CheckBox 1.0 CheckBox.qml
CheckBoxQQC2 1.0 CheckBoxQQC2.qml
ComboBox 1.0 ComboBox.qml
ContentSection 1.0 ContentSection.qml
GlyphButton 1.0 GlyphButton.qml
HorizontalRule 1.0 HorizontalRule.qml
HorizontalSpacer 1.0 HorizontalSpacer.qml
ImageMessageBox 1.0 ImageMessageBox.qml
Key 1.0 Key.qml
Keyboard 1.0 Keyboard.qml
Label 1.0 Label.qml
QueuedButton 1.0 QueuedButton.qml
RadioButton 1.0 RadioButton.qml
Separator 1.0 Separator.qml
Slider 1.0 Slider.qml
SpinBox 1.0 SpinBox.qml
Switch 1.0 Switch.qml
Table 1.0 Table.qml
TabletContentSection 1.0 TabletContentSection.qml
TabletHeader 1.0 TabletHeader.qml
TextAction 1.0 TextAction.qml
TextEdit 1.0 TextEdit.qml
TextField 1.0 TextField.qml
ToolTip 1.0 ToolTip.qml
Tree 1.0 Tree.qml
VerticalSpacer 1.0 VerticalSpacer.qml
WebGlyphButton 1.0 WebGlyphButton.qml
WebSpinner 1.0 WebSpinner.qml
WebView 1.0 WebView.qml

View file

@ -4,7 +4,7 @@ import QtQuick.Controls.Styles 1.3
Text { Text {
id: root id: root
FontLoader { id: iconFont; source: "../../fonts/fontawesome-webfont.ttf"; } FontLoader { id: iconFont; source: "qrc:/fonts/fontawesome-webfont.ttf"; }
property int size: 32 property int size: 32
width: size width: size
height: size height: size

View file

@ -532,8 +532,8 @@ ModalWindow {
itemDelegate: Item { itemDelegate: Item {
clip: true clip: true
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
FiraSansSemiBold { FiraSansSemiBold {
text: getText(); text: getText();

View file

@ -496,8 +496,8 @@ TabletModalWindow {
itemDelegate: Item { itemDelegate: Item {
clip: true clip: true
//FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } //FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
//FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } //FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
FiraSansSemiBold { FiraSansSemiBold {
text: getText(); text: getText();

View file

@ -345,8 +345,8 @@ Item {
itemDelegate: Item { itemDelegate: Item {
clip: true clip: true
FontLoader { id: firaSansSemiBold; source: "../../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
FontLoader { id: firaSansRegular; source: "../../../fonts/FiraSans-Regular.ttf"; } FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
FiraSansSemiBold { FiraSansSemiBold {
text: styleData.value text: styleData.value

View file

@ -660,7 +660,7 @@ Windows.ScrollingWindow {
text: styleData.value text: styleData.value
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
font.family: firaSansSemiBold.name font.family: firaSansSemiBold.name
font.pixelSize: hifi.fontSizes.textFieldInput font.pixelSize: hifi.fontSizes.textFieldInput
height: hifi.dimensions.tableRowHeight height: hifi.dimensions.tableRowHeight

View file

@ -25,8 +25,8 @@ Item {
property int dialogHeight; property int dialogHeight;
property int comboOptionTextSize: 16; property int comboOptionTextSize: 16;
property int comboBodyTextSize: 16; property int comboBodyTextSize: 16;
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
FontLoader { id: ralewaySemiBold; source: "../../fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
visible: false; visible: false;
id: combo; id: combo;
anchors.fill: parent; anchors.fill: parent;

View file

@ -24,8 +24,8 @@ Item {
property real headerTextMargin: -5 property real headerTextMargin: -5
property real headerGlyphMargin: -15 property real headerGlyphMargin: -15
property bool isDesktop: false property bool isDesktop: false
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
FontLoader { id: ralewaySemiBold; source: "../../fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
visible: false visible: false
id: letterbox id: letterbox
anchors.fill: parent anchors.fill: parent

View file

@ -23,8 +23,8 @@ Item {
property real popupTextPixelSize: 16 property real popupTextPixelSize: 16
property real headerTextMargin: -5 property real headerTextMargin: -5
property real headerGlyphMargin: -15 property real headerGlyphMargin: -15
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
FontLoader { id: ralewaySemiBold; source: "../../fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
visible: false visible: false
id: letterbox id: letterbox
anchors.fill: parent anchors.fill: parent

View file

@ -177,7 +177,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: editGlyph.width + editGlyph.anchors.rightMargin anchors.rightMargin: editGlyph.width + editGlyph.anchors.rightMargin
// Style // Style
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
font.family: firaSansSemiBold.name font.family: firaSansSemiBold.name
font.pixelSize: displayNameTextPixelSize font.pixelSize: displayNameTextPixelSize
selectionColor: hifi.colors.blueAccent selectionColor: hifi.colors.blueAccent

View file

@ -908,7 +908,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter; anchors.horizontalCenter: parent.horizontalCenter;
} }
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
Text { Text {
id: connectionHelpText; id: connectionHelpText;
// Anchors // Anchors

View file

@ -141,7 +141,7 @@ Item {
} }
} }
FontLoader { id: ralewayRegular; source: "../../../../fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
TextMetrics { TextMetrics {
id: textMetrics; id: textMetrics;
font.family: ralewayRegular.name font.family: ralewayRegular.name

View file

@ -925,7 +925,7 @@ Item {
anchors.rightMargin: 20; anchors.rightMargin: 20;
height: 95; height: 95;
FontLoader { id: firaSansSemiBold; source: "../../../../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
TextArea { TextArea {
id: optionalMessage; id: optionalMessage;
property int maximumLength: 72; property int maximumLength: 72;

View file

@ -659,7 +659,7 @@ Rectangle {
text: styleData.value text: styleData.value
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
font.family: firaSansSemiBold.name font.family: firaSansSemiBold.name
font.pixelSize: hifi.fontSizes.textFieldInput font.pixelSize: hifi.fontSizes.textFieldInput
height: hifi.dimensions.tableRowHeight height: hifi.dimensions.tableRowHeight

View file

@ -478,8 +478,8 @@ Rectangle {
itemDelegate: Item { itemDelegate: Item {
clip: true clip: true
//FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; } //FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
//FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } //FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
FiraSansSemiBold { FiraSansSemiBold {
text: getText(); text: getText();

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: anonymousProRegular; source: "../../fonts/AnonymousPro-Regular.ttf"; } FontLoader { id: anonymousProRegular; source: "qrc:/fonts/AnonymousPro-Regular.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: firaSansRegular; source: "../../fonts/FiraSans-Regular.ttf"; } FontLoader { id: firaSansRegular; source: "qrc:/fonts/FiraSans-Regular.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: firaSansSemiBold; source: pathToFonts + "fonts/FiraSans-SemiBold.ttf"; } FontLoader { id: firaSansSemiBold; source: "qrc:/fonts/FiraSans-SemiBold.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -12,7 +12,7 @@ import QtQuick 2.5
Text { Text {
id: root id: root
FontLoader { id: hiFiGlyphs; source: pathToFonts + "fonts/hifi-glyphs.ttf"; } FontLoader { id: hiFiGlyphs; source: "qrc:/fonts/hifi-glyphs.ttf"; }
property int size: 32 property int size: 32
font.pixelSize: size font.pixelSize: size
width: size width: size

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: ralewayBold; source: pathToFonts + "fonts/Raleway-Bold.ttf"; } FontLoader { id: ralewayBold; source: "qrc:/fonts/Raleway-Bold.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: ralewayLight; source: "../../fonts/Raleway-Light.ttf"; } FontLoader { id: ralewayLight; source: "qrc:/fonts/Raleway-Light.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: ralewayRegular; source: pathToFonts + "fonts/Raleway-Regular.ttf"; } FontLoader { id: ralewayRegular; source: "qrc:/fonts/Raleway-Regular.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -14,7 +14,7 @@ import QtQuick.Controls.Styles 1.4
Text { Text {
id: root id: root
FontLoader { id: ralewaySemiBold; source: pathToFonts + "fonts/Raleway-SemiBold.ttf"; } FontLoader { id: ralewaySemiBold; source: "qrc:/fonts/Raleway-SemiBold.ttf"; }
property real size: 32 property real size: 32
font.pixelSize: size font.pixelSize: size
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter

View file

@ -0,0 +1,22 @@
module stylesUit
AnonymousProRegular 1.0 AnonymousProRegular.qml
ButtonLabel 1.0 ButtonLabel.qml
FiraSansRegular 1.0 FiraSansRegular.qml
FiraSansSemiBold 1.0 FiraSansSemiBold.qml
HifiConstants 1.0 HifiConstants.qml
HiFiGlyphs 1.0 HiFiGlyphs.qml
IconButton 1.0 IconButton.qml
InfoItem 1.0 InfoItem.qml
InputLabel 1.0 InputLabel.qml
ListItem 1.0 ListItem.qml
Logs 1.0 Logs.qml
OverlayTitle 1.0 OverlayTitle.qml
RalewayBold 1.0 RalewayBold.qml
RalewayLight 1.0 RalewayLight.qml
RalewayRegular 1.0 RalewayRegular.qml
RalewaySemiBold 1.0 RalewaySemiBold.qml
SectionName 1.0 SectionName.qml
Separator 1.0 Separator.qml
ShortcutText 1.0 ShortcutText.qml
TabName 1.0 TabName.qml
TextFieldInput 1.0 TextFieldInput.qml

View file

@ -236,8 +236,6 @@ void Web3DOverlay::setupQmlSurface() {
_webSurface->getSurfaceContext()->setContextProperty("Web3DOverlay", this); _webSurface->getSurfaceContext()->setContextProperty("Web3DOverlay", this);
_webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data()); _webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data());
_webSurface->getSurfaceContext()->setContextProperty("pathToFonts", "../../");
// Override min fps for tablet UI, for silky smooth scrolling // Override min fps for tablet UI, for silky smooth scrolling
setMaxFPS(90); setMaxFPS(90);
} }

View file

@ -23,6 +23,7 @@ const QString Basic2DWindowOpenGLDisplayPlugin::NAME("Desktop");
static const QString FULLSCREEN = "Fullscreen"; static const QString FULLSCREEN = "Fullscreen";
void Basic2DWindowOpenGLDisplayPlugin::customizeContext() { void Basic2DWindowOpenGLDisplayPlugin::customizeContext() {
#if defined(Q_OS_ANDROID)
auto iconPath = PathUtils::resourcesPath() + "images/analog_stick.png"; auto iconPath = PathUtils::resourcesPath() + "images/analog_stick.png";
auto image = QImage(iconPath); auto image = QImage(iconPath);
if (image.format() != QImage::Format_ARGB32) { if (image.format() != QImage::Format_ARGB32) {
@ -61,8 +62,7 @@ void Basic2DWindowOpenGLDisplayPlugin::customizeContext() {
_virtualPadStickBaseTexture->assignStoredMip(0, image.byteCount(), image.constBits()); _virtualPadStickBaseTexture->assignStoredMip(0, image.byteCount(), image.constBits());
_virtualPadStickBaseTexture->setAutoGenerateMips(true); _virtualPadStickBaseTexture->setAutoGenerateMips(true);
} }
#endif
Parent::customizeContext(); Parent::customizeContext();
} }
@ -88,6 +88,7 @@ bool Basic2DWindowOpenGLDisplayPlugin::internalActivate() {
} }
void Basic2DWindowOpenGLDisplayPlugin::compositeExtra() { void Basic2DWindowOpenGLDisplayPlugin::compositeExtra() {
#if defined(Q_OS_ANDROID)
auto& virtualPadManager = VirtualPad::Manager::instance(); auto& virtualPadManager = VirtualPad::Manager::instance();
if(virtualPadManager.getLeftVirtualPad()->isBeingTouched()) { if(virtualPadManager.getLeftVirtualPad()->isBeingTouched()) {
// render stick base // render stick base
@ -115,6 +116,7 @@ void Basic2DWindowOpenGLDisplayPlugin::compositeExtra() {
batch.draw(gpu::TRIANGLE_STRIP, 4); batch.draw(gpu::TRIANGLE_STRIP, 4);
}); });
} }
#endif
Parent::compositeExtra(); Parent::compositeExtra();
} }

View file

@ -42,6 +42,8 @@ private:
uint32_t _framerateTarget { 0 }; uint32_t _framerateTarget { 0 };
int _fullscreenTarget{ -1 }; int _fullscreenTarget{ -1 };
#if defined(Q_OS_ANDROID)
gpu::TexturePointer _virtualPadStickTexture; gpu::TexturePointer _virtualPadStickTexture;
gpu::TexturePointer _virtualPadStickBaseTexture; gpu::TexturePointer _virtualPadStickBaseTexture;
#endif
}; };

View file

@ -21,15 +21,26 @@
class NLPacket : public udt::Packet { class NLPacket : public udt::Packet {
Q_OBJECT Q_OBJECT
public: public:
//
// | BYTE | BYTE | BYTE | BYTE |
//
// 0 1 2 3 // 0 1 2 3
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | Packet Type | Packet Version | // | Packet Type | Version | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
// | Node UUID | Hash (only if verified) | Optional (only if sourced) // | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // | Node UUID - 16 bytes |
// // | (ONLY FOR SOURCED PACKETS) |
// | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
// | |
// | MD5 Verification - 16 bytes |
// | (ONLY FOR VERIFIED PACKETS) |
// | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// | | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
// NLPacket Header Format // NLPacket Header Format
// this is used by the Octree classes - must be known at compile time // this is used by the Octree classes - must be known at compile time

View file

@ -87,6 +87,7 @@
#include "model_shadow_vert.h" #include "model_shadow_vert.h"
#include "skin_model_shadow_vert.h" #include "skin_model_shadow_vert.h"
#include "skin_model_shadow_dq_vert.h" #include "skin_model_shadow_dq_vert.h"
#include "skin_model_shadow_fade_dq_vert.h"
#include "model_shadow_frag.h" #include "model_shadow_frag.h"
#include "skin_model_shadow_frag.h" #include "skin_model_shadow_frag.h"
@ -204,6 +205,7 @@ void initDeferredPipelines(render::ShapePlumber& plumber, const render::ShapePip
auto skinModelDualQuatVertex = skin_model_dq_vert::getShader(); auto skinModelDualQuatVertex = skin_model_dq_vert::getShader();
auto skinModelNormalMapDualQuatVertex = skin_model_normal_map_dq_vert::getShader(); auto skinModelNormalMapDualQuatVertex = skin_model_normal_map_dq_vert::getShader();
auto skinModelShadowDualQuatVertex = skin_model_shadow_dq_vert::getShader(); auto skinModelShadowDualQuatVertex = skin_model_shadow_dq_vert::getShader();
auto skinModelShadowFadeDualQuatVertex = skin_model_shadow_fade_dq_vert::getShader();
auto skinModelFadeDualQuatVertex = skin_model_fade_dq_vert::getShader(); auto skinModelFadeDualQuatVertex = skin_model_fade_dq_vert::getShader();
auto skinModelNormalMapFadeDualQuatVertex = skin_model_normal_map_fade_dq_vert::getShader(); auto skinModelNormalMapFadeDualQuatVertex = skin_model_normal_map_fade_dq_vert::getShader();
auto skinModelTranslucentDualQuatVertex = skinModelFadeDualQuatVertex; // We use the same because it ouputs world position per vertex auto skinModelTranslucentDualQuatVertex = skinModelFadeDualQuatVertex; // We use the same because it ouputs world position per vertex
@ -390,7 +392,7 @@ void initDeferredPipelines(render::ShapePlumber& plumber, const render::ShapePip
// Same thing but with Fade on // Same thing but with Fade on
addPipeline( addPipeline(
Key::Builder().withMaterial().withSkinned().withDualQuatSkinned().withTranslucent().withFade(), Key::Builder().withMaterial().withSkinned().withDualQuatSkinned().withTranslucent().withFade(),
skinModelFadeVertex, modelTranslucentFadePixel, batchSetter, itemSetter); skinModelFadeDualQuatVertex, modelTranslucentFadePixel, batchSetter, itemSetter);
addPipeline( addPipeline(
Key::Builder().withMaterial().withSkinned().withDualQuatSkinned().withTranslucent().withTangents().withFade(), Key::Builder().withMaterial().withSkinned().withDualQuatSkinned().withTranslucent().withTangents().withFade(),
skinModelNormalMapFadeDualQuatVertex, modelTranslucentFadePixel, batchSetter, itemSetter); skinModelNormalMapFadeDualQuatVertex, modelTranslucentFadePixel, batchSetter, itemSetter);
@ -409,6 +411,16 @@ void initDeferredPipelines(render::ShapePlumber& plumber, const render::ShapePip
addPipeline( addPipeline(
Key::Builder().withSkinned().withDepthOnly().withFade(), Key::Builder().withSkinned().withDepthOnly().withFade(),
skinModelShadowFadeVertex, modelShadowFadePixel, batchSetter, itemSetter); skinModelShadowFadeVertex, modelShadowFadePixel, batchSetter, itemSetter);
// Now repeat for dual quaternion
// Depth-only
addPipeline(
Key::Builder().withSkinned().withDualQuatSkinned().withDepthOnly(),
skinModelShadowDualQuatVertex, modelShadowPixel, nullptr, nullptr);
// Same thing but with Fade on
addPipeline(
Key::Builder().withSkinned().withDualQuatSkinned().withDepthOnly().withFade(),
skinModelShadowFadeDualQuatVertex, modelShadowFadePixel, batchSetter, itemSetter);
} }
void initForwardPipelines(ShapePlumber& plumber, const render::ShapePipeline::BatchSetter& batchSetter, const render::ShapePipeline::ItemSetter& itemSetter) { void initForwardPipelines(ShapePlumber& plumber, const render::ShapePipeline::BatchSetter& batchSetter, const render::ShapePipeline::ItemSetter& itemSetter) {
@ -418,6 +430,9 @@ void initForwardPipelines(ShapePlumber& plumber, const render::ShapePipeline::Ba
auto skinModelVertex = skin_model_vert::getShader(); auto skinModelVertex = skin_model_vert::getShader();
auto skinModelNormalMapVertex = skin_model_normal_map_vert::getShader(); auto skinModelNormalMapVertex = skin_model_normal_map_vert::getShader();
auto skinModelDualQuatVertex = skin_model_dq_vert::getShader();
auto skinModelNormalMapDualQuatVertex = skin_model_normal_map_dq_vert::getShader();
// Pixel shaders // Pixel shaders
auto modelPixel = forward_model_frag::getShader(); auto modelPixel = forward_model_frag::getShader();
auto modelUnlitPixel = forward_model_unlit_frag::getShader(); auto modelUnlitPixel = forward_model_unlit_frag::getShader();
@ -445,6 +460,8 @@ void initForwardPipelines(ShapePlumber& plumber, const render::ShapePipeline::Ba
// Skinned Opaques // Skinned Opaques
addPipeline(Key::Builder().withMaterial().withSkinned(), skinModelVertex, modelPixel); addPipeline(Key::Builder().withMaterial().withSkinned(), skinModelVertex, modelPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withTangents(), skinModelNormalMapVertex, modelNormalMapPixel); addPipeline(Key::Builder().withMaterial().withSkinned().withTangents(), skinModelNormalMapVertex, modelNormalMapPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withDualQuatSkinned(), skinModelDualQuatVertex, modelPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withTangents().withDualQuatSkinned(), skinModelNormalMapDualQuatVertex, modelNormalMapPixel);
// Translucents // Translucents
addPipeline(Key::Builder().withMaterial().withTranslucent(), modelVertex, modelTranslucentPixel); addPipeline(Key::Builder().withMaterial().withTranslucent(), modelVertex, modelTranslucentPixel);
@ -453,6 +470,8 @@ void initForwardPipelines(ShapePlumber& plumber, const render::ShapePipeline::Ba
// Skinned Translucents // Skinned Translucents
addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent(), skinModelVertex, modelTranslucentPixel); addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent(), skinModelVertex, modelTranslucentPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent().withTangents(), skinModelNormalMapVertex, modelTranslucentPixel); addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent().withTangents(), skinModelNormalMapVertex, modelTranslucentPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent().withDualQuatSkinned(), skinModelDualQuatVertex, modelTranslucentPixel);
addPipeline(Key::Builder().withMaterial().withSkinned().withTranslucent().withTangents().withDualQuatSkinned(), skinModelNormalMapDualQuatVertex, modelTranslucentPixel);
forceLightBatchSetter = false; forceLightBatchSetter = false;
} }
@ -559,7 +578,7 @@ void initZPassPipelines(ShapePlumber& shapePlumber, gpu::StatePointer state) {
auto skinPixel = skin_model_shadow_frag::getShader(); auto skinPixel = skin_model_shadow_frag::getShader();
gpu::ShaderPointer skinProgram = gpu::Shader::createProgram(skinVertex, skinPixel); gpu::ShaderPointer skinProgram = gpu::Shader::createProgram(skinVertex, skinPixel);
shapePlumber.addPipeline( shapePlumber.addPipeline(
ShapeKey::Filter::Builder().withSkinned().withoutFade(), ShapeKey::Filter::Builder().withSkinned().withoutDualQuatSkinned().withoutFade(),
skinProgram, state); skinProgram, state);
auto modelFadeVertex = model_shadow_fade_vert::getShader(); auto modelFadeVertex = model_shadow_fade_vert::getShader();
@ -573,8 +592,21 @@ void initZPassPipelines(ShapePlumber& shapePlumber, gpu::StatePointer state) {
auto skinFadePixel = skin_model_shadow_fade_frag::getShader(); auto skinFadePixel = skin_model_shadow_fade_frag::getShader();
gpu::ShaderPointer skinFadeProgram = gpu::Shader::createProgram(skinFadeVertex, skinFadePixel); gpu::ShaderPointer skinFadeProgram = gpu::Shader::createProgram(skinFadeVertex, skinFadePixel);
shapePlumber.addPipeline( shapePlumber.addPipeline(
ShapeKey::Filter::Builder().withSkinned().withFade(), ShapeKey::Filter::Builder().withSkinned().withoutDualQuatSkinned().withFade(),
skinFadeProgram, state); skinFadeProgram, state);
//Added for dual quaternions
auto skinModelShadowDualQuatVertex = skin_model_shadow_dq_vert::getShader();
gpu::ShaderPointer skinModelShadowDualQuatProgram = gpu::Shader::createProgram(skinModelShadowDualQuatVertex, skinPixel);
shapePlumber.addPipeline(
ShapeKey::Filter::Builder().withSkinned().withDualQuatSkinned().withoutFade(),
skinModelShadowDualQuatProgram, state);
auto skinModelShadowFadeDualQuatVertex = skin_model_shadow_fade_dq_vert::getShader();
gpu::ShaderPointer skinModelShadowFadeDualQuatProgram = gpu::Shader::createProgram(skinModelShadowFadeDualQuatVertex, skinFadePixel);
shapePlumber.addPipeline(
ShapeKey::Filter::Builder().withSkinned().withDualQuatSkinned().withFade(),
skinModelShadowFadeDualQuatProgram, state);
} }
#include "RenderPipelines.h" #include "RenderPipelines.h"

View file

@ -163,8 +163,10 @@ void RenderShadowMap::run(const render::RenderContextPointer& renderContext, con
auto shadowPipeline = _shapePlumber->pickPipeline(args, defaultKeyBuilder); auto shadowPipeline = _shapePlumber->pickPipeline(args, defaultKeyBuilder);
auto shadowSkinnedPipeline = _shapePlumber->pickPipeline(args, defaultKeyBuilder.withSkinned()); auto shadowSkinnedPipeline = _shapePlumber->pickPipeline(args, defaultKeyBuilder.withSkinned());
auto shadowSkinnedDQPipeline = _shapePlumber->pickPipeline(args, defaultKeyBuilder.withSkinned().withDualQuatSkinned());
std::vector<ShapeKey> skinnedShapeKeys{}; std::vector<ShapeKey> skinnedShapeKeys{};
std::vector<ShapeKey> skinnedDQShapeKeys{};
std::vector<ShapeKey> ownPipelineShapeKeys{}; std::vector<ShapeKey> ownPipelineShapeKeys{};
// Iterate through all inShapes and render the unskinned // Iterate through all inShapes and render the unskinned
@ -172,7 +174,11 @@ void RenderShadowMap::run(const render::RenderContextPointer& renderContext, con
batch.setPipeline(shadowPipeline->pipeline); batch.setPipeline(shadowPipeline->pipeline);
for (auto items : inShapes) { for (auto items : inShapes) {
if (items.first.isSkinned()) { if (items.first.isSkinned()) {
skinnedShapeKeys.push_back(items.first); if (items.first.isDualQuatSkinned()) {
skinnedDQShapeKeys.push_back(items.first);
} else {
skinnedShapeKeys.push_back(items.first);
}
} else if (!items.first.hasOwnPipeline()) { } else if (!items.first.hasOwnPipeline()) {
renderItems(renderContext, items.second); renderItems(renderContext, items.second);
} else { } else {
@ -187,6 +193,13 @@ void RenderShadowMap::run(const render::RenderContextPointer& renderContext, con
renderItems(renderContext, inShapes.at(key)); renderItems(renderContext, inShapes.at(key));
} }
// Reiterate to render the DQ skinned
args->_shapePipeline = shadowSkinnedDQPipeline;
batch.setPipeline(shadowSkinnedDQPipeline->pipeline);
for (const auto& key : skinnedDQShapeKeys) {
renderItems(renderContext, inShapes.at(key));
}
// Finally render the items with their own pipeline last to prevent them from breaking the // Finally render the items with their own pipeline last to prevent them from breaking the
// render state. This is probably a temporary code as there is probably something better // render state. This is probably a temporary code as there is probably something better
// to do in the render call of objects that have their own pipeline. // to do in the render call of objects that have their own pipeline.

View file

@ -30,6 +30,7 @@ out vec3 _normal;
out vec3 _tangent; out vec3 _tangent;
out vec3 _color; out vec3 _color;
out float _alpha; out float _alpha;
out vec4 _worldPosition;
void main(void) { void main(void) {
vec4 position = vec4(0.0, 0.0, 0.0, 0.0); vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
@ -53,6 +54,7 @@ void main(void) {
TransformCamera cam = getTransformCamera(); TransformCamera cam = getTransformCamera();
TransformObject obj = getTransformObject(); TransformObject obj = getTransformObject();
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$> <$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
<$transformModelToWorldPos(obj, position, _worldPosition)$>
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$> <$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$> <$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>

View file

@ -130,8 +130,8 @@ public:
Builder& withSkinned() { _flags.set(SKINNED); _mask.set(SKINNED); return (*this); } Builder& withSkinned() { _flags.set(SKINNED); _mask.set(SKINNED); return (*this); }
Builder& withoutSkinned() { _flags.reset(SKINNED); _mask.set(SKINNED); return (*this); } Builder& withoutSkinned() { _flags.reset(SKINNED); _mask.set(SKINNED); return (*this); }
Builder& withDualQuatSkinned() { _flags.set(DUAL_QUAT_SKINNED); _mask.set(SKINNED); return (*this); } Builder& withDualQuatSkinned() { _flags.set(DUAL_QUAT_SKINNED); _mask.set(DUAL_QUAT_SKINNED); return (*this); }
Builder& withoutDualQuatSkinned() { _flags.reset(DUAL_QUAT_SKINNED); _mask.set(SKINNED); return (*this); } Builder& withoutDualQuatSkinned() { _flags.reset(DUAL_QUAT_SKINNED); _mask.set(DUAL_QUAT_SKINNED); return (*this); }
Builder& withDepthOnly() { _flags.set(DEPTH_ONLY); _mask.set(DEPTH_ONLY); return (*this); } Builder& withDepthOnly() { _flags.set(DEPTH_ONLY); _mask.set(DEPTH_ONLY); return (*this); }
Builder& withoutDepthOnly() { _flags.reset(DEPTH_ONLY); _mask.set(DEPTH_ONLY); return (*this); } Builder& withoutDepthOnly() { _flags.reset(DEPTH_ONLY); _mask.set(DEPTH_ONLY); return (*this); }
@ -170,6 +170,7 @@ public:
bool isUnlit() const { return _flags[UNLIT]; } bool isUnlit() const { return _flags[UNLIT]; }
bool isTranslucent() const { return _flags[TRANSLUCENT]; } bool isTranslucent() const { return _flags[TRANSLUCENT]; }
bool isSkinned() const { return _flags[SKINNED]; } bool isSkinned() const { return _flags[SKINNED]; }
bool isDualQuatSkinned() const { return _flags[DUAL_QUAT_SKINNED]; }
bool isDepthOnly() const { return _flags[DEPTH_ONLY]; } bool isDepthOnly() const { return _flags[DEPTH_ONLY]; }
bool isDepthBiased() const { return _flags[DEPTH_BIAS]; } bool isDepthBiased() const { return _flags[DEPTH_BIAS]; }
bool isWireframe() const { return _flags[WIREFRAME]; } bool isWireframe() const { return _flags[WIREFRAME]; }
@ -209,6 +210,7 @@ inline QDebug operator<<(QDebug debug, const ShapeKey& key) {
<< "isUnlit:" << key.isUnlit() << "isUnlit:" << key.isUnlit()
<< "isTranslucent:" << key.isTranslucent() << "isTranslucent:" << key.isTranslucent()
<< "isSkinned:" << key.isSkinned() << "isSkinned:" << key.isSkinned()
<< "isDualQuatSkinned:" << key.isDualQuatSkinned()
<< "isDepthOnly:" << key.isDepthOnly() << "isDepthOnly:" << key.isDepthOnly()
<< "isDepthBiased:" << key.isDepthBiased() << "isDepthBiased:" << key.isDepthBiased()
<< "isWireframe:" << key.isWireframe() << "isWireframe:" << key.isWireframe()

View file

@ -248,7 +248,6 @@ void OffscreenQmlSurface::initializeEngine(QQmlEngine* engine) {
rootContext->setContextProperty("GL", ::getGLContextData()); rootContext->setContextProperty("GL", ::getGLContextData());
rootContext->setContextProperty("urlHandler", new UrlHandler()); rootContext->setContextProperty("urlHandler", new UrlHandler());
rootContext->setContextProperty("resourceDirectoryUrl", QUrl::fromLocalFile(PathUtils::resourcesPath())); rootContext->setContextProperty("resourceDirectoryUrl", QUrl::fromLocalFile(PathUtils::resourcesPath()));
rootContext->setContextProperty("pathToFonts", "../../");
rootContext->setContextProperty("ApplicationInterface", qApp); rootContext->setContextProperty("ApplicationInterface", qApp);
auto javaScriptToInject = getEventBridgeJavascript(); auto javaScriptToInject = getEventBridgeJavascript();
if (!javaScriptToInject.isEmpty()) { if (!javaScriptToInject.isEmpty()) {

View file

@ -71,7 +71,7 @@ module.exports = {
} }
} }
httpRequest.open(options.method, options.uri, true); httpRequest.open(options.method, options.uri, true);
httpRequest.send(options.body); httpRequest.send(options.body || null);
} }
}; };

View file

@ -7,11 +7,11 @@
/* jslint bitwise: true */ /* jslint bitwise: true */
/* global Script, Entities, Overlays, Controller, Vec3, Quat, getControllerWorldLocation, RayPick, /* global Script, Entities, Overlays, Controller, Vec3, Quat, getControllerWorldLocation,
controllerDispatcherPlugins:true, controllerDispatcherPluginsNeedSort:true, controllerDispatcherPlugins:true, controllerDispatcherPluginsNeedSort:true,
LEFT_HAND, RIGHT_HAND, NEAR_GRAB_PICK_RADIUS, DEFAULT_SEARCH_SPHERE_DISTANCE, DISPATCHER_PROPERTIES, LEFT_HAND, RIGHT_HAND, NEAR_GRAB_PICK_RADIUS, DEFAULT_SEARCH_SPHERE_DISTANCE, DISPATCHER_PROPERTIES,
getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Pointers, PickType, COLORS_GRAB_SEARCHING_HALF_SQUEEZE getGrabPointSphereOffset, HMD, MyAvatar, Messages, findHandChildEntities, Picks, PickType, Pointers, COLORS_GRAB_SEARCHING_HALF_SQUEEZE
COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, Picks, TRIGGER_ON_VALUE, PointerManager COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, TRIGGER_ON_VALUE, PointerManager
*/ */
controllerDispatcherPlugins = {}; controllerDispatcherPlugins = {};
@ -378,8 +378,8 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
}; };
this.setBlacklist = function() { this.setBlacklist = function() {
RayPick.setIgnoreItems(_this.leftControllerRayPick, this.blacklist); Pointers.setIgnoreItems(_this.leftPointer, this.blacklist);
RayPick.setIgnoreItems(_this.rightControllerRayPick, this.blacklist); Pointers.setIgnoreItems(_this.rightPointer, this.blacklist);
}; };
var MAPPING_NAME = "com.highfidelity.controllerDispatcher"; var MAPPING_NAME = "com.highfidelity.controllerDispatcher";
@ -451,7 +451,7 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
data = JSON.parse(message); data = JSON.parse(message);
var action = data.action; var action = data.action;
var id = data.id; var id = data.id;
var index = _this.blacklis.indexOf(id); var index = _this.blacklist.indexOf(id);
if (action === 'add' && index === -1) { if (action === 'add' && index === -1) {
_this.blacklist.push(id); _this.blacklist.push(id);

View file

@ -7,7 +7,7 @@
/* jslint bitwise: true */ /* jslint bitwise: true */
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat, /* global Script, Controller, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities,
enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, entityIsGrabbable, enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, entityIsGrabbable,
makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,

View file

@ -6,7 +6,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset, /* global Script, Controller, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset,
makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters, makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData, makeLaserParams DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData, makeLaserParams

View file

@ -10,7 +10,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat, /* global Script, Controller, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities, getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities,
enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,

View file

@ -10,7 +10,7 @@
/* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues, /* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
Messages, makeDispatcherModuleParameters, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, Messages, makeDispatcherModuleParameters, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick, Picks, makeLaserParams getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, Picks, makeLaserParams
*/ */
Script.include("/~/system/libraries/controllerDispatcherUtils.js"); Script.include("/~/system/libraries/controllerDispatcherUtils.js");

View file

@ -12,7 +12,7 @@
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex, /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3, enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3,
RayPick, HMD, Uuid, AvatarList, Picks, Pointers, PickType HMD, Uuid, AvatarList, Picks, Pointers, PickType
*/ */
Script.include("/~/system/libraries/Xform.js"); Script.include("/~/system/libraries/Xform.js");

View file

@ -9,7 +9,7 @@
makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD, makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD,
INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay, Picks, makeLaserParams TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, ContextOverlay, Picks, makeLaserParams
*/ */
Script.include("/~/system/libraries/controllerDispatcherUtils.js"); Script.include("/~/system/libraries/controllerDispatcherUtils.js");

View file

@ -15,7 +15,7 @@
// //
/* global MyAvatar, Entities, Script, Camera, Vec3, Reticle, Overlays, getEntityCustomData, Messages, Quat, Controller, /* global MyAvatar, Entities, Script, Camera, Vec3, Reticle, Overlays, getEntityCustomData, Messages, Quat, Controller,
isInEditMode, HMD entityIsGrabbable, Pointers, PickType RayPick*/ isInEditMode, HMD entityIsGrabbable, Picks, PickType, Pointers*/
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
@ -258,14 +258,14 @@ function Grabber() {
this.liftKey = false; // SHIFT this.liftKey = false; // SHIFT
this.rotateKey = false; // CONTROL this.rotateKey = false; // CONTROL
this.mouseRayOverlays = RayPick.createRayPick({ this.mouseRayOverlays = Picks.createPick(PickType.Ray, {
joint: "Mouse", joint: "Mouse",
filter: Picks.PICK_OVERLAYS, filter: Picks.PICK_OVERLAYS,
enabled: true enabled: true
}); });
var tabletItems = getMainTabletIDs(); var tabletItems = getMainTabletIDs();
if (tabletItems.length > 0) { if (tabletItems.length > 0) {
RayPick.setIncludeItems(this.mouseRayOverlays, tabletItems); Picks.setIncludeItems(this.mouseRayOverlays, tabletItems);
} }
var renderStates = [{name: "grabbed", end: beacon}]; var renderStates = [{name: "grabbed", end: beacon}];
this.mouseRayEntities = Pointers.createPointer(PickType.Ray, { this.mouseRayEntities = Pointers.createPointer(PickType.Ray, {
@ -328,7 +328,7 @@ Grabber.prototype.pressEvent = function(event) {
return; return;
} }
var overlayResult = RayPick.getPrevRayPickResult(this.mouseRayOverlays); var overlayResult = Picks.getPrevPickResult(this.mouseRayOverlays);
if (overlayResult.type != Picks.INTERSECTED_NONE) { if (overlayResult.type != Picks.INTERSECTED_NONE) {
return; return;
} }
@ -599,7 +599,7 @@ Grabber.prototype.keyPressEvent = function(event) {
Grabber.prototype.cleanup = function() { Grabber.prototype.cleanup = function() {
Pointers.removePointer(this.mouseRayEntities); Pointers.removePointer(this.mouseRayEntities);
RayPick.removeRayPick(this.mouseRayOverlays); Picks.removePick(this.mouseRayOverlays);
}; };
var grabber = new Grabber(); var grabber = new Grabber();