vector-field:3D矢量场(流场)的数据结构和查找

时间:2024-02-20 07:10:42
【文件属性】:

文件名称:vector-field:3D矢量场(流场)的数据结构和查找

文件大小:1.63MB

文件格式:ZIP

更新时间:2024-02-20 07:10:42

flow lookup noise vectors perlin

向量场 3D矢量场(流场)的数据结构和查找。 安装 npm install vector-field 用法 参见。 import VectorField from "vector-field" ; let time = 0 ; const directionFn = ( [ x , y , z ] ) => { const n = myNoise4D ( x , y , z , time ) ; const theta = n ; const phi = n ; return [ Math . sin ( theta ) * Math . sin ( phi ) , Math . cos ( theta ) , Math . sin ( theta ) * Math . cos ( phi ) ] ; } ; const vectorField = new VectorField ( directionFn , [ 12 , 6 , 6 ] , 1 ) ; const frame = ( ) => { time += 0.001 ;


【文件预览】:
vector-field-master
----index.html(559B)
----.npmignore(46B)
----LICENSE.md(1KB)
----README.md(3KB)
----demo.js(3KB)
----.gitignore(25B)
----screenshot.gif(1.65MB)
----index.js(2KB)
----package-lock.json(114KB)
----package.json(1KB)

网友评论