Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): add transition appearance #860

Merged
merged 3 commits into from Dec 15, 2023
Merged

chore(web): add transition appearance #860

merged 3 commits into from Dec 15, 2023

Conversation

keiya01
Copy link
Member

@keiya01 keiya01 commented Dec 15, 2023

Overview

I added an API to enable moving entity smoothly.

Screen.Recording.2023-12-15.at.13.24.12.mov

What I've done

  • Added transition appearance
  • Added support transition appearance's translate property in marker.

What I haven't done

  • Support transition for other feature type.
  • Support transition appearance other than translate property.

How I tested

You can use this script.(If you move the cursor to out of globe, it causes the exception error. I will make an API to prevent it in another PR)

const id = reearth.layers.add({
  type: "simple",
  data: {
    type: "geojson",
    value: {
      type: "Feature",
      geometry: {
        type: "Point",
        coordinates: [0, 0, 100],
      },
    },
  },
  marker: {
    color: "#00FFFF",
  },
});

setTimeout(() => {
  reearth.camera.flyTo(id);
  reearth.on("mousemove", ({ lng, lat, height }) => {
    reearth.layers.override(id, {
      type: "simple",
      data: {
        type: "geojson",
        value: {
          type: "Feature",
          geometry: {
            type: "Point",
            coordinates: [0, 0, 100],
          },
        },
      },
      marker: {
        color: "#00FFFF",
      },
      transition: {
        useTransition: true,
        translate: [lng, lat, height],
      },
    });
  });
}, 10);

Which point I want you to review particularly

Memo

@keiya01 keiya01 self-assigned this Dec 15, 2023
Copy link

netlify bot commented Dec 15, 2023

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 8fbcbd3
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/657bfe0c719772000850ebc6
😎 Deploy Preview https://deploy-preview-860--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 configuration.

@github-actions github-actions bot added the web label Dec 15, 2023
@keiya01 keiya01 requested a review from KaWaite December 15, 2023 04:30
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #860 (8fbcbd3) into main (7f0e761) will increase coverage by 0.00%.
The diff coverage is 44.44%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #860   +/-   ##
=======================================
  Coverage   25.83%   25.83%           
=======================================
  Files        1642     1642           
  Lines      181071   181117   +46     
  Branches     3885     3884    -1     
=======================================
+ Hits        46780    46800   +20     
- Misses     133202   133228   +26     
  Partials     1089     1089           
Flag Coverage Δ
web 24.10% <44.44%> (+<0.01%) ⬆️
web-beta 24.10% <44.44%> (+<0.01%) ⬆️
web-classic 24.10% <44.44%> (+<0.01%) ⬆️
web-utils 24.10% <44.44%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
web/src/beta/lib/core/mantle/types/appearance.ts 100.00% <100.00%> (ø)
...src/beta/lib/core/engines/Cesium/Feature/index.tsx 33.62% <41.17%> (+0.89%) ⬆️
...a/lib/core/engines/Cesium/Feature/Marker/index.tsx 15.03% <33.33%> (+1.64%) ⬆️

... and 3 files with indirect coverage changes

@keiya01 keiya01 merged commit fb496e3 into main Dec 15, 2023
15 of 16 checks passed
@keiya01 keiya01 deleted the feat/transition branch December 15, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants