{"id":19862092,"url":"https://github.com/lewiscollum/webgl_3dscene","last_synced_at":"2025-08-29T02:35:18.485Z","repository":{"id":132333869,"uuid":"417325772","full_name":"LewisCollum/webgl_3dscene","owner":"LewisCollum","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-15T01:56:56.000Z","size":2637,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T23:48:32.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LewisCollum.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-10-15T00:50:35.000Z","updated_at":"2021-10-15T01:56:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"db23a874-43eb-466b-9bc7-d1185eeb4a87","html_url":"https://github.com/LewisCollum/webgl_3dscene","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LewisCollum/webgl_3dscene","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewisCollum%2Fwebgl_3dscene","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewisCollum%2Fwebgl_3dscene/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewisCollum%2Fwebgl_3dscene/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewisCollum%2Fwebgl_3dscene/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LewisCollum","download_url":"https://codeload.github.com/LewisCollum/webgl_3dscene/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewisCollum%2Fwebgl_3dscene/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272612123,"owners_count":24964387,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T15:10:46.009Z","updated_at":"2025-08-29T02:35:18.455Z","avatar_url":"https://github.com/LewisCollum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: WebGL 3D Scene Implementing Phong Shading\n\n#+NAME: Floating Coin\n#+CAPTION: Illustrates a floating spinning coin, various light sources, and textured objects\n\n\n[[./figure/snapshot.png]]\n\n** Running\n   #+begin_src bash\ngit clone https://github.com/LewisCollum/webgl_3dscene.git\ncd webgl_3dscene\npython -m http.server --directory .\n   #+end_src\n   Then in your browser, go to [[http://localhost:8000/]]. The scene should appear.\n  \n** User Interaction\n   - =W, A, S, D=: Move Camera\n   - =R=: Increase Coin Rotation Speed\n   - =Mouse Click on tab=: Interact with lighting menu.\n\n** Source\n   - [[./src/PlyLoader.js][PlyLoader]], [[./src/ObjLoader.js][ObjLoader]]: parses model files into vertices, texture coordinates, normals, and indices. We use Blender to create/import a mesh and then export that mesh as a PLY. Once exported from Blender, we import it to our WebGL code with PlyLoader.\n   - [[./scene.js][Scene]]: holds all objects in our scene, including lights, meshes, and the camera. These objects (and their properties, e.g. \"material\") are tied to the shaders using SceneImporter.\n   - [[./src/SceneImporter.js][SceneImporter]]: recursively add objects from the [[./scene.js][scene]] file. It generates a list of callables that the [[./src/Drawer.js][Drawer]] uses to render each object in the [[./scene.js][scene]] file.\n   - [[./src/Drawer.js][Drawer]]: iterates a list of callables (from the \"SceneImporter\") and runs each callable, to render the scene.\n   - [[./src/form.js][form]], [[./src/matrix.js][matrix]], [[./src/vector.js][vector]]: files for matrix/vector operations.\n   - [[./src/FrameDispatcher.js][FrameDispatcher]]: Users can add a listener to the FrameDispatcher which includes their game/scene logic (in [[./main.js]]). Users can also control the frame rate.\n** Lighting:\n   There are 2 point and 1 directional light sources implemented.\n   - Point source 1: can be turned on/off in the interactive light menu.\n   - Point source 2: sways back and forth by varying the x coordinate.\n   - Directional: can be turned on/off in the interactive light menu.\n\n** Meshes\n   - Coin: uses material, many polyhedra\n   - Grass: uses material, many polyhedra\n   - Wall: textured, one polyhedra\n   - Ground: textured\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewiscollum%2Fwebgl_3dscene","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewiscollum%2Fwebgl_3dscene","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewiscollum%2Fwebgl_3dscene/lists"}