three模拟下雨天路灯三维场景效果代码
代码语言:html
所属分类:三维
代码描述:three模拟下雨天路灯三维场景效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
min-height: 100vh;
background: black;
display: flex;
align-items: center;
justify-content: center;
}
canvas {
max-width: 100vw;
max-height: 100vh;
width: auto !important;
height: auto !important;
}
</style>
</head>
<body >
<canvas id="canvas"></canvas>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/es-module-shims.1.6.3.js"></script>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.147.0/build/three.module.js",
"three/examples/": "https://unpkg.com/three@0.147.0/examples/",
"meshline": "https://unpkg.com/meshline@3.1.6/dist/index.js",
"@/utils/": "https://unpkg.com/@callumacrae/utils@0.6.0/built/",
"seed-random": "https://cdn.skypack.dev/seed-random@2.2.0",
"tweakpane": "https://cdn.skypack.dev/tweakpane@3.1.1",
"@tweakpane/plugin-essentials": "https://cdn.skypack.dev/@tweakpane/plugin-essentials@0.1.5",
"d3-ease": "https://cdn.skypack.dev/d3-ease@3.0.1",
"matter-js": "https://cdn.skypack.dev/matter-js@0.18.0",
"simplex-noise": "https://cdn.skypack.dev/simplex-noise@3.0.1"
}
}
</script>
<script type="module">
import SimplexNoise from 'simplex-noise';
import * as THREE from 'three';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass';.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0