{"id":21905628,"url":"https://github.com/laino/rendercrank","last_synced_at":"2025-03-22T07:18:31.585Z","repository":{"id":145122648,"uuid":"398115063","full_name":"laino/rendercrank","owner":"laino","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-23T20:33:02.000Z","size":236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T07:29:23.631Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/laino.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":"2021-08-20T00:58:39.000Z","updated_at":"2021-08-23T20:33:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c000c73d-db17-43c0-913d-82cfc9f9a820","html_url":"https://github.com/laino/rendercrank","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/laino%2Frendercrank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laino%2Frendercrank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laino%2Frendercrank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laino%2Frendercrank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laino","download_url":"https://codeload.github.com/laino/rendercrank/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918924,"owners_count":20531726,"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-28T16:34:45.932Z","updated_at":"2025-03-22T07:18:31.567Z","avatar_url":"https://github.com/laino.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"RenderCrank\n===========\n\nUnopinionated 2D WebGL Renderer with automatic batching, resource management/streaming, and support\nfor WebWorker/OffscreenCanvas.\n\nFeatures\n---------\n\n- [x] **Unopinionated**: Doesn't force you into one way of managing your data - you just submit draw calls!\n\n- [x] **Draw Call Batching**: Automatically reorders and batches calls.\n\n- [x] **Offscreen Canvas**: Draw in the main thread and render in a WebWorker or vice-versa!\n\n- [x] **Automatic Resource Management**: Keeps track of what resources you used and where.\n\n- [x] **Resource Streaming**: Load textures, compile shaders, ..., without blocking rendering.\n\n- [x] **TypeScript**: Typechecked all the way down to shader attributes.\n\nExample\n-------\n\n```ts\nimport { autoDetectRenderer, component } from 'rendercrank';\n\n// Create a Canvas:\nconst canvas = document.createElement('canvas');\ncanvas.width = window.innerWidth;\ncanvas.height = window.innerHeight;\ndocument.body.appendChild(canvas);\n\n// Automatically pick a single-threaded or WebWorker renderer based on browser capablities:\nconst renderer = autoDetectRenderer(canvas);\n\n// Components wrap functions that draw something and automatically\n// keep track of (and reference) resources used within them:\nconst scene = component(t =\u003e t.rect(200, 200, 400, 400));\n\n// Render the component:\nrenderer.render(scene);\n\n// Unload resources used by a component if we don't need it in the near future:\nrenderer.unload(scene);\n\n// Unloads things globally used by the renderer:\nrenderer.reset();\n```\n\nContributing\n------------\n\n```bash\n# Checkout\ngit clone https://github.com/laino/rendercrank.git\ncd rendercrank\nyarn install\nyarn build\n\n# Watch and automatically rebuild\nyarn watch\n```\n\nOpen ``examples/rectangle/index.html`` in a browser of your choice - it should work!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaino%2Frendercrank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaino%2Frendercrank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaino%2Frendercrank/lists"}