Skip to content

Instantly share code, notes, and snippets.



Last active Oct 10, 2020
What would you like to do?
Detect which material was selected by the material picker
var viewer = WALK.getViewer();
viewer.onSceneReadyToDisplay(function() {
var setMaterialForMeshOriginal = viewer.setMaterialForMesh;
viewer.setMaterialForMesh = function(material, mesh) {
console.log('Material selected ' +;
setMaterialForMeshOriginal.apply(this, [material, mesh]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment