Skip to content

Instantly share code, notes, and snippets.

@wrr wrr/body-end.html
Created Jun 7, 2019

What would you like to do?
Detect which material was selected by the material picker
var viewer = WALK.getViewer();
viewer.onSceneReadyToDisplay(function() {
var setMaterialForNodeOriginal = viewer.setMaterialForNode;
viewer.setMaterialForNode = function(material, node) {
console.log('Material selected ' +;
setMaterialForNodeOriginal.apply(this, [material, node]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.