You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing some custom functions to react to links being clicked within the Shapespark animation. I have it working for menu links since they come through as mouse events. But when I click on graphics in the animation, they are coming in as "WALK" nodes. These are mostly images with click events. Is there a way to tag images with an alt text or get more info about the click event -- the walk node doesn't really have anything I can use for pushing to analytics, no meaningful text.
Thanks.
The text was updated successfully, but these errors were encountered:
Sorry for missing this issue, for some reason we didn't get notification about it. WALK.Node represents an object that is clicked. In case of click events, every node will have a mesh attached (there are parent nodes without meshes, but such nodes cannot be clicked). Mesh always has a material, and a material with a texture will have baseColorTexture property. So your click event could do:
function onClick(node) {
if (node.mesh.material.baseColorTexture) {
console.log('Clicked texture: ' + node.mesh.material.baseColorTexture.name);
}
}
I am writing some custom functions to react to links being clicked within the Shapespark animation. I have it working for menu links since they come through as mouse events. But when I click on graphics in the animation, they are coming in as "WALK" nodes. These are mostly images with click events. Is there a way to tag images with an alt text or get more info about the click event -- the walk node doesn't really have anything I can use for pushing to analytics, no meaningful text.
Thanks.
The text was updated successfully, but these errors were encountered: