35 Commits

Author SHA1 Message Date
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
Oscar Lorentzon
fa04a4ee1a Test that size observable is shared. 2016-02-29 10:02:55 +01:00
Oscar Lorentzon
84e5f3ec81 Test GL rendering for multiple registrations. 2016-02-28 20:57:43 +01:00
Oscar Lorentzon
28e7f965b6 Test that GLRenderer renders on render mode change. 2016-02-23 09:25:03 +01:00
Oscar Lorentzon
f6556ad66c Test rendering on resize and no renders registered. 2016-02-23 09:17:54 +01:00
Oscar Lorentzon
73600c7141 Test that render is called when camera has changed. 2016-02-22 23:03:00 +01:00
Oscar Lorentzon
57eaddb4ef Test that rendering is not done when not requested. 2016-02-22 22:09:01 +01:00
Oscar Lorentzon
919cc647ff Test that renderer renders twice and on clear. 2016-02-22 18:05:40 +01:00
Oscar Lorentzon
2f88ce8f5b Test that GLRenderer renders correctly for single hash. 2016-02-22 11:26:59 +01:00
Oscar Lorentzon
70fe693ff3 Test that WebGLRenderer is created on render request. 2016-02-21 17:49:07 +01:00
Oscar Lorentzon
cf904d0415 GLRenderer ctor unit tests. 2016-02-21 17:47:15 +01:00