The fix had two parts.
* Make Avatar::getAbsoluteDefaultJointXXXInObjectFrame thread safe
* Make teleport.js handle a zero foot offset more gracefully, to prevent the avatar from teleporting into the floor.
Particle Editor was agressively refreshing when ever a particle was be
ing up dated
Added a flag check to make sure the particle was always using the latest
version
https://github.com/highfidelity/hifi/pull/11024#pullrequestreview-51611518
Cleans up tabs, moves new functionality out of ShapeFactory directly to
RenderableShapeEntityItem's computeShapeInfo override, begins to break down
where we will need pointlists.
Still need to determine how rotation is handled for pointlists, and check
for axis alignment on cylinders before deciding on a shape.
Changes to be committed:
modified: libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
modified: libraries/entities-renderer/src/RenderableShapeEntityItem.h
modified: libraries/entities/CMakeLists.txt
modified: libraries/entities/src/ShapeEntityItem.cpp
modified: libraries/entities/src/ShapeEntityItem.h
modified: libraries/physics/src/ShapeFactory.cpp
modified: libraries/physics/src/ShapeFactory.h
modified: libraries/shared/src/ShapeInfo.cpp
modified: scripts/developer/tests/basicEntityTest/entitySpawner.js
* Addresses physics library dependency by moving computeShapeInfo override from
ShapeEntityItem (which is within Entities Library) to RenderableShapeEntityItem
(which is in Entities-Renderer Library).
** Entities-Renderer library already links against the physic library.
** Per discussion with Andrew Meadows: In order to ShapeEntityItem to be
utilized the library dependency between the Entity and Physics library
would need to be resolved to avoid the cyclical reliance which isn't in
the scope of this ticket.
* Updates shapeSpawner test script from the default clone of basicEntityTest\entitySpawner.js
** Objects now have a finite lifetime
** Script now cleans up the objects created when the script ends
** Also moved some adjustable properties out into var aliases at the top of the
file for easier/less error prone tweaking. Should probably add one for the shapeType.
* Fixes some issues with validateShapeType helper function
* Removed naive attempt at including physics library within entities library.
* Transferred some todos from notes
* Fixed some formatting
NOTE(s):
This compiles and runs. Cylinder is spawned and treated as CYLINDER_Y.
TODO(s):
* Add tweakable var for shapeType within shapeSpawner.js
* Vet and verify other shapes.
* Add in edge case handling.
* Add in support for other shapes to ShapeInfo infrastructure.
Changes to be committed:
modified: libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
modified: libraries/entities-renderer/src/RenderableShapeEntityItem.h
modified: libraries/entities/CMakeLists.txt
modified: libraries/entities/src/ShapeEntityItem.cpp
modified: libraries/entities/src/ShapeEntityItem.h
modified: libraries/physics/src/ShapeFactory.cpp
modified: libraries/shared/src/ShapeInfo.cpp
modified: scripts/developer/tests/basicEntityTest/shapeSpawner.js
Revised approach involves creating a helper function within ShapeFactory to aid
in devising the ShapeType to be used by an ShapeEntityItem for collision. The
ShapeFactory is currently doing this for creating the actual Bullet Library
collision shapes.
ShapeEntityItem overrides its virtually inherited computeShapeInfo which
in turn calls the new ShapeFactory helper function.
ShapeEntityItem has a new memvar _collisionShapeType to cache its actual
ShapeType used by the physics system. This memvar is returned via the getShapeType
accessor which is expected to return an object's ShapeType.
Note(s):
This is similar to the original approach save translation between entity::Shape and ShapeType
isn't tied to the EntityItemProperties shapeTypeNames or shapeType. This approach more
directly solves the issue of getting the actual ShapeType used by the time it's needed
to determine the bullet collision object type created when initializing the physic information.
Translation of the ShapeEntityItem's entity::Shape to its ShapeType is handled by
ShapeFactory which handles creating the bullet collision objects when setting up
physics on the ShapeEntityItems.
Known Issue(s):
This doesn't compile. It appears that the Entity Library needs to know about
the Physics Library. The naive attempt at providing that link failed to resolve
all compilation issues.
Current Error:
C1083: Cannot open include file: btBulletDynamicsCommon.h:
No such file or directory (C:\projects\cusack\libraries\entities\src\ShapeEntityItem.cpp)
C:\projects\cusack\libraries\physics\src\ShapeFactory.h 15 1 entities
modified: libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
modified: libraries/entities/CMakeLists.txt
modified: libraries/entities/src/ShapeEntityItem.cpp
modified: libraries/entities/src/ShapeEntityItem.h
modified: libraries/physics/src/ShapeFactory.cpp
modified: libraries/physics/src/ShapeFactory.h
modified: libraries/physics/src/ShapeInfo.cpp
modified: scripts/developer/tests/basicEntityTest/entitySpawner.js
new file: scripts/developer/tests/basicEntityTest/shapeSpawner.js
In entityPropeties.js
line #1079 says:
elParentJointIndex.addEventListener('change', createEmitNumberPropertyUpdateFunction('parentJointIndex'));
The problem should be fixed by changing it to:
elParentJointIndex.addEventListener('change', createEmitNumberPropertyUpdateFunction('parentJointIndex', 0));
createEmitNumberPropertyUpdateFunction() is parsing the value as a
float to a default decimal position of 4. Looks like it only accepts
integers. By adding in that 0 as a second argument, it should coerce the
value to one that will be recognized by the UI/backend.
We're seeing the ignoreRayIntersection flag not take effect before findRayIntersection calls. This may be due to editOverlay and editOverlays becoming non-blocking in 1f7d2b2 .
This altered the flow in mousePressEvent significantly; the first block, intended to handle scale/clone only, started handling rotation (should have been second block) and sometimes selection (should have been third block).
Similarly, in the various rotate grabbers' onMove methods, the pickRay will no longer intersect anything other than rotateOverlayTarget; this avoids some awful behavior when scrubbing over the size and clone grabbers.
This also reverts unnecessary parts of the prior commits to keep the diff for this WL cleaner, and adds a few TODO comments to revisit about redundant statements and incorrect names.
In addition, we've noticed but not fixed herein:
* There is a minor edgecase near 0 and 180, where it's difficult to get within a degree or two of the poles occasionally.
* The scale/clone grabbers don't stay disappeared for rotation in some cases. This doesn't impact usability anymore, but it'd be nice to determine why they come back when they hide briefly.
* The addGrabbers for yaw/pitch/roll could be deduplicated, and yaw has some multiselect "reposition" enable/disable logic that pitch and roll lack.
Reviewed-by: LaShonda Hopper <lashonda@1stplayable.com>
Made changes to the 3 sub files for the properties tabs. Although
visually the exiting menu looked like it was in different sections,
structurally it was all just one run of item after item, with a fair
amount of div-itis. I added in fieldsets to provide true groups and
replaced much of the div-ities with aditional feidlsets as they are the
smeantic element to use here.
Prior to and after addressing Worklist Item #21420, it was observed that the
tool bar buttons popping in and out during load. Taking a while to become visible.
Ran JSHint on the edit.js script to see if something stood out.
Testing with the various lint fixes the odd loading behavior wasn't observed locally any longer.
Pushing this up for testing. This may be what @CainFoool was seeing regarding the create button
not appearing when testing a different PR as at times it took quite some time for the buttons
to load properly.
JSHint Issues Addressed:
* Resolved instance of \"Use the function form of \"use strict\"\"
** Moved use strict declaration to the file function level.
** This fixed various unknown or not defined errors.
* Resolved instances of \"\'const\' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).\"
** Switched const to var to avoid using keywords respected by only a subset of browsers.
* Resolved various multiply defined vars.
** Notable callouts being position var and properties var.
** This should fix issues where the same var was being used though the intent of use may have varied.
* Resolved instances of missing semi-colons
PreFix: 51 JSHint issues detected
PostFix: 0 JSHint issues detected.
Changes to be committed:
modified: scripts/system/edit.js
* Adds a local message/event: "Toolbar-DomainChanged"
** This message is sent by the application via its registered domain handlers:
*** hostnameChanged
*** connectedToDomain
*** disconnectedFromDomain
* edit.js subscribes to the "Toolbar-DomainChanged" event and updates the Create
button icon as long as there's a valid known valid create button.
Item Ticket Link: https://worklist.net/21420
Changes to be committed:
modified: interface/src/Application.cpp
modified: scripts/system/edit.js