webgl+three实现液态三维物体旋转起伏动画效果代码

代码语言:html

所属分类:三维

代码描述:webgl+three实现液态三维物体旋转起伏动画效果代码

代码标签: webgl three 液态 三维 物体 旋转 起伏 动画

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

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">

 
 
<style>
html
,
body
{
 
height: 100%;
}
body
{
 
margin: 0;
 
display: grid;
 
place-items: center;
 
overflow: hidden;
}

canvas
{
 
max-width: 100%;
 
max-height: 100%;
 
height: auto !important;
}
</style>


 
 
</head>

<body>
 
<script type="x-shader/x-vertex">
  uniform float uTime;

varying vec3 vPosition;

//
// https://github.com/hughsk/glsl-noise/blob/master/classic/3d.glsl
//
// GLSL textureless classic 3D noise "cnoise",
// with an RSL-style periodic variant "pnoise".
// Author:  Stefan Gustavson (stefan.gustavson@liu.se)
// Version: 2011-10-11
//
// Many thanks to Ian McEwan of Ashima Arts for the
// ideas for permutation and gradient selection.
//
// Copyright (c) 2011 Stefan Gustavson. All rights reserved.
// Distributed under the MIT license. See LICENSE file.
// https://github.com/ashima/webgl-noise
//

vec3 mod289(vec3 x) {
        r.........完整代码请登录后点击上方下载按钮下载查看

网友评论0