[Laszlo-dev] Master sprite implementation
Raju Bitter
rajubitter at googlemail.com
Mon Feb 1 00:34:56 PST 2010
I did a bit of testing with the master sprite functionality in DHTML, that's great! I did a test with 4 images, here's the source code:
<canvas width="100%" height="800" bgcolor="black">
<!-- Take a few resources -->
<resource name="p1" src="Puffin1.png" />
<resource name="p2" src="Puffin2.png" />
<resource name="p3" src="Puffin3.png" />
<resource name="p4" src="Puffin4.png" />
<resource name="p5" src="Puffin5.png" />
<view x="20" y="20">
<simplelayout axis="x" spacing="50" />
<view resource="p1" />
<view resource="p2" />
<view resource="p3" />
<view resource="p4" />
<view resource="p5" />
</view>
</canvas>
The master sprite image is generated as imagesprite.sprite.png and contains all 5 PNG files, but the first image Puffin1.png is still downloaded as a separate file. Inspecting the HTML I can see that the view with resource p1 is still using the single Puffin1.png using an image tag, although that's part of the master sprite.
Another interesting thing is that the request is first started to download the master sprite, and then the single image is downloaded. Is that a feature?
But besides the technical questions, that's a great functionality which is going to speed up many large DHTML apps!
- Raju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20100201/9e6166ea/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MasterSprite-Firebug-HTML.png
Type: image/png
Size: 106522 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20100201/9e6166ea/MasterSprite-Firebug-HTML-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MasterSprite-Firebug-NetworkTraffic.png
Type: image/png
Size: 203861 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20100201/9e6166ea/MasterSprite-Firebug-NetworkTraffic-0001.png
More information about the Laszlo-dev
mailing list