[TOC]
## 解析判斷題
本文解析判斷題的導出結果。
## 判斷題模板效果圖

## 最少資源
最少資源xml文件樣本數據:
```
<resources>
<image name="c53889a7bd026f57e8ba0c0e50a8b1e8.png"/>
<sound name="257435d8012888294df5ff9e1182da7a.mp3"/>
<image name="f02167c4172851e61aed2210f72ef8f2.png"/>
<image name="8a3efcf9b1efc0ec64af11ce0b99d747.png"/>
<image name="dccbac4a8370c41ea9b6947e8464bbcc.png"/>
<image name="be7d007c1a41d31f164a8a6cdb37bce7.png"/>
<image name="531fb778d91df08c0aa9a96e7a8d3bee.png"/>
<image name="f1aa52340d1366ca2fcdbae2687b83d2.png"/>
<image name="8dfe97168373674d02bc074b7dceac75.png"/>
<sound name="b445ae0566677dd418499618e9fa3e96.mp3"/>
<sound name="4664acbc34a7c89e64656e8e0dc3869f.mp3"/>
</resources>
```
最少資源說明:
8個圖片,3個音頻,4個文本
圖片分別是:背景圖1,左側背景圖1,右側背景圖1,選項背景圖1-2個,選項答對答錯圖2個,2個音頻播放圖
音頻分別是:答1音效,答2音效,音頻播放圖
4個文本:右側文本,選項1文本,選項2文本,note文本
## 模板配置信息
同樣也是在xml文件中的。找到對應的page,在scene父級目錄下。代碼如下:
```
<scenes>
<page background-color="#ffffff" background-image="c53889a7bd026f57e8ba0c0e50a8b1e8.png" with="100%" height="100%" type="choice" correct="b" subject-name="judgment-1">
<right-audio src="4664acbc34a7c89e64656e8e0dc3869f.mp3"/>
<wrong-audio src="b445ae0566677dd418499618e9fa3e96.mp3"/>
<image src="dccbac4a8370c41ea9b6947e8464bbcc.png" width="1092" height="1092" x="650" y="800"/>
<image src="be7d007c1a41d31f164a8a6cdb37bce7.png" width="1092" height="1092" x="1850" y="800"/>
<label text-html="Alice like warm days." font-size="50" color="#0" width="700" height="50" x="1800" y="520"/>
<audio src="257435d8012888294df5ff9e1182da7a.mp3" width="200" height="200" x="2360" y="140" id="hgb1tn3awxi">
<normal>
<image src="f02167c4172851e61aed2210f72ef8f2.png" width="200" height="200" x="100" y="100"/>
</normal>
<active visible="false">
<image src="8a3efcf9b1efc0ec64af11ce0b99d747.png" width="200" height="200" x="100" y="100"/>
</active>
</audio>
<choice key="a">
<normal>
<image src="531fb778d91df08c0aa9a96e7a8d3bee.png" width="332" height="188" x="1600" y="930"/>
</normal>
<active visible="false">
<image src="f1aa52340d1366ca2fcdbae2687b83d2.png" width="332" height="188" x="1600" y="930"/>
</active>
<label text-html="True" font-size="80" color="#ffffff" width="300" height="80" x="1600" y="930"/>
</choice>
<choice key="b">
<normal>
<image src="531fb778d91df08c0aa9a96e7a8d3bee.png" width="332" height="188" x="2000" y="930"/>
</normal>
<active visible="false">
<image src="8dfe97168373674d02bc074b7dceac75.png" width="332" height="188" x="2000" y="930"/>
</active>
<label text-html="False" font-size="80" color="#ffffff" width="300" height="80" x="2000" y="930"/>
</choice>
</page>
</scenes>
```
## 模板配置具體說明
### 基本頁面信息摘要表格
```
<page background-color="#ffffff" background-image="c53889a7bd026f57e8ba0c0e50a8b1e8.png"
with="100%" height="100%" type="choice" correct="b"
subject-name="judgment-1">
```
| 基本頁面屬性 | 字段值 |
| --- | --- |
| background-color | 背景顏色 ,默認白色 |
| background-image | 背景圖片,一搬會更換 |
| width | 寬,默認100% |
| height | 高,默認100% |
|type | choice,選擇題 |
| correct | string,配置的正確項的id |
|subject-name | 分類名稱,判斷題第一種 |
其中,對整個交互有影響的是type,choice,以及subject-name的子類型,而correct的部分會決定交互中的判斷原則。
### 音頻文件對應的配置信息字段
| 基本屬性 | 字段值 |
| --- | --- |
| right-audio | 正確音頻,需要文件名稱地址 |
| wrong-audio | 錯誤音頻,需要文件名稱地址 |
| audio | 播放音效,對應關聯未播放和播放的兩個狀態啊需要的圖片和坐標,提供給scene使用 |
其中audio的配置稍微復雜,需要另外兩張圖(分別為未播放和播放中的圖):雖然配置了相應的坐標,寬高和圖替換,但目前的交互中不允許修改,屬于固定值。
```
<audio src="257435d8a.mp3" width="200" height="200" x="2360" y="140" id="hgb1tn3awxi">
<normal>
<image src="f02167c417.png" width="200" height="200" x="100" y="100"/>
</normal>
<active visible="false">
<image src="8a37.png" width="200" height="200" x="100" y="100"/>
</active>
</audio>
```
### 圖片信息
單獨標記為圖片的只有兩個,格式如下:分別對應于,左側背景,右側背景,同樣記錄位置信息給白板場景使用。
```
<image src="dccbac4a8370c41ea9b6947e8464bbcc.png" width="1092" height="1092" x="650" y="800"/>
```
### 題目信息
右側題目信息,主要是記錄文本內容,坐標和顏色、文字大小都是固定的
```
<label text-html="Alice like warm days." font-size="50" color="#0" width="700" height="50" x="1800" y="520"/>
```
### 選項信息
兩個選項,格式一樣,基本信息,key,常規狀態下的背景圖,激活狀態背景圖,選項的文本信息。默認情況下只有一個選項原先是選中狀態的。
```
<choice key="a">
<normal>
<image src="531fb778d91df08c0aa9a96e7a8d3bee.png" width="332" height="188" x="1600" y="930"/>
</normal>
<active visible="false">
<image src="f1aa52340d1366ca2fcdbae2687b83d2.png" width="332" height="188" x="1600" y="930"/>
</active>
<label text-html="True" font-size="80" color="#ffffff" width="300" height="80" x="1600" y="930"/>
</choice>
```
## actions
空
- 相關資源鏈接
- 米樂星球小程序內調研
- 項目結構說明
- 交互課件說明
- server項目說明
- 項目說明
- 項目啟動
- app.js做的事情
- 獲取互動課件的地址
- 分析互動課件地址的參數
- policy目錄--lesson.js
- 解析ppt--api/lesson.js
- 信令中的key:template
- 信令中的key:media
- kk-talkee-engine.js
- Message
- 課件模板頁的識別過程
- 解析課件模板的源文件
- 場景與模板的對應關系
- 所有場景的基類
- choiceScence為例
- 注意事項
- ws
- online項目的說明
- online消息
- 課件編輯項目
- 資源鏈接
- 基本項目信息
- electron項目結構分析
- ipc
- 模板題組
- 普通題組
- 游戲題組
- 課件導出內容分析
- 課件模板分類明細
- 圖片題
- 視頻題
- 音頻題
- 選擇題
- 判斷題
- 轉盤
- 篩子
- 圖層拖拽
- 動畫題
- 翻拍題
- 語音題
- 201908變更
- 課件制作流程分析
- 菜單配置
- 入口操作
- 定義模板布局與初始化
- 選擇素材
- 導出過程
- egret
- interface
- ad選擇器模板
- ab選擇器模板
- 圖層拖拽模板
- 判斷題模板
- xml
- 轉盤
- events
- components
- 父類組件
- 基本組件
- 判斷題組件
- 龍骨動畫調研
- 基本了解
- 產品原型
- 白板Client項目
- 消息類型
- 白板項目分析
- 入口