粒子时光机传输时空效果
代码语言:html
所属分类:粒子
代码描述:粒子时光机传输时空效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> canvas { display: block; width: 100vw; height: 100vh; } .infos { padding: 5vmin; display: grid; position: fixed; top: 0; left: 0; } .infos a { color: #eee; } </style> </head> <body translate="no"> <canvas></canvas> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/babylon-min.js"></script> <script> "use strict"; var Engine = BABYLON.Engine,Scene = BABYLON.Scene,ArcRotateCamera = BABYLON.ArcRotateCamera,Vector3 = BABYLON.Vector3,MeshBuilder = BABYLON.MeshBuilder,PBRMaterial = BABYLON.PBRMaterial,PointLight = BABYLON.PointLight,SolidParticleSystem = BABYLON.SolidParticleSystem,SolidParticle = BABYLON.SolidParticle,DefaultRenderingPipeline = BABYLON.DefaultRenderingPipeline; var canvas = document.querySelector('canvas'); var engine = new Engine(canvas); var scene = new Scene(engine); scene.clearColor.set(0, 0, 0, 1); var camera = new ArcRotateCamera('', -Math.PI / 2, Math.PI / 2, 10, new Vector3(0, 0, 0), scene); camera.fov = Math.PI / 2; camera.minZ = 1e-4; var light = new PointLight('', new Vector3(0, -1, 0), scene); light.intensity = 5e3; light.diffuse.set(1, 1, 1); var pp = new DefaultRenderingPipeline(''); pp.bloomEnabled = true; pp.bloomThreshold = 0.2; var mat = new PBRMateria.........完整代码请登录后点击上方下载按钮下载查看
网友评论0