ssloy / tinyraytracer

A brief computer graphics / rendering course
https://github.com/ssloy/tinyraytracer/wiki
5.04k stars 333 forks source link

I ported this to javascript. #4

Open manthrax opened 5 years ago

manthrax commented 5 years ago

I enjoyed reading this, so I ported it to javascript!

I added some premature optimization by making it render incrementally via generator functions, and by caching datastructure allocations.. those changes are easily removed if desired.

Here it is running: http://vectorslave.com/trt/trt.html

Here's the code: trt-js.zip

Cheers!

ssloy commented 5 years ago

Very cool, thank you!

mkyung commented 5 years ago

maybe @manthrax you can make a pull request to add this version?

ssloy commented 5 years ago

@manthrax , would you please so kind as to put it to github ? I'd like to collect a gallery of different realizations.

powernic commented 5 years ago

@ssloy Здравствуйте! Мне так же понравилась ваша реализация рэйтрейсинга, если интересно, то вот моя реализация на js: https://github.com/powernic/jsraytracing