{"id":13725933,"url":"https://github.com/williamngan/react-pts-canvas-examples","last_synced_at":"2025-10-07T05:23:10.900Z","repository":{"id":24290912,"uuid":"100778896","full_name":"williamngan/react-pts-canvas-examples","owner":"williamngan","description":"An example project of using Pts with React, using react-pts-canvas package.","archived":false,"fork":false,"pushed_at":"2024-02-26T09:16:17.000Z","size":9002,"stargazers_count":135,"open_issues_count":21,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-05T16:36:30.694Z","etag":null,"topics":["canvas","pts","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/williamngan.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":"2017-08-19T07:45:45.000Z","updated_at":"2025-03-01T18:23:41.000Z","dependencies_parsed_at":"2023-01-14T01:30:39.325Z","dependency_job_id":null,"html_url":"https://github.com/williamngan/react-pts-canvas-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/williamngan/react-pts-canvas-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamngan%2Freact-pts-canvas-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamngan%2Freact-pts-canvas-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamngan%2Freact-pts-canvas-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamngan%2Freact-pts-canvas-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/williamngan","download_url":"https://codeload.github.com/williamngan/react-pts-canvas-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/williamngan%2Freact-pts-canvas-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"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-07T02:00:06.786Z","response_time":59,"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":["canvas","pts","react"],"created_at":"2024-08-03T01:02:41.721Z","updated_at":"2025-10-07T05:23:10.885Z","avatar_url":"https://github.com/williamngan.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# pts-react-example\n\nThis repo provides an example of using [react-pts-canvas](https://github.com/williamngan/react-pts-canvas) with [Vite](https://vitejs.dev/). The example code will also work with [create-react-app](https://create-react-app.dev/) if you prefer it over Vite.\n\nplease refer to documentations in [`react-pts-canvas`](https://github.com/williamngan/react-pts-canvas) repo for details.\n\n[Pts](https://github.com/williamngan/pts) is a typescript/javascript library for visualization and creative-coding. Get started at [ptsjs.org](https://ptsjs.org).\n\nLet's take a look at [the demo](https://williamngan.github.io/react-pts-canvas-examples/build/) first before we start.\n\n![screenshot](./screenshot.png)\n\n\n## Quick Start\nIf you just want to try out Pts, there's no need to install and build. Try out the [online demo editor](https://ptsjs.org/demo/edit/?name=polygon.convexHull) for quick experimentations.\n\n\n## Technical notes\n\nFor common use cases, you can include `PtsCanvas` functional component in your own component. Take a look at `PtsExamples.jsx` for example components.\n\n```javascript\nimport { PtsCanvas } from \"react-pts-canvas\";\n```\n\nLegacy class component is deprecated in react-pts-canvas v0.4. If you still need it, use v0.3.x and take a look at the code in `legacy` folder. \n\nIf you need to use Pts, you can import a class like this:\n\n```javascript\nimport {Pt, Create, Util} from \"pts\"; // use ES6\n```\n\nNote that Pts is an javascript es6 library that targets modern browsers. It also provides an ES5 version for use in older builds. To use ES5, import a class like this:\n\n```javascript\nimport {Pt} from \"pts/dist/es5\"; // use ES5\n```\n\n\n\n## License\nApache License 2.0. See LICENSE file for details.\nCopyright © 2017-2018 by William Ngan and contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamngan%2Freact-pts-canvas-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamngan%2Freact-pts-canvas-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamngan%2Freact-pts-canvas-examples/lists"}