Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Read and write .gltf and .glb files in R.

NotificationsYou must be signed in to change notification settings

dmurdoch/rgl2gltf

Repository files navigation

This R package contains functions to read, write and display.gltf and.glb files containing 3D models, following theofficial spec atkhronos.org. It also contains functions to convertrgl scenes andmesh3dobjects to and from glTF objects.

It is still in active development. Please add issues or pull requests ifsomething important to you is missing.

Apkgdown website is here:https://dmurdoch.github.io/rgl2gltf/dev/

To install from CRAN, run

install.packages("rgl2gltf")

To install the development version, run

remotes::install_github("dmurdoch/rgl2gltf")

Sample code:

library(rgl)library(rgl2gltf)gltf<- readGLB("https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/2CylinderEngine/glTF-Binary/2CylinderEngine.glb?raw=true")mesh<- as.mesh3d(gltf)plot3d(gltf)snapshot3d(webshot=FALSE,filename="man/figures/engine.png")

Copyright

Most of this package is written by Duncan Murdoch and licensed under GPL2.0.

Sample files ininst/glb andinst/localtests are unmodified copiesof files fromhttps://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0,and have details of copyright and licenses listed there. All havepermissive licenses, some requiring acknowledgment.

Files ininst/localtests are in the Github repository, but are notincluded in the package tarball.

Briefly,

  • 2CylinderEngine.glb was produced by Okino Computer Graphics.
  • AlphaBlendModeTest.glb,NormalTangentTest.glb andNormalTangentMirrorTest.glb were created by Ed Mackey and are ownedby Analytical Graphics, Inc., licensed under CC-BY 4.0https://creativecommons.org/licenses/by/4.0/.
  • AntiqueCamera.glb was produced by Maximilian Kamps and UX3D.
  • Avocado.glb was produced by Microsoft.
  • BarramundiFish.glb was produced by Microsoft.
  • BoxAnimated.glb andRiggedSimple.glb were produced by Cesium.
  • BrainStem.glb was created by Keith Hunter and is owned by SmithMicro Software, Inc. 
  • DamagedHelmet.glb was created by theblueturtle_.

Filessrc/mikktspace.c andsrc/mikktspace.h are written by Morten S.Mikkelsen and used under the permissive license included within them,with slight modifications for C99 compatibility.


[8]ページ先頭

©2009-2025 Movatter.jp