Masked Foto as dynamic Elements in Animation possible?


(Rafael Schaer) #1

Hi there,

I would need some support, is this possible to have something
like having photos from users, put in a running animation?
https://www.evernote.com/l/APxlqPD0LyFGtKI-WtEFCL-f6e5CRg5rhtE

thank you very much for any help!

cheers

  • raf

(Jonathan Deutsch) #2

In general it is possible, but would require a little bit of code. You’d probably make the full animation first with some sort of dummy image where the faces would go. You’d then need in Javascript:

  1. A method of acquiring the image from the user, either via file upload or using the camera
  2. Replacing the image

Step two would basically mean:

  • Set a Unique Element ID on the element that is the dummy image for the face
  • Use the hypeDocument.setElementProperty() Hype API for background-image to replace the image