babylon实现旋涡虫洞井底水下波纹效果

代码语言:html

所属分类:动画

代码描述:babylon实现旋涡虫洞井底水下波纹效果

代码标签: 涡虫 井底 水下 波纹 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  display: grid;
  place-content: start;
  height: 100vh;
}
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}
.info {
  color: #eee;
  position: relative;
  z-index: 1;
  padding: 5vmin;
}
</style>

</head>
<body translate="no">
<canvas></canvas><a class="info" href="//twitter.com/ycwhk" target="_blank">swirl</a>

<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,Mesh = BABYLON.Mesh;
var canvas = document.querySelector('canvas');
var engine = new Engine(canvas);
var scene = new Scene(engine);
var camera = new ArcRotateCamera('', -Math.PI / 2, Math.PI / 2, 1e2, new Vector3(), scene);
camera.attachControl(canvas);
var light = new PointLight('', new Vector3(), scene);
light.intensity = 1e4;
var pp = new DefaultRenderingPipeline('');
pp.bl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0