{"id":20767741,"url":"https://github.com/dmnsgn/cameras","last_synced_at":"2025-04-30T11:21:19.872Z","repository":{"id":53512986,"uuid":"237494480","full_name":"dmnsgn/cameras","owner":"dmnsgn","description":"Cameras for 3D rendering.","archived":false,"fork":false,"pushed_at":"2021-11-12T13:38:29.000Z","size":1046,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-29T19:25:13.900Z","etag":null,"topics":["3d","cameras","orthographic","perspective","webgl"],"latest_commit_sha":null,"homepage":"https://dmnsgn.github.io/cameras/","language":"TypeScript","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/dmnsgn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-31T18:45:56.000Z","updated_at":"2023-10-24T22:47:31.000Z","dependencies_parsed_at":"2022-09-08T01:12:07.516Z","dependency_job_id":null,"html_url":"https://github.com/dmnsgn/cameras","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fcameras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fcameras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fcameras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmnsgn%2Fcameras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmnsgn","download_url":"https://codeload.github.com/dmnsgn/cameras/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227843581,"owners_count":17827986,"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":["3d","cameras","orthographic","perspective","webgl"],"created_at":"2024-11-17T11:33:14.727Z","updated_at":"2024-12-03T02:50:58.228Z","avatar_url":"https://github.com/dmnsgn.png","language":"TypeScript","funding_links":["https://paypal.me/dmnsgn"],"categories":[],"sub_categories":[],"readme":"# cameras\n\n[![npm version](https://img.shields.io/npm/v/cameras)](https://www.npmjs.com/package/cameras)\n[![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)](https://www.npmjs.com/package/cameras)\n[![npm minzipped size](https://img.shields.io/bundlephobia/minzip/cameras)](https://bundlephobia.com/package/cameras)\n[![dependencies](https://img.shields.io/librariesio/release/npm/cameras)](https://github.com/dmnsgn/cameras/blob/main/package.json)\n[![types](https://img.shields.io/npm/types/cameras)](https://github.com/microsoft/TypeScript)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-fa6673.svg)](https://conventionalcommits.org)\n[![styled with prettier](https://img.shields.io/badge/styled_with-Prettier-f8bc45.svg?logo=prettier)](https://github.com/prettier/prettier)\n[![linted with eslint](https://img.shields.io/badge/linted_with-ES_Lint-4B32C3.svg?logo=eslint)](https://github.com/eslint/eslint)\n[![license](https://img.shields.io/github/license/dmnsgn/cameras)](https://github.com/dmnsgn/cameras/blob/main/LICENSE.md)\n\nCameras for 3D rendering.\n\n[![paypal](https://img.shields.io/badge/donate-paypal-informational?logo=paypal)](https://paypal.me/dmnsgn)\n[![coinbase](https://img.shields.io/badge/donate-coinbase-informational?logo=coinbase)](https://commerce.coinbase.com/checkout/56cbdf28-e323-48d8-9c98-7019e72c97f3)\n[![twitter](https://img.shields.io/twitter/follow/dmnsgn?style=social)](https://twitter.com/dmnsgn)\n\n![](https://raw.githubusercontent.com/dmnsgn/cameras/master/screenshot.jpg)\n\n## Installation\n\n```bash\nnpm install cameras\n```\n\n## Usage\n\nSee the [demo](https://dmnsgn.github.io/cameras/) and its [source](index.html).\n\n```js\nimport { PerspectiveCamera } from \"cameras\";\n\nconst perspectiveCamera = new PerspectiveCamera({\n  fov: Math.PI / 2,\n  near: 1,\n  far: 1000,\n  position: [3, 3, 3],\n  target: [0, 1, 0],\n});\n\n// Create controls\nconst perspectiveCameraControls = new Controls({\n  element: regl._gl.canvas,\n  camera: perspectiveCamera,\n});\n\n// Update controls and set camera with controls position/target\nperspectiveCameraControls.update();\nperspectiveCamera.position = perspectiveCameraControls.position;\nperspectiveCamera.target = perspectiveCameraControls.target;\n\n// Update view matrices (call when changing position/target/up)\nperspectiveCamera.update();\n\n// Update projection matrix  (call when changing near/far/view and other camera type specific options)\nperspectiveCamera.updateProjectionMatrix();\n```\n\n## API\n\nSee the [documentation](https://dmnsgn.github.io/cameras/docs) and [Typescript types](src/types.ts).\n\n## License\n\nMIT. See [license file](https://github.com/dmnsgn/cameras/blob/main/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnsgn%2Fcameras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmnsgn%2Fcameras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmnsgn%2Fcameras/lists"}