Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pragmatwice/light2d-hs
learn miloyip/light2d, and translate to haskell
https://github.com/pragmatwice/light2d-hs
haskell ray-tracing
Last synced: 3 days ago
JSON representation
learn miloyip/light2d, and translate to haskell
- Host: GitHub
- URL: https://github.com/pragmatwice/light2d-hs
- Owner: PragmaTwice
- License: bsd-3-clause
- Created: 2019-01-27T04:47:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T09:04:34.000Z (almost 6 years ago)
- Last Synced: 2024-12-06T15:50:11.679Z (2 months ago)
- Topics: haskell, ray-tracing
- Language: Haskell
- Homepage:
- Size: 47.9 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# light2d-hs
[![Build Status](https://travis-ci.com/PragmaTwice/light2d-hs.svg?branch=master)](https://travis-ci.com/PragmaTwice/light2d-hs)
learn [miloyip/light2d](https://github.com/miloyip/light2d), and translate to haskell
## dependencies
- GHC
- Stack *(for package management)*
- [JuicyPixels](https://github.com/Twinside/Juicy.Pixels) *(for dumping PNG image file)*
- other packages in `package.yaml/dependencies`## online demo
[TravisCI](https://travis-ci.com/) will automatically run all of these algorithms, render images, and generate a image website using [thumbsup](https://github.com/thumbsup/thumbsup), then upload the site to [Surge](https://surge.sh/).
So enjoy in **[light2d-hs.surge.sh](https://light2d-hs.surge.sh/)**.
## others
#### About random algorithm:
~~NO. (Dynamic) random algorithms in Haskell lead to RealWorld operations (mostly when initializing the random seed via `/dev/urandom` on Unix-like systems or `RtlGenRandom` on Windows), and produce lots of IO Monad, which would damage these concise light2d algorithms.~~In [BeerLambertColor part](https://github.com/PragmaTwice/light2d-hs/blob/master/src/Light2D/BeerLambertColor.hs#L10), a static random algorithm is used in jittered sampling.
#### About issue for usage, improvement or disagreement:
Welcome.#### About runtime performance:
Bad, I know it runs very slowly. But I still cannot be skilled with Haskell, so further optimization is unreachable now. Therefore if there are some PRs about these improvement, I will be grateful.