Skip to content

Instantly share code, notes, and snippets.

@prideout
Created April 3, 2020 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prideout/9c0d3c15482121c07718823f7b20a0e9 to your computer and use it in GitHub Desktop.
Save prideout/9c0d3c15482121c07718823f7b20a0e9 to your computer and use it in GitHub Desktop.
getting-started-names
val asset = modelViewer.asset!!
val rm = modelViewer.engine.renderableManager
for (entity in asset.entities) {
val renderable = rm.getInstance(entity)
if (renderable == 0) {
continue
}
if (asset.getName(entity) == "Scheibe_Boden_0") {
rm.setLayerMask(renderable, 0xff, 0x00)
}
val material = rm.getMaterialInstanceAt(renderable, 0)
material.setParameter("emissiveFactor", 0f, 0f, 0f)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment