Created
April 3, 2020 02:11
-
-
Save prideout/c6356e0cbe2911f56e32bb032b9f498e to your computer and use it in GitHub Desktop.
getting-started-json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
// ... | |
//loadGlb("DamagedHelmet") | |
loadGltf("BusterDrone") | |
loadEnvironment("venetian_crossroads_2k") | |
} | |
private fun loadGltf(name: String) { | |
val buffer = readAsset("models/${name}.gltf") | |
modelViewer.loadModelGltf(buffer) { uri -> readAsset("models/$uri") } | |
modelViewer.transformToUnitCube() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment