JohnCoene / echarts4r

🐳 ECharts 5 for R
http://echarts4r.john-coene.com/
Other
598 stars 81 forks source link

its possible to use the argument "metalness" for e_globe? #426

Closed Jorge-hercas closed 2 years ago

Jorge-hercas commented 2 years ago

Hello, good afternoon, I hope you are very well. I'm trying some parameters of the e_globe function, but I haven't been able to get them to work correctly. Specifically I would like to give the globe the white look it has in its official documentation, something like:

I am trying with the following code:

library(echarts4r.assets)
library(echarts4r)

airports <- read.csv(
  paste0("https://raw.githubusercontent.com/plotly/datasets/",
         "master/2011_february_us_airport_traffic.csv")
)

airports |> 
  e_charts(long) |> 
  e_globe(
    viewControl = list(rotateSensitivity = 5),
    realisticMaterial = list(metalness = 1),
    globeOuterRadius = 100
  ) |> 
  e_scatter_3d(lat, cnt, coord_system = "globe", blendMode = 'lighter') |> 
  e_visual_map(inRange = list(symbolSize = c(1, 10))) |> 
  e_color(background = "transparent")

Is there any way to make it work? Thank you very much for the help

JohnCoene commented 2 years ago

Metalness is what gives it a shine, you can try in the examples. To have a white globe you'd need to find that white texture they use, I can't find it on the website.

JohnCoene commented 2 years ago

I'm going to close this, I'm pretty sure metalness should just work. If you had issues in the past, I have just updated to the latest echarts.js so it should definitely work now.