Commit fe697c57 authored by linzhiguo's avatar linzhiguo

+ 飞进飞出

parent ce304201
export class WL02{
title : string;
audio_url : string;
time:string;
sitems : Array<SubItem> = [];
}
export class SubItem{
audio_url : string;
correct: string;
incorrect: string;
}
@import '../style/common_mixin.css';
.model-content {
width: 100%;
height: 100%;
}
.radioPaire {
float: left;
margin: 3px;
border-style: dashed;
border-color: #000;
border-width: 1px;
}
.border {
border-radius: 20px;
border-style: dashed;
padding: 20px;
margin: 20px;
/*width: 500px; */
/*//border-radius: 20px;*/
/*//border-width: 2px;*/
/*//border-color: #000000;*/
}
.border-lite {
border: 2px dashed #ddd;
border-radius: 0.5rem;
padding: 10px;
margin: 10px;
}
<div class="model-content">
<div style="padding: 10px;">
<div style="width: 300px;" align='center'>
<span>图1: </span>
<app-upload-image-with-preview
[picUrl]="item.pic_url"
(imageUploaded)="onImageUploadSuccess($event, 'pic_url')">
</app-upload-image-with-preview>
<nz-divider nzText="主题" nzOrientation="left"></nz-divider>
<div nz-row style="width: 800;">
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1;margin-left: 10px;">
标题
</div>
<div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="item.title" (blur)="saveItem()" style="width: 160px;"/>
</div>
</div>
<div style="width: 300px; margin-top: 5px;" align='center'>
<span>图2: </span>
<app-upload-image-with-preview
[picUrl]="item.pic_url_2"
(imageUploaded)="onImageUploadSuccess($event, 'pic_url_2')">
</app-upload-image-with-preview>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1;margin-left: 10px;">
音频
</div>
<div style="flex:5">
<app-audio-recorder [audioUrl]="item.audio_url" (audioUploaded)="onAudioUploadSuccess($event, item, 'audio_url')" ></app-audio-recorder>
</div>
</div>
<div style="width: 300px; margin-top: 15px;">
<span>文本: </span>
<input type="text" nz-input [(ngModel)]="item.text" (blur)="save()">
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1; margin-left: 10px;">
每道题限时(整数)
</div>
<div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="item.time" (blur)="saveItem()" style="width: 160px;"/> s
</div>
</div>
</div>
<nz-divider nzText="题目列表(最多16道题)" nzOrientation="left"></nz-divider>
<div class="card-config">
<div *ngFor="let data of item.sitems; let i = index" class="card-item" style="padding: 0.5vw;" >
<div class="card-item-content border">
<div class="card-item-content">
<div class="title" >
题目-<strong>{{ i + 1 }}</strong>
</div>
<div style="text-align: right; padding-right: 20px;">
<button nz-button nzType="danger" (click)="delSubItem(i)" >
<span>删除此题</span>
</button>
</div>
<div class="section" >
<div class="section-content">
<div style="flex-wrap:wrap; width: 800px;display: flex;" >
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
题干音频
</div>
<div style="flex:5">
<app-audio-recorder [audioUrl]="data.audio_url" (audioUploaded)="onAudioUploadSuccess($event, data, 'audio_url')" ></app-audio-recorder>
</div>
</div>
<div style="margin-top: 5px">
<span>音频: </span>
<app-audio-recorder
[audioUrl]="item.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url')"
></app-audio-recorder>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
正确答案
</div>
<div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="data.correct" (blur)="saveItem()"/>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
错误答案
</div>
<div style="flex:5">
<input type="text" nz-input placeholder="" [(ngModel)]="data.incorrect" (blur)="saveItem()"/>
</div>
</div>
</div>
<div style="flex:20">
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="item.sitems.length < 16">
<div class="card-item" style="padding: 0.5vw;" >
<button nz-button nzType="primary" class="add-btn" (click)="addSubItem()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
新建题目
</button>
</div>
</div>
</div>
@import "../style/common_mixin";
.model-content {
.card-config {
width: 100%;
height: 100%;
margin-left: 10px;
display: flex;
flex-wrap: wrap;
.card-item{
flex:1;
.border {
border-radius: 20px;
border-style: dashed;
padding:20px;
width: 360px;
}
.card-item-content{
.title {
font-size: 24px;
width: 100%;
text-align: center;
}
.section{
border-top: 1px solid ;
padding: 10px 0;
.section-title{
font-size: 24px;
width: 100%;
}
.section-content{
display: flex;
margin: 5px 0 10px 0;
}
}
.pic-sound-box {
width: 50%;
display: flex;
flex-direction: column;
}
.add-btn-box {
display: flex;
align-items: center;
justify-content: center;
height: 20vw;
padding: 10px;
padding-top: 5vw;
}
}
}
}
}
import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { JsonPipe } from '@angular/common';
import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef} from '@angular/core';
import { WL02, SubItem } from './WL02';
import { JsonPipe } from '@angular/common';
@Component({
selector: 'app-form',
templateUrl: './form.component.html',
styleUrls: ['./form.component.css']
styleUrls: ['./form.component.scss']
})
export class FormComponent implements OnInit, OnChanges, OnDestroy {
// 储存数据用
saveKey = "test_001";
saveKey = "WL02";
// 储存对象
item;
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
}
createShell() {
this.item.wordList.push({
word: '',
audio: '',
backWord: '',
backWordAudio: '',
});
this.save();
}
@Output()
update = new EventEmitter();
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
removeShell(idx) {
this.item.wordList.splice(idx, 1);
this.save();
}
ngOnInit() {
this.item = {};
//this.item = new Course();
this.item = new WL02();
this.item.time = 10;
this.item.sitems = new Array<SubItem>();
// 获取存储的数据
(<any>window).courseware.getData((data) => {
if (data) {
this.item = data;
}
//console.log(data);
this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}, this.saveKey);
//console.log(this.item);
}
ngOnChanges() {
}
ngOnDestroy() {
}
init() {
init() {
if(!this.item){
this.item = new WL02();
this.item.time = 10;
this.item.sitems = new Array<SubItem>();
}
}
/**
* 储存图片数据
* @param e
*/
onImageUploadSuccess(e, key) {
this.item[key] = e.url;
this.save();
initData() {
}
/**
* 储存音频数据
* @param e
*/
onAudioUploadSuccess(e, key) {
this.item[key] = e.url;
onImageUploadSuccess(e, item, key) {
item[key] = e.url;
this.save();
}
onWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].audio = e.url;
onAudioUploadSuccess(e, item, key) {
item[key] = e.url;
this.save();
}
onBackWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].backWordAudio = e.url;
saveItem() {
this.save();
}
/**
* 储存数据
*/
save() {
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh();
console.log('this.item = ' + JSON.stringify(this.item));
}
/**
* 刷新 渲染页面
*/
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
}
\ No newline at end of file
addSubItem(){
let sitem = new SubItem();
if (!this.item.sitems)
this.item.sitems = new Array<SubItem>();
this.item.sitems.push(sitem);
this.save();
}
delSubItem(index){
if (index !== -1){
this.item.sitems.splice(index, 1);;
this.save();
}
}
}
This diff is collapsed.
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "69844312-80d0-4de7-9098-b587a41dce64",
"subMetas": {}
}
\ No newline at end of file
{"width":512,"SubTexture":[{"width":210,"y":1,"height":198,"name":"WL01-flower(1)/矢量智能对象_17","x":1},{"width":79,"y":299,"height":74,"name":"WL01-flower(1)/矢量智能对象_16","x":248},{"width":47,"y":201,"height":44,"name":"WL01-flower(1)/矢量智能对象_15","x":157},{"width":157,"y":1,"height":147,"name":"WL01-flower(1)/矢量智能对象_14","x":213},{"width":58,"y":385,"height":54,"name":"WL01-flower(1)/矢量智能对象_13","x":144},{"width":120,"y":124,"height":113,"name":"WL01-flower(1)/矢量智能对象_12","x":372},{"width":157,"y":150,"height":147,"name":"WL01-flower(1)/矢量智能对象_11","x":213},{"width":89,"y":299,"height":84,"name":"WL01-flower(1)/矢量智能对象_10","x":157},{"width":154,"y":201,"height":145,"name":"WL01-flower(1)/矢量智能对象_9","x":1},{"width":128,"y":1,"height":121,"name":"WL01-flower(1)/矢量智能对象_8","x":372},{"width":60,"y":348,"height":56,"name":"WL01-flower(1)/矢量智能对象_7","x":82},{"width":47,"y":406,"height":44,"name":"WL01-flower(1)/矢量智能对象_6","x":82},{"width":79,"y":348,"height":74,"name":"WL01-flower(1)/矢量智能对象_5","x":1},{"width":47,"y":247,"height":44,"name":"WL01-flower(1)/矢量智能对象_4","x":157},{"width":45,"y":424,"height":42,"name":"WL01-flower(1)/矢量智能对象_3","x":1},{"width":45,"y":342,"height":42,"name":"WL01-flower(1)/矢量智能对象_2","x":389},{"width":58,"y":342,"height":54,"name":"WL01-flower(1)/矢量智能对象_1","x":329},{"width":107,"y":239,"height":101,"name":"WL01-flower(1)/矢量智能对象_0","x":372},{"width":58,"y":375,"height":54,"name":"WL01-flower(1)/矢量智能对象","x":248}],"height":512,"name":"WL01-flower(1)","imagePath":"WL01-flower(1)_tex.png"}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "8db93b59-84b6-460e-918b-5e68695ec600",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "f06f7289-a956-4aac-8242-f482aa66ae16",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"1orange": {
"WL01-flower(1)_tex": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "4899d243-41fa-4e99-ad75-7e0741ad39f1",
"rawTextureUuid": "f06f7289-a956-4aac-8242-f482aa66ae16",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"offsetX": -5.5,
"offsetY": 22.5,
"trimX": 1,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"width": 499,
"height": 465,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{"frameRate":24,"name":"WL02-fiy","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-96,"y":-68,"width":176,"height":148},"bone":[{"name":"root"},{"length":72,"name":"bone","parent":"root","transform":{"x":19.1,"y":23,"skX":88.22,"skY":88.22}},{"length":37,"name":"图层_35","parent":"bone","transform":{"x":5.7785,"y":-8.8748,"skX":-86.7571,"skY":-86.7571}},{"length":74,"name":"图层_21","parent":"bone","transform":{"x":9.4748,"y":7.3979,"skX":105.7885,"skY":105.7885}},{"length":17,"name":"图层_36","parent":"图层_21","transform":{"x":47.8658,"y":22.0697,"skX":57.8641,"skY":57.8641}},{"length":12,"name":"图层_39","parent":"图层_21","transform":{"x":88.0084,"y":16.0743,"skX":52.7624,"skY":52.7624}},{"length":68,"name":"图层_32","parent":"图层_35","transform":{"x":14.1342,"y":-28.22,"skX":-74.3941,"skY":-74.3941}},{"length":70,"name":"图层_31","parent":"图层_35","transform":{"x":-1.2944,"y":-25.2252,"skX":-110.3974,"skY":-110.3974}},{"name":"图层_50","parent":"图层_21","transform":{"x":52.0878,"y":-31.6499,"skX":165.9916,"skY":165.9916}},{"name":"图层_54","parent":"图层_36","transform":{"x":30.4454,"y":1.4968}},{"name":"图层_37","parent":"图层_39","transform":{"x":25.5464,"y":-1.3323}}],"slot":[{"name":"图层_31","parent":"图层_31"},{"name":"图层_35","parent":"图层_35"},{"name":"图层_21","parent":"图层_21"},{"name":"图层_39","parent":"图层_39"},{"displayIndex":1,"name":"图层_37","parent":"图层_37"},{"name":"图层_36","parent":"图层_36"},{"name":"图层_32","parent":"图层_32"},{"name":"图层_54","parent":"图层_54"},{"name":"图层_50","parent":"图层_50"}],"skin":[{"slot":[{"name":"图层_50","display":[{"name":"苍蝇(1)01/图层_50","transform":{"x":1.2,"y":0.7}},{"name":"苍蝇(1)01/图层_18","transform":{"x":24.7,"y":-24.3}}]},{"name":"图层_39","display":[{"name":"苍蝇(1)01/图层_39","transform":{"x":19.38,"y":8.86,"skX":113.23,"skY":113.23}}]},{"name":"图层_31","display":[{"name":"苍蝇(1)01/图层_31","transform":{"x":35.85,"y":-3.56,"skX":108.93,"skY":108.93}}]},{"name":"图层_32","display":[{"name":"苍蝇(1)01/图层_32","transform":{"x":34.22,"y":-3.19,"skX":72.93,"skY":72.93}}]},{"name":"图层_21","display":[{"name":"苍蝇(1)01/图层_21","transform":{"x":41.4,"y":-1.36,"skX":165.99,"skY":165.99}}]},{"name":"图层_37","display":[{"name":"苍蝇(1)01/图层_37","transform":{"x":7.82,"y":-3.39,"skX":113.23,"skY":113.23}},{"name":"苍蝇(1)01/图层_55","transform":{"x":-2.88,"y":1.27,"skX":113.23,"skY":113.23}},{"name":"苍蝇(1)01/图层_56","transform":{"x":3.03,"y":-1.09,"skX":113.23,"skY":113.23}}]},{"name":"图层_54","display":[{"name":"苍蝇(1)01/图层_54","transform":{"x":-3.08,"y":0.73,"skX":108.13,"skY":108.13}},{"name":"苍蝇(1)01/图层_58","transform":{"x":8.38,"y":-14.99,"skX":108.13,"skY":108.13}},{"name":"苍蝇(1)01/图层_57","transform":{"x":1.15,"y":-7.36,"skX":108.13,"skY":108.13}}]},{"name":"图层_36","display":[{"name":"苍蝇(1)01/图层_36","transform":{"x":23.11,"y":5.57,"skX":108.13,"skY":108.13}}]},{"name":"图层_35","display":[{"name":"苍蝇(1)01/图层_35","transform":{"x":6.09,"y":9.35,"skX":-1.46,"skY":-1.46}}]}]}],"animation":[{"duration":24,"playTimes":0,"name":"normal","bone":[{"name":"bone","translateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"y":-16.99},{"duration":0}]},{"name":"图层_21","rotateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"rotate":-2.22},{"duration":0}]},{"name":"图层_32","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":0}]},{"name":"图层_31","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":0}]}],"slot":[{"name":"图层_37","displayFrame":[{"duration":24}]},{"name":"图层_54","displayFrame":[{"duration":24,"value":1}]},{"name":"图层_50","displayFrame":[{"duration":24,"value":1}]}]},{"duration":24,"playTimes":0,"name":"dizzy","bone":[{"name":"bone","translateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"y":-20.51},{"duration":0}],"rotateFrame":[{"duration":12,"tweenEasing":0,"rotate":12.77},{"duration":12,"tweenEasing":0,"rotate":19.12},{"duration":0,"rotate":12.77}]},{"name":"图层_21","rotateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"rotate":-12.87},{"duration":0}]},{"name":"图层_32","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":0}]},{"name":"图层_31","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":0}]},{"name":"图层_54","rotateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"rotate":180},{"duration":0}]},{"name":"图层_37","rotateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"rotate":180},{"duration":0}]}]},{"duration":24,"playTimes":0,"name":"laugh","bone":[{"name":"bone","translateFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"y":-16.99},{"duration":0}]},{"name":"图层_21","rotateFrame":[{"duration":6,"tweenEasing":0},{"duration":6,"tweenEasing":0,"rotate":-17.3},{"duration":6,"tweenEasing":0,"rotate":-2.22},{"duration":6,"tweenEasing":0,"rotate":-17.9},{"duration":0}]},{"name":"图层_32","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":0}]},{"name":"图层_31","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":0}]}],"slot":[{"name":"图层_37","displayFrame":[{"duration":24}]},{"name":"图层_54","displayFrame":[{"duration":24,"value":1}]},{"name":"图层_50","displayFrame":[{"duration":24,"value":1}]}]},{"duration":20,"playTimes":0,"name":"scare","bone":[{"name":"bone","translateFrame":[{"duration":12,"tweenEasing":0},{"duration":8,"tweenEasing":0,"y":-1.68},{"duration":0}],"rotateFrame":[{"duration":12,"tweenEasing":0,"rotate":12.77},{"duration":8,"tweenEasing":0,"rotate":27.49},{"duration":0,"rotate":12.77}]},{"name":"图层_21","rotateFrame":[{"duration":10,"tweenEasing":0},{"duration":10,"tweenEasing":0,"rotate":3.15},{"duration":0}]},{"name":"图层_32","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":35.92},{"duration":0}]},{"name":"图层_31","rotateFrame":[{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":2,"tweenEasing":0},{"duration":2,"tweenEasing":0,"rotate":-29.04},{"duration":0}]},{"name":"图层_50","scaleFrame":[{"duration":2,"tweenEasing":0},{"duration":18,"x":0.3}]}],"slot":[{"name":"图层_37","displayFrame":[{"duration":2},{"duration":18,"value":2},{"duration":0}]},{"name":"图层_54","displayFrame":[{"duration":2,"value":1},{"duration":18,"value":2},{"duration":0,"value":1}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}],"canvas":{"width":240,"height":180}}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b8430916-f888-43d8-a423-4facb4deef13",
"subMetas": {}
}
\ No newline at end of file
{"width":256,"SubTexture":[{"width":55,"y":107,"height":77,"name":"苍蝇(1)01/图层_31","x":77},{"width":74,"y":107,"height":84,"name":"苍蝇(1)01/图层_35","x":1},{"width":101,"y":1,"height":104,"name":"苍蝇(1)01/图层_21","x":1},{"width":54,"y":179,"height":53,"name":"苍蝇(1)01/图层_39","x":143},{"width":31,"y":35,"height":28,"name":"苍蝇(1)01/图层_55","x":196},{"width":8,"y":238,"height":7,"name":"苍蝇(1)01/图层_56","x":53},{"width":14,"y":238,"height":12,"name":"苍蝇(1)01/图层_37","x":1},{"width":64,"y":186,"height":66,"name":"苍蝇(1)01/图层_36","x":77},{"width":60,"y":107,"height":70,"name":"苍蝇(1)01/图层_32","x":134},{"width":39,"y":1,"height":32,"name":"苍蝇(1)01/图层_54","x":196},{"width":7,"y":238,"height":7,"name":"苍蝇(1)01/图层_57","x":63},{"width":12,"y":238,"height":14,"name":"苍蝇(1)01/图层_58","x":17},{"width":20,"y":238,"height":7,"name":"苍蝇(1)01/图层_50","x":31},{"width":67,"y":193,"height":43,"name":"苍蝇(1)01/图层_18","x":1}],"height":256,"name":"WL02-fiy","imagePath":"WL02-fiy_tex.png"}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d8decd83-f3ec-4f0c-87b9-8b45948b3741",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b899fb91-da61-49af-bfa7-660fd09df1ab",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 256,
"platformSettings": {},
"subMetas": {
"WL02-fiy_tex": {
"ver": "1.0.4",
"uuid": "376fb951-5155-4439-8a06-f90d7140553b",
"rawTextureUuid": "b899fb91-da61-49af-bfa7-660fd09df1ab",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -10,
"offsetY": 1.5,
"trimX": 1,
"trimY": 1,
"width": 234,
"height": 251,
"rawWidth": 256,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"uuid": "954a1831-f11e-4448-b641-0e4a2d830e57",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
export const defaultData =
{
"sitems": [
{
"correct": "a",
"incorrect": "the",
"audio_url": "http://staging-teach.cdn.ireadabc.com/dd360bbbcf5817eea26ac5fa3341ef5d.mp3"
},
{
"audio_url": "http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3",
"correct": "b",
"incorrect": "eee"
},
{
"audio_url": "http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3",
"correct": "s",
"incorrect": "ddd"
}
],
"time": "3",
"audio_url": "http://staging-teach.cdn.ireadabc.com/a812f773f22fdb5fa0de04bc7979f6d7.mp3",
"title": "woijsjifwoiejf"
}
export function playDragonBoneAnimation(node, animationName, time = 1, onFinish = null, onFrameEvent = null) {
const armatureDisplay = node.getComponent(dragonBones.ArmatureDisplay);
armatureDisplay.once(dragonBones.EventObject.COMPLETE, () => {
if (onFinish) {
onFinish();
}
});
armatureDisplay.on(dragonBones.EventObject.FRAME_EVENT, (event) => {
if (onFrameEvent) {
onFrameEvent(event);
}
});
armatureDisplay.playAnimation(animationName, time);
}
export function getPosByAngle(angle, len) {
const radian = angle * Math.PI / 180;
......
{
"ver": "2.3.5",
"uuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "f3586893-c9af-4a15-bb89-22b2cd2214fe",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 66,
"height": 105,
"platformSettings": {},
"subMetas": {
"btn_right": {
"air_0": {
"ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "64584a25-0b5f-4475-acf8-96d2c4af4576",
"rawTextureUuid": "f3586893-c9af-4a15-bb89-22b2cd2214fe",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 60,
"height": 66,
"rawWidth": 61,
"rawHeight": 67,
"width": 66,
"height": 105,
"rawWidth": 66,
"rawHeight": 105,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "0ae3b1ad-1320-41bb-93a0-7d787bc895de",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 163,
"platformSettings": {},
"subMetas": {
"air_1": {
"ver": "1.0.4",
"uuid": "6ae8f594-379c-48cb-9004-10df6e4d1a0c",
"rawTextureUuid": "0ae3b1ad-1320-41bb-93a0-7d787bc895de",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 102,
"height": 163,
"rawWidth": 102,
"rawHeight": 163,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d0fd4ec5-58bf-4bd2-8769-7d16d7c96898",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"bg": {
"ver": "1.0.4",
"uuid": "a0e475f7-598e-4937-85e9-71026b619bbf",
"rawTextureUuid": "d0fd4ec5-58bf-4bd2-8769-7d16d7c96898",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "1276353c-1214-4193-8668-ee0f2ad2fd65",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
......@@ -11,10 +11,10 @@
"height": 720,
"platformSettings": {},
"subMetas": {
"bg": {
"bg1": {
"ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "dedb0572-e58c-4703-b5b0-57a90f0d6d60",
"rawTextureUuid": "1276353c-1214-4193-8668-ee0f2ad2fd65",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......
{
"ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "db64fd99-728b-49ba-99cc-9f5b3314a455",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"btn_left": {
"bg2": {
"ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "446c3c6b-3ad5-43d0-bae5-27a215f3a281",
"rawTextureUuid": "db64fd99-728b-49ba-99cc-9f5b3314a455",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 61,
"height": 67,
"rawWidth": 61,
"rawHeight": 67,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "c9531747-09e6-4c50-9e55-8f7df94c055e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 645,
"height": 160,
"platformSettings": {},
"subMetas": {
"cup": {
"ver": "1.0.4",
"uuid": "f41b953d-198a-4437-a871-c4198ef8ec9f",
"rawTextureUuid": "c9531747-09e6-4c50-9e55-8f7df94c055e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 645,
"height": 160,
"rawWidth": 645,
"rawHeight": 160,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3490beae-5126-4c4b-8add-48e1a5a98021",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 76,
"platformSettings": {},
"subMetas": {
"desk": {
"ver": "1.0.4",
"uuid": "b126504b-24cb-474c-9d5e-34dfcbac9dfe",
"rawTextureUuid": "3490beae-5126-4c4b-8add-48e1a5a98021",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 76,
"rawWidth": 1280,
"rawHeight": 76,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "24ee341c-7dfd-41c3-a941-dc45833b7e6d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 364,
"height": 308,
"platformSettings": {},
"subMetas": {
"flyswatter": {
"ver": "1.0.4",
"uuid": "fa9cb3c8-2996-484d-88a1-668a5b9c157b",
"rawTextureUuid": "24ee341c-7dfd-41c3-a941-dc45833b7e6d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 364,
"height": 308,
"rawWidth": 364,
"rawHeight": 308,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0644eafb-6e34-45d8-a62b-2e02abed4388",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 32,
"height": 46,
"platformSettings": {},
"subMetas": {
"icon_0": {
"ver": "1.0.4",
"uuid": "35e1bdd3-ea12-4be8-ae1c-aa4602266b0c",
"rawTextureUuid": "0644eafb-6e34-45d8-a62b-2e02abed4388",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 32,
"height": 46,
"rawWidth": 32,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c4d88804-0433-4caa-b21b-75b7fbd2dbc2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 40,
"height": 54,
"platformSettings": {},
"subMetas": {
"icon_1": {
"ver": "1.0.4",
"uuid": "020443b0-ca60-4a48-bde2-5ac11fb32c09",
"rawTextureUuid": "c4d88804-0433-4caa-b21b-75b7fbd2dbc2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 40,
"height": 54,
"rawWidth": 40,
"rawHeight": 54,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6300be7b-7614-4325-a43e-63663b61310f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 103,
"height": 95,
"platformSettings": {},
"subMetas": {
"icon_orange": {
"ver": "1.0.4",
"uuid": "64305c43-132e-408d-9de8-5bb16a7cbf0f",
"rawTextureUuid": "6300be7b-7614-4325-a43e-63663b61310f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 103,
"height": 95,
"rawWidth": 103,
"rawHeight": 95,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "584dd5ec-79b4-4106-ae28-e9badda3bb74",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 37,
"height": 46,
"platformSettings": {},
"subMetas": {
"sound": {
"ver": "1.0.4",
"uuid": "7f0c4726-754e-436f-b9ed-9320bbd0edb9",
"rawTextureUuid": "584dd5ec-79b4-4106-ae28-e9badda3bb74",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 37,
"height": 46,
"rawWidth": 37,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3e879aa7-c737-4964-ba8c-ebc4532253f8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 444,
"height": 134,
"platformSettings": {},
"subMetas": {
"title": {
"ver": "1.0.4",
"uuid": "56e9bcab-89f8-4896-95db-4e35d887c777",
"rawTextureUuid": "3e879aa7-c737-4964-ba8c-ebc4532253f8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 444,
"height": 134,
"rawWidth": 444,
"rawHeight": 134,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d82e2d1a-8aee-4b46-9436-e7ac94dbca04",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 302,
"height": 176,
"platformSettings": {},
"subMetas": {
"virus_0": {
"ver": "1.0.4",
"uuid": "d175e9c9-f9de-4dbc-8759-652357567489",
"rawTextureUuid": "d82e2d1a-8aee-4b46-9436-e7ac94dbca04",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 302,
"height": 176,
"rawWidth": 302,
"rawHeight": 176,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "58962aa8-995d-47d6-b90f-868f8383b064",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 619,
"height": 108,
"platformSettings": {},
"subMetas": {
"water_0": {
"ver": "1.0.4",
"uuid": "25888753-774b-4e73-9075-d8d5068928ae",
"rawTextureUuid": "58962aa8-995d-47d6-b90f-868f8383b064",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 619,
"height": 108,
"rawWidth": 619,
"rawHeight": 108,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "52a5aa0a-75cc-4330-8e9b-2e86037fc3c5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 619,
"height": 108,
"platformSettings": {},
"subMetas": {
"water_1": {
"ver": "1.0.4",
"uuid": "8408f90e-edc7-404c-8460-9a154ac2e9a3",
"rawTextureUuid": "52a5aa0a-75cc-4330-8e9b-2e86037fc3c5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 619,
"height": 108,
"rawWidth": 619,
"rawHeight": 108,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
export const defaultData = {
"pic_url": "http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png",
"pic_url_2": "http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png",
"text": "This is a test label.",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 144,
"height": 144,
"platformSettings": {},
"subMetas": {
"icon": {
"ver": "1.0.4",
"uuid": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a",
"rawTextureUuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 2,
"width": 138,
"height": 141,
"rawWidth": 144,
"rawHeight": 144,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment