three实现3d文字入场动画效果代码

代码语言:html

所属分类:三维

代码描述:three实现3d文字入场动画效果代码

代码标签: three 3d 文字 入场 动画

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

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Three.js Cool 3D Text Transitions</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
            background-color: #050505;
            font-family: 'Courier New', Courier, monospace;
        }
        canvas {
            display: block;
        }
        #ui {
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 10;
            display: flex;
            gap: 10px;
        }
        button {
            background: rgba(0, 255, 255, 0.1);
            border: 1px solid #00ffff;
            color: #00ffff;
            padding: 10px 20px;
            cursor: pointer;
            font-weight: bold;
            text-transform: uppercase;
            transition: all 0.3s;
            backdrop-filter: blur(5px);
        }
        button:hover {
            background: #00ffff;
            color: #000;
            box-shadow: 0 0 15px #00ffff;
        }
        #loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 24px;
            pointer-events: none;
            transition: opacity 0.5s;
        }
    </style>
</head>
<body>

    <div id="loading">LOADING 3D ASSETS...</div>

    <div id="ui">
        <button onclick="animAssemble()">💥 汇聚</button>
        <button onclick="animWave()">🌊 波浪</button>
        <button onclick="animSpiral()">🌀 螺旋</button>
        <button onclick="animGlitch()">⚡ 故障</button>
    </div>

    <!-- 引入 Three.js -->
    <script type="importmap">
        {
            "imports": {
                "three": "https://unpkg.com/three@0.160.0/build/three.module.js",
                "three/addons/": "https:/.........完整代码请登录后点击上方下载按钮下载查看

网友评论0