three将本地svg图标变成透明三维玻璃立体模型代码

代码语言:html

所属分类:三维

代码描述:three将本地svg图标变成透明三维玻璃立体模型代码

代码标签: three 本地 svg 图标 变成 透明 三维 玻璃 立体 模型 代码

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  
  
  
  
<style>
body {
            margin: 0;
            overflow: hidden;
            background-color: #000;
        }
        canvas {
            display: block;
        } 
        #loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-family: sans-serif;
            font-size: 18px;
            pointer-events: none;
            transition: opacity 0.5s ease;
            z-index: 10;
        }
</style>


  
</head>

<body translate="no">
  <script type="importmap">
        {
            "imports": {
                "three": "https://cdn.jsdelivr.net/npm/three@0.165.0/build/three.module.js",
                "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.165.0/examples/jsm/",
                "lil-gui": "https://unpkg.com/lil-gui@0.19.1/dist/lil-gui.esm.min.js"
            }
        }
    </script>

    <div id="loading">Loading assets...</div>
    <input type="file" id="bgInput" accept="image/*" style="display: none;">
    <input type="file" id="svgInput" accept=".svg" style="display: none;"&g.........完整代码请登录后点击上方下载按钮下载查看

网友评论0