{"id":25945150,"url":"https://github.com/jacobjaffe/pointer-lock-controls-offset-example","last_synced_at":"2025-10-20T11:07:25.593Z","repository":{"id":53346150,"uuid":"318289725","full_name":"JacobJaffe/pointer-lock-controls-offset-example","owner":"JacobJaffe","description":"Example of how to use pointer lock controls in Three Fiber with offsets for raycasting","archived":false,"fork":false,"pushed_at":"2022-08-04T18:15:16.000Z","size":12781,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T00:05:29.347Z","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/JacobJaffe.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}},"created_at":"2020-12-03T18:52:01.000Z","updated_at":"2025-03-08T13:04:19.000Z","dependencies_parsed_at":"2022-09-11T03:34:20.764Z","dependency_job_id":null,"html_url":"https://github.com/JacobJaffe/pointer-lock-controls-offset-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JacobJaffe/pointer-lock-controls-offset-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobJaffe%2Fpointer-lock-controls-offset-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobJaffe%2Fpointer-lock-controls-offset-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobJaffe%2Fpointer-lock-controls-offset-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobJaffe%2Fpointer-lock-controls-offset-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacobJaffe","download_url":"https://codeload.github.com/JacobJaffe/pointer-lock-controls-offset-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacobJaffe%2Fpointer-lock-controls-offset-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280080725,"owners_count":26268364,"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-10-20T02:00:06.978Z","response_time":62,"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":"2025-03-04T08:29:22.293Z","updated_at":"2025-10-20T11:07:25.564Z","avatar_url":"https://github.com/JacobJaffe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pointer Lock Controls Offset Example\n\nThis repo provides an example of how to use mouse offsets with pointer lock controls with Three Fiber.\n\nNormally, when raycasting for pointer events, the raycast occurs from the offset of the mouse and camera.\n\nHowever, when using a PointerLockControl, the offset should be disregarded, as the mouse position does _not_ change. This can cause issues unless the mouse is set to the middle of the canvas before entering the pointer lock.\n\nBy setting the offset to be the middle of the canvas, the offset is ignored, and the raycasts operate as expected.\n\nThis is demo'd here by having the raycasted mouse location tracked with a `red circle`, and the expected raycast location tracked with a `black reticle`.\n\n## Without Offsetting\n\n![Without Offsetting](readmeAssets/withoutOffsetting2.gif)\n\n## With Offsetting\n\n![With Offsetting](readmeAssets/withOffsetting2.gif)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobjaffe%2Fpointer-lock-controls-offset-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobjaffe%2Fpointer-lock-controls-offset-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobjaffe%2Fpointer-lock-controls-offset-example/lists"}