18 Commits

Author SHA1 Message Date
Mark Peterson
07db0fcc0a
License update (#830) 2020-08-12 17:28:51 -05:00
Patrick Hogan
09c81f862e Update 2018-06-21 19:03:59 -07:00
Patrick Hogan
44a32a6501 Update 2018-06-21 18:45:33 -07:00
David Collins
c005bc998f
Enhanced geographic to Cartesian arithmetic precision (#714)
* Unit tests for map projection arithmetic
- Unit tests for Globe's ellipsoidal properties and methods against official WGS84 reference values
- In-progress unit tests for ProjectionWGS84's geographic-to-cartesian arithmetic

* Unit tests for map projection arithmetic
- Unit tests for Globe's ellipsoidal properties and methods
- Unit tests for ProjectionWGS84's geographic-to-Cartesian transformations
- Employed official WGS84 reference values for all unit tests

* Unit tests for map projection arithmetic
- Unit tests for Globe's ellipsoidal properties and methods
- Unit tests for ProjectionWGS84's geographic-to-Cartesian transformations
- Employed official WGS84 reference values for all unit tests

* Enhanced geographic to Cartesian arithmetic precision

* Disabled unit tests validating incorrect results
- Several unit tests validated functions based on earlier output from the function itself.
- These functions computed incorrect results, and once repaired the erroneous unit tests failed.
- I've opted to disable these unit tests until an independent validation method can be established.
- In the meantime, I have added unit tests for the problematic low-level functions that are validated against independent results.

* Simplified WorldWind module import for new unit tests

* Clarified property docs for Globe.polarRadius and eccentricitySquared
2018-05-24 15:20:59 -07:00
Mark Peterson
20973fe978 Initial elevation coverage composition (#580)
The first iteration of changes required to move toward fulfilling the requirements of issue #422.
2018-04-05 14:35:44 -07:00
Miguel Del Castillo
8a84f250bd Refactored ScreenCreditsController to use existing components (#499)
* Corrected comparison operators with type coercion

* Corrected comparison operator with type coercion

* Corrected comparison operator with type coercion

* Corrected comparison operators with type coercion

* First draft of ScreenCreditController composite

* Usage of ScreenText and ScreenImage in controller
 - Temporarily modified OSM layer server for testing purposes

* Attempted to render ScreenText and ScreenImage

* Corrected proper check of existence of both stringCredits and imageCredits

* ImageCredit offset test

* ImageCredit offset test (still no proper units implemented)

* Image credits correct offset implemented

* Removed unneeded attributes and methods related to opacity
 - Opacity will be handled in the Layer level. No need for the
   attribute in the class.
 - Due to the aforementioned, the text attributes won't need a
   default alpha setting either.
 - Removed transform matrices since the class is not handling graphics
   rendering anymore.

* First attempt at drawing string credits with proper offset

* Screencreditcontroller added as a layer

* Fix broken unit tests

* Change ScreenCreditController so it will operate as a Layer
 - Identified which part of TextRenderer is causing the ScreenText
   not to render.

* doRender override in ScreenCreditController so it works as before
 - Corrected typo in TextRenderer

* Solved bug for string credits.
 - An object was being passed instead of a string
 - Bug: Offset calculation is still wrong, but text is rendering now
 - Bug: First ScreenText is rendered without transparency, the second one
   is half transparent.
 - Bug: ScreenTexts are rendering with outlines

* Rendered all image and string credits in their appropriate offsets
 - Layer opacity is still not accounted for
 - Bug: "WorldWindow.drawOrderedRenderables: Error while rendering
   an ordered renderable. Cannot read property 'opacity' of null"
   E.g: USGSSlabs is not rendering the slabs.

* Set default layer opacity to fully replicate prior behavior
 - Bug regarding other orderedRenderables opacity still present.

* New controller proposal

* Obtainint textures with makeOrderedRenderable(). Still getting bugs.

* Removed layer opacity and unneeded return statement

* Added fixed credit spacing. Reintroduced default layer opacity

* Removed previous offsetting code

* Temporary modification to WorldWindow to work around bug (issue 494)

* Credit display with fixed spacing

* Aligning to right text credits without resorting to texture size

* Added TextAttributes.offset setting for text credits

* Added previously existing exception handling

* Simplified loop indexes

* Changed credit spacing index placement to increase readability

* Added note to document temporary workaround

* Reverted change to comparison operators
 - Will submit these changes in a different branch.

* Reverted change to comparison operators
 - Will submit these changes in a different branch.

* Removed currently unused modules. Reintroduced license notice.

* Removed now unused property

* Renamed index to a more descriptive name

* Used faster pattern in iterative loop

* First attempt to switch RenderableLayer inheritance to Layer

* Added call to render() to every renderable, removed call to Layer.doRender()
 - Removed all unused modules

* Modified whitespace to license as in other modules

* Removed unused parameter

* Corrected another unneeded iterated call to Array.length
 - Properly nitialized index in iterator

* Verify previously added credit existence to avoid credit repetition

* Code formatting corrections
2018-03-07 09:31:35 -08:00
Miguel Del Castillo
ee60729668 Addition of text outline color customization features (#452)
* Modified texture modulation to always modulate to white
 - Corrected wrong logger message call in TextRenderer
 - Corrected missing semicolon in TextRenderer
 - Corrected missing color string in state key of TextAttributes

* Modified documentation to reflect how color is now applied to the text

* Removed parameters from TextRenderer functions that are now unneeded
 - Removed getMaxLineHeight function.
 - Updated call of textRenderer.wrap in Annotation.

* Returned getMaxLineHeight function for documentation purposes

* Modified TextRenderer unit test to fit new function parameters

* First draft of DrawContext.renderText
 - Counterpart to WWA's RenderContext.renderText.

* First propagation of textAttributes to Text through DrawContext
 - Bug: ScreenText and Annotations examples show their text in
   incorrect colors.

* Modified Annotation to use new DrawContext.renderText
 - Annotations example updated to explicitly remove outline from
   the annotation's text.
 - Temporary outline settings for dc.textRenderer are now unneeded and
   are removed as well.

* Corrected Annotation's configuration of fragment program color

* Modified Placemark to use new DrawContext.renderText function

* Corrected wrong assignation of outlineColor

* Updated DrawContext.renderText and TextRenderer documentation

* Disabled Annotation's text outline by default in its constructor
 - Removed superfluous change in TextRenderer documentation
 - Removed text outline disable in Annotations example

* Changed default TextAttributes to a more appropriate name

* Refactored AnnotationAttributes' default text fields for readability
2018-02-06 09:46:05 -08:00
Mark Peterson
59c04fb1b5 Refactor NavigatorState (#444)
* Work in progress

* Further controller refactoring

* Bug fixes

* Added docs and removed test code

* Removed commented out code

* Revert WebStorm config changes

* Formatting tweaks

* Doc fixes

* Navigator state phase 1

* unProject refactor and unit tests

* Fix for incorrect matrix

* Moved convertToViewport

* Moved further NavigatorState methods, added unit tests

* Remove experimental change

* Various property migrations

* Final property moves

* Bug fixes

* Unit test update

* Unit test corrections

* Unit test cleanup

* Unit test fixes

* Unit test fixes

* Formatting fixes

* Documentation tweaks

* Move calls that require access to wwd.drawContext

* Remove wwd.drawContext dependencies

* Remove drawContext dependencies

* Fixes for classes saving direct references to drawcontext properties.

* Formatting fixes

* WIP

* Fix for 2D panning issue

* Removed commented out code
2018-01-16 10:37:35 -08:00
David Collins
7245ba35f1 Added missing semicolon in TextRenderer.test.js 2018-01-12 14:55:12 -08:00
Miguel Del Castillo
9ee36f61e7 Modified RenderText test for empty string input
- Added unit test regarding the aforementioned.
2018-01-10 13:55:31 -06:00
Miguel Del Castillo
cfa9a9dffb Modified mocked DrawContext name to reflect that it's a mockup 2018-01-09 16:29:51 -06:00
Miguel Del Castillo
9d566761d8 Modified TextRenderer unit test to align it with new constructor
- Included a mock DrawContext to avoid WebGL context requirements.
 - Added a new test of exception throwing for the constructor.
2018-01-09 16:23:17 -06:00
Miguel Del Castillo
c4073f0228 Corrected extra parameter in wrapLine call
- Made width a constant in wrap calls.
2018-01-05 15:56:38 -06:00
Miguel Del Castillo
7bf6635131 Dummy commit to trigger reload of a failed TravisCI job 2018-01-05 14:54:49 -06:00
Miguel Del Castillo
639664bc70 Modified mock textSize function to return a realistic value 2018-01-05 13:10:22 -06:00
Miguel Del Castillo
82239849a1 Added comment to TextRenderer mockup 2018-01-05 11:23:16 -06:00
Miguel Del Castillo
7c021ef932 Added tests for wrap and wrapLine functions 2018-01-05 11:16:24 -06:00
Miguel Del Castillo
87df81ea51 First draft of TextRenderer unit test 2018-01-03 17:48:13 -06:00