{"id":16127062,"url":"https://github.com/mikolalysenko/perspective-camera-controller","last_synced_at":"2025-04-06T13:22:00.162Z","repository":{"id":27099031,"uuid":"30566340","full_name":"mikolalysenko/perspective-camera-controller","owner":"mikolalysenko","description":"Perspective matrix controller for WebGL cameras","archived":false,"fork":false,"pushed_at":"2015-02-10T00:20:53.000Z","size":104,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-12T19:34:42.610Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikolalysenko.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}},"created_at":"2015-02-10T00:20:34.000Z","updated_at":"2016-09-26T08:54:15.000Z","dependencies_parsed_at":"2022-09-02T04:51:18.411Z","dependency_job_id":null,"html_url":"https://github.com/mikolalysenko/perspective-camera-controller","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/mikolalysenko%2Fperspective-camera-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fperspective-camera-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fperspective-camera-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikolalysenko%2Fperspective-camera-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikolalysenko","download_url":"https://codeload.github.com/mikolalysenko/perspective-camera-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485852,"owners_count":20946479,"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-10-09T21:41:54.520Z","updated_at":"2025-04-06T13:22:00.116Z","avatar_url":"https://github.com/mikolalysenko.png","language":"JavaScript","readme":"perspective-camera-controller\n=============================\nAn interface for generating a perspective matrix from a set of input variables.\n\n# Install\n\n```\nnpm i perspective-camera-controller\n```\n\n# API\n\n## Constructor\n\n#### `var controller = require('perspective-camera-controller')(options)`\nConstructs the perspective matrix controller\n\n* `options.width` initial width\n* `options.height` initial height\n* `options.fovx` initial horizontal fov\n* `options.fovy` initial vertical fov\n* `options.znear` initial near clip distance\n* `options.zfar` initial far clip distance\n\n**Returns** A new controller object\n\n## Properties\n\n#### `controller.width`\nThe width of the view port for the camera\n\n#### `controller.height`\nThe height of the view port for the camera\n\n#### `controller.fovy`\nVertical fov angle in radians\n\n#### `controller.fovx`\nHorizontal fov angle in radians\n\n#### `controller.near`\nNear clip plane distance\n\n#### `controller.far`\nFar clip plane distance\n\n## Methods\n\n#### `controller.get(matrix)`\nRetrieves the current camera matrix\n\n* `matrix` gets the result of the camera matrix\n\n**Returns** `matrix`\n\n#### `controller.dirty()`\n**Returns** `true` if the state of the matrix has changed since last call to `get`\n\n#### `controller.setNear(zn)`\nSets near clip plane distance\n\n#### `controller.setFar(zn)`\nSets far clip plane distance\n\n#### `controller.setFOVX(fov)`\nSets horizontal fov angle\n\n#### `controller.setFOVY(fov)`\nSets vertical fov angle\n\n#### `controller.setWidth(w)`\nSets camera width\n\n#### `controller.setHeight(h)`\nSets camera height\n\n# License\n(c) 2015 Mikola Lysenko. MIT License","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fperspective-camera-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikolalysenko%2Fperspective-camera-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikolalysenko%2Fperspective-camera-controller/lists"}