60 Commits

Author SHA1 Message Date
Oscar Lorentzon
b608c36861 chore: update unit test dependencies
Handle spec type problems.
2020-06-04 15:09:09 +02:00
Oscar Lorentzon
2ef6fd0cf2 feat: fixed fov in earth mode 2018-11-05 14:11:53 +00:00
Oscar Lorentzon
e4f4288a6a chore: update typescript
Workaround faulty compiler errors by type casting.
2018-10-08 05:14:04 +00:00
Oscar Lorentzon
5294321a9d test: render camera fov changes 2018-10-04 11:15:14 +00:00
Oscar Lorentzon
b653daa952 fix(render): take absolute value of projected points
Take absolute value to ensure that projected points are
always positive, i.e. corresponds to the upper right
quadrant part of the image border.
Simple unit tests on render camera field of view.
2018-09-19 07:06:46 +00:00
Oscar Lorentzon
e9916738f3 feat: handle fill and letterbox after undistortion
Calculate vertical field of view for fill and
letterbox based on quarter of image boundary.
Refactor render camera to handle internal behavior
internally.
Refactor unit tests.
2018-09-04 11:48:01 +00:00
Oscar Lorentzon
1969bd83bc refactor: use pipe operators
Use pipe operators everywhere.
Fix errors becasue of piping more than nine operations.
2018-06-13 12:03:40 +00:00
Oscar Lorentzon
72e778b921 chore: upgrade to rxjs 6 compat
Downgrade node types version because of observable type
compatibility issue.
Remove unsupported generics from empty calls.
Use observable create for API call wrapping
becasue of non compatible type when using
observable from promise.
Add frame generator because it was removed
from RxJS 6.
2018-06-12 06:01:04 +00:00
Oscar Lorentzon
c38f4e7c4f chore: remove typings dependency
Add types folder as type root.
Declare modules in type def files to be able to compile.
2018-06-11 06:16:58 +00:00
Oscar Lorentzon
e3250d8162 refactor: import rxjs operators in a single place 2018-04-17 12:50:59 +00:00
Oscar Lorentzon
51f79ef802 chore: extend tslint recommended
Extend recommended while keeping functionality.
Remove duplicate blank lines.
2017-11-14 13:23:36 +00:00
Oscar Lorentzon
282f9b8129 refactor: avoid creating an unused interactive canvas
When no WebGL components are activated the canvas should either
not be created at all  or created and maintained. If the canvas
is not resized correctly it will behave incorrectly. Therefore
do not create it at all for non WebGL state. This will result in
that interactive components like mouse and keyboard will not
function for non WebGL functionality.
2017-09-04 07:51:09 +00:00
Oscar Lorentzon
4deba2edbe refactor: create canvas in container for more control 2017-09-04 07:32:38 +00:00
Oscar Lorentzon
0562931890 Update TS related dependencies.
Fix linting errors for new linter version.
2017-05-29 09:04:08 +00:00
Oscar Lorentzon
c5ea00f1da Handle element height of zero.
Fixes #239

Handle infinite aspect and zero vfov in bearing component.
Handle zero width and height when calculating aspect
in render camera.
2017-05-18 12:17:02 +00:00
Oscar Lorentzon
5c2405a6d9 Correct params to GL renderer ctor in spec. 2017-03-08 07:39:29 +00:00
Oscar Lorentzon
8729699a62 Add bearing observable on render service. 2017-01-09 13:47:03 +01:00
Oscar Lorentzon
7fc2b64778 Workaround rxjs subscribe with no args bug.
Complete all created subjects in tests.
Add noop function to all previously empty subscribe calls
to ensure that they are not completed prematurely because
of rxjs bug.
2017-01-04 10:38:38 +01:00
Oscar Lorentzon
a720d1a2df Migrate to TS 2.1.
Extending Error does not create instances of the created error classes.
Act accordingly in unit test error type checks.
Upgrade three js typings for compatibility.
Error derived classes does not need to create stack trace
explicitly.
Use tilde ranges for ts dev deps for future compatibility.
2016-12-21 17:04:09 +01:00
Oscar Lorentzon
fc3a930c65 Migrate to rxjs 5.0. 2016-12-21 11:37:43 +01:00
Oscar Lorentzon
5af29c6aff Move image tile related classes to tiles folder. 2016-11-25 15:51:16 +01:00
Oscar Lorentzon
8862bfe946 Add empty viewport service and tile loader. 2016-11-25 11:58:39 +01:00
Oscar Lorentzon
95f71f3f4a Add empty texture renderer class. 2016-11-24 15:24:05 +01:00
Oscar Lorentzon
a2e020cd03 Set pixel ratio on gl renderer.
Remove unapplied style setting.
Set auto clear only once.
2016-11-24 11:41:52 +01:00
Oscar Lorentzon
628c70e547 Fill render mode as default. 2016-10-25 20:10:19 +02:00
Oscar Lorentzon
1a8bb3bdee Public API for setting center and zoom.
Set both properties immediately if current node is set.
Store both properties if current node is not set and apply
when first node is set.
Clamp values to valid zoom and basic coordiantes.
2016-09-14 07:02:42 -04:00
Oscar Lorentzon
00bda4b356 Expose public get center and zoom methods.
Return simple array for center.
Active observable on mouse component to avoid emitting move start
events while dragging slowly.
2016-09-14 07:02:42 -04:00
Oscar Lorentzon
bf200628db Use current camera for rotation calculations.
Change current and previous camera basic correctly in traversing
state.
2016-08-03 10:43:42 -04:00
Oscar Lorentzon
1048b4f7cf Test DOM rendering and patching. 2016-07-18 22:58:19 +02:00
Oscar Lorentzon
f5f98c70e1 Migrate to RxJS 5 beta.
Fixes #116
Fixes #117

Migrate src and spec.
Handle change operator specs.
Install es6-shim typings for RxJS promise support.
Remove RxJS browser file.
Import only needed classes and functions from RxJS to enable
smaller builds.
2016-07-14 13:20:17 -04:00
Oscar Lorentzon
89030047ad TS lint scripts.
TS lint scripts for spec and src.
Fix all spec files to comply with linting.
Use lint script in pre commit hook.
2016-07-12 11:42:23 -04:00
Oscar Lorentzon
3c4c40cad0 Handle size and render mode changes before initialization.
Fixes #115

Handle size and render mode changes by operating on render camera
that has subscribtion. Use the latest render camera for each new
frame.
Disable all render service unit tests that because some of them
fail randomly because of #116 but this bugfix is critical for
library users so change is required.
2016-07-05 16:03:58 -04:00
Oscar Lorentzon
12a0dfb8d1 Do not transform focal length based on orientation in camera.
Add render camera fov unit tests.
Correct zoom logic in fov calculation.
2016-06-15 17:04:58 +02:00
Oscar Lorentzon
b41d39ad53 Migrate to typings 1.0.
Fixes #135
2016-06-07 14:53:35 +02:00
Oscar Lorentzon
61ab3b4f15 Zoom on mouse wheel events.
Filter mouse events on full pano nodes for rotation and zoom.
2016-04-26 13:10:00 +02:00
Oscar Lorentzon
2333b47c3b Render when single hash is added or cleared.
When the first hash is added to the GL renderer the
frame subscription is initiated. It will not render
for the frame of the render hash but needs to render
for the next frame. Therefor needs render is set on
the render camera.
Clear hash before clearing renderer to ensure that
one empty render is drawn.
Unit test when clearing one of multiple renders.
2016-04-06 23:05:30 +02:00
Oscar Lorentzon
11db76868b Make render camera changed handling robust.
Do not expect that the next frame is a successive integer.
Unit test render camera changed handling.
2016-04-04 09:34:57 +02:00
Oscar Lorentzon
93bd9738e9 Use render service element in GL renderer. 2016-04-02 09:22:32 +02:00
Oscar Lorentzon
5333b7cb4d Clear GL content when last hash is cleared.
GLRenderer should render one extra time after the last render
hash has been cleared and the frame subscription has been
disposed to ensure that the canvas is cleared.
Edit unit test to ensure that no extra frame is needed for
content to be cleared.
2016-04-02 08:58:52 +02:00
Oscar Lorentzon
05ede0e1fb Use render service camera in GL renderer.
Change GL renderer unit tests to use render service mock.
Share render collection observble to run only once.
Replay render camera frame to ensure a value is always
retrieved.
2016-04-01 20:27:46 +02:00
Oscar Lorentzon
726f23dd58 Unit test render camera observables on render service. 2016-04-01 18:08:32 +02:00
Oscar Lorentzon
27b88a6189 Expose render camera observable on render service.
Filter on movement and alpha.
2016-04-01 15:21:21 +02:00
Oscar Lorentzon
6089b7713a Make render mode configurable in viewer options. 2016-04-01 08:25:02 +02:00
Oscar Lorentzon
34ec3ea777 Reference geo position on state.
Expose reference lat, lon, alt position on state.
Reset reference position when current node is to far
and the transition is motionless only.
Calculate translation for each node set on state before
creating transform. Use reference position for computing
translation.
Expose reference observable on state service.
Use reference observable in marker component.
2016-03-29 20:41:44 +02:00
Johan Gyllenspetz
de79e27ee0 Fix glRender tests 2016-03-18 17:44:19 -07:00
Oscar Lorentzon
29c92c8419 Remove GL prefix from render mode class name.
Render mode applies to both the DOM and GL renderers.
2016-03-12 08:52:58 +01:00
Oscar Lorentzon
9a73b94642 Use render service in GL renderer.
Change unit tests to use render service for
resize and mode changes.
2016-03-11 13:31:30 +01:00
Oscar Lorentzon
22779a0069 Render service with render mode and size.
Unit tests.
2016-03-11 12:18:59 +01:00
Oscar Lorentzon
061af4ae69 Add missing state interface property in unit test helper. 2016-03-02 18:07:58 +01:00
Oscar Lorentzon
8066b9c52a Use Typings instead of TSD.
Remove deprecated TSD dependency.
Use Typings to install type definitions.
Install rx typings from npm package.
2016-02-29 16:58:56 +01:00