Giter Club home page Giter Club logo

wix_optimized_slide_gallery's Introduction

Mobile Web Graphics Tutorial

To start:

  1. run npm install
  2. run npm start
  3. open in a browser: http://localhost:5005
  4. open in a mobile browser: http://[your-ip-address]:5005

The Task

  1. It needs to be fast
  2. It needs to be able to scale to a larger amount of images in terms of memory and performance
  3. It needs to work on mobile
  4. It needs to be responsive: the image height is fixed to all the images but cannot be a hardcoded value.
  5. The scroll bars need to represent the expected height of the page and move together with the user's scrolling

Tips on how to make it fast:

Layered Viewport Management

  • Only have a limited amount of DOM components at any given time, equivalent to the viewport + buffer
  • Have three layers behind each other: front layer with the full image, mid layer with thumbnail, and back with the prominent color. The back layers should be larger, as they'd be visible when scrolling

Direct Compositing

  • Use will-change: transform on "atomic" elements (rectangles and images)

Background Image Caching

  • Download images in a worker as a blob
  • Save them to indexeddb as base64
  • In the main page, try to access indexeddb and get the base64 image if it's there. if not, tell the worker to download it to cache

Fix the height of the body

  • Use translateY() to have at least one element that goes all the way down to the expected height of the body so that scrolling works as expected.

wix_optimized_slide_gallery's People

Contributors

noamr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.