cobejs实现旋转的三维数字地球动画效果代码

代码语言:html

所属分类:动画

代码描述:cobejs实现旋转的三维数字地球动画效果代码

代码标签: cobejs 旋转 三维 数字 地球 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

  
</head>
<body>
   <canvas
  id="cobe"
  style="width: 600px; height: 600px;"
  width="1000"
  height="1000"
></canvas>

   <script type="module">
        import createGlobe from '//repo.bfw.wiki/bfwrepo/js/module/cobe/cobe.js'


        let phi = 0
        let canvas = document.getElementById("cobe")

        let background = "#000000";
        let baseColor = "#6ccaf4";
        let glowColor = "#60b6f2";
        let markerColor = "#6ccaf4";

        function convertRGB(color) {
            // Remove '#' from the beginning of the color string if present
            color = color.replace(/^#/, '');

            // Parse the color string into RGB components
            let r = parseInt(color.substring(0, 2), 16) / 255;
            let g = parseInt(color.substring(2, 4), 16) / 255;
            let b = parseInt(color.substring(4, 6).........完整代码请登录后点击上方下载按钮下载查看

网友评论0