three实现三维光照立体玻璃画作旋转动画效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维光照立体玻璃画作旋转动画效果代码,玻璃表面有逼真反射。
代码标签: three 三维 光照 立体 玻璃 画作 旋转 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> canvas { display: block; width: 100%; height: 100vh; cursor: -webkit-grab; cursor: grab; } </style> </head> <body > <!-- Conveyor animation - build your own conveyor in create_conveyor() --> <script async type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/es-module-shims.1.5.1.js" crossorigin="anonymous"></script> <script type="importmap"> { "imports": { "three": "//repo.bfw.wiki/bfwrepo/js/module/three/build/146/three.module.js", "three/addons/": "//repo.bfw.wiki/bfwrepo/js/module/three/examples/jsm/" } } </script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/gsap.3.9.1.js"></script> <script type="module"> import * as THREE from 'three' import { OrbitControls } from 'three/addons/controls/OrbitControls.js' // ---- // params // ---- const LENGTH = 3.5 // conveyor curve related (see create_conveyor) const RADIUS = 0.5 // ditto const ITEM_THICKNESS = 0.2 // item thickness const ITEM_TILT = 15 // in degree, tilt item around y const ANIM_DURATION = 60 // in second const IMG_URLS = [ // (1) Mae Mu - https://unsplash.com/photo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0