{"id":16153037,"url":"https://github.com/stewdio/cornell-torus","last_synced_at":"2026-04-26T08:39:08.955Z","repository":{"id":148552219,"uuid":"281194940","full_name":"stewdio/cornell-torus","owner":"stewdio","description":"Rotating torus knot inside a Cornell Box rendered live with Three.js.","archived":false,"fork":false,"pushed_at":"2020-08-21T14:49:43.000Z","size":1059,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T05:32:12.866Z","etag":null,"topics":["cornellbox","javascript","threejs","torus"],"latest_commit_sha":null,"homepage":"http://stewartsmith.io/studies/cornell-torus/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stewdio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-20T18:24:55.000Z","updated_at":"2020-11-22T23:01:49.000Z","dependencies_parsed_at":"2023-06-07T07:30:31.708Z","dependency_job_id":null,"html_url":"https://github.com/stewdio/cornell-torus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stewdio%2Fcornell-torus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stewdio%2Fcornell-torus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stewdio%2Fcornell-torus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stewdio%2Fcornell-torus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stewdio","download_url":"https://codeload.github.com/stewdio/cornell-torus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569138,"owners_count":20959758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cornellbox","javascript","threejs","torus"],"created_at":"2024-10-10T01:09:54.118Z","updated_at":"2026-04-26T08:39:03.936Z","avatar_url":"https://github.com/stewdio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Cornell torus](./media/cornell-torus.jpg \"Cornell torus\")  \n\n\nCornell torus\n========================================================================\nThis demo is part of my “Three.js in a Hurry” collection—an effort \nto help fellow spatial computing folks get up to speed quickly with \nthe [Three.js](https://threejs.org/) WebGL-based 3D rendering library. \nThis example contains a rotating \n[torus knot](https://en.wikipedia.org/wiki/Torus_knot) inside a \n[Cornell Box](https://en.wikipedia.org/wiki/Cornell_box) rendered live, \ncomplete with interactive controls for adjusting various parameters. \nThe code is clean, commented, and contains links to relevant \nthird-party documentation. This demonstration code is live at \n[http://stewartsmith.io/studies/cornell-torus/](http://stewartsmith.io/studies/cornell-torus/).  \n  \n  \nHow to: Download this code package\n------------------------------------------------------------------------\nIf you’re not familiar with GitHub, the easiest way to download this\ncode package is to click the green “↓ Code” button near the top of this \npage. Choose the “Download ZIP” option.  \n  \n  \nHow to: Run this from your Mac desktop\n------------------------------------------------------------------------\nSadly, you cannot just drag and drop the `index.html` file onto a \nbrowser window to view this application from your own \n[Macintosh](https://www.apple.com/macos/) desktop. You’ll need to spin\nup a server and view the application from a URL like \n[http://localhost:8000/](http://localhost:8000/) instead. But don’t \nworry—that’s easy!  \n\n1. Open the **Terminal** application. (Just hit ⌘ + Spacebar, then type\n“terminal” to search for it on your Mac. Once found, hit Enter to open \nit.)\n\n2. Type `cd `\u0026nbsp;(yes, with that space after it), then drag and drop this\nwhole code package folder that you’ve downloaded onto the **Terminal** \nwindow—it will fill in the folder’s full path address for you. \n(You’ll see something like `cd ~/YourName/Downloads/cornell-torus/`.) \nNow hit Enter to tell **Terminal** it must `c`hange `d`irectories to \nthat folder.\n\n3. Paste this into **Terminal**, then hit Enter: \n`python -m SimpleHTTPServer 8000`. You are now running a web server on \nport `8000`. (You could instead use a different number to listen on a \ndifferent port. This is handy if you need many servers running at once;\neach will need to listen to a different port.)\n\n4. Now you can visit this website at \n[http://localhost:8000](http://localhost:8000) and everything should be \nfine 👍  \n\nWhen you’re ready to shut down the server, go back to **Terminal**  and\ntap Control + C. That’s all!  \n  \nFor more information on running a barebones local server, (including \nPython 3 commands) see Mozilla’s\n[Set up a local testing server](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server)\narticle.  \n  \n  \n  \n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstewdio%2Fcornell-torus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstewdio%2Fcornell-torus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstewdio%2Fcornell-torus/lists"}