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): support IBL for terrain #529

Merged
merged 16 commits into from
Jul 19, 2023
Merged

feat(web): support IBL for terrain #529

merged 16 commits into from
Jul 19, 2023

Conversation

keiya01
Copy link
Member

@keiya01 keiya01 commented Jun 28, 2023

Overview

Screenshot 2023-06-28 at 13 18 52

What I've done

What I haven't done

How I tested

// Step1
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": {
  }
});
setTimeout(()=>{
  reearth.camera.flyTo(layerId, {duration: 0});
},10);

// Step2
reearth.scene.overrideProperty({
  terrain: {
    terrain: true,
    terrainNormal: true
  },
  atmosphere: {
    globeShadowDarkness: 0.3,
    globeImageBasedLighting: true,
    enable_lighting: true,
  },
  light: {
      sphericalHarmonicCoefficients: [
        [0.499745965003967, 0.499196201562881, 0.500154078006744],
        [0.265826553106308, -0.266099184751511, 0.265922993421555],
        [0.243236944079399, 0.266723394393921, -0.265380442142487],
        [-0.266895800828934, 0.265416264533997, 0.266921550035477],
        [0.000195000306121, -0.000644546060357, -0.000383183418307],
        [-0.000396036746679, -0.000622032093816, 0.000262127199676],
        [-0.000214280473301, 0.00004872302452, -0.000059724134189],
        [0.000107143961941, -0.000126510843984, -0.000425444566645],
        [-0.000069071611506, 0.000134039684781, -0.000119135256682],
      ],
      imageBasedLightIntensity: 1,
  },
  tiles: [
    {
      id: "default",
      tile_type: "default_road",
    },
  ],
});

Which point I want you to review particularly

Memo

@keiya01 keiya01 self-assigned this Jun 28, 2023
@netlify
Copy link

netlify bot commented Jun 28, 2023

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 31560cd
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/64b7a1cf0fac8100074e342b
😎 Deploy Preview https://deploy-preview-529--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.

@keiya01 keiya01 changed the title feat: support IBL for terrain feat(web): support IBL for terrain Jun 28, 2023
@github-actions github-actions bot added the web label Jun 28, 2023
@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Merging #529 (3b4a199) into main (99f5ad8) will increase coverage by 0.00%.
The diff coverage is 35.22%.

❗ Current head 3b4a199 differs from pull request most recent head 31560cd. Consider uploading reports for the commit 31560cd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main     #529    +/-   ##
========================================
  Coverage   28.49%   28.49%            
========================================
  Files        1392     1394     +2     
  Lines      150357   150113   -244     
  Branches     3590     3621    +31     
========================================
- Hits        42837    42769    -68     
+ Misses     106368   106222   -146     
+ Partials     1152     1122    -30     
Flag Coverage Δ
web 26.40% <35.22%> (+0.01%) ⬆️
web-beta 26.40% <35.22%> (+0.01%) ⬆️
web-classic 26.40% <35.22%> (+0.01%) ⬆️
web-utils 26.40% <35.22%> (+0.01%) ⬆️

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%> (ø)
...sium/Shaders/CustomShaders/NonPBRLightingShader.ts 100.00% <ø> (ø)
...eb/src/beta/lib/core/engines/Cesium/core/Globe.tsx 0.00% <0.00%> (ø)
web/src/beta/lib/core/engines/Cesium/hooks.ts 0.00% <0.00%> (ø)
web/src/beta/lib/core/engines/Cesium/types.ts 0.00% <0.00%> (ø)
.../lib/core/engines/Cesium/useOverrideGlobeShader.ts 0.00% <0.00%> (ø)
web/src/beta/lib/core/hooks/useRefFunction.ts 0.00% <0.00%> (ø)
...a/lib/core/engines/Cesium/Feature/Tileset/hooks.ts 16.25% <14.28%> (-1.48%) ⬇️
...ta/lib/core/engines/Cesium/Feature/Model/index.tsx 17.30% <25.00%> (-3.77%) ⬇️
web/src/beta/lib/core/utils/StringMatcher.ts 90.38% <90.38%> (ø)
... and 2 more

... and 50 files with indirect coverage changes

@keiya01 keiya01 marked this pull request as ready for review July 19, 2023 06:29
@keiya01 keiya01 requested a review from KaWaite as a code owner July 19, 2023 06:30
@keiya01 keiya01 marked this pull request as draft July 19, 2023 06:30
@keiya01 keiya01 marked this pull request as ready for review July 19, 2023 08:06
@github-actions github-actions bot requested a review from isoppp July 19, 2023 08:06
@keiya01 keiya01 requested review from airslice and removed request for isoppp July 19, 2023 08:08
web/package.json Outdated Show resolved Hide resolved
@keiya01 keiya01 enabled auto-merge (squash) July 19, 2023 08:43
@keiya01 keiya01 merged commit 7439637 into main Jul 19, 2023
@keiya01 keiya01 deleted the feat/terrain-normal branch July 19, 2023 08:48
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.

3 participants