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

Tuggummi's Texer Resources #13

Closed
wants to merge 3 commits into from
Closed

Tuggummi's Texer Resources #13

wants to merge 3 commits into from

Conversation

idleberg
Copy link
Contributor

This is the complete set of Tuggummi's resources for Texer. Not sure
whether you want to keep them in this file or put them into a separate file.
There are also other Texer packs available, although this is clearly
the most popularly used one.

I replaced your included images, as mine seemed to be slightly smaller.

This is the complete set of Tuggummi's resources for texer. Not sure
whether you want to keep them in here or put them into a seperate file.
There are also other Texer packs available, although this is clearly
the most popularly used one.

I replaced your included images, as mine seemed to be slightly smaller.
@azeem
Copy link
Owner

azeem commented Nov 30, 2013

We should keep them here in this file itself. What im thinking about though, is whether the Webvs.Resources is a good way to handle builtin resources at all, because it consumes a lot of memory unnecessarily.

  • Here, we are storing all the resources into a global object, which means that all the resources will be in memory, all the time. I just did a quick check on the profiler and it looks like Webvs.Resources takes up the most memory. Even when running presets that are'nt using any images.
  • If we try to get around by returning them lazily through a function call or something. It'll still be in memory as constants in the code.

so loading files via ajax seems like the better way.On the down side, this'd mean the image file would also have to be distributed, which isnt too much of problem, is it? what do you think?

@azeem
Copy link
Owner

azeem commented Nov 30, 2013

Didnt notice this before. I guess you have forgotten to include the src/Resources.js file. This pull contains only the build file.

@idleberg
Copy link
Contributor Author

idleberg commented Dec 1, 2013

I agree that it's not necessary to keep the resources in memory, especially since there are at least two more collection that should be included. I'm wondering why these take up so much space. What's the deal with all those slashes?

@azeem
Copy link
Owner

azeem commented Dec 1, 2013

Well, my guess is that those are the white pixel areas. / in ascii value is 63, which in binary is 111111 so sequences of these probably represent rgb(255,255,255). These png images must have low compression setting.

@idleberg
Copy link
Contributor Author

idleberg commented Dec 1, 2013

Found the problem. The original BMP image used indexed colors and that didn't convert so well into PNGs. Now I'm forcing the PNGs to be saved using a restricted algorithm and the Base16 results are way shorter.

@azeem azeem mentioned this pull request Dec 29, 2013
@azeem
Copy link
Owner

azeem commented Jan 9, 2014

In 1.2 i have written a uniform way of loading/embedding resource files. check this: #7 (comment)

Essentially, now, all builtin resource files will be put in /resources directory of the source root and entries for the files are added in Resource.js https://github.com/azeem/webvs/blob/1.2dev/src/Resources.js.

Clients will automatically download and cache resource files only on a need basis.

Can you please make a pull request against 1.2dev branch with these files in the above format? Also, please do let me know if you have any suggestions on this system of resource handling.

@azeem
Copy link
Owner

azeem commented Feb 11, 2018

Not sure how relevant this is right now. I'll work with you to add these resource files, but we may have to revisit resource loading now that we're packaging webvs with npm. Thanks for this PR but i'm closing it for now since it doesn't merge cleanly anyways.

@azeem azeem closed this Feb 11, 2018
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

Successfully merging this pull request may close these issues.

2 participants