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

feat(web): visualizer supports shadow map #524

Merged
merged 7 commits into from
Jun 28, 2023
Merged

Conversation

airslice
Copy link
Contributor

@airslice airslice commented Jun 26, 2023

Overview

Add shadow map support for beta.

What I've done

add:

type SceneProperty = {
  atmosphere?: {
    // ...
    shadowResolution?: 1024 | 2048 | 4096,
    softShadow?: boolean,
    shadowDarkness?: number,
  };
};

What I haven't done

How I tested

let layerId = reearth.layers.add({
  type: "simple",
  data: {
    type: "3dtiles",
    url: "https://assets.cms.plateau.reearth.io/assets/11/6d05db-ed47-4f88-b565-9eb385b1ebb0/13100_tokyo23-ku_2022_3dtiles%20_1_1_op_bldg_13101_chiyoda-ku_lod1/tileset.json",
  },
  "3dtiles": {
      pbr: false
  }
});

setTimeout(()=>{
    reearth.camera.flyTo(layerId);

    reearth.scene.overrideProperty({
        atmosphere:{
            shadows: true,
            shadowResolution: 4096,
            softShadow: true,
            shadowDarkness: 0.3
        },
        terrain:{
            terrain: true,
        },
        light:{
            lightType: 'directionalLight', // in case you test this at night
        }
    });
},0);

Which point I want you to review particularly

Memo

@netlify
Copy link

netlify bot commented Jun 26, 2023

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 8c4822a
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/649ba662cf54e40008244901
😎 Deploy Preview https://deploy-preview-524--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 Jun 26, 2023
@airslice airslice marked this pull request as ready for review June 26, 2023 09:24
@airslice airslice requested a review from keiya01 as a code owner June 26, 2023 09:24
@github-actions github-actions bot requested a review from isoppp June 26, 2023 09:24
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #524 (eb22f86) into main (fa30bc5) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head eb22f86 differs from pull request most recent head 8c4822a. Consider uploading reports for the commit 8c4822a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
- Coverage   26.69%   26.68%   -0.02%     
==========================================
  Files        1337     1337              
  Lines      144435   144501      +66     
  Branches     3481     3481              
==========================================
+ Hits        38559    38560       +1     
- Misses     104754   104819      +65     
  Partials     1122     1122              
Flag Coverage Δ
web 24.02% <0.00%> (-0.02%) ⬇️
web-beta 24.02% <0.00%> (-0.02%) ⬇️
web-classic 24.02% <0.00%> (-0.02%) ⬇️
web-utils 24.02% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
web/src/beta/lib/core/Map/types/index.ts 0.00% <0.00%> (ø)
web/src/beta/lib/core/engines/Cesium/hooks.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@airslice airslice merged commit 748d9db into main Jun 28, 2023
12 checks passed
@airslice airslice deleted the feat/visualizer-shadow-map branch June 28, 2023 03:31
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.

2 participants