Image Project object

type "image".
Type of project.

height Integer. Minimum is 10, Maximum is 1920.
Height in pixels.

width Integer. Minimum is 10, Maximum is 1920.
Width in pixels.

tracks Array of Track objects. At least 1 Track should be included.
The order matters. Tracks at the start of the array will appear above tracks at the end.

Track object

element Element object.
Object describing the HTML element of this track.

keyframes Array with exactly 1 Keyframe object.
The array with the Keyframe object describes the style of the track.

Element object

type "p" or "img" or "iframe" or "div".
String representing the HTML element of this track.

text String. Required only when type is "p".
The text to show on the "p" element.

fontName String. Required only when type is "p" and fontUrl is present.
The external font name to be used in the fontFamily CSS property for example.

fontUrl String. Required only when type is "p" and fontName is present.
The publicly available URL of a font file. The font name of the file must much the fontName property.

💡

By default Noto fonts are included.

💡

You can get these values from Google fonts opening the URL of the font in you browser, for example for "Permanent Marker":

  1. Open https://fonts.googleapis.com/css2?family=Permanent+Marker.
  2. fontNameis "Permanent Marker"
  3. fontUrl is "https://fonts.gstatic.com/s/permanentmarker/v16/F...lg.woff2"

src String. Required only when type is "img" or "iframe".
The publicly available URL of the image or webpage. For iframes the website must be allowed to be embedded in third party domains.

Keyframe object

elementStyle Object where the keys are CSS properties in javascript form and the values are strings. The properties apply to the element.

containerStyle Object where the keys are CSS properties in javascript form and the values are strings.
The properties apply to the container div that each element has.

Example:

{
"backgroundColor": "red",
"marginRight": "var(--my-linear-var)"
}
💡

Note how the property values don't end with ";".

💡

When several tracks need to appear at the same time on the screen with a common layout, it can be useful to use the same CSS grid properties on the containerStyle of the tracks, and different gridArea values on the elementStyle.