Hi @merri thanks a lot.
The mouse over effect can be found here: MouseOver effect - #17 by Mahesh
You can use the “script” extension from the viewer tab in the Shapespark editor and copy this snippet there. Just change the “NAME-OF-YOUR-MATERIAL” to the name of the material you want to highlight, save and upload.
const viewer = WALK.getViewer();
function handleHoverChanged(material, hoverActive) {
if (hoverActive) {
document.body.style.cursor = ‘pointer’;
} else {
document.body.style.cursor = ‘’;
}
}
viewer.onMaterialHoverChanged(‘NAME-OF-YOUR-MATERIAL’, handleHoverChanged);
viewer.onMaterialHoverChanged(‘NAME-OF-YOUR-MATERIAL-2’, handleHoverChanged);
function handleHoverChanged(material, hoverActive) {
if (hoverActive) {
document.body.style.cursor = ‘pointer’;
material.emissive = true;
material.emissionStrength = 2;
viewer.requestFrame();
} else {
document.body.style.cursor = ‘’;
material.emissive = false;
viewer.requestFrame();
}
}