{"id":13735079,"url":"https://github.com/bwlewis/rthreejs","last_synced_at":"2025-05-16T15:06:38.500Z","repository":{"id":23462380,"uuid":"26826454","full_name":"bwlewis/rthreejs","owner":"bwlewis","description":"Three.js widgets for R and shiny","archived":false,"fork":false,"pushed_at":"2025-05-03T10:48:06.000Z","size":28153,"stargazers_count":304,"open_issues_count":37,"forks_count":59,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-05-03T11:32:36.277Z","etag":null,"topics":["data-visualization","graph-animation","igraph","r","threejs","webgl"],"latest_commit_sha":null,"homepage":"http://bwlewis.github.io/rthreejs","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwlewis.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-11-18T19:36:56.000Z","updated_at":"2025-05-03T10:48:09.000Z","dependencies_parsed_at":"2025-05-03T11:27:41.349Z","dependency_job_id":"2ef0c3df-188f-4339-9f68-2d9b36588137","html_url":"https://github.com/bwlewis/rthreejs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwlewis%2Frthreejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwlewis%2Frthreejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwlewis%2Frthreejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwlewis%2Frthreejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwlewis","download_url":"https://codeload.github.com/bwlewis/rthreejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553959,"owners_count":22090417,"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":["data-visualization","graph-animation","igraph","r","threejs","webgl"],"created_at":"2024-08-03T03:01:02.780Z","updated_at":"2025-05-16T15:06:38.479Z","avatar_url":"https://github.com/bwlewis.png","language":"JavaScript","readme":"# Three.js and R\n\nThree.js widgets for R and shiny. The package includes\n\n* graphjs: an interactive network visualization widget\n* scatterplot3js: a 3-d scatterplot widget similar to, but more limited than, the scatterplot3d function\n* globejs: a somewhat silly widget that plots data and images on a 3-d globe\n\nThe widgets are easy to use and render directly in RStudio, in R markdown, in\nShiny applications, and from command-line R via a web browser.  They produce\nhigh-quality interactive visualizations with just a few lines of R code.\n\nVisualizations optionally use accelerated WebGL graphics, falling back to\nnon-accelerated graphics for systems without WebGL when possible.\n\nSee https://threejs.org for details on three.js.\n\nSee https://bwlewis.github.io/rthreejs for R examples.\n\nThis project is based on the htmlwidgets package. See http://htmlwidgets.org\nfor details and links to many other visualization widgets for R.\n\n# Changes in version 0.3.4 (August, 2021)\n\nAdded a JavaScript 'program' function argument to run extra user-supplied\nJavaScript initialization code, see the graphjs help for examples.\n\n# New in version 0.3.0 (June, 2017)\n\nThe new 0.3.0 package version introduces major changes. The `scatterplot3js()`\nfunction generally works as before but with more capabilities.  The `graphjs()`\nfunction is very different with a new API more closely tied to the igraph\npackage.\n\nThe threejs package now depends on igraph.  If you're doing serious network\nanalysis, you're probably already using igraph (or you should be). Threejs now\nuses external graph layouts (either from igraph or elsewhere). This gives much\ngreater graph layout flexibility, something I was looking for, but also removes\nthe cute (but slow and crude) force-directed JavaScript animation previously\nused. To partially make up for that, several new graph animation and\ninteraction schemes are newly available.\n\nSee https://bwlewis.github.io/rthreejs/animation/animation.html\nand https://bwlewis.github.io/rthreejs/advanced/advanced.html for short tutorials on the\nnew graph animation capabilities.\n\nPerformance of `graphjs()` is generally much improved using extensive buffering\nand custom WebGL shaders where needed. See\nhttps://bwlewis.github.io/rthreejs/ego/index.html for an example.\n\n## Summary of changes\n\nThe `scatterplot3js()` function was substantially improved and updated.\n\n- The new `pch` option supports many point styles with size control.\n- Interactive rotation and zooming are greatly improved and panning is now supported: press and hold the right mouse button (or touch equivalent) and move the mouse to pan.\n- Mouse over labels are supported in WebGL renderings.\n- The `points3d()` interface has changed to support pipelining.\n- Lines are supported too, see `lines3d()`.\n- Support for crosstalk selection handles (see `demo(\"crosstalk\", package=\"threejs\")`).\n- Set the experimental `use.orbitcontrols=TRUE` option for more CPU-efficient (but less fluid) rendering (good for laptops), also applies to `graphjs()`.\n\nThe `graphjs()` function is completely new.\n\n- Greater variety of WebGL vertex rendering (\"pch\") options, including spheres\n  and much higher-performance options for large graphs.\n- Graph layout is now external; for instance use one of the many superb\n  igraph package graph layout options.\n- Graph animation is supported, see the examples.\n- Interactive (click-able) graph animation is supported, see `demo(package=\"threejs\")` for examples.\n- Limited brushing is available to highlight portions of the graph, see the `brush=TRUE` option.\n- Support for crosstalk selection handles.\n\n## Known issues\n\n- RStudio on Windows systems may not be able to render the WebGL graphics emitted\n  by threejs. RStudio users running on Windows systems may need to use the plot\n  \"pop out\" button to see visualizations in an external browser. We expect this\n  to be a temporary problem until the underlying graphics rendering system used\n  by RStudio is updated later in 2017.\n- The fallback Canvas rendering code has diverged too much from the baseline\n  WebGL code and no longer works. We have temporarily disabled Canvas\n  rendering with an error message. See https://github.com/bwlewis/rthreejs/issues/67\n  for details.\n- Crosstalk filter handles are used in a non-standard and experimental way to\n  control graph animation. Don't rely on this experimental feature.\n\n## Install\n\nUse the devtools package to install threejs directly from GitHub on any\nR platform (Mac, Windows, Linux, ...). You'll need the 'devtools' package.\n```r\nif(!require(\"devtools\")) install.packages(\"devtools\")\ndevtools::install_github(\"bwlewis/rthreejs\")\n```\n\n## Examples\n\nSee `?scatterplot3d` for more examples and detailed help.\n```r\nlibrary(threejs)\nz \u003c- seq(-10, 10, 0.1)\nx \u003c- cos(z)\ny \u003c- sin(z)\nscatterplot3js(x, y, z, color=rainbow(length(z)))\n```\n\nThe following example plots an undirected graph with 4039 vertices and 88234\nedges from the Stanford SNAP network\nrepository http://snap.stanford.edu/data/facebook_combined.txt.gz.\n```r\ndata(ego)\ngraphjs(ego, bg=\"black\")\n```\n\nThe next example illustrates the globe widget by plotting the relative\npopulation of some cities using data from the R maps package on a globe. It's\nbased on the JavaScript WebGL Globe Toolkit (https://github.com/dataarts) by\nthe Google Creative Lab Data Arts Team.\n```r\nrunApp(system.file(\"examples/globe\", package=\"threejs\"))\n```\n\nFor detailed help on the widgets and additional examples, see\n```r\n?scatterplot3js\n?globejs\n?graphjs\n```\n\n","funding_links":[],"categories":["HTML Widgets","Tools","JavaScript","Visualization"],"sub_categories":["Integrations","Scatterplot"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwlewis%2Frthreejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwlewis%2Frthreejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwlewis%2Frthreejs/lists"}