Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

feat: support acquiring locations with terrain #343

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

airslice
Copy link
Contributor

@airslice airslice commented Oct 31, 2022

Overview

Mouse events want to get the correct location when terrain is on.

What I've done

Update the common getLocationFromScreenXY function, added a prop withTerrain default as false.

If withTerrain is true it will use globe.pick instead of camera.pickEllipsoid so that terrain can take effect. And if doesn't get the location it will still try camera.pickEllipsoid as a polyfill.

What I haven't done

How I tested

Tested with plugin using mouse event.

Screenshot

image

Which point I want you to review particularly

Memo

@netlify
Copy link

netlify bot commented Oct 31, 2022

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 2a3a40c
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/635f438eb6a5b7000833f162
😎 Deploy Preview https://deploy-preview-343--reearth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #343 (2a3a40c) into main (76a1696) will decrease coverage by 0.00%.
The diff coverage is 10.52%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
- Coverage   18.12%   18.12%   -0.01%     
==========================================
  Files         512      512              
  Lines       50921    50937      +16     
  Branches      619      619              
==========================================
+ Hits         9231     9232       +1     
- Misses      41669    41684      +15     
  Partials       21       21              
Impacted Files Coverage Δ
...onents/molecules/Visualizer/Engine/Cesium/hooks.ts 0.00% <0.00%> (ø)
...nents/molecules/Visualizer/Engine/Cesium/common.ts 40.90% <12.50%> (-0.73%) ⬇️

@airslice airslice marked this pull request as ready for review October 31, 2022 03:48
@rot1024 rot1024 changed the title feat: support get location with terrain feat: support for acquiring locations with terrain Oct 31, 2022
@rot1024 rot1024 changed the title feat: support for acquiring locations with terrain feat: support acquiring locations with terrain Oct 31, 2022
@airslice airslice merged commit f40d022 into main Oct 31, 2022
@airslice airslice deleted the feat/plugin-mouseevent-support-terrain branch October 31, 2022 04:28
rot1024 pushed a commit that referenced this pull request Nov 4, 2022
feat: support get location with terrain
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants