AFrame GIF Component
A gif controller for A-Frame VR. Requires aframe-gif-shader
.
Inspired by @gtk2k's awesome sample.
Method
Global method
play()
Play gif animation
entity
pause()
Pause gif animation
entity
Custom method
togglePlayback()
Toggle playback. if the gif is paused, play and pause if it's playing.
entitycomponentsgif
nextFrame()
Go to next frame. Useful if it's paused.
entitycomponentsgif
paused()
Returns if it is paused.
const paused = entitycomponentsgif // true or false
Usage
Browser Installation
Install and use by directly including the browser files:
My A-Frame Scene
NPM Installation
Install via NPM:
npm i -D aframe-gif-shader aframe-gif-component
Then register and use.