{"id":13690097,"url":"https://github.com/dig/onset-camera-library","last_synced_at":"2025-03-03T06:15:34.265Z","repository":{"id":99159984,"uuid":"229358525","full_name":"dig/onset-camera-library","owner":"dig","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-23T23:13:01.000Z","size":29,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T09:49:35.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/dig.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}},"created_at":"2019-12-21T01:02:57.000Z","updated_at":"2020-05-27T01:31:51.000Z","dependencies_parsed_at":"2023-06-04T08:00:31.849Z","dependency_job_id":null,"html_url":"https://github.com/dig/onset-camera-library","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/dig%2Fonset-camera-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dig%2Fonset-camera-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dig%2Fonset-camera-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dig%2Fonset-camera-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dig","download_url":"https://codeload.github.com/dig/onset-camera-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241616676,"owners_count":19991543,"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-08-02T16:00:43.562Z","updated_at":"2025-03-03T06:15:34.237Z","avatar_url":"https://github.com/dig.png","language":"Lua","funding_links":[],"categories":["Packages and Plugins"],"sub_categories":["Libraries"],"readme":"# onset-camera-library\nAuthors: Digital\n\n### Features\n* Set camera to pan a location.\n* Set camera on paths.\n\n### Installation\nCreate a folder inside your servers package folder called camera, download all files from this repository and place them inside the camera folder. \u003cbr /\u003e\nEdit your server_config.json to install camera as a package.\n\n### Example\n```lua\nlocal Camera = ImportPackage('camera')\n\n-- Start camera panning over the quarry\nCamera.StartCameraPan({ -98067, 93583, 400 }, 15000, 0.05, { 0, 0, 7000 })\n\n-- Start camera path near the prison\nCamera.StartCameraPath({\n  { -157745.265625, 76728.546875, 2211.7468261719, 351.61010742188, 155.78399658203, 0.0 },\n  { -160801.359375, 78152.84375, 1891.3470458984, 359.83453369141, 180.45664978027, 0.0 },\n  { -163122.6875, 78130.640625, 2388.2092285156, 3.4768590927124, 182.0550994873, 0.0 },\n  { -167719.71875, 77846.765625, 2019.0693359375, 356.47750854492, 179.95524597168, 0.0 }\n}, 5000)\n\n-- Print if camera is enabled or not\nAddPlayerChat(tostring(Camera.IsCameraEnabled()))\n\n-- Stop camera\nCamera.StopCamera()\n```\n\n### Functions\n#### StartCameraPan\nStart the camera panning over a center point.\n```lua\nCamera.StartCameraPan(center, distance, speed, [, offset], [, stayInCamera])\n```\n* **center** Array with 3 entries, x, y, z. Example: { -98067, 93583, 400 }\n* **distance** Camera distance from center point. Example: 15000\n* **speed** Speed of the camera. Example: 0.05\n* **offset (optional)** Offset to the camera position. Example: { 0, 0, 7000 }\n* **stayInCamera (optional)** Default false, if true the camera will not return to the player after the pan ends.\n\n#### StartCameraPath\nStart the camera following a path.\n```lua\nCamera.StartCameraPath(path, length, [, stayInCamera])\n```\n* **path** Table with position arrays inside. Each array must contain 6 entries, x, y, z, rx, ry, rz. r being rotation. Format for each array should be { x, y, z, rx, ry, rz }. Example: See above\n* **length** How long the camera will follow the path for in milliseconds. Example: 5000\n* **stayInCamera (optional)** Default false, if true the camera will not return to the player after the path ends.\n\n#### StopCamera\nStop the camera.\n```lua\nCamera.StopCamera()\n```\n\n#### IsCameraEnabled\nReturns if the camera is currently enabled.\n```lua\nCamera.IsCameraEnabled()\n```\nReturn boolean.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdig%2Fonset-camera-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdig%2Fonset-camera-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdig%2Fonset-camera-library/lists"}