Commit cf12dbb4 authored by 李维's avatar 李维

dev commit

parent 75d586d1
This diff is collapsed.
......@@ -55,4 +55,4 @@
"tslint": "~5.18.0",
"typescript": "~3.7.5"
}
}
\ No newline at end of file
}
......@@ -18,6 +18,7 @@ import {UploadImageWithPreviewComponent} from './common/upload-image-with-previe
import {PlayerContentWrapperComponent} from './common/player-content-wrapper/player-content-wrapper.component';
import {CustomHotZoneComponent} from './common/custom-hot-zone/custom-hot-zone.component';
import {UploadVideoComponent} from './common/upload-video/upload-video.component';
import { UploadDragonBonesComponent } from "./common/upload-dragon-bones/upload-dragon-bones.component";
import {TimePipe} from './pipes/time.pipe';
import {ResourcePipe} from './pipes/resource.pipe';
import {AudioRecorderComponent} from './common/audio-recorder/audio-recorder.component';
......@@ -40,7 +41,7 @@ registerLocaleData(zh);
TimePipe,
UploadVideoComponent,
CustomHotZoneComponent,
UploadDragonBonesComponent,
PlayerContentWrapperComponent
],
......
<!--龙骨面板-->
<p>
<span>&nbsp;</span>
<button nz-button nzType="dashed" (click)="setAnimaBtnClick(_dragonBones)" nzSize="large">
<i nz-icon nzType="tool" nzTheme="outline"></i>
{{buttonText}}
</button>
</p>
<nz-modal [(nzVisible)]="animaPanelVisible" nzTitle="配置资源文件" (nzOnCancel)="animaPanelCancel()" (nzOnOk)="animaPanelOk()" nzOkText="保存">
<div class="anima-upload-btn">
<span style="margin-right: 10px">上传 ske_json 文件: </span>
<nz-upload
[nzShowUploadList]="false"
nzAccept="application/json"
[nzAction]="uploadUrl"
[nzData]="uploadData"
(nzChange)="skeJsonHandleChange($event)">
<button nz-button><i nz-icon nzType="upload"></i><span>Upload</span></button>
</nz-upload>
<i *ngIf="isSkeJsonLoading" style="margin-left: 10px;" nz-icon [nzType]="'loading'"></i>
<span *ngIf="skeJsonData['name']" style="margin-left: 10px"><u> {{skeJsonData['name']}} </u></span>
</div>
<div class="anima-upload-btn">
<span style="margin-right: 10px">上传 tex_json 文件: </span>
<nz-upload
[nzShowUploadList]="false"
nzAccept="application/json"
[nzAction]="uploadUrl"
[nzData]="uploadData"
(nzChange)="texJsonHandleChange($event)">
<button nz-button><i nz-icon nzType="upload"></i><span>Upload</span></button>
</nz-upload>
<i *ngIf="isTexJsonLoading" style="margin-left: 10px;" nz-icon [nzType]="'loading'"></i>
<span *ngIf="texJsonData['name']" style="margin-left: 10px"><u> {{texJsonData['name']}} </u></span>
</div>
<div class="anima-upload-btn">
<span style="margin-right: 10px">上传 tex_png 文件: </span>
<nz-upload
[nzShowUploadList]="false"
nzAccept = "image/*"
[nzAction]="uploadUrl"
[nzData]="uploadData"
(nzChange)="texPngHandleChange($event)">
<button nz-button><i nz-icon nzType="upload"></i><span>Upload</span></button>
</nz-upload>
<i *ngIf="isTexPngLoading" style="margin-left: 10px;" nz-icon [nzType]="'loading'"></i>
<span *ngIf="texPngData['name']" style="margin-left: 10px"><u> {{texPngData['name']}} </u></span>
</div>
</nz-modal>
\ No newline at end of file
@import '../../style/common_mixin.css';
.anima-upload-btn {
margin-bottom: 10px;
}
\ No newline at end of file
import {Component, ElementRef, EventEmitter, Input, Output, OnInit, OnChanges, ViewChild} from '@angular/core';
import {NzMessageService, UploadChangeParam, UploadFile, UploadFileStatus} from 'ng-zorro-antd';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
@Component({
selector: 'upload-dragon-bones',
templateUrl: './upload-dragon-bones.component.html',
styleUrls: ['./upload-dragon-bones.component.scss']
})
export class UploadDragonBonesComponent implements OnInit, OnChanges {
@Input() dragonBones = {
skeJsonData: {url: "", name: ""},
texJsonData: {url: "", name: ""},
texPngData: {url: "", name: ""}
};
@Input() buttonText: string = "配置骨骼动画"
@Output() change = new EventEmitter();
@ViewChild('videoNode', {static: true }) videoNode: ElementRef;
uploadUrl;
uploadData;
animaPanelVisible: boolean = false;
isSkeJsonLoading = false;
isTexJsonLoading = false;
isTexPngLoading = false;
skeJsonData = {};
texJsonData = {};
texPngData = {};
_dragonBones = {
skeJsonData: {url: "", name: ""},
texJsonData: {url: "", name: ""},
texPngData: {url: "", name: ""}
};
constructor(private nzMessageService: NzMessageService) {
this.uploadUrl = (<any> window).courseware.uploadUrl();
this.uploadData = (<any> window).courseware.uploadData();
window['air'].getUploadCallback = (url, data) => {
this.uploadUrl = url;
this.uploadData = data;
};
}
ngOnInit() {
if(this.dragonBones) {
if(!this.dragonBones.skeJsonData) {
this.dragonBones.skeJsonData = {url: "", name: ""}
}
if(!this.dragonBones.texJsonData) {
this.dragonBones.texJsonData = {url: "", name: ""}
}
if(!this.dragonBones.texPngData) {
this.dragonBones.texPngData = {url: "", name: ""}
}
} else {
this.dragonBones = {
skeJsonData: {url: "", name: ""},
texJsonData: {url: "", name: ""},
texPngData: {url: "", name: ""}
};
}
this._dragonBones = this.dragonBones;
}
ngOnChanges() {
}
animaPanelCancel() {
this.animaPanelVisible = false;
}
animaPanelOk() {
this.animaPanelVisible = false;
this.change.emit({
texPngData: this.texPngData,
texJsonData: this.texJsonData,
skeJsonData: this.skeJsonData,
})
}
setAnimaBtnClick(dragonBones) {
const {skeJsonData, texJsonData, texPngData} = dragonBones;
this.skeJsonData = skeJsonData || {};
this.texJsonData = texJsonData || {};
this.texPngData = texPngData || {};
this.animaPanelVisible = true;
}
skeJsonHandleChange(e) {
switch (e.type) {
case 'start':
this.isSkeJsonLoading = true;
break;
case 'success':
this.skeJsonData['url'] = e.file.response.url;
this.skeJsonData['name'] = e.file.name;
this.nzMessageService.success('上传成功');
this.isSkeJsonLoading = false;
break;
case 'progress':
break;
}
}
texJsonHandleChange(e) {
switch (e.type) {
case 'start':
this.isTexJsonLoading = true;
break;
case 'success':
this.texJsonData['url'] = e.file.response.url;
this.texJsonData['name'] = e.file.name;
this.nzMessageService.success('上传成功');
this.isTexJsonLoading = false;
break;
case 'progress':
break;
}
}
texPngHandleChange(e) {
switch (e.type) {
case 'start':
this.isTexPngLoading = true;
break;
case 'success':
this.texPngData['url'] = e.file.response.url;
this.texPngData['name'] = e.file.name;
this.nzMessageService.success('上传成功');
this.isTexPngLoading = false;
break;
case 'progress':
break;
}
}
}
@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>
</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>
<div class="card-config">
<div class="card-item clearfix" style="padding: 0.5vw; width: 100%;" >
<div class="card-item-content border" >
<div class="card-item-content">
<div class="title" >
题目素材
</div>
<div class="section" >
<div class="section-content">
<div style="margin-bottom: 10px;">
<nz-form-item >
<nz-form-label [nzSpan]="2" nzFor="email">主题皮肤</nz-form-label>
<nz-form-control [nzSpan]="6">
<nz-select [(ngModel)]="contentObj.theme" (ngModelChange)="saveItem()" style="width: 70%;">
<nz-option nzValue="A" nzLabel="A"></nz-option>
<nz-option nzValue="B" nzLabel="B"></nz-option>
<nz-option nzValue="C" nzLabel="C"></nz-option>
<nz-option nzValue="D" nzLabel="自定义"></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control [nzSpan]="16"></nz-form-control>
</nz-form-item >
</div>
</div>
<div *ngIf="contentObj.theme=='D'" class="section-content">
<div style="margin-bottom: 10px; display: flex;">
<div style="flex: 1; display: flex; padding: 0 5px;">
<div style="flex:1">外框</div>
<div style="flex:5">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="contentObj.border_image_url" (imageUploaded)="onImageUploadSuccessByItem($event, item, 'border_image_url')"></app-upload-image-with-preview>
</div>
</div>
<div style="width: 300px; margin-top: 15px;">
<span>文本: </span>
<input type="text" nz-input [(ngModel)]="item.text" (blur)="save()">
</div>
<div style="flex: 1; display: flex; padding: 0 5px;">
<div style="flex:1">视频背景</div>
<div style="flex:5">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="contentObj.video_image_url" (imageUploaded)="onImageUploadSuccessByItem($event, item, 'video_image_url')"></app-upload-image-with-preview>
</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="flex: 1; display: flex; padding: 0 5px;">
<div style="flex:1">文字背景</div>
<div style="flex:5">
<app-upload-image-with-preview style="width: 100%;" [picUrl]="contentObj.text_image_url" (imageUploaded)="onImageUploadSuccessByItem($event, item, 'text_image_url')"></app-upload-image-with-preview>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngFor="let item of contentObj.dataArray; 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 class="section" >
<div class="section-content">
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
视频
</div>
<div style="flex:5">
<app-upload-video [videoUrl]="item.video_url" (videoUploaded)="onVideoUploadSuccessByItem($event, item, 'video_url')" ></app-upload-video>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<h3 style="text-align: center; width: 100%;">骨骼动画</h3>
</div>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
文字
</div>
<div style="flex:5">
<upload-dragon-bones
[dragonBones]="item.textDragonBones"
(change)="updateDragonBones($event, 'textDragonBones', item)"
></upload-dragon-bones>
</div>
</div>
<div style="display: flex; margin-bottom: 10px;">
<div style="flex:1">
右侧
</div>
<div style="flex:5">
<upload-dragon-bones
[dragonBones]="item.rightDragonBones"
(change)="updateDragonBones($event, 'rightDragonBones', item)"
></upload-dragon-bones>
</div>
</div>
</div>
</div>
<div class="section" >
<div style="text-align: right; padding-right: 20px;">
<button style="margin-bottom: 10px;" nz-button nzType="danger" (click)="deleteItem(contentObj.dataArray, i)" >
<span>删除本题</span>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card-item" style="padding: 0.5vw;" >
<button [disabled]="contentObj.dataArray.length>=10" nz-button nzType="primary" class="add-btn" (click)="addItem(contentObj.dataArray)">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>
新建卡片组
</button>
</div>
</div>
</div>
@import "../style/common_mixin";
.model-content {
margin: 10px;
.card-config {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
.card-item{
width: 500px;
margin-bottom: 40px;
.border {
border-radius: 20px;
border-style: dashed;
padding:20px;
width: 100%;
}
.card-item-content{
.title {
font-size: 24px;
width: 100%;
text-align: center;
}
.section{
border-top: 1px dashed ;
padding: 10px 0;
.section-title{
font-size: 24px;
width: 100%;
}
.section-content{
display: flex;
flex-direction: column;
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;
}
}
}
}
}
.clearfix:before,.clearfix:after {
content: "";
display: block;
clear: both;
}
\ No newline at end of file
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 { defauleFormData } from '../../assets/default/formData/defaultData_LST01'
const defauleFormData = {
"version": "1.0",
key: "DataKey_Sbx_Pronunciation",
bgMusic: "",
titleText: "",
dataArray: []
}
@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";
// 储存对象
item;
_item: any;
KEY = 'DataKey_Sbx_Pronunciation';
checkOptionsOne = []
Text = "Text"
Image = "Image"
set item(item) {
this._item = item;
}
get item() {
return this._item;
}
contentObj = {
"version": "1.0",
key: "DataKey_Sbx_Pronunciation",
theme: "A",
border_image_url: "",
video_image_url: "",
text_image_url: "",
dataArray: []
}
@Output()
update = new EventEmitter();
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
}
createShell() {
this.item.wordList.push({
word: '',
audio: '',
backWord: '',
backWordAudio: '',
});
this.save();
handleQuestionTypeChange(){
// if(this.contentObj.question.type != 'LongAudio'){
// this.contentObj.answerType='Text'
// }
this.saveItem()
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
}
removeShell(idx) {
this.item.wordList.splice(idx, 1);
this.save();
handleAnswerTypeChange(){
// console.log("Change")
// let len = this.contentObj.dataArray.length
// this.contentObj.dataArray = Array(len).fill("")
this.saveItem()
}
ngOnInit() {
handleTextChange(e, index){
// console.log(e.target.value, index)
this.contentObj.dataArray[index].text = e.target.value
this.saveItem()
this.refresh();
}
ngOnInit() {
this.item = {};
// 获取存储的数据
(<any>window).courseware.getData((data) => {
this.item.contentObj = {};
const getData = (<any> window).courseware.getData;
getData((data) => {
console.log("读取数据", data)
if (data) {
this.item = data;
} else {
this.item = {};
}
if ( !this.item.contentObj ) {
this.item.contentObj = {};
}
this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
setTimeout(() => {
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
}, 100);
// this.save()
}, this.KEY);
}
ngOnChanges() {}
ngOnDestroy() {}
}, this.saveKey);
init() {
if (Object.keys(this.item.contentObj).length != 0 && this.item.contentObj.version && this.item.contentObj.version==this.contentObj.version) {
console.log("读取数据", this.item.contentObj)
this.contentObj = this.item.contentObj;
} else {
console.log("使用演示数据", this.contentObj)
this.item.contentObj = this.contentObj;
}
}
ngOnChanges() {
cardItemData(){
return {audio_url:"", image_url:""}
}
ngOnDestroy() {
cardChoiceData(){
return { isText: true, text: "", image_url: "" }
}
init() {
initData() {
}
handleMoveItemUp(items, index){
if(index!=0){
items[index] = items.splice(index-1, 1, items[index])[0];
}else{
items.push(items.shift());
}
this.save()
}
handleMoveItemDown(items, index){
if(index!=items.length-1){
items[index] = items.splice(index+1, 1, items[index])[0];
}else{
items.unshift( items.splice(index,1)[0]);
}
this.save()
}
/**
* 储存图片数据
* @param e
*/
onImageUploadSuccess(e, key) {
deleteItem(item, index){
item.splice(index,1)
this.save()
}
this.item[key] = e.url;
this.save();
addItem(item?, type?) {
item.push({video_url: "", textDragonBones: {}, rightDragonBones: {}})
this.saveItem();
}
onImageUploadSuccessByItem(e, item, key) {
item[key] = e.url
this,this.refresh()
this.save();
}
/**
* 储存音频数据
* @param e
*/
onAudioUploadSuccess(e, key) {
this.item[key] = e.url;
onAudioUploadSuccessByItem(e, item, key) {
item[key] = e.url
this.save();
}
onWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].audio = e.url;
onVideoUploadSuccessByItem(e, item, key) {
item[key] = e.url
this.save();
}
onBackWordAudioUploadSuccess(e, idx) {
this.item.wordList[idx].backWordAudio = e.url;
updateDragonBones(e, key, item) {
item[key] = e;
this.saveItem()
}
saveItem() {
this.save();
}
/**
* 储存数据
*/
save() {
(<any>window).courseware.setData(this.item, null, this.saveKey);
(<any> window).courseware.setData(this.item, null, this.KEY);
this.refresh();
console.log('this.item = ' + JSON.stringify(this.item));
console.log(JSON.stringify(this.item))
console.log("保存", this.item)
}
/**
* 刷新 渲染页面
*/
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
}
\ No newline at end of file
updateCheckbox(){
let check = []
this.item.contentObj.textDown.forEach((item, index) => {
check.push({label:index+1, value:index, checked:false})
});
let length = check.length
this.item.contentObj.textUp.forEach((item, index) => {
let _check = JSON.parse(JSON.stringify(check))
item.lineTo.forEach(option=> {
if(option<length){
_check[Number(option)].checked = true
}
});
item.checkOptions = _check
});
}
}
This diff is collapsed.
......@@ -158,6 +158,33 @@ export default class Cartoon {
}
}
// Video
getVideo(video_url){
return new Promise((resolve, reject)=>{
cc.assetManager.loadRemote(video_url, (err, videoClip) => {
resolve(videoClip)
});
})
}
playVideo(videoPlayer, callback) {
if(videoPlayer && videoPlayer.isPlaying) {
videoPlayer.stop()
}
if(videoPlayer) {
setTimeout(()=>{
videoPlayer.play()
videoPlayer.node.off("completed")
videoPlayer.node.on("completed", ()=>{
if(callback) {
callback()
}
})
}, 50)
}
}
// Audio
playAudio(audio_url, cb = null) {
return new Promise((resolve, reject)=>{
......@@ -381,14 +408,22 @@ class DragonBones {
});
}
showDragonBones(times = 1, animaName = null) {
deleteDragonBones() {
const parentNode = this.parentNode
if (parentNode.animaNode) {
parentNode.animaNode.removeFromParent();
}
}
showDragonBones(times = 1, animaName, callBack) {
let animaNameIndex = this._animationLoaded.animaNames.indexOf(animaName)
if (this._animationLoaded && this._animationLoaded.animaNames.length > 0) {
if(!animaName || animaNameIndex==-1) {
this._animationLoaded.playAnimation(this._animationLoaded.animaNames[0], -1);
this._animationLoaded.playAnimation(this._animationLoaded.animaNames[0], times);
} else {
this._animationLoaded.playAnimation(animaName, -1);
this._animationLoaded.playAnimation(animaName, times);
}
// this._animationLoaded.on(this._animationLoaded.EventObject.COMPLETE, callback)
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -28,10 +28,6 @@ cc.Class({
onLoad() {
this.initSceneData();
this.initSize();
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
cc.director.setClearColor(new cc.Color(255 ,255 ,255 , 0));
},
_imageResList: null,
......@@ -108,7 +104,7 @@ cc.Class({
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"TEstd","questionAudio_url":"","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png"}]}}'
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"http://staging-teach.cdn.ireadabc.com/ad58bae62ea02cf215ce7dee22df306f.mp3","titleText":"TEstd","questionAudio_url":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png","audio_url":"http://staging-teach.cdn.ireadabc.com/ae7c0930a45d0ffc9f13182298e2be71.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/78579114773af12a7aec6723e3b9d475.png","audio_url":"http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/c99e82e1c3f087c6dc0469e30c624f70.png","audio_url":"http://staging-teach.cdn.ireadabc.com/135c628899396df62c14567f46d61f3f.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/5b45c89ac9e899d76522767219b1346b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/2e28eae8f0e0f01193da6f3677379ed3.png","audio_url":"http://staging-teach.cdn.ireadabc.com/cb0ac1d1bcdfdaf768f0a06d3fff37a3.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/fad2dac4f8b59a185dc30d42617c2ca8.png","audio_url":"http://staging-teach.cdn.ireadabc.com/9df3f14bc88bcffc49b6717c40428ed8.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/6c3fca11052464102407f173e4a83db9.png","audio_url":"http://staging-teach.cdn.ireadabc.com/d5a5ac2f45431a8a15492cb9f78e0396.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ec82c796af801486548ae98623f614d2.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/ac4b9422df1556f80ac5c3058cd3d670.png","audio_url":"http://staging-teach.cdn.ireadabc.com/fb08783926362bf64232e2ec6966011d.mp3"}]}}'
// const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","titleText":"TEstd","questionAudio_url":"http://staging-teach.cdn.ireadabc.com/2bf96923b83ee0c5f20930386ce07384.mp3","dataArray":[{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/06cc843598a912921f6ca3acfde6220b.png","audio_url":"http://staging-teach.cdn.ireadabc.com/3b5540cc95a006dff8c41dba7537075a.mp3"},{"text":"","image_url":"http://staging-teach.cdn.ireadabc.com/571974922f6678111348a5643dba7e20.png","audio_url":"http://staging-teach.cdn.ireadabc.com/ae7c0930a45d0ffc9f13182298e2be71.mp3"}]}}'
const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbox_FT_08","bgMusic":"","titleText":"","questionAudio_url":"","dataArray":[]}}'
const dataJson = '{"contentObj":{"version":"1.0","key":"DataKey_Sbx_Pronunciation", "dataArray":[{"video_url":"http://staging-teach.cdn.ireadabc.com/82438e44e9e106cfa43d1fd62a24d61b.mp4","textDragonBones":{"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/2d668f8049bc98c0e026921ef316a0fd.png","name":"sb_boy_tex.png"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/ecc48e23d55b1af8eb40d997dc573791.json","name":"sb_boy_tex.json"},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/363ea3636888e4f70037d69794956daa.json","name":"sb_boy_ske.json"}},"rightDragonBones":{"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/2d668f8049bc98c0e026921ef316a0fd.png","name":"sb_boy_tex.png"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/ecc48e23d55b1af8eb40d997dc573791.json","name":"sb_boy_tex.json"},"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/8b1a3ca16c2810028d61b80978631edf.json","name":"sb_boy_ske.json"}}},{"video_url":"http://staging-teach.cdn.ireadabc.com/f25bb33cdb266345667a1bec58818175.mp4","textDragonBones":{"skeJsonData":{"url":"","name":""},"texJsonData":{"url":"","name":""},"texPngData":{"url":"","name":""}},"rightDragonBones":{"skeJsonData":{"url":"","name":""},"texJsonData":{"url":"","name":""},"texPngData":{"url":"","name":""}}}],"theme":"D"},"border_image_url":"http://staging-teach.cdn.ireadabc.com/e9ce15bcb9165a8416799df5597f01e6.jpg","video_image_url":"http://staging-teach.cdn.ireadabc.com/308cc7a44debd884b12508a7fcad83ab.jpg","text_image_url":"http://staging-teach.cdn.ireadabc.com/389033602b7468ceb2a34845b0063ea1.jpg"}'
const data = JSON.parse(dataJson);
return data;
},
......
......@@ -119,7 +119,7 @@ export async function asyncPlayEffectByUrl(url, loop = false) {
}
export function jelly(node) {
console.log("Jelly")
// console.log("Jelly")
return new Promise((resolve, reject) => {
cc.tween(node)
.to(0.1, { scaleX: 0.9, scaleY: 1.1 })
......
{
"ver": "2.3.5",
"uuid": "c2d7a302-f27f-4225-8613-f055a50a4bad",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 45,
"height": 46,
"platformSettings": {},
"subMetas": {
"btn_left": {
"ver": "1.0.4",
"uuid": "14ab9d19-81eb-427e-be7b-6f7a292e5083",
"rawTextureUuid": "c2d7a302-f27f-4225-8613-f055a50a4bad",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 45,
"height": 46,
"rawWidth": 45,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "41c08af1-6c51-4e8e-914f-ae8b65112ce6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 44,
"height": 46,
"platformSettings": {},
"subMetas": {
"btn_right": {
"ver": "1.0.4",
"uuid": "bcad95f2-0595-4c8e-82c0-1f540f5a54b4",
"rawTextureUuid": "41c08af1-6c51-4e8e-914f-ae8b65112ce6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 44,
"height": 46,
"rawWidth": 44,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -67,8 +67,8 @@
loadScript(debug ? 'physics.js' : 'physics-min.js', window.boot);
}
else {
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
cc.director.setClearColor(new cc.Color(255 ,255 ,255 , 0));
// cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
// cc.director.setClearColor(new cc.Color(255 ,255 ,255 , 0));
window.boot();
}
});
......
cd ../form & npm install & npm run publish & cd ../play & C:/CocosDashboard_1.0.7/resources/.editors/Creator/2.4.0/CocosCreator.exe --path "./" --build "platform=web-desktop;debug=true" --force & cd ../publish & node build.js
pause
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