Samsung Internet Developers

Writings from the Samsung Internet Developer Relations Team. For more info see our disclaimer: https://hub.samsunginter.net/about-blog

Optimising A-Frame Assets for Faster Starts

3 min readSep 17, 2016

--

Image optimised by the Image optimisation service

Optimising Images for A-Frame Textures

Warning when image size is not a power of two.
Two Images, the top is how the image is used in the browser. The bottom is it represented in UV space where aspect ratio is discarded.

Automating this on the fly with ImageOptim Service

BEFORE:https://cdn.rawgit.com/AdaRoseEdwards/adaroseedwards.github.io/master/images/SAM_100_0122.jpg
6.44MB 7200x3600
AFTER:https://img.gs/bbdkhfbzkk/4096x2048,stretch/https://cdn.rawgit.com/AdaRoseEdwards/adaroseedwards.github.io/master/images/SAM_100_0122.jpg
0.77MB 4096x2048

API Details

https://img.gs/[api-key]/[options]/[url]
<a-assets>
<img id="sky" src="https://img.gs/bbdkhfbzkk/4096x2048,stretch/https://cdn.rawgit.com/AdaRoseEdwards/adaroseedwards.github.io/master/images/SAM_100_0122.jpg" crossorigin="anonymous" />
</a-assets>

Further Reading: Optimising Geometry Data

Thanks

--

--

Samsung Internet Developers
Samsung Internet Developers

Published in Samsung Internet Developers

Writings from the Samsung Internet Developer Relations Team. For more info see our disclaimer: https://hub.samsunginter.net/about-blog

Ada Rose Cannon
Ada Rose Cannon

Written by Ada Rose Cannon

Co-chair of the W3C Immersive Web Working Group, Developer Advocate for Samsung.

Responses (1)