标签: planetary.js

为planetJS globe添加更多功能

我想在planetJS globe中添加两个功能

  1. 我想提高由行星JS创建的地球仪的变焦速度
  2. 如何生成多个ping,就像这里生成的ping一样.我知道它需要一套经度和纬度,但即使是一次ping也无法做到这一点.

此外,在那里给出的球体旋转比由planetJS提供的那样平滑

总之,我希望像这样实现完全相似的地球

有什么投入?

卡巴斯基的全球背景太棒了.当我们旋转地球仪时,背景正在移动,我应该如何实现它?我在这里试过

(function() {
  var canvas = document.getElementById('quakeCanvas');

  // Create our Planetary.js planet and set some initial values;
  // we use several custom plugins, defined at the bottom of the file
  var planet = planetaryjs.planet();
  planet.loadPlugin(autocenter({extraHeight: -120}));
  planet.loadPlugin(autoscale({extraHeight: -120}));
  planet.loadPlugin(planetaryjs.plugins.earth({
    topojson: { file:   'https://rawgit.com/prashantgpt91/9b0558613b94eb2498325931acf5ea21/raw/0440b7a29db12374257ffdec3d41fda8f7481f3e/world-110m.json' },
    oceans:   { fill:   '#001320' },
    land:     { fill:   '#06304e' },
    borders:  { stroke: '#001320' }
  }));
  planet.loadPlugin(planetaryjs.plugins.pings());
  planet.loadPlugin(planetaryjs.plugins.zoom({
    scaleExtent: [10, 10000]
  })); …
Run Code Online (Sandbox Code Playgroud)

javascript planetary.js

10
推荐指数
1
解决办法
766
查看次数

标签 统计

javascript ×1

planetary.js ×1