Back to the Shapespark home page

Change color image on mouse hover

hi im trying all mouse hover effect i think

i mastered opacity and emission but now i need other thing

change color channel or image channel

image

is there a way to call a file here and change my albedo ( diffuse ) color or jpg/png
on mouse hover

thanks

To change the material’s solid base color use the setRGB method on the baseColor object:

material.baseColor.setRGB(r, g, b)

This method accepts colors in the linear colorspace from [0;1] range.

Changing the texture is described at: https://github.com/shapespark/shapespark-viewer-api#replace-textures-using-images-or-videos-from-external-source

1 Like

and ty are my savior those last days

1 Like