{"id":16508520,"url":"https://github.com/osteele/p5pose-optitrack","last_synced_at":"2025-10-27T20:10:56.123Z","repository":{"id":66371817,"uuid":"218227859","full_name":"osteele/p5pose-optitrack","owner":"osteele","description":"Use p5.js to render data from an OptiTrack CSV -\u003e WebSocket server.","archived":false,"fork":false,"pushed_at":"2019-10-30T00:38:05.000Z","size":94,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T11:16:55.251Z","etag":null,"topics":["optitrack","p5js","posenet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/osteele.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-29T07:26:07.000Z","updated_at":"2021-06-04T15:23:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8e25b10-8eaf-4161-9937-a28f432142f3","html_url":"https://github.com/osteele/p5pose-optitrack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/osteele/p5pose-optitrack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osteele%2Fp5pose-optitrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osteele%2Fp5pose-optitrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osteele%2Fp5pose-optitrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osteele%2Fp5pose-optitrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osteele","download_url":"https://codeload.github.com/osteele/p5pose-optitrack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osteele%2Fp5pose-optitrack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273832388,"owners_count":25176262,"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-09-05T02:00:09.113Z","response_time":402,"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":["optitrack","p5js","posenet"],"created_at":"2024-10-11T15:45:59.677Z","updated_at":"2025-10-27T20:10:56.057Z","avatar_url":"https://github.com/osteele.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P5.JS \u003c-\u003e OptiTrack Starter Kit\n\nThis repository uses [p5.js](https://p5js.org) to render data from an [OptiTrack\nCSV -\u003e WebSocket server](https://github.com/osteele/optitrack-ws-server).\n\n## Installation\n\n1. Clone this repo.\n\n2. Install [Node.js](https://nodejs.org).\n   - On macOS, [install HomeBrew](https://brew.sh), and then enter `brew install node` into a terminal window.\n   - On Windows, install it from the [Node.js download page](https://nodejs.org/en/).\n\n3. In a terminal window:\n   - Change directories (`cd`) into the repository directory.\n   - Enter `npm install`\n\n## Running\n\nIn a terminal window:\n\n1. Change directories (`cd`) into the repository directory.\n2. Either:\n   1. Add a `serverUrl` property to the `optitrack.poseNet()` call in\n      `sketch.js`; *or*:\n   2. Run an [OptiTrack CSV -\u003e WebSocket\n      server](https://github.com/osteele/optitrack-ws-server).\n3. Enter `npm start`\n\nIf you added `serverUrl` property, the modified code should look like:\n\n```javascript\n  const poseNet = optitrack.poseNet(video, { p5, serverUrl: 'ws://myserver.example.com:8764' },\n    () =\u003e p5.select('#status').hide());\n```\n\nwhere `myserver.example.com` and `8764` are the hostname and port of a WebSocket\nserver.\n\nThis will open PoseNet in a browser window.\n\n## API\n\nThe code in `optitrack.js` provides an API that is very similar to the [ml5.js\nPoseNet](https://learn.ml5js.org/docs/#/reference/posenet) API. Code that uses\n`ml5.poseNet` can be trivially adapted to render (a projection of) OptiTrack\ndata instead, or more extensively modified to make use of 3D data.\n\n`const poseNet = optitrack.poseNet(?video, ?options, ?callback);`\n\n### Parameters\n\n* *video*: OPTIONAL. Optional HTMLVideoElement. If present, the x and y\n  coordinates from the 3D position are scaled to the dimensions of this element,\n  to create the 2D position. (This can any object that provides `width` and\n  `height` properties.)\n\n* *callback*: OPTIONAL. A function that is called when the WebSocket connection\n  is established.\n\n* *options*: OPTIONAL. An object that contains the following properties. `p5` is\n  the global `p5` variable. It is required when p5.js is used in [instance\n  mode](https://github.com/processing/p5.js/wiki/Global-and-instance-mode).\n\n  ```json\n  {\n      p5: p5,\n      frameRate: 1,\n      serverUrl: 'ws://localhost:8765'\n  }\n  ```\n\n### Methods\n\n`posenet.on('pose', callback)`\n\nAn event listener that returns the results when a pose is detected.\n\nThis is upwards-compatible with the ML5's [`posenet.on`\nmethod](https://learn.ml5js.org/docs/#/reference/posenet?id=on39pose39-).\n\nEach keypoint in the array includes both a `position: {x, y}` property (the same\nas PoseNet), but also a `pos: {x, y, z}` with the 3D OptiTrack data.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosteele%2Fp5pose-optitrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosteele%2Fp5pose-optitrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosteele%2Fp5pose-optitrack/lists"}