fast-voxel-raycast:通过体素进行快速射线投射

时间:2021-05-12 15:36:16
【文件属性】:
文件名称:fast-voxel-raycast:通过体素进行快速射线投射
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-12 15:36:16
JavaScript 快速体素射线广播 通过体素进行快速射线投射。 这是一个分支,使用了Amanatides和Woo在描述的更快,更简单的算法。 通常,除了边缘情况(例如,当射线投射精确地接触实心体素的角)时,它的功能与父库等效,在这种情况下,未定义任何特定行为。 对于2D射线广播,还请参见noffle对该模块的。 安装 npm install fast-voxel-raycast 用法 var raycast = require ( 'fast-voxel-raycast' ) raycast ( getVoxel , start , direction , distance , hit_position , hit_normal ) getVoxel一个function(x,y,z) ,该function(x,y,z)返回有关每个体素是否应阻止射线投射的真实值 start -射线的起源 direct
【文件预览】:
fast-voxel-raycast-master
----index.js(3KB)
----package.json(646B)
----test()
--------check_hits.js(2KB)
--------check_shallow.js(793B)
--------check_sphere.js(909B)
--------check_halt.js(480B)
----.gitignore(27B)
----README.md(2KB)

网友评论