mayognaise / aframe-gif-shader

A shader to display GIF for A-Frame VR.
https://mayognaise.github.io/aframe-gif-shader/basic
MIT License
107 stars 44 forks source link

GIF Shader not working on A-frame 0.9.0 #9

Closed iburguera closed 5 years ago

iburguera commented 5 years ago

GIF shader does not work on versions above 0.2.0.

<!DOCTYPE html>
<html>
<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.9.0/aframe.min.js"></script>
  <script src="https://rawgit.com/mayognaise/aframe-gif-shader/master/dist/aframe-gif-shader.min.js"></script>
  <script src="https://rawgit.com/mayognaise/aframe-gif-component/master/dist/aframe-gif-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity geometry="primitive:box" material="shader:gif;src:url(https://media0.giphy.com/media/xT9IgsOaEG15pWz17y/giphy.gif);" gif=""></a-entity>
  </a-scene>
</body>
</html>

Warning display in the console: THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().

mayoyml commented 5 years ago

@iburguera thank you for the information. I'd like to make sure, but what's the 0.2.0? Is it 0.9.0?

iburguera commented 5 years ago

@mayoymi Hi! I mean 0.2.0 version of A-frame right. In the example code you provide, there is a link to A-frame version 0.2.0 which is working properly.

 <script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script>

The issue is when I use the version 0.9.0 of A-frame that GIF animations are not appearing. I'm working on a project that uses that version and I need to add GIF animations to it.

Here you can find a example i made in codepen for testing purposes:

If you change A-Frame version from 0.2.0 -> 0.9.0 GIF animations are not working.

Maybe changing this warning should fix it?

Warning display in the console: THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().

mayoyml commented 5 years ago

@iburguera ah got it. haha, I haven't been updated for a while... I will fix it this weekend. I need to check all PR & issues too!

iburguera commented 5 years ago

Thank you very much @mayoyml really appreciate it.

mayognaise commented 5 years ago

@iburguera just let me know ill push it tonight 🙏

mayognaise commented 5 years ago

@iburguera 0.9.0 has published! please see the link here: https://www.npmjs.com/package/aframe-gif-shader

iburguera commented 5 years ago

Works like a charm, you are awesome. Thank you very much!

devadhirath commented 5 years ago

Still not working i use same clone code