Last Modified: 2023-12-19

Workflow

Overview

  1. put .png/.jpg into App/contentX/assets/images manually or use kwik-export plugin for Ps/XD to publish images to App folder

    • images without coordinates
    • images with coordinates from Ps, XD with kwik-export plugin
      • models/assets/images/*.json
  2. kwik-editor traverses the assets folder to output .json for models and .lua for scenes/pageX and components/pageX

    • kwik-generate-model
    • kwik-generate-index
    • kwik-scaffold-lua

    you can edit props or positions of images or attach a type of class such as animation, button …

    you can creat an event and a corresponding action of code such as playAnimation, hideLayer, playAudio …

    if you manually add a .lua file, you need to update scenes/pageX/index.lua too. You can use kwik-generate-index that traverses pageX folder of commands, components and scenes for synclonizing the lisf of .lua for pageX context defined in the index.lua.

1. assets

├── App
    ├── contentX
        ├── assets
            ├── audios
            │   ├── short
            │   ├── long
            │   └── sync
            ├── images
            │   └── pageX
            │       ├── bg.png
                    ├── folder
                    |      ├─  .png
                    |      └── .png
                    └── .png

1-1 images

Alternatively

1-2 audios

put audio files under assets/audios folder

.
├── assets
│   ├── audios
│   │   ├── short
│   │   │   └── ballsCollide.mp3
│   │   ├── long
│   │   │   ├── Gentle-Rain.mp3
│   │   │   └── Tranquility.mp3
│   │   └── sync
│   │       ├── en
│   │       │   ├── cat.mp3
│   │       │   ├── kwik.mp3
│   │       │   └── narration.mp3
│   │       ├── jp
│   │       │   ├── cat.mp3
│   │       │   ├── kwik.mp3
│   │       │   └── narration.mp3
│   │       ├── pageX_Text1.mp3
│   │       ├── pageX_Text1.txt
│   │       ├── page02_Text1.mp3
│   │       └── page02_Text1.txt