Jump to content

Tower of Babel 2.1, texture inlining added


JCPalmer
 Share

Recommended Posts

It was just last Friday that 2.0 was released.  With multiple projects in the Extensions repository, I decided to get this feature added before probably doing multiple commits to Morph for SIMD & not wanting the intermediate commits getting in the way.

 

Basically, the contents of the typescript or Javascript file can now contain all your texture files inside them.  You can still have textures as separate files, if you wish, but inside is now the default.  It is controlled using a new checkbox shown when performing the export.

post-8492-0-41506400-1430848938.png

The idea is that reducing calls to the http server is faster, especially in high latency situations, e.g. mobile.  The size increase after gzip is only 3%.  Did find an old study that showed inlining was actually 6X slower on mobile in 2013 though. http://www.mobify.com/blog/data-uris-are-slow-on-mobile/.  The reason shown looks like it is due to the wussy CPUs in phones by then.  That is probably much less of a 2015 concern and going forward.  Other issues brought out probably do not apply to inline textures like no caching.

 

For a CocoonJS or BabylonHx app, all the downloading occurs when the app is installed, so you might want to keep textures separate.  However, for the matching browser teaser / marketing page, inlining would load faster.  No problem, just export / build twice with the check set different ways.

 

Finally, you can take this really far.  Source code files can be combined together as much as you want.  Try gluing multiple .jpg or even .babylon files together, and see if that works. Finish it off with an uglify & you are ready to go.  Probably want to keep Babylon.js out though, since it can be downloaded from a CDN.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...