shadows-js
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

shadows-js

See the demo page

This library calculates the visible area in a closed room from a central point. The calculations are exact, to the extent that floating point arithmetic allows.

The inspiration comes from the soldiers' view field in the Commandos game series.

Limitations

  • You need to cover the center with walls all-around to get 360 degrees of shadows
  • The wall segments cannot overlap, or touch each other in the middle, only end-to-end overlaps are allowed

Readme

Keywords

Package Sidebar

Install

npm i shadows-js

Weekly Downloads

5

Version

0.1.4

License

MIT

Unpacked Size

124 kB

Total Files

33

Last publish

Collaborators

  • costas-basdekis