three实现三维可调参数光照大楼阴影效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维可调参数光照大楼阴影效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { overflow: hidden; font-family: 'Courier New', monospace; } #app { width: 100vw; height: 100vh; } .controls { position: fixed; top: 20px; left: 20px; background: rgba(10, 15, 25, 0.85); backdrop-filter: blur(8px); padding: 20px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); color: #e0e6ed; font-size: 12px; max-width: 280px; z-index: 100; } .control-group { margin-bottom: 15px; } .control-group:last-child { margin-bottom: 0; } label { display: block; margin-bottom: 5px; color: #9ca3af; font-weight: bold; } input[type="range"] { width: 100%; height: 4px; background: #374151; outline: none; border-radius: 2px; margin-bottom: 5px; } input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; background: #60a5fa; cursor: pointer; border-radius: 50%; } input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: #60a5fa; cursor: pointer; border-radius: 50%; border: none; } .value { color: #60a5fa; font-weight: bold; } .help { position: fixed; bottom: 20px; right: 20px; background: rgba(10, 15, 25, 0.85); backdrop-filter: blur(8px); padding: 15px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); color: #9ca3af; font-size: 11px; max-width: 200px; } </style> </head> <body translate="no"> <div id="app"></div> <div class="controls"> <div class="control-group"> <label>Camera Y Rotation: <span class="value" id="rotateYVal">0°</span></label> <input type="range" id="rotateY" min="-180" max="180" step="1" value="0"> </div> <div class="control-group"> <label>Camera X Rotation: <span class="value" id="rotateXVal">-5°</span></label> <input type="range&q.........完整代码请登录后点击上方下载按钮下载查看
网友评论0