Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated Textures Aren't Loading #2

Open
DevScyu opened this issue Jul 25, 2018 · 4 comments
Open

Animated Textures Aren't Loading #2

DevScyu opened this issue Jul 25, 2018 · 4 comments

Comments

@DevScyu
Copy link

DevScyu commented Jul 25, 2018

As the title says, when I try to load animated textures with this they sometimes won't load. They never seem to load the first time the page is loaded but when the canvas is refreshed they seem to have a chance of working after that, you can see a live example of this if needed.

@vberlier
Copy link
Owner

Looks like you're right! It's been a really long time since I touched any of this code, but I remember that the code for loading images was extremely sloppy. I think the issue was that I started to write these huge synchronous functions and when it came to loading the images, I couldn't just use an onload callback since I was doing everything synchronously. Using dataurls seemed to make the attributes of the image immediately available so I went with that, but it looks like it doesn't work for larger images in general (like animated textures).

Yeah I know this is horrible, I was reaaally new to everything web-related. I'm glad people find this project useful but newbie code has its limitations :/

I'm planning to do a full rewrite, to replace this mess with a proper library. I just didn't get to do it yet.

I'm leaving the issue open so people can see it if they run into the same problem.

@DevScyu
Copy link
Author

DevScyu commented Sep 26, 2018

I would really love to use this so I look forward to what you do!!

@vberlier
Copy link
Owner

@DevScyu Just letting you know, I finally started working on a complete rewrite. Not usable yet but it's going pretty well so far. I'm currently building a clean lower level library that will be able to create three.js geometry, materials and meshes from minecraft models 👉 https://github.com/vberlier/three-mcmodel.

@DevScyu
Copy link
Author

DevScyu commented Oct 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants