# Mask Component - Blank Canvas Tutorial

Please Note：This tutorial mainly explains **how to create interactive materials using the Mask Component to display target images through clicking, dragging, and other interactive methods.** It is recommended to use it together with the [demo](https://tinyurl.com/4j5t5z3u) and [feature introduction document ](/playable-tools-content-editor/content-editor-user-guide/component-and-quick-layout/mask-component.md) for a better understanding!

## <mark style="color:blue;">1. Basic Info</mark> <a href="#h5pts" id="h5pts"></a>

* \[Difficulty]: ⭐⭐
* \[Applicable Products]: Universal
* \[Interaction]: Drag and drop to the specified location
* \[Freedom]: Fixed process
* \[Core Assets]: Image
* \[Features]: Mask Shape、Masking Group、Drag event

## <mark style="color:blue;">2.Effect Preview</mark>

<table><thead><tr><th width="218.33333333333331">Best experience for playable on mobile devices</th><th width="255">Vertical screen</th><th>Horizontal screen</th></tr></thead><tbody><tr><td><img src="/files/V0yHpjk7mHnLPefsgRPH" alt="" data-size="original"></td><td><img src="/files/A5HoSw9qzGRV5eMy8JRj" alt="" data-size="original"></td><td><img src="/files/fNMDlubDYIck4aXoNqWv" alt="" data-size="original"></td></tr><tr><td>Scan to play</td><td><a href="https://tinyurl.com/4j5t5z3u">Click to play</a></td><td><a href="https://tinyurl.com/4j5t5z3u">Click to play</a></td></tr></tbody></table>

## <mark style="color:blue;">3. Gameplay Overview</mark>

**Before starting the production, we need to outline the gameplay logic for this case：**

* Upon entering the trial, display \[black and white background] and \[operation guide], guide the player to slide to color
* Player drags the rainbow bar
  * If not dragged to the specified position, the rainbow bar returns to its original position
  * If dragged to the specified position, the coloring is successful and the ending scene is redirected to
* In the ending scene, when the player presses the button, redirect him to app store.&#x20;

<div align="left"><figure><img src="/files/b2tbM5R6rGaPouiHwNsf" alt="" width="495"><figcaption></figcaption></figure></div>

## <mark style="color:blue;">4.Production Approach</mark>

**Core Concept:** Minimize the number of animations and events within each scene, maintain clear logic in scene segmentation, and keep the layer structure simple.

**Scene Segmentation:** Based on the gameplay overview from the previous section, we can divide this case into 2 scenes for production.

<table><thead><tr><th width="180">Scene Name</th><th width="271">Scene 1 - Core Gameplay</th><th>Scene 2 - End Page</th></tr></thead><tbody><tr><td><strong>Visual Rendering</strong></td><td><img src="/files/D3mjZ0X0RmWIE3cnDFkE" alt="" data-size="original"></td><td><img src="/files/BkSrmnvLcelWE7B1sdvi" alt="" data-size="original"></td></tr><tr><td><strong>Scene Description</strong></td><td>Player drags the rainbow bar to color the image.</td><td>Success feedback &#x26; Redirect button</td></tr><tr><td><strong>Core Assets</strong></td><td><p><strong>Static Images:</strong> </p><p><mark style="color:red;">Colored image (Masking Group)</mark></p><p><mark style="color:red;">Rainbow bar (Follow Element)</mark></p><p>Black and white background</p><p>Guiding finger</p><p><strong>Audio-visual packaging:</strong></p><p>Rainbow bar particle effect   (Follow Element)</p><p>Click sound effect</p></td><td><p><strong>Static Images:</strong> </p><p>Colored image</p><p>Redirect button</p><p><strong>Audio-visual packaging:</strong></p><p>Star particle effect</p><p>Success sound effect</p></td></tr><tr><td><strong>Core Animations</strong></td><td><p><strong>Guiding finger:</strong> Displacement Easing</p><p><strong>Guiding text:</strong> Flash</p></td><td><p><strong>Feedback text &#x26; Redirect button:</strong> PulseFront</p><p><strong>Background light:</strong> Spin Easing</p></td></tr><tr><td><strong>Core Events</strong></td><td><p><strong>Trigger Object:</strong> Mask Shape</p><p><strong>Trigger Event:</strong> Drag and drop to the specified location</p><p><strong>Response Event:</strong> Redirect to the next scene</p></td><td><p><strong>Trigger Object:</strong> Redirect button</p><p><strong>Trigger Event:</strong> Press</p><p><strong>Response Event:</strong> Redirect to app store</p></td></tr></tbody></table>

## <mark style="color:blue;">5.</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Production Guidelines**</mark> <a href="#qh8tn" id="qh8tn"></a>

\*The core content consists of **Step 2"Component Parameter Setting,"** and **Step 5"Event Setting."**

### **Step 1 - Scene Setup** <a href="#znmfx" id="znmfx"></a>

It is recommended to upload all assets into the <mark style="color:red;">"Project Assets"</mark> after creating the project for easier access and usage in the future.

#### **1. Global Scene**

1）Add BGM and Background Image in the "Global Settings" section.

2）Add permanent download button, logo and other product information under \[Global Scene], and adjust the position and size of each asset. Group and sort the assets reasonably.

<figure><img src="/files/CBEV0AcBIfHlHRLf6K7m" alt=""><figcaption></figcaption></figure>

#### **2. G**eneral **Scene**

1）In Scene 1, click on "Gameplay Template" and select the Mask Component from the "Component" to add it.

<div align="left"><figure><img src="/files/q8liXXya11gAEUAfyscz" alt="" width="399"><figcaption></figcaption></figure></div>

2）Add the guiding finger, guiding text, and click sound effect. Adjust the position and size of each asset.

<figure><img src="/files/x5sOIb1THynY8O5wHAVb" alt=""><figcaption></figcaption></figure>

3）In Scene 2, add corresponding feedback assets and adjust their positions and sizes (you can group all assets together for easier landscape adaptation).

4）Set the parameters of the feedback sound effect to "autoplay 1 time upon open."

<div align="left"><figure><img src="/files/GGHBi2cMYQlLfat2fDym" alt=""><figcaption></figcaption></figure></div>

5）Check Scene 2 as the "Ending Scene."

<figure><img src="/files/YLzESukYQPwlMh5K4oSQ" alt=""><figcaption></figcaption></figure>

### <mark style="color:red;">Step 2 - Component Parameter Setting</mark>

#### 1.Exterior

Select the Mask Component and adjust its size to the desired dimensions under the Exterior parameters.

<figure><img src="/files/Nfqllw0t4eqg01EQgxt5" alt=""><figcaption></figcaption></figure>

#### 2.Mask Settings&#x20;

<mark style="color:red;">**2.1 Masking Group**</mark>&#x20;

The "Masking Group" contains the content that will be displayed within the coverage area of the "Mask Shape."&#x20;

First, add the final image (colored image) that needs to be displayed into the "Masking Group."

<figure><img src="/files/95Mml1Wu8dUsK2sdfOUA" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**2.2 Custom Groups**</mark>

1）Add mask custom group 1 (named "background\_image").  Add the initial image (black-and-white image) to the group and adjust its layer order to the lowest.

<figure><img src="/files/bZyuB32iuP9oNqbeYMS4" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/X4Ik9BUDCGLyQZDHg14E" alt=""><figcaption></figcaption></figure>

2）Add mask custom group 2 (named "outer\_frame").  Add the frame image to the group and adjust its layer order to the highest (decorative image that should always stay on top).

<figure><img src="/files/EmqBBsVk0ZkuzArxDwAN" alt=""><figcaption></figcaption></figure>

<mark style="color:red;">**2.3 Mask Shape**</mark>

1）In this case, we choose a rectangle as the Mask Shape.

2）Click on "Rectangle" to open the parameter window and adjust the size of the Mask Shape to cover the final displayed image.

3）Move the Mask Shape to the right side (without overlapping the Masking Group).

<figure><img src="/files/DstXEaa7Xz3Gvf3VDDAN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/uMj7TsmZLQ0SuG6k56Am" alt=""><figcaption><p>Clicking on "Preview Mask Effect" allows you to view the actual effect.</p></figcaption></figure>

<mark style="color:red;">**2.4 Follow Element**</mark>

Under "Follow Element," add the rainbow bar and rainbow particles, and adjust their positions and sizes accordingly.

<figure><img src="/files/QWEGo72i7aBkuJV6ef4C" alt=""><figcaption></figcaption></figure>

### Step 3 - Landscape & Portrait Orientation Adaptation

After completing the layout for portrait orientation, we need to adjust the "layout for landscape orientation" and the "screen adaptation for both landscape and portrait orientations."

#### 1. Adjust the layout for landscape orientation

1）In Scene 1, switch to landscape mode. Select all the top-level layers, including the Mask Component, and use the "Reuse vertical screen position configuration" feature to automatically arrange them for landscape mode.&#x20;

<figure><img src="/files/OnUvD7eqDqGvWd8CtBd9" alt=""><figcaption></figcaption></figure>

2）Then, individually adjust the position and scale of each layer to display the complete core gameplay-related content.&#x20;

<figure><img src="/files/lq1UuCW4CPvp3jxJ1DwV" alt=""><figcaption></figcaption></figure>

3）Similarly, repeat the process for Scene 2 and the Global Scene to complete the layout for landscape mode.

<figure><img src="/files/6fOGmi2beiSXhYXEScEV" alt=""><figcaption></figcaption></figure>

#### 2.  Adjust the Screen adaptation

In this case, we want the persistent information group in portrait mode to always be at the top of the screen for each device model. Therefore, we adjust its "Screen adaptation" to "Top-Fit" (other layers remain centered without adjustment).

<figure><img src="/files/TTJVbmcmzULVBtA2P8QW" alt=""><figcaption></figcaption></figure>

### Step 4 - Animation Setting

In this case, the animations and particle effects used are as follows. Let's go through them one by one:

Scene 1: Guiding finger displacement animation、Guiding text blinking animation

Scene 2: Feedback text & Redirect button scaling animation、Background light rotation animation、Star particles

#### 1. Guiding finger：Displacement Easing

Select the hand image \[gf\_hand], Add Animation - Universal - Displacement Easing, as a looping guiding animation. Set the parameters as follows:

<figure><img src="/files/sg5R34kWgtm0jpCEaUoN" alt=""><figcaption></figcaption></figure>

#### 2.Guiding text：Displacement Easing

Select the guiding text \[text\_guide], Add Animation - Emphasize - Flash, as a looping guiding animation. Set the parameters as follows:

<figure><img src="/files/J0OtXACBkZTgX66kxOZs" alt=""><figcaption></figcaption></figure>

#### 3.Redirect button & Feedback text:PulseFront

1）Select the redirect button group \[btn\_end], Add Animation - Emphasize - PulseFront, as a looping guiding animation. Set the parameters as follows:

<figure><img src="/files/9Vtzq0rYgLlwXzjYMY0J" alt=""><figcaption></figcaption></figure>

2）Duplicate the animation to the feedback text \[text\_feedback], adjust the parameters slightly, and use it as a looping display animation. Set the parameters as follows:

<figure><img src="/files/wVNhtVjJ4zpkT0BVxHEq" alt=""><figcaption></figcaption></figure>

#### 4.Background light：Spin Easing

Select the background light image \[light], Add Animation - Universal - Spin Easing, as an additional effect animation. Set the parameters as follows:

<div align="left"><figure><img src="/files/8JhNUvCk3SKlkzzDMY9p" alt=""><figcaption></figcaption></figure></div>

#### 5.Particle Effects

1）Open the "Asset Library"- "Particle", choose suitable particle effects (such as star particles) to enhance the visual effect of the scene.

2）Adjust the position of the particles to suitable locations (remember to adjust for both portrait and landscape modes).

<figure><img src="/files/KjgHGVPzoj5InTuUKSIO" alt=""><figcaption></figcaption></figure>

### <mark style="color:red;">Step 5 -</mark> <mark style="color:red;"></mark> <mark style="color:red;"></mark><mark style="color:red;">**Event**</mark> <mark style="color:red;"></mark><mark style="color:red;">Setting</mark> <a href="#lnpxj" id="lnpxj"></a>

To complete the setup of all animations, we need to configure the logic of the gameplay using "events."

The contents related to events and settings in this case include: hiding the guiding interaction when the Mask Shape is pressed, redirecting to the end scene after dragging the Mask Shape to a specific position, and redirecting to app store after pressing the redirect button.

Next, we will explain each step in sequence.

#### <mark style="color:red;">1. Layer: Mask Component</mark>

1）Select the \[Rectangle]. **Add Event - Press**. Add response events:

* Set Tracking Event, select tracking ID 1, and edit the tracking name as "Player First Press."
* Hide the guiding interaction
* Play the click sound effect once

<div align="left"><figure><img src="/files/0ZmCojJx3VhUM4RItMqL" alt=""><figcaption></figcaption></figure></div>

2）**Add Event -Drag and drop to the specified location.**  Edit the \[Specified Area] and \[Custom Draggable Range], selecting the drag direction as horizontal.

<div align="left"><figure><img src="/files/Nzn7d7yKOaOioZAcvLXT" alt=""><figcaption></figcaption></figure></div>

&#x20;*(If the draggable range is set to "Full Screen", there might be a possibility of dragging too far, revealing the black-and-white background image.)*&#x20;

<div align="left"><figure><img src="/files/8omKBVbYqRrbIBaJINbA" alt=""><figcaption></figcaption></figure></div>

3） Add response events:

* Set Tracking Event, select tracking ID 2, and edit the tracking name as "Successfully completed coloring."
* Redirect to the next scene

<div align="left"><figure><img src="/files/JuwTouHoSZJBCCB9onJb" alt=""><figcaption></figcaption></figure></div>

#### 2. Layer: Redirect button group

Select the redirect button group \[btn\_end].  **Add Event - Press**.  Add response events:

* Set Tracking Event, select tracking ID 3, and edit the tracking name as "Ending Page Trigger redirection."
* Redirect to app store.

<div align="left"><figure><img src="/files/SDddFVAYDrEc5EdaLq0x" alt=""><figcaption></figcaption></figure></div>

#### 3. Layer: Persistent download button group

Select the persistent download button group \[group\_ctat] .  **Add Event - Press**.  Add response event: Redirect to app store.

<div align="left"><figure><img src="/files/Oqlrs6tRYxmYfu2pPqZN" alt=""><figcaption></figcaption></figure></div>

These are all the events used in this case. With the completion of all event settings, our material is completed.

### Step 6 - Overall Preview <a href="#q96z9" id="q96z9"></a>

1）It is advisable to preview your work promptly after completing each step in the creation process to check if the settings are correct.

2）Once everything is completed, it is recommended to perform an overall preview on different devices, languages, and orientations to ensure everything is working correctly.

<figure><img src="/files/dk2oR6NZu1hRzPwJkFiR" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">6.Assets Provision</mark>

At the end of the tutorial, we have **provided all the assets used in this case** for you. Click on the compressed file to download it.&#x20;

You can use these assets to follow the tutorial and try to make it, so that you can start using the Content Editor and Mask Component to make such materials as soon as possible.

{% file src="/files/8vOFB6vSzbjm9HFNxzjo" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.playturbo.com/playturbo-case-study/playable-content-editor/painting-gameplay-cases/mask-component-blank-canvas-tutorial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
