Commit graph

61951 commits

Author SHA1 Message Date
Leander Hasty
74734f35e9 [Case 6491] more uniform grabber tools; more distrust of rotateOverlayTarget.
Rotation tools' onMove methods now use rayPlaneIntersection rather than using the giant invisible rotateOverlayTarget.  It can likely be entirely removed in the next commit.

tool.onBegin's signature is now (event, pickRay, pickResult, ...) -- this allows us to avoid recomputing the ray or intersection when unnecessary.

translateXZTool is now a part of the grabberTools array; addGrabberTool and addStretchTool have been modified to return the tool reference (and not disassemble and reassemble the tools, so they can keep their own local functions and state).  This does make the array potentially less type-uniform, which may (?) undo some javascript optimizations, but allows us to eventually remove some state -- and they're only 1x/frame methods.

We now compute rotationNormal in rotation tool onBegin, rather than having many different normals lying around.

Merged the final branches in mousePressEvent.

Also fixed issue with mode TRANSLATE_XZ test within updateRotationHandles.

Reviewed-by: LaShonda Hopper <lashonda@1stplayable.com>
2017-09-28 15:04:27 -04:00
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
utkarshgautamnyu
16a75d20dc Update JSBakerTest.cpp 2017-09-28 11:58:07 -07:00
utkarshgautamnyu
305719da24 Update JSBakerTest.h 2017-09-28 11:47:39 -07:00
utkarshgautamnyu
0bfb199fa0 Update BakeAssetTask.cpp 2017-09-28 11:24:45 -07:00
utkarshgautamnyu
32e319fedc Update AssetServer.cpp 2017-09-28 11:23:20 -07:00
druiz17
3b05317db6 fixing grabbing and tablet bugs 2017-09-28 11:18:40 -07:00
Zach Fox
f0d668c5c3 Fix marketplace injection problems - yay! 2017-09-28 11:14:44 -07:00
utkarshgautamnyu
463afd6be5 made updates to fix building 2017-09-28 11:12:26 -07:00
Zach Fox
b5dc6b791b Fix commerce setting handle 2017-09-28 10:42:45 -07:00
Zach Fox
8d74487393 Use edition number; fix CONFIRMED timer 2017-09-28 10:25:05 -07:00
samcake
2f9779c02c Merge branch 'master' of https://github.com/highfidelity/hifi into blue 2017-09-28 10:08:20 -07: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
Zach Fox
b6ce294bb2 Merge branch 'master' of https://github.com/highfidelity/hifi into pop_interfaceChanges2 2017-09-28 09:38:48 -07:00
Zach Fox
65a63ea8c3 Remove dead OS X code 2017-09-28 09:38:22 -07:00
samcake
b1daae0150 Merge branch 'master' of https://github.com/highfidelity/hifi into blue 2017-09-28 09:16:02 -07:00
Daniela
4a1dd975a9 Fix bubble scale issue for IPD Secondary Task List: bubble.js Scale. 2017-09-28 17:05:06 +01:00
Ryan Huffman
97bf093cab Fix ambiguous conversion in AssetMappingScriptingInterface 2017-09-28 08:16:54 -07:00
Daniela
13eb7db462 Change teleport.js to update render state more frequently. 2017-09-28 16:12:20 +01:00
vladest
0a9bebeefc Added workaround to enable menu bar under Linux 2017-09-28 15:34:56 +02:00
vladest
8d23bf38ac Merge branch 'master' into login_dialog_rework 2017-09-28 14:55:12 +02:00
vladest
4f907aba1e sign in reworked 2017-09-28 14:49:48 +02: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
David Rowe
30c4a22441 Merge branch 'master' into vr-edit-a 2017-09-28 16:10:26 +13:00
David Rowe
47ab9d3221 Fix flash of color from laser target when turn on or jump distance 2017-09-28 16:04:22 +13:00
Nissim Hadar
9d0cf16c20 Fixed Ubuntu warnings. 2017-09-27 19:33:04 -07:00
Nissim Hadar
784f928433 After merge. 2017-09-27 18:46:55 -07:00
utkarshgautamnyu
290e3d307c Create JSBakerTest.cpp 2017-09-27 18:06:35 -07:00
utkarshgautamnyu
354fa12d36 Create JSBakerTest.h 2017-09-27 18:05:28 -07:00
utkarshgautamnyu
e4c25c0aa1 Create CMakeLists 2017-09-27 18:04:08 -07:00
samcake
40ca98214b Moving all of the camera and avatar eval to game loop 2017-09-27 17:58:43 -07:00
Nissim Hadar
4d8a1db895 Merge branch 'master' into hazeZone
# Conflicts:
#	libraries/entities-renderer/src/RenderableModelEntityItem.cpp
2017-09-27 17:50:51 -07:00
Nissim Hadar
55fafeacb1 Implemented HazePropertyGroup and added the haze shader. Shader does not work yet! 2017-09-27 17:43:09 -07: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
Zach Fox
60823903cf You own X others 2017-09-27 17:05:07 -07:00
David Rowe
a74678a24d Improve size of scale handles for distant entities 2017-09-28 12:57:30 +13:00
Zach Fox
7b7e0bc78b Updated Recent Activity 2017-09-27 16:35:35 -07:00
samcake
29da0c663f Merge branch 'master' of https://github.com/highfidelity/hifi into flash 2017-09-27 16:21:55 -07:00
David Rowe
9a51ce4b29 Simplification 2017-09-28 12:18:36 +13:00
David Rowe
57cec50583 Fix UI disappearing when inside complex model 2017-09-28 12:18:09 +13: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
Atlante45
eb06c33187 Naming coding standard fix 2017-09-27 15:32:53 -07:00