Skip to content

gif(...)

Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.

gif(opts? : SocialOptions, callback? : () => void) : void;

gif(opts? : string, callback? : () => void) : void;

Triggers the device to take a 90 frame gif. While this function returns instantly, the gif will not start being taken until the next frame is rendered to the screen.

ParameterTypeDescription
optsoptional, string or SocialOptionsIf a string it will be used as the message to pre-fill in any share dialog presented to the user, overriding any value set with the gifMessage(val) function. If a SocialOptions, message will override any value set with the gifMessage(val) function. Note that some share methods, such as Facebook, choose to ignore this message and present an empty dialog to the user.
callbackoptional, functionThe function will be called once the gif has finished being taken. Use to restore any UI that was hidden for the gif taking process.