ScatterCo / Depthkit.js-deprecated

🎞 A plugin for using Depthkit's volumteric captures in Three.js
https://depthkit.tv
MIT License
33 stars 11 forks source link

meshScalar value limit #2

Closed chetu3319 closed 5 years ago

chetu3319 commented 5 years ago

Proper value check using floor() or step() functions to have only integer value. -> https://github.com/ScatterCo/Depthkit.js/blob/b1fc3a10bfb606f2d47129fa6dab5e37251a949a/src/depthkit.js#L48-L49

Also setting meshScalar = 0; breaks the whole code fundamentally it will be NaN.

tim-depthkit commented 5 years ago

Updated to support values 0-3 inclusive, clamps input to this range, and uses floor() to handle floating point input. 0 - 1 vertex per depth pixel 1 - 1 vertex per every 2 depth pixels 2 - 1 vertex per every 4 depth pixels 3 - 1 vertex per every 8 depth pixels