lassemt / SparkAR-Example_Programmatic-Layouts

Just a simple example on how to size and position something programmatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spark AR Example Programmatic Layouts

Example for how you can solve responsive layouts in spark using code. This project is the answer to a question asked in the Spark AR Community on Facebook.

In the code you will learn how to create these 3 layouts:

Squares aligned to the bottom with spacing

Squares aligned to the bottom with spacing

Rectangles that scale proportionally, that are aligned to the right and stretched out to fill the height of the screen

Rectangles that scale proportionally, that are aligned to the right and stretched out to fill the height of the screen

Rectangles that are aligned diagonally accross the screen.

Rectangles that are aligned diagonally accross the screen


The scripts also include some other secret juice.

About

Just a simple example on how to size and position something programmatically


Languages

Language:JavaScript 100.0%