{"id":19234598,"url":"https://github.com/smitelli/js-hom","last_synced_at":"2026-03-02T05:02:49.602Z","repository":{"id":145541646,"uuid":"64358752","full_name":"smitelli/js-hom","owner":"smitelli","description":"Something approximating Vanilla Doom's Hall-of-Mirrors shimmer in JavaScript","archived":false,"fork":false,"pushed_at":"2017-01-19T16:48:55.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T01:12:08.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/smitelli.png","metadata":{"files":{"readme":"README.md","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":"2016-07-28T02:46:27.000Z","updated_at":"2017-01-19T16:48:56.000Z","dependencies_parsed_at":"2023-05-23T10:00:24.200Z","dependency_job_id":null,"html_url":"https://github.com/smitelli/js-hom","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/smitelli%2Fjs-hom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fjs-hom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fjs-hom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fjs-hom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smitelli","download_url":"https://codeload.github.com/smitelli/js-hom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240317420,"owners_count":19782389,"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":[],"created_at":"2024-11-09T16:14:22.582Z","updated_at":"2026-03-02T05:02:44.582Z","avatar_url":"https://github.com/smitelli.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"JS-HOM\n======\n\nSomething approximating Vanilla Doom's Hall-of-Mirrors shimmer in JavaScript\n\nby [Scott Smitelli](mailto:scott@smitelli.com)\n\nWhat?\n-----\n\nThis is a thing I threw together to try to understand exactly how the \"Hall of\nMirrors\" shimmering effect arises in the original DOS version of Doom.\n\nCheck it out at [https://rawgit.com/smitelli/js-hom/master/js-hom.html](https://rawgit.com/smitelli/js-hom/master/js-hom.html).\n\nThings Learned\n--------------\n\nDoom caps its frame rate at 35 FPS. There are three screen buffers.\n\nIf the chainsaw is in view, the swing no longer runs at 35 FPS and instead drops\nto the \"idle\" sprite animation speed. Possibly an implementation oversight.\n\nThe weapon swing roughly draws the lower arc of a circle, 32 pixels in diameter.\nThe left-to-right sweep places the sprite in the exact same spots as the\nright-to-left sweep, except for the very bottom point of the circle (the X\ncoordinate for this point varies by 1 depending on the direction; seems to be\nround-off error.) One complete swing cycle is 64 frames long, which does not\ndivide evenly into the three screen buffers.\n\nThe \"angle\" in the cycle is dictated by the game clock. Beginning to move the\nplayer at different times will jump into the animation cycle at different\nangles. The magnitude of movement is controlled by the player's bob value, which\nis based on player velocity and affects the view's height from the floor as\nwell.\n\nThe original swing code appears to be in\n[p_pspr.c, in A_WeaponReady()](https://github.com/id-Software/DOOM/blob/77735c3ff0772609e9c8d29e3ce2ab42ff54d20b/linuxdoom-1.10/p_pspr.c#L275).\nThere is also a function P_CalcSwing() in that file that's similar, but looks to\nbe unused.\n\nThe DOM was a poor choice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmitelli%2Fjs-hom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmitelli%2Fjs-hom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmitelli%2Fjs-hom/lists"}