{"_id":"@atzhukov/raytracer","_rev":"2-6d611c1240a91af336a7a37a3d395385","name":"@atzhukov/raytracer","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@atzhukov/raytracer","version":"0.1.0","_id":"@atzhukov/raytracer@0.1.0","maintainers":[{"name":"atzhukov","email":"labyrinth.gesangbuch6i@icloud.com"}],"homepage":"https://github.com/atzhukov/raytracer#readme","bugs":{"url":"https://github.com/atzhukov/raytracer/issues"},"dist":{"shasum":"1e018afc96149a9cbd6a26643905836565c368c9","tarball":"https://registry.npmjs.org/@atzhukov/raytracer/-/raytracer-0.1.0.tgz","fileCount":5,"integrity":"sha512-hY2dhlWgcP1kvyJI1udWqnqRQ8jkVsz+gM47Hb4+Bfel23hfy/9v6hwZeQVz07gxXkApBTnLWD3XzhZaRUbx3A==","signatures":[{"sig":"MEUCICtd6z1G+qiuELRKn4liXitn7LV7ZlDLdq3y7VMdyk2DAiEAia+t9al3V7aFaJnY/PassbWUuzFYszU2Eca/aoKULCU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208725},"main":"raytracer.js","type":"module","types":"raytracer.d.ts","gitHead":"9ab167022ca8f3b092c43e8e12b5f3371a468f92","_npmUser":{"name":"atzhukov","email":"labyrinth.gesangbuch6i@icloud.com"},"repository":{"url":"git+https://github.com/atzhukov/raytracer.git","type":"git"},"_npmVersion":"10.9.3","description":"A hobby ray tracer project","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/raytracer_0.1.0_1763118788165_0.07147762760164067","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@atzhukov/raytracer","type":"module","description":"A hobby ray tracer project","version":"0.1.1","repository":{"type":"git","url":"git+https://github.com/atzhukov/raytracer.git"},"main":"raytracer.js","types":"raytracer.d.ts","sideEffects":["./snippets/*"],"gitHead":"bbce06a756b37748e19555e5d983ef599f907134","_id":"@atzhukov/raytracer@0.1.1","bugs":{"url":"https://github.com/atzhukov/raytracer/issues"},"homepage":"https://github.com/atzhukov/raytracer#readme","_nodeVersion":"22.21.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-t4/bVikeM1k8p3oXPXGlAnmzkqIhla2fOE3eRLmc3jNbKH//cNRhlVCHWqyQI9sZ0zO/YMKZpq8gou4f3O75/Q==","shasum":"ee05d2bdb7a44cb7312dba4810e098d742cd5e56","tarball":"https://registry.npmjs.org/@atzhukov/raytracer/-/raytracer-0.1.1.tgz","fileCount":5,"unpackedSize":209417,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atzhukov%2fraytracer@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFEIMYHcj2rBqZX6WMS3imsi1i0DizfoYb9lBojrg9BWAiAp6E69tprCx825vwl6pbRQayddLQxgsqmH8LiVhTJyKg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:665aedb1-0375-4508-bf1e-b627424628a4"}},"directories":{},"maintainers":[{"name":"atzhukov","email":"labyrinth.gesangbuch6i@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/raytracer_0.1.1_1763122848208_0.167942902000896"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-14T11:13:08.073Z","modified":"2025-11-14T12:20:48.890Z","0.1.0":"2025-11-14T11:13:08.393Z","0.1.1":"2025-11-14T12:20:48.391Z"},"bugs":{"url":"https://github.com/atzhukov/raytracer/issues"},"homepage":"https://github.com/atzhukov/raytracer#readme","repository":{"type":"git","url":"git+https://github.com/atzhukov/raytracer.git"},"description":"A hobby ray tracer project","maintainers":[{"name":"atzhukov","email":"labyrinth.gesangbuch6i@icloud.com"}],"readme":"![preview](resources/banner.webp)\n\n# raytracer 🔦\n\nImplementation of a ray tracer in Rust.\nHobby project.\nGuidance: https://raytracing.github.io\n\n## Usage\n\n```sh\nraytracer-cli <INPUT> --width=<WIDTH> --height=<HEIGHT> [OPTIONS]\n```\n\nYou can control output, camera and rendering parameters with other options.\nFor example, the following command will produce a demo image of width 800 px, height 450 px, camera at `(0, 0, 1)` and a vertical field of view of 90 degrees:\n\n```sh\nraytracer-cli ./inputs/github.json -w=800 -h=450 -c=0,0,1 --fov=90\n```\n\nFor a list of all available options, see the help message with:\n\n```sh\nraytracer-cli -H   # or --help\n```\n\n## Build & Run\n\nIf you haven't already, install the [Rust toolchain](https://www.rust-lang.org/tools/install).\nYou can either clone this repository or if you don't know how, download the source code by clicking on the green `<> Code` button above.\n\n> [!NOTE]\n> The following commands utilize the `release` profile, as the resulting executable is substantially faster (at the expense of compile time).\n> For debug information, use the `dev` profile by omitting the `-r/--release` flag.\n\nYou can build and run the program with the following command:\n\n```sh\ncargo run -rq -- -w=<WIDTH> -h=<HEIGHT> [OPTIONS]\n```\n\nOn the first execution this will compile the binary, which might take a little time.\nSuccessive executions will be faster, provided no source code has been changed.\n\n> [!TIP]\n> Another performance optimization you can do is compiling the binary strictly for your specific CPU by setting the `target-cpu` compiler flag:\n>\n> ```\n> RUSTFLAGS=\"-C target-cpu=native\" cargo run -rq -- -w=<WIDTH> -h=<HEIGHT> [OPTIONS]\n> ```\n\n### Executable\n\nIf you've run the commands above, the executable will be located in the `target/release` subdirectory.\nOtherwise, you can compile the binary with:\n\n```sh\ncargo build --release\n```\n\n### WebAssembly\n\nTo compile for `wasm32-unknown-unknown`, install `wasm-pack`:\n\n```sh\ncargo install wasm-pack\n```\n\nThen, run the following:\n\n```sh\nwasm-pack build --target=web\n```\n\n## References\n\n_Peter Shirley, Trevor David Black, Steve Hollasch:_ [Ray Tracing in One Weekend Series](https://raytracing.github.io).\n","readmeFilename":"README.md"}