Commit graph

59493 commits

Author SHA1 Message Date
Leander Hasty
fa74fbc986 [Case 6491] fixes rotation skip near 0 and 180.
Previously, when rotating, it would be easy to achieve 1 degree granularity, except near the 0 degree and 180 degree "poles", where it would often e.g. jump from 10 to -10, or 174 to -175, or similar.

yawZero/pitchZero/rollZero were all based on the yawHandle/pitchHandle/rollHandle ray intersection, and were not necessarily coplanar with rotateOverlayTarget. As a result, centerToZero didn't lie on the expected plane, while centerToIntersect did.  This had the effect of distorting the rotation range.

We also have a possible issue in here with editOverlay(rotationOverlayTarget,{rotation:...}) not taking effect immediately.  Better to take the existing ray and cast against a known plane, as e.g. translateXZTool and such do.  No risk of stale rotation in that case.

This also cleans up rotationHelper args a bit to avoid some string switches and keep flow a little more readable.

TODO: propagate ray-plane test to helperRotationHandleOnMove rather than relying on ray hit location; normalize onBegin/onMove/etc across all tools to take queryRay and results args to avoid recreating the ray.

Reviewed-by: LaShonda Hopper <lashonda@1stplayable.com>
2017-09-28 15:04:27 -04:00
LaShonda Hopper
fe171af31b [Case 6491] entitySelectionTool mousePressEvent refactor/cleanup (details below).
Fixes situations where attempting to click on a rotate, grab,
or scale handle that was in front of others might unexpectedly
activate the obscured handle.

As of this commit the flow of mousePressEvent such that the
first item whether it be a tool or selection is what reacts
and absorbs the click/touch.  This is counter to the prior
behavior where whichever item or tool last passed the check
would determine what was hit and handled the touch _even_
when it wasn't the first thing to be touched.

* Got rid of some unused/stale vars
* Added some convenience functions
    * setRotationHandlesVisible function
    * setStretchHandlesVisible function
    * setGrabberMoveUpVisible function
* Removed checkIntersectWith helper functions as they're
  no longer used.
* Normalized onBegin signatures for all GrabberTools to
  support the new flow within mousePressEvent.
    * These are tools registered via addGrabberTool/makeStretchTool.
    * The onBegin signature changes from onBegin( event ) to
      onBegin( event, intersectResult ).
        * This allows for a simpler tool triggering where tools which
          utilized the additional information provided will have it,
          those which may need it the future shall have it with little
          issue, and those that don't care may ignore it.

NOTE(s):
* Tested normal movement within opening creation menu:  Passed
* With Creation Menu Open:
    * Tested clicking around the world in empty space: Passed
    * Tested single selection: Passed
    * Tested single selection rotation (pitch, yaw, roll): Passed
    * Tested single selection translation (xz, y): Passed
    * Tested multiple selection: Passed
    * Tested multiple selection rotation (pitch, yaw, roll): Passed
    * Tested multiple selection translation (xz, y): Passed

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 15:04:27 -04:00
LaShonda Hopper
96afbeca23 [Case 6491] Dedupe rotation handle tool code (details below).
Pulled the common code shared between the rotation handle
tools out into helper funcs:
* helperRotationHandleOnBegin
* helperRotationHandleOnMove
* helperRotationHandleOnEnd

These functions either take in or derive the necessary info
needed to handle a specific rotation axis.

NOTE(s):
* Tested yaw, pitch, & roll handles using a box. The behavior
  remained consistent with that prior to this commit.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 15:04:26 -04:00
LaShonda Hopper
926789437c [Case 6491] Propagates rotation reposition fix from YawHandle (details below).
This wraps the selections rotation update handling into common helper
function utilized by all rotation handle tools (yaw,pitch,roll).

This function is the generalized fix previously exclusive to yawHandle.
This functions is now called within onMove for yaw, pitch, & rollHandle
tools.

NOTE(s):
* Tested yaw, pitch, & roll rotation didn't see any aberrant behavior.
** Tested overlapping shapes and selecting the overlapping portions followed
   by a rotation handle.  Only one took hold as a selection.
** Tested multiple selection and objects rotated & repositioned about the
   encapsulating bounding box's center point as expected.
* Tested translation with multiple items selected and it behaved as
  expected.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 15:04:26 -04:00
LaShonda Hopper
18cc632df5 [Case 6491] Minor: Switching off wantDebug flags that were left on.
Changes Committed:
	modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 15:04:26 -04:00
LaShonda Hopper
196b665e22 [Case 6491] Cleanup of mousePressEvent/tool(s) onBegin (details below).
* Removes unregister tools switch which was never reached.
* Rolls all code rotation handle related code within mousePressEvent
  to the respective rotation handler onBegin functions.
    * onBegin call site updated accordingly to provide intersection
      data that code depends upon.
* Moves all translateXZTool code explicitly within mousePressEvent
  to the tool's onBegin function.
    * onBegin signature updated accordingly to provide intersect
      results that the tool relies upon.
    * Found and fixed a bug with translateXZTool
      where its startingElevation and startingDistance properties
      were _only_ set when local _debug_ var was set.
          * This appears to have been responsible for being able
            to move the object farther than was visible.  Re-tested
            with fix and wasn't able to get that behavior any longer.
* Wrap intersect tests within more reader friendly functions.

NOTE(s):
* Tested GrabberMoveUp and Rotation Handles.  They work as they
  did previously as expected.
* Tested selection behavior and it currently maintains as expected.
* Tested translationXZTool and it maintains its prior behavior with
  the improvement noted above.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
    modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 15:04:20 -04:00
LaShonda Hopper
ae8ae6f6cc [Case 6491] Grabbers stay invisible while rotating (details below).
This fixes the issue where grabbers would re-appear when rotating
the selected object rather than staying hidden.

updateHandles will now take the mode into account when deciding
if the non-light grabber handles should be visible.  This can be
subverted by the user selecting a light source as in line with
the previous behavior.

Adds some debug prints in event handlers guarded by local
wantDebug checks.

Has some minor cleanup changes:
* Remove unused var within updateRotationHandles
* Readability improvement for light check within updateHandles
* Pulled up rotate mode check within updateHandles
* Added grabberCloner visibility flag within updateHandles

Changes Committed:
    modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 14:58:30 -04:00
LaShonda Hopper
15ff4ebecb [Case 6491] Adds some debugging prints.
Changes Committed:
	modified:   scripts/system/libraries/entitySelectionTool.js
2017-09-28 14:58:30 -04:00
Seth Alves
912305fd4b Merge pull request #11476 from ElderOrb/case7925
7925 Create Mode: keyboard focused entry field is not visible
2017-09-28 10:03:28 -07:00
beholder
338a230de9 reduced delay to improve user experience 2017-09-28 13:01:14 +03:00
beholder
1021aa1a0e re-center focused eleemnt even if keyboard was already visible 2017-09-28 12:59:36 +03:00
Seth Alves
a1c52ea638 Merge pull request #11477 from samcake/flash
Fixing the broken "on hud" overlay's render transform
2017-09-27 17:42:15 -07:00
samcake
29da0c663f Merge branch 'master' of https://github.com/highfidelity/hifi into flash 2017-09-27 16:21:55 -07:00
Sam Gateau
287f4f1d71 Merge pull request #11466 from SamGondelman/mirrorCrash
Fix mirror and fade threading crashes
2017-09-27 16:17:04 -07:00
Seth Alves
3016ce0a2b Merge pull request #11470 from sethalves/fix-grab-vs-trigger
set grabbable and other checkboxes correctly if userData is blank
2017-09-27 15:24:37 -07:00
samcake
3bd6e35e30 Fixing the broken on hud overlay's render transform 2017-09-27 15:19:21 -07:00
Sam Gateau
f25e4203fd Merge pull request #11469 from SamGondelman/tPose
Don't constantly reload animGraph if URL didn't change
2017-09-27 14:46:05 -07:00
Zach Fox
7ad3a5a1e3 Commerce: Tons of Interface changes (#11463)
* canRez(Tmp)Certified()

* CertifiedItem beginnings

* Skeleton of verifyOwnerChallenge()

* Controlled failure; updateLocation() skeletion

* Controlled failure on checkout page with ctrl+f

* Skeleton Purchases first-use tutorial

* Initial progress on new setup

* Security pic tip

* Skeleton Certificate page

* Updates to Certificate

* General progress; setup is nearly complete

* Better buttons; last step almost done

* Initial progress on wallet home

* Completed recent transactions

* Security page

* Scrollbar

* Fix auth error text

* PassphraseSelection

* Change security pic

* Minor layout changes; beginnings of emulated header

* Various layout changes; wallet nav bar

* Help screen

* Quick onaccepted change

* First pass at new purchases

* Small style updates

* Some error progress

* Lightbox in purchases

* Collapse other help answers when clicking on another

* REZZED notif

* Commerce Lightbox

* Lots of new interactions in Purchases

* Hook up 'view certificate'

* Fix errors, fix close button on cert

* Purchases timer; much faster filter

* Add debugCheckout

* Purchase updates

* GlyphButton; separator; Checkout Success; Ledger fix; debug modes

* Lock glyph below security pic should be white

* Various fixes, round 1

* Circular mask

* Passphrase change button fix; TextField error edge highlighting

* Recent Activity fixes

* Various changes

* Standard Security Pic location

* Color changes

* Filter bar changes

* Styling for multiple owned items

* Minor language change

* Header dropdown (harder than expected)

* Small fixes

* View backup instructions

* marketplaces.js onCommerceScreen

* Beginnign of new injection

* Marketplace injection changes

* Purchase button style changes

* More button styling

* MY PURCHASES button

* marketplace onUsernameChanged

* New help QA

* Help text changes etc

* Downscale security image, reducing filesize

* Lots of bugfixes

* Cleanup before PR

* Only open cert during inspection if commerce switch is on

* Help text changes

* Purchase status incl. change to confirmed; Help text; Open Explorer to hifikey

* Quick glyph change

* New 'wallet not set up' flow for when entering Purchases or Checkout without set-up wallet
2017-09-27 14:43:51 -07:00
anshuman64
9e1a181cbc Merge pull request #11473 from ElderOrb/case7926
7926 Create Mode: the keyboard tray is not styled correctly
2017-09-27 14:35:10 -07:00
beholder
00c3dcee2f 7925 Create Mode: keyboard focused entry field is not visible
note: changed the way of calculation scroll value after showing virtual keyboard.
Now it doesn't require KEYBOARD_HEGHT and will always try to position focused element at vertical center of the client area
2017-09-28 00:28:54 +03:00
Seth Alves
2e92d40c8d Merge pull request #11475 from druiz17/bugs
Fix EntitySelectioTool and improve far rotate
2017-09-27 14:05:35 -07:00
druiz17
58a00a89d7 remove debug print 2017-09-27 12:58:11 -07:00
SamGondelman
553829f7ab make sure FadeEffect dependency is created early 2017-09-27 11:58:35 -07:00
druiz17
cea3c002dd improving far rotate 2017-09-27 11:47:26 -07:00
beholder
3677718e48 7926 Create Mode: the keyboard tray is not styled correctly 2017-09-27 21:33:18 +03:00
druiz17
38096b48d9 fixing entitySelectionTool 2017-09-27 10:52:56 -07:00
Sam Gateau
88097bb39f Merge pull request #11447 from AndrewMeadows/lod-auto-adjust
LODManager uses batchTime and engineRunTime for automatic LOD adjustment
2017-09-27 10:51:46 -07:00
Seth Alves
eb6c99456d Merge branch 'master' of github.com:highfidelity/hifi into fix-grab-vs-trigger 2017-09-27 10:01:24 -07:00
Brad Hefta-Gaub
3500705d0c Merge pull request #11427 from ElderOrb/case7723
7723 Tablet Should Rotate Faster when using Create app
2017-09-26 22:05:45 -07:00
Seth Alves
ae42d56cd6 Merge pull request #11465 from hyperlogic/bug-fix/teleporter-near-scale
Teleport.js: can now teleport small distances with small avatar scale
2017-09-26 19:05:14 -07:00
Seth Alves
ce3e5eb1a3 set grabbable and other checkboxes correctly if userData is blank or malformed. near-trigger blocks near-grab 2017-09-26 18:56:27 -07:00
SamGondelman
306cf883fe don't reload animGraph if url didn't change 2017-09-26 18:18:41 -07:00
Sam Gateau
9317ad38aa Merge pull request #11462 from highfidelity/game-render-interface
Moving transform evaluation out from render loop to gameplay loop / fixing tablet tearing
2017-09-26 17:40:23 -07:00
Seth Alves
f384cde471 Merge pull request #11467 from sethalves/fix-near-trigger
Fix near trigger
2017-09-26 17:27:05 -07:00
Dante Ruiz
410baaf7bc Merge pull request #11464 from druiz17/controller-dispatacher-bugs
fix auto dropping and re-grabbing loop
2017-09-26 16:46:34 -07:00
Seth Alves
8180acbffc use same trigger test as in isReady 2017-09-26 16:29:22 -07:00
anshuman64
ca4d5ef807 Merge pull request #11454 from ElderOrb/case7877
7877 Unexpected Behavior when pressing Enter on Input Field
2017-09-26 16:26:42 -07:00
SamGondelman
49512c95d7 possibly fix threading crashes, mirror and fade 2017-09-26 16:21:36 -07:00
Andrew Meadows
dafadf82bb Merge pull request #11458 from jherico/fix/tablet_latency
Fix long tablet lag on first load
2017-09-26 16:18:31 -07:00
Andrew Meadows
a0cfd87674 Merge pull request #11348 from jherico/android_new
Working on new android toolchain & sample
2017-09-26 16:00:09 -07:00
Bradley Austin Davis
9d18fd3a46 Merge branch 'master' into android_new 2017-09-26 15:59:01 -07:00
Seth Alves
a478506da3 Merge branch 'master' of github.com:highfidelity/hifi into fix-near-trigger 2017-09-26 15:52:22 -07:00
samcake
badb45c921 fixing the web surface now getting scaled when the table t is grabbed is fixed 2017-09-26 15:20:45 -07:00
Seth Alves
644532dd59 only send startNearTrigger once 2017-09-26 15:17:23 -07:00
druiz17
5a1242a1ac fix spelling error 2017-09-26 15:06:31 -07:00
druiz17
76c1fe688c fix auto dropping 2017-09-26 14:52:01 -07:00
Bradley Austin Davis
e42068f681 Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
Anthony J. Thibault
a7cfb5d635 teleport.js: fix for TELEPORT_CANCEL_RANGE with large/small avatar scale 2017-09-26 14:21:25 -07:00
Andrew Meadows
909e5e86b1 Merge pull request #11442 from vladest/fix_dde_visibility
Fix dde visibility
2017-09-26 14:19:47 -07:00
Anthony J. Thibault
f081c36f25 ViveControllerManager: Code review feedback on PR #11422 2017-09-26 14:19:31 -07:00