Commit 8be2c391 authored by 李维's avatar 李维

复制项目

parent f58541b4
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
import { asyncGetSpriteFrimeByUrl, onHomeworkFinish} from "../Script/util_sn03_playVideo"; import { asyncGetSpriteFrimeByUrl, onHomeworkFinish } from "../Script/util_sn03_playVideo";
import { defaultData } from "../Script/defaultData_sn03_playVideo"; import { defaultData } from "../Script/defaultData_sn03_playVideo";
cc.Class({ const { ccclass, property } = cc._decorator;
extends: cc.Component,
@ccclass
properties: { export default class VideoPlayerComponent extends cc.Component {
videoPlayer: { @property(cc.VideoPlayer)
default: null, videoPlayer: cc.VideoPlayer = null;
type: cc.VideoPlayer
}, @property(cc.Node)
ProgressBar: { ProgressBar: cc.Node = null;
default: null,
type: cc.Node @property(cc.Button)
}, playButton: cc.Button = null;
playButton: {
default: null, @property(cc.Button)
type: cc.Button pauseButton: cc.Button = null;
},
pauseButton: { @property(cc.Button)
default: null, restartButton: cc.Button = null;
type: cc.Button
}, @property(cc.Button)
restartButton: { backButton: cc.Button = null;
default: null,
type: cc.Button @property(cc.Button)
}, forwardButton: cc.Button = null;
backButton: {
default: null, @property(cc.Label)
type: cc.Button durationLabel: cc.Label = null;
},
forwardButton: { @property(cc.Label)
default: null, currentTimeLabel: cc.Label = null;
type: cc.Button
}, @property(cc.Node)
durationLabel: { barTag: cc.Node = null;
default: null,
type: cc.Label @property(cc.Node)
}, bar: cc.Node = null;
currentTimeLabel: {
default: null, @property(cc.Node)
type: cc.Label loadingSprite: cc.Node = null;
},
barTag: { _designSize: cc.Size = null;
default: null, _frameSize: cc.Size = null;
type: cc.Node _mapScaleMin: number = null;
}, _mapScaleMax: number = null;
bar: { _cocosScale: number = null;
default: null,
type: cc.Node data;
},
loadingSprite: {
// ATTRIBUTES:
default: null, // The default value will be used only when the component attaching
// to a node for the first time
type: cc.Node, // optional, default is typeof default
},
// defaults, set visually when attaching this script to the Canvas
// text: 'Hello, World!'
},
_designSize: null, // 设计分辨率
_frameSize: null, // 屏幕分辨率
_mapScaleMin: null, // 场景中常用缩放(取大值)
_mapScaleMax: null, // 场景中常用缩放(取小值)
_cocosScale: null, // cocos 自缩放 (较少用到)
initSize() { initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小 let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height;
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height;
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height console.log("原本尺寸",screen_size,"现在尺寸",design_size)
let f = screen_size >= design_size let f = screen_size >= design_size;
cc.Canvas.instance.fitHeight = f cc.Canvas.instance.fitHeight = f;
cc.Canvas.instance.fitWidth = !f cc.Canvas.instance.fitWidth = !f;
const frameSize = cc.view.getFrameSize(); const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize; this._frameSize = frameSize;
...@@ -86,90 +71,97 @@ cc.Class({ ...@@ -86,90 +71,97 @@ cc.Class({
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale; this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale; this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
cc.director['_scene'].width = frameSize.width; console.log("原本宽度",cc.director["_scene"].width,"现在宽度",frameSize.width)
cc.director['_scene'].height = frameSize.height; console.log("原本高度",cc.director["_scene"].height,"现在高度",frameSize.height)
},
getVideoUrl(url1) { cc.director["_scene"].width = frameSize.width;
return new Promise((resovle, reject) => { cc.director["_scene"].height = frameSize.height;
}
getVideoUrl(url1: string): Promise<string> {
return new Promise((resolve, reject) => {
const url2 = url1.replace(/.mp4$/g, "_h.mp4"); const url2 = url1.replace(/.mp4$/g, "_h.mp4");
this.httpHeadCall(url2, (success) => { this.httpHeadCall(url2, (success) => {
if (success) { if (success) {
console.log('return url2: ', url2); console.log('return url2: ', url2);
resovle(url2); resolve(url2);
} else { } else {
console.log('return url1: ', url1); console.log('return url1: ', url1);
resovle(url1); resolve(url1);
}
});
});
}
httpHeadCall(requestUrl: string, callback: (success: boolean) => void) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requestUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status < 400) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e);
} }
}) };
})
}, xhr.open("HEAD", requestUrl, true);
xhr.send();
httpHeadCall(requsetUrl, callback) {
xhr.timeout = 15000;
let xhr = new XMLHttpRequest(); xhr.onerror = (e) => {
console.log("Status: Send Post Request to " + requsetUrl); console.log("汪汪汪 posterror", e);
try { callback(false);
xhr.onreadystatechange = () => { };
try {
xhr.ontimeout = (e) => {
console.log('xhr.readyState: ', xhr.readyState); console.log("汪汪汪 ontimeout", e);
callback(false);
if (xhr.readyState == 4) { };
if ((xhr.status >= 200 && xhr.status < 400)) { } catch (e) {
callback(true); console.log("Send Get Request error: ", e);
} else { }
callback(false); }
}
} _isPlayComplated: boolean = null;
_isReadyToPlay: boolean = null;
} catch (e) {
console.log(e) onLoad() {
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e)
}
},
// use this for initialization
_isPlayComplated: null,
_isReadyToPlay: null,
onLoad () {
cc.debug.setDisplayStats(false); cc.debug.setDisplayStats(false);
this.initSize(); this.initSize();
cc.find('Canvas/bg').scale = this._mapScaleMax; cc.find('Canvas/bg').scale = this._mapScaleMax;
cc.find('Canvas/video_node/bg').scale = this._mapScaleMax; cc.find('Canvas/video_node/bg').scale = this._mapScaleMax;
// cc.find('Canvas/bgwhite').zIndex=-2
// cc.find('Canvas/bg').zIndex=-1
// cc.find('Canvas/VideoNode').zIndex=0
// cc.find('Canvas/video_node').zIndex=1
// cc.find('Canvas/bg_video_shadow').zIndex=2
// cc.find('Canvas/Controls').zIndex=3
// cc.find('Canvas/videolist').zIndex=4
// cc.find('Canvas/btn_return').zIndex=5
// cc.find('Canvas/title').zIndex=5
this._isReadyToPlay = false; this._isReadyToPlay = false;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true; cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
this.videoPlayer.node.on('ready-to-play', () => { this.videoPlayer.node.on('ready-to-play', () => {
console.log('ready-to-play'); console.log('ready-to-play');
this.playButton.active = true; this.playButton.node.active = true;
cc.find(`Canvas/bg_video_shadow`).active = false; cc.find(`Canvas/bg_video_shadow`).active = false;
cc.find(`Canvas/loading`).active = false; // cc.find(`Canvas/loading`).active = false;
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration()); this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this._isReadyToPlay = true; this._isReadyToPlay = true;
this._isPlayComplated = false; this._isPlayComplated = false;
this.videoPlayer.currentTime = 0; this.videoPlayer.currentTime = 0;
// this.videoPlayer.resume();
this.play(); this.play();
}); });
this.videoPlayer.node.on('meta-loaded', () => { this.videoPlayer.node.on('meta-loaded', () => {
...@@ -189,7 +181,21 @@ cc.Class({ ...@@ -189,7 +181,21 @@ cc.Class({
}, 6000); }, 6000);
} }
}); });
this.videoPlayer.node.on('touchstart', () => { this.videoPlayer.node.on('touchstarted', () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`Canvas/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`Canvas/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on(cc.Node.EventType.TOUCH_START, () => {
console.log('touchstarted'); console.log('touchstarted');
if (this.isVideoFull) { if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true; this.videoPlayer.stayOnBottom = true;
...@@ -212,88 +218,100 @@ cc.Class({ ...@@ -212,88 +218,100 @@ cc.Class({
}); });
this.videoPlayer.node.on('paused', () => { this.videoPlayer.node.on('paused', () => {
console.log('paused'); console.log('paused');
// this.playButton.node.active = true;
// this.pauseButton.node.active = false;
}); });
this.videoPlayer.node.on('stopped', () => { this.videoPlayer.node.on('stopped', () => {
console.log('stopped'); console.log('stopped');
// this.playButton.node.active = true;
// this.pauseButton.node.active = false;
}); });
this.videoPlayer.node.on('completed', async () => { this.videoPlayer.node.on('completed', async () => {
console.log('completed'); console.log('completed');
// this.videoPlayer.currentTime = 0;
this._isPlayComplated = true; this._isPlayComplated = true;
this.playButton.node.active = false; this.playButton.node.active = false;
this.pauseButton.node.active = false; this.pauseButton.node.active = false;
this.restartButton.node.active = false; this.restartButton.node.active = false;
// 循环播放下一个
const nextItem = this.videoItemList[this.videoPlayIndex + 1]; const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if(nextItem) { if (nextItem) {
nextItem.emit('my_item_click'); nextItem.emit('my_item_click');
} else { } else {
this.videoItemList[0].emit('my_item_click'); this.videoItemList[0].emit('my_item_click');
} }
}); });
cc.view.setResizeCallback((params) => { cc.view.setResizeCallback(() => {
console.log('Resize', params); console.log('Resize');
this.initdDrag() this.initdDrag();
}); });
this.initdDrag(); this.initdDrag();
},
this.videoPlayIndex=0
this.refreshLastNextBtns()
}
refreshLastNextBtns(){
cc.find("Canvas/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList)
cc.find("Canvas/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
}
onClickNext(){
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
onClickLast(){
const nextItem = this.videoItemList[this.videoPlayIndex - 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
initListener() { initListener() {
// 设置缓冲加载动画 转动 if (window['air']) {
// cc.tween(this.loadingSprite) window["air"].dialogStatus = (statusCode: number) => {
// .by(0.1, { angle: -10 }) console.log("缓冲", statusCode);
// .repeatForever() if (statusCode == 701) {
// .start();
// 覆盖Air中的dialogStatus方法 用于监测视频加载状态
if(window['air']) {
window["air"].dialogStatus = (statusCode) => {
console.log("缓冲", statusCode)
if(statusCode == 701) {
// 缓冲中
this.loadingSprite.active = true; this.loadingSprite.active = true;
} else if(statusCode == 702) { } else if (statusCode == 702) {
// 缓冲结束
this.loadingSprite.active = false; this.loadingSprite.active = false;
} }
} };
} }
}, }
initdDrag() { initdDrag() {
const maxX = this.ProgressBar.width; const maxX = this.ProgressBar.width;
const minX = 0; const minX = 0;
this.barTag.off(cc.Node.EventType.TOUCH_START); this.barTag.off(cc.Node.EventType.TOUCH_START);
this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => { this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => {
if (!this._isReadyToPlay) { if (!this._isReadyToPlay) {
return; return;
} }
console.log("TOUCH_START"); console.log("TOUCH_START");
}); });
this.barTag.off(cc.Node.EventType.TOUCH_MOVE); this.barTag.off(cc.Node.EventType.TOUCH_MOVE);
this.barTag.on(cc.Node.EventType.TOUCH_MOVE,(e) => { this.barTag.on(cc.Node.EventType.TOUCH_MOVE, (e) => {
if (!this._isReadyToPlay) { if (!this._isReadyToPlay) {
return; return;
} }
const worldPos = e.getLocation(); const worldPos = e.getLocation();
const localPos = this.barTag.parent.convertToNodeSpaceAR(worldPos); const localPos = this.barTag.parent.convertToNodeSpaceAR(worldPos);
let newX = localPos.x; let newX = localPos.x;
newX = Math.min(maxX, Math.max(newX, minX)); newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX; this.barTag.x = newX;
const percent = newX / maxX; const percent = newX / maxX;
const dur = this.videoPlayer.getDuration(); const dur = this.videoPlayer.getDuration();
this.currentTimeLabel.string = this.formatTime(percent * dur ); this.currentTimeLabel.string = this.formatTime(percent * dur);
this.videoPlayer.currentTime = percent * dur; this.videoPlayer.currentTime = percent * dur;
}); });
this.barTag.off(cc.Node.EventType.TOUCH_ENDED); this.barTag.off(cc.Node.EventType.TOUCH_END);
this.barTag.on(cc.Node.EventType.TOUCH_ENDED, (e) => { this.barTag.on(cc.Node.EventType.TOUCH_END, (e) => {
if (!this._isReadyToPlay) { if (!this._isReadyToPlay) {
return; return;
} }
...@@ -308,84 +326,94 @@ cc.Class({ ...@@ -308,84 +326,94 @@ cc.Class({
console.log("MOUSE_UP"); console.log("MOUSE_UP");
this.updateBarByPos(this.barTag.x); this.updateBarByPos(this.barTag.x);
}); });
}, }
videoItemList: cc.Node[] = null;
videoPlayIndex: number = null;
videoItemList: null,
videoPlayIndex: null,
async initView() { async initView() {
this.videoItemList = []; this.videoItemList = [];
const videoListContent = cc.find(`Canvas/videolist/view/content`); const videoListContent = cc.find(`Canvas/videolist/view/content`);
const templateItem = cc.find(`item`, videoListContent); const templateItem = cc.find(`item`, videoListContent);
for (let i = 0; i < this.data.dataArr.length; i++) { for (let i = 0; i < this.data.dataArr.length; i++) {
const row = this.data.dataArr[i]; const row = this.data.dataArr[i];
const itemClone = cc.instantiate(templateItem); const itemClone = cc.instantiate(templateItem);
itemClone.parent = videoListContent; itemClone.parent = videoListContent;
itemClone.active = true; itemClone.active = true;
const spriteFrame = await asyncGetSpriteFrimeByUrl(row.cover); const spriteFrame = await asyncGetSpriteFrimeByUrl(row.cover);
const picNode = cc.find(`cover`, itemClone); const picNode1 = cc.find(`item/mask/cover`, itemClone);
picNode.getComponent(cc.Sprite).spriteFrame = spriteFrame; picNode1.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx = 226 / picNode.width; const sx1 = 321 / picNode1.width;
const sy = 126 / picNode.height; const sy1 = 199 / picNode1.height;
picNode.scale = Math.min(sx, sy); picNode1.scale = Math.min(sx1, sy1);
const picNode2 = cc.find(`item_active/mask/cover`, itemClone);
picNode2.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx2 = 366 / picNode2.width;
const sy2 = 227 / picNode2.height;
picNode2.scale = Math.min(sx2, sy2);
cc.find(`item_active/title`, itemClone).getComponent(cc.Label).string = row.title; cc.find(`item_active/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item/title`, itemClone).getComponent(cc.Label).string = row.title; cc.find(`item/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item_active/num`, itemClone).getComponent(cc.Label).string = (i+1>9?(i+1):`0${i+1}`); cc.find(`item_active/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
cc.find(`item/num`, itemClone).getComponent(cc.Label).string = (i+1>9?(i+1):`0${i+1}`); cc.find(`item/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
itemClone.attr({video_url: row.video_url, playIndex: i}); itemClone.attr({ video_url: row.video_url, playIndex: i });
itemClone.on('my_item_click', () => { itemClone.on('my_item_click', () => {
// 无法用代码触发click事件,所以只能写一个自定义事件了
this.clickVideoItem(null, itemClone); this.clickVideoItem(null, itemClone);
}); });
this.videoItemList.push(itemClone); this.videoItemList.push(itemClone);
} }
},
let videolist = cc.find(`Canvas/videolist`)
showTips(tips) { videolist.getComponent(cc.ScrollView).scrollToLeft()
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer'); }
if (middleLayer) {
middleLayer.showTips(tips); showTips(tips: string) {
} else { const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
console.log(tips); if (middleLayer) {
} middleLayer.showTips(tips);
}, } else {
// 选择视频播放 console.log(tips);
async clickVideoItem(evt, _node) { }
const item = evt?evt.currentTarget:_node; }
if (!item.video_url) {
async clickVideoItem(evt: cc.Event.EventTouch, _node: cc.Node) {
const item = evt ? evt.currentTarget : _node;
if (!item.video_url) {
this.showTips("视频不存在"); this.showTips("视频不存在");
return; return;
} }
if (item.video_url == this.videoPlayer.remoteURL) { if (item.video_url == this.videoPlayer.remoteURL) {
this.showTips("该视频正在播放"); this.showTips("该视频正在播放");
return; return;
} }
this.videoPlayIndex = item.playIndex; this.videoPlayIndex = item.playIndex;
this._isReadyToPlay = false; this._isReadyToPlay = false;
cc.find(`Canvas/loading`).active = true; // cc.find(`Canvas/loading`).active = true;
cc.find(`Canvas/bg`).active = true; cc.find(`Canvas/bg`).active = true;
cc.find(`Canvas/bgwhite`).active = true; cc.find(`Canvas/bgwhite`).active = true;
cc.find(`Canvas/bg_video_shadow`).active = true; // cc.find(`Canvas/bg_video_shadow`).active = true;
this.videoPlayer.node.x = -5000; // this.videoPlayer.node.x = -5000;
this.videoPlayer.node.y = -5000; // this.videoPlayer.node.y = -5000;
cc.find(`Canvas/videolist/view/content`).children.forEach(row => { cc.find(`Canvas/videolist/view/content`).children.forEach(row => {
cc.find(`item_active`, row).active = false; cc.find(`item_active`, row).active = false;
cc.find(`item`, row).active = true;
}); });
cc.find(`item_active`, item).active = true; cc.find(`item_active`, item).active = true;
const originalUrl = item.video_url; const originalUrl = item.video_url;
this.videoPlayer.remoteURL = await this.getVideoUrl(item.video_url); this.videoPlayer.remoteURL = await this.getVideoUrl(item.video_url);
// 数据采集
for (let i = 0; i < this.data.dataArr.length; i++) { for (let i = 0; i < this.data.dataArr.length; i++) {
const element = this.data.dataArr[i]; const element = this.data.dataArr[i];
if (element.video_url == originalUrl) { if (element.video_url == originalUrl) {
const count = this.data.dataArr[i].count; const count = this.data.dataArr[i].count;
if (count) { if (count) {
this.data.dataArr[i].count ++; this.data.dataArr[i].count++;
} else { } else {
this.data.dataArr[i].count = 1; this.data.dataArr[i].count = 1;
} }
...@@ -393,46 +421,71 @@ cc.Class({ ...@@ -393,46 +421,71 @@ cc.Class({
} }
const totalCount = this.data.totalCount; const totalCount = this.data.totalCount;
if (totalCount) { if (totalCount) {
this.data.totalCount ++; this.data.totalCount++;
} else { } else {
this.data.totalCount = 1; this.data.totalCount = 1;
} }
this.refreshLastNextBtns()
}, }
start() { start() {
this.node.zIndex = 10000;
let getData = this.getData.bind(this); let getData = this.getData.bind(this);
if (window && window.courseware) { if (window && window["courseware"]) {
// console.log('has window'); getData = window["courseware"].getData;
getData = window.courseware.getData;
} }
getData(async (data) => { getData(async (data) => {
console.log('data:', JSON.stringify(data)); console.log('data:', JSON.stringify(data));
this.data = data || this.getDefaultData(); this.data = data || this.getDefaultData();
await this.initView(); await this.initView();
if (window && window["air"]) { if (window && window["air"]) {
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
} }
cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1;
if (this.data.dataArr.length<=1){
console.log("qsj???")
cc.find(`Canvas/bg/videoBg`).scale=1.2
cc.find(`Canvas/bg/videoBg`).y=-136.058
// cc.find(`Canvas/video_node`).scale=1.2
cc.find(`Canvas/video_node`).width*=1.2
cc.find(`Canvas/video_node`).height*=1.2
cc.find(`Canvas/video_node`).y=73.311
cc.find(`Canvas/bg_video_shadow`).scale=1.2
cc.find(`Canvas/bg_video_shadow`).y=59.039
cc.find(`Canvas/btn_last`).x=-734.101
cc.find(`Canvas/btn_last`).y=-39.603
cc.find(`Canvas/btn_next`).x=734.101
cc.find(`Canvas/btn_next`).y=-39.603
cc.find(`Canvas/VideoNode`).scale=1.2
cc.find(`Canvas/Controls`).scale=1.2
cc.find(`Canvas/Controls`).y=-570
cc.find(`Canvas/Controls`).x+=50
this.videoPlayIndex=0
this.videoItemList[0].emit('my_item_click');
}
}); });
if(window.CustomEvent){ if (window.CustomEvent) {
window.dispatchEvent(new CustomEvent('resize'), true) window.dispatchEvent(new CustomEvent('resize'));
} }
this.initListener(); this.initListener();
}, }
updateBarByPos(newX) {
updateBarByPos(newX: number) {
const maxX = this.ProgressBar.width; const maxX = this.ProgressBar.width;
const minX = 0; const minX = 0;
let percent = newX / maxX; let percent = newX / maxX;
if (percent > 1) { if (percent > 1) {
percent = 1 percent = 1;
} }
const dur = this.videoPlayer.getDuration(); const dur = this.videoPlayer.getDuration();
this.videoPlayer.currentTime = percent * dur this.videoPlayer.currentTime = percent * dur;
}, }
updateBarByTime(ct){
updateBarByTime(ct: number) {
if (this._isPlayComplated) { if (this._isPlayComplated) {
return; return;
} }
...@@ -440,7 +493,7 @@ cc.Class({ ...@@ -440,7 +493,7 @@ cc.Class({
const dur = this.videoPlayer.getDuration(); const dur = this.videoPlayer.getDuration();
let percent = ct / dur; let percent = ct / dur;
if (percent > 1) { if (percent > 1) {
percent = 1 percent = 1;
} }
this.ProgressBar.getComponent(cc.ProgressBar).progress = percent; this.ProgressBar.getComponent(cc.ProgressBar).progress = percent;
const maxX = this.ProgressBar.width; const maxX = this.ProgressBar.width;
...@@ -448,25 +501,26 @@ cc.Class({ ...@@ -448,25 +501,26 @@ cc.Class({
let newX = percent * maxX; let newX = percent * maxX;
newX = Math.min(maxX, Math.max(newX, minX)); newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX; this.barTag.x = newX;
}, }
formatTime(time) {
formatTime(time: number): string {
if (time === undefined) { if (time === undefined) {
return ''; return '';
} }
let hh = Math.floor(time / 60 / 60); let hh:Number|String = Math.floor(time / 60 / 60);
if (hh > 0) { if (Number(hh) > 0) {
hh = `${hh.toString().padStart(2, '0')}:`; hh = `${hh.toString().padStart(2, '0')}:`;
} else { } else {
hh = ''; hh = '';
} }
const mm = Math.floor(time / 60).toString().padStart(2, '0'); const mm = Math.floor(time / 60).toString().padStart(2, '0');
const ss = Math.round(time % 60).toString().padStart(2, '0'); const ss = Math.round(time % 60).toString().padStart(2, '0');
return `${hh}${mm}:${ss}`; return `${hh}${mm}:${ss}`;
}, }
getData(func) { getData(func: (data: any) => void) {
const middleLayer = cc.find('middleLayer'); const middleLayer = cc.find('middleLayer');
if (middleLayer) { if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer'); const middleLayerComponent = middleLayer.getComponent('middleLayer');
...@@ -474,19 +528,21 @@ cc.Class({ ...@@ -474,19 +528,21 @@ cc.Class({
return; return;
} }
func(this.getDefaultData()); func(this.getDefaultData());
}, }
getDefaultData() { getDefaultData() {
return defaultData; return defaultData;
}, }
play(){ play() {
console.log("PL")
if (!this._isReadyToPlay) { if (!this._isReadyToPlay) {
return; return;
} }
const {width, height} = cc.find(`Canvas/bg`); const { width, height } = cc.find(`Canvas/bg`);
cc.find(`Canvas/text_tips`).active = false; cc.find(`Canvas/text_tips`).active = false;
cc.find(`Canvas/bg`).active = false; // cc.find(`Canvas/bg`).active = false;
cc.find(`Canvas/bgwhite`).active = false; cc.find(`Canvas/bgwhite`).active = false;
cc.find(`Canvas/bg_video_shadow`).active = false; cc.find(`Canvas/bg_video_shadow`).active = false;
...@@ -496,29 +552,34 @@ cc.Class({ ...@@ -496,29 +552,34 @@ cc.Class({
this.videoPlayer.node.x = videoContainer.x; this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y; this.videoPlayer.node.y = videoContainer.y;
this.videoPlayer.play(); this.videoPlayer.play();
}, }
pause(){
pause() {
this.videoPlayer.pause(); this.videoPlayer.pause();
}, }
forward(){
}, forward() {
backward(){ }
},
replay(){ backward() {
}
replay() {
this._isPlayComplated = false; this._isPlayComplated = false;
this.videoPlayer.currentTime = 0; this.videoPlayer.currentTime = 0;
this.videoPlayer.play(); this.videoPlayer.play();
}, }
playLocalAudio(audioName) { playLocalAudio(audioName: string) {
cc.audioEngine.stopAll(); cc.audioEngine.stopAll();
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource); const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
cc.audioEngine.playEffect(audio.clip, false); cc.audioEngine.playEffect(audio.clip, false);
}, }
time1: any = null;
isVideoFull: boolean = false;
tempPos: any = null;
time1: null,
isVideoFull: false,
tempPos: null,
fullScreen() { fullScreen() {
if (this.isVideoFull) { if (this.isVideoFull) {
return; return;
...@@ -534,9 +595,10 @@ cc.Class({ ...@@ -534,9 +595,10 @@ cc.Class({
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull; cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull; cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull; cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find(`Canvas/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('Canvas/video_node'); const videoContainer = cc.find('Canvas/video_node');
this.tempPos.videoPos = {x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height}; this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height };
videoContainer.width = this.node.width; videoContainer.width = this.node.width;
videoContainer.height = this.node.height; videoContainer.height = this.node.height;
videoContainer.x = 0; videoContainer.x = 0;
...@@ -545,11 +607,14 @@ cc.Class({ ...@@ -545,11 +607,14 @@ cc.Class({
cc.find(`Canvas/videolist`).active = false; cc.find(`Canvas/videolist`).active = false;
const controls = cc.find(`Canvas/Controls`); const controls = cc.find(`Canvas/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls) const controlBg = cc.find(`bg_video_bottom`, controls);
this.tempPos.controlPos = {x: controls.x, y: controls.y}; this.tempPos.controlPos = { x: controls.x, y: controls.y };
// cc.find(`bg_video_bottom`, controls).active = false; controls.x = 300; // qsj
controls.x = 0; if (this.data.dataArr.length<=1){
controls.y = 0 - this.node.height / 2 + 49; controls.y = 0 - this.node.height / 2-30;
} else {
controls.y = 0 - this.node.height / 2-30;
}
controlBg.opacity = 240; controlBg.opacity = 240;
controlBg.width = this.node.width; controlBg.width = this.node.width;
...@@ -559,15 +624,14 @@ cc.Class({ ...@@ -559,15 +624,14 @@ cc.Class({
this.videoPlayer.node.y = 0; this.videoPlayer.node.y = 0;
setTimeout(() => { setTimeout(() => {
// IOS下视频的全屏适配比例有问题,所以做一个计算 this.videoPlayer.node.width = Math.min(this.node.width, this.node.height * 16 / 9);
this.videoPlayer.node.width = Math.min(this.node.width, this.node.height*16/9);
}, 100); }, 100);
this.time1 = setTimeout(() => { this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false; this.videoPlayer.stayOnBottom = false;
cc.find(`Canvas/Controls`).active = false; cc.find(`Canvas/Controls`).active = false;
}, 3000); }, 3000);
}, }
exitFullScreen() { exitFullScreen() {
if (!this.isVideoFull) { if (!this.isVideoFull) {
...@@ -579,6 +643,7 @@ cc.Class({ ...@@ -579,6 +643,7 @@ cc.Class({
cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull; cc.find(`Canvas/Controls/exitfull`).active = this.isVideoFull;
cc.find(`Canvas/btn_return`).active = !this.isVideoFull; cc.find(`Canvas/btn_return`).active = !this.isVideoFull;
cc.find(`Canvas/title`).active = !this.isVideoFull; cc.find(`Canvas/title`).active = !this.isVideoFull;
cc.find(`Canvas/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('Canvas/video_node'); const videoContainer = cc.find('Canvas/video_node');
videoContainer.width = this.tempPos.videoPos.width; videoContainer.width = this.tempPos.videoPos.width;
...@@ -591,50 +656,47 @@ cc.Class({ ...@@ -591,50 +656,47 @@ cc.Class({
this.videoPlayer.node.x = videoContainer.x; this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y; this.videoPlayer.node.y = videoContainer.y;
cc.find(`Canvas/videolist`).active = true; cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1;
const controls = cc.find(`Canvas/Controls`); const controls = cc.find(`Canvas/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls) const controlBg = cc.find(`bg_video_bottom`, controls);
// cc.find(`bg_video_bottom`, controls).active = true;
controls.x = this.tempPos.controlPos.x; controls.x = this.tempPos.controlPos.x;
controls.y = this.tempPos.controlPos.y; controls.y = this.tempPos.controlPos.y;
controlBg.opacity = 255; controlBg.opacity = 255;
controlBg.width = 1259; controlBg.width = 1259;
if(this.time1) { if (this.time1) {
clearTimeout(this.time1); clearTimeout(this.time1);
} }
}, }
onDestroy() { onDestroy() {
if(this.time1) { clearTimeout(this.time1); } if (this.time1) {
}, clearTimeout(this.time1);
}
exitGame () { }
exitGame() {
this.data.templateName="JJ_Video_01";
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer'); const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) { if (middleLayer) {
// 有些模板需要在返回时上报数据,直接把数据作为参数传入就可以了 middleLayer.exitGame(this.data, true);
middleLayer.exitGame(this.data); } else {
} else { console.log("==触发返回事件==");
console.log("==触发返回事件=="); }
} }
},
update(dt: number) {
console.log("==VIDEO==",this.node.active);
// called every frame
update: function (dt) {
if (!this._isReadyToPlay) { if (!this._isReadyToPlay) {
return; return;
} }
// if (this.wardState && this.videoPlayer.isPlaying()) {
// this.wardState = false;
// this.pause();
// }
if (this.videoPlayer) { if (this.videoPlayer) {
const ct = this.videoPlayer.currentTime; const ct = this.videoPlayer.currentTime;
if (ct) { if (ct) {
this.updateBarByTime(ct); this.updateBarByTime(ct);
} }
if (this.videoPlayer.isPlaying()) { if (this.videoPlayer.isPlaying()) {
if (this.playButton.node.active) { if (this.playButton.node.active) {
this.playButton.node.active = false; this.playButton.node.active = false;
...@@ -642,20 +704,18 @@ cc.Class({ ...@@ -642,20 +704,18 @@ cc.Class({
} }
if (!this.pauseButton.node.active) { if (!this.pauseButton.node.active) {
this.pauseButton.node.active = true; this.pauseButton.node.active = true;
} }
} else { } else {
if (!this.playButton.node.active) { if (!this.playButton.node.active) {
this.playButton.node.active = true; this.playButton.node.active = true;
} }
if (this.pauseButton.node.active) { if (this.pauseButton.node.active) {
this.pauseButton.node.active = false; this.pauseButton.node.active = false;
} }
if (this.restartButton.node.active) { if (this.restartButton.node.active) {
this.playButton.node.active = false; this.playButton.node.active = false;
} }
} }
} }
}
}, }
}); \ No newline at end of file
{ {
"ver": "1.0.8", "ver": "1.0.8",
"uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a", "uuid": "55549888-dcef-408a-8203-8d3066ce5005",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
"loadPluginInNative": true, "loadPluginInNative": true,
......
export const defaultData = { export const defaultData = {
"dataArr": [ "dataArr": [
{ {
"title": "The Old Man", "title": "The Old Man",
"cover": "http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png", "cover": "http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/c37a3945121274a1f7d95717327539ec.mp4" "video_url": "http://staging-teach.cdn.ireadabc.com/c37a3945121274a1f7d95717327539ec.mp4"
}, },
{ {
"title": "Where has my little dog gone", "title": "Where has my little dog gone",
"cover": "http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png", "cover": "http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/d9df7ef1ba8d7e20613e83984d2d7b9a.mp4" "video_url": "http://staging-teach.cdn.ireadabc.com/d9df7ef1ba8d7e20613e83984d2d7b9a.mp4"
} }
] ]
}; };
\ No newline at end of file \ No newline at end of file
{
"ver": "1.1.2",
"uuid": "4954792e-a40f-4e1a-986a-f7e90addb3fd",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "9643b99b-bfa1-4b12-a3ae-a7a3582262e1",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"ver": "1.2.9",
"uuid": "59286199-6a11-47ed-8d48-f792c3448a8f",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "c83618a6-a058-4cb0-bf49-0872f18ba784",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
import { asyncGetSpriteFrimeByUrl, onHomeworkFinish } from "../Script/util_JJ_Video_01";
import { defaultData } from "../Script/defaultData_JJ_Video_01";
const { ccclass, property } = cc._decorator;
@ccclass
export default class VideoPlayerComponent extends cc.Component {
@property(cc.VideoPlayer)
videoPlayer: cc.VideoPlayer = null;
@property(cc.Node)
ProgressBar: cc.Node = null;
@property(cc.Button)
playButton: cc.Button = null;
@property(cc.Button)
pauseButton: cc.Button = null;
@property(cc.Button)
restartButton: cc.Button = null;
@property(cc.Button)
backButton: cc.Button = null;
@property(cc.Button)
forwardButton: cc.Button = null;
@property(cc.Label)
durationLabel: cc.Label = null;
@property(cc.Label)
currentTimeLabel: cc.Label = null;
@property(cc.Node)
barTag: cc.Node = null;
@property(cc.Node)
bar: cc.Node = null;
@property(cc.Node)
loadingSprite: cc.Node = null;
_designSize: cc.Size = null;
_frameSize: cc.Size = null;
_mapScaleMin: number = null;
_mapScaleMax: number = null;
_cocosScale: number = null;
data;
initSize() {
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height;
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height;
console.log("原本尺寸",screen_size,"现在尺寸",design_size)
let f = screen_size >= design_size;
cc.Canvas.instance.fitHeight = f;
cc.Canvas.instance.fitWidth = !f;
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
console.log("原本宽度",cc.director["_scene"].width,"现在宽度",frameSize.width)
console.log("原本高度",cc.director["_scene"].height,"现在高度",frameSize.height)
cc.director["_scene"].width = frameSize.width;
cc.director["_scene"].height = frameSize.height;
}
getVideoUrl(url1: string): Promise<string> {
return new Promise((resolve, reject) => {
const url2 = url1.replace(/.mp4$/g, "_h.mp4");
this.httpHeadCall(url2, (success) => {
if (success) {
console.log('return url2: ', url2);
resolve(url2);
} else {
console.log('return url1: ', url1);
resolve(url1);
}
});
});
}
httpHeadCall(requestUrl: string, callback: (success: boolean) => void) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requestUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status < 400) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e);
}
};
xhr.open("HEAD", requestUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e);
}
}
_isPlayComplated: boolean = null;
_isReadyToPlay: boolean = null;
onLoad() {
cc.debug.setDisplayStats(false);
this.initSize();
cc.find('JJ_Video_01/bg').scale = this._mapScaleMax;
cc.find('JJ_Video_01/video_node/bg').scale = this._mapScaleMax;
// cc.find('JJ_Video_01/bgwhite').zIndex=-2
// cc.find('JJ_Video_01/bg').zIndex=-1
// cc.find('JJ_Video_01/VideoNode').zIndex=0
// cc.find('JJ_Video_01/video_node').zIndex=1
// cc.find('JJ_Video_01/bg_video_shadow').zIndex=2
// cc.find('JJ_Video_01/Controls').zIndex=3
// cc.find('JJ_Video_01/videolist').zIndex=4
// cc.find('JJ_Video_01/btn_return').zIndex=5
// cc.find('JJ_Video_01/title').zIndex=5
this._isReadyToPlay = false;
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
this.videoPlayer.node.on('ready-to-play', () => {
console.log('ready-to-play');
this.playButton.node.active = true;
cc.find(`JJ_Video_01/bg_video_shadow`).active = false;
// cc.find(`JJ_Video_01/loading`).active = false;
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this._isReadyToPlay = true;
this._isPlayComplated = false;
this.videoPlayer.currentTime = 0;
this.play();
});
this.videoPlayer.node.on('meta-loaded', () => {
console.log('meta-loaded');
});
this.videoPlayer.node.on('clicked', () => {
console.log('clicked');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on('touchstarted', () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on(cc.Node.EventType.TOUCH_START, () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on('playing', () => {
console.log('playing');
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this.playButton.node.active = false;
this.restartButton.node.active = false;
this.pauseButton.node.active = true;
});
this.videoPlayer.node.on('paused', () => {
console.log('paused');
});
this.videoPlayer.node.on('stopped', () => {
console.log('stopped');
});
this.videoPlayer.node.on('completed', async () => {
console.log('completed');
this._isPlayComplated = true;
this.playButton.node.active = false;
this.pauseButton.node.active = false;
this.restartButton.node.active = false;
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
});
cc.view.setResizeCallback(() => {
console.log('Resize');
this.initdDrag();
});
this.initdDrag();
this.videoPlayIndex=0
this.refreshLastNextBtns()
}
refreshLastNextBtns(){
cc.find("JJ_Video_01/btn_last").active=this.videoPlayIndex!=0
if (this.videoItemList)
cc.find("JJ_Video_01/btn_next").active=this.videoPlayIndex!=this.videoItemList.length-1
}
onClickNext(){
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
onClickLast(){
const nextItem = this.videoItemList[this.videoPlayIndex - 1];
if (nextItem) {
nextItem.emit('my_item_click');
} else {
this.videoItemList[0].emit('my_item_click');
}
this.refreshLastNextBtns()
}
initListener() {
if (window['air']) {
window["air"].dialogStatus = (statusCode: number) => {
console.log("缓冲", statusCode);
if (statusCode == 701) {
this.loadingSprite.active = true;
} else if (statusCode == 702) {
this.loadingSprite.active = false;
}
};
}
}
initdDrag() {
const maxX = this.ProgressBar.width;
const minX = 0;
this.barTag.off(cc.Node.EventType.TOUCH_START);
this.barTag.on(cc.Node.EventType.TOUCH_START, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("TOUCH_START");
});
this.barTag.off(cc.Node.EventType.TOUCH_MOVE);
this.barTag.on(cc.Node.EventType.TOUCH_MOVE, (e) => {
if (!this._isReadyToPlay) {
return;
}
const worldPos = e.getLocation();
const localPos = this.barTag.parent.convertToNodeSpaceAR(worldPos);
let newX = localPos.x;
newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX;
const percent = newX / maxX;
const dur = this.videoPlayer.getDuration();
this.currentTimeLabel.string = this.formatTime(percent * dur);
this.videoPlayer.currentTime = percent * dur;
});
this.barTag.off(cc.Node.EventType.TOUCH_END);
this.barTag.on(cc.Node.EventType.TOUCH_END, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("TOUCH_ENDED");
this.updateBarByPos(this.barTag.x);
});
this.barTag.off(cc.Node.EventType.MOUSE_UP);
this.barTag.on(cc.Node.EventType.MOUSE_UP, (e) => {
if (!this._isReadyToPlay) {
return;
}
console.log("MOUSE_UP");
this.updateBarByPos(this.barTag.x);
});
}
videoItemList: cc.Node[] = null;
videoPlayIndex: number = null;
async initView() {
this.videoItemList = [];
const videoListContent = cc.find(`JJ_Video_01/videolist/view/content`);
const templateItem = cc.find(`item`, videoListContent);
for (let i = 0; i < this.data.dataArr.length; i++) {
const row = this.data.dataArr[i];
const itemClone = cc.instantiate(templateItem);
itemClone.parent = videoListContent;
itemClone.active = true;
const spriteFrame = await asyncGetSpriteFrimeByUrl(row.cover);
const picNode1 = cc.find(`item/mask/cover`, itemClone);
picNode1.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx1 = 321 / picNode1.width;
const sy1 = 199 / picNode1.height;
picNode1.scale = Math.min(sx1, sy1);
const picNode2 = cc.find(`item_active/mask/cover`, itemClone);
picNode2.getComponent(cc.Sprite).spriteFrame = spriteFrame;
const sx2 = 366 / picNode2.width;
const sy2 = 227 / picNode2.height;
picNode2.scale = Math.min(sx2, sy2);
cc.find(`item_active/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item/title`, itemClone).getComponent(cc.Label).string = row.title;
cc.find(`item_active/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
cc.find(`item/num`, itemClone).getComponent(cc.Label).string = String(i + 1 > 9 ? (i + 1) : `0${i + 1}`);
itemClone.attr({ video_url: row.video_url, playIndex: i });
itemClone.on('my_item_click', () => {
this.clickVideoItem(null, itemClone);
});
this.videoItemList.push(itemClone);
}
let videolist = cc.find(`JJ_Video_01/videolist`)
videolist.getComponent(cc.ScrollView).scrollToLeft()
}
showTips(tips: string) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.showTips(tips);
} else {
console.log(tips);
}
}
async clickVideoItem(evt: cc.Event.EventTouch, _node: cc.Node) {
const item = evt ? evt.currentTarget : _node;
if (!item.video_url) {
this.showTips("视频不存在");
return;
}
if (item.video_url == this.videoPlayer.remoteURL) {
this.showTips("该视频正在播放");
return;
}
this.videoPlayIndex = item.playIndex;
this._isReadyToPlay = false;
// cc.find(`JJ_Video_01/loading`).active = true;
cc.find(`JJ_Video_01/bg`).active = true;
cc.find(`JJ_Video_01/bgwhite`).active = true;
// cc.find(`JJ_Video_01/bg_video_shadow`).active = true;
// this.videoPlayer.node.x = -5000;
// this.videoPlayer.node.y = -5000;
cc.find(`JJ_Video_01/videolist/view/content`).children.forEach(row => {
cc.find(`item_active`, row).active = false;
cc.find(`item`, row).active = true;
});
cc.find(`item_active`, item).active = true;
const originalUrl = item.video_url;
this.videoPlayer.remoteURL = await this.getVideoUrl(item.video_url);
for (let i = 0; i < this.data.dataArr.length; i++) {
const element = this.data.dataArr[i];
if (element.video_url == originalUrl) {
const count = this.data.dataArr[i].count;
if (count) {
this.data.dataArr[i].count++;
} else {
this.data.dataArr[i].count = 1;
}
}
}
const totalCount = this.data.totalCount;
if (totalCount) {
this.data.totalCount++;
} else {
this.data.totalCount = 1;
}
this.refreshLastNextBtns()
}
start() {
this.node.zIndex = 10000;
let getData = this.getData.bind(this);
if (window && window["courseware"]) {
getData = window["courseware"].getData;
}
getData(async (data) => {
console.log('data:', JSON.stringify(data));
this.data = data || this.getDefaultData();
await this.initView();
if (window && window["air"]) {
window["air"].hideAirClassLoading();
}
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
if (this.data.dataArr.length<=1){
console.log("qsj???")
cc.find(`JJ_Video_01/bg/videoBg`).scale=1.2
cc.find(`JJ_Video_01/bg/videoBg`).y=-136.058
// cc.find(`JJ_Video_01/video_node`).scale=1.2
cc.find(`JJ_Video_01/video_node`).width*=1.2
cc.find(`JJ_Video_01/video_node`).height*=1.2
cc.find(`JJ_Video_01/video_node`).y=73.311
cc.find(`JJ_Video_01/bg_video_shadow`).scale=1.2
cc.find(`JJ_Video_01/bg_video_shadow`).y=59.039
cc.find(`JJ_Video_01/btn_last`).x=-734.101
cc.find(`JJ_Video_01/btn_last`).y=-39.603
cc.find(`JJ_Video_01/btn_next`).x=734.101
cc.find(`JJ_Video_01/btn_next`).y=-39.603
cc.find(`JJ_Video_01/VideoNode`).scale=1.2
cc.find(`JJ_Video_01/Controls`).scale=1.2
cc.find(`JJ_Video_01/Controls`).y=-570
cc.find(`JJ_Video_01/Controls`).x+=50
this.videoPlayIndex=0
this.videoItemList[0].emit('my_item_click');
}
});
if (window.CustomEvent) {
window.dispatchEvent(new CustomEvent('resize'));
}
this.initListener();
}
updateBarByPos(newX: number) {
const maxX = this.ProgressBar.width;
const minX = 0;
let percent = newX / maxX;
if (percent > 1) {
percent = 1;
}
const dur = this.videoPlayer.getDuration();
this.videoPlayer.currentTime = percent * dur;
}
updateBarByTime(ct: number) {
if (this._isPlayComplated) {
return;
}
this.currentTimeLabel.string = this.formatTime(ct);
const dur = this.videoPlayer.getDuration();
let percent = ct / dur;
if (percent > 1) {
percent = 1;
}
this.ProgressBar.getComponent(cc.ProgressBar).progress = percent;
const maxX = this.ProgressBar.width;
const minX = 0;
let newX = percent * maxX;
newX = Math.min(maxX, Math.max(newX, minX));
this.barTag.x = newX;
}
formatTime(time: number): string {
if (time === undefined) {
return '';
}
let hh:Number|String = Math.floor(time / 60 / 60);
if (Number(hh) > 0) {
hh = `${hh.toString().padStart(2, '0')}:`;
} else {
hh = '';
}
const mm = Math.floor(time / 60).toString().padStart(2, '0');
const ss = Math.round(time % 60).toString().padStart(2, '0');
return `${hh}${mm}:${ss}`;
}
getData(func: (data: any) => void) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.getData(func);
return;
}
func(this.getDefaultData());
}
getDefaultData() {
return defaultData;
}
play() {
if (!this._isReadyToPlay) {
return;
}
const { width, height } = cc.find(`JJ_Video_01/bg`);
cc.find(`JJ_Video_01/text_tips`).active = false;
// cc.find(`JJ_Video_01/bg`).active = false;
cc.find(`JJ_Video_01/bgwhite`).active = false;
cc.find(`JJ_Video_01/bg_video_shadow`).active = false;
const videoContainer = cc.find('JJ_Video_01/video_node');
cc.find('bg', videoContainer).width = width;
cc.find('bg', videoContainer).height = height;
this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y;
this.videoPlayer.play();
}
pause() {
this.videoPlayer.pause();
}
forward() {
}
backward() {
}
replay() {
this._isPlayComplated = false;
this.videoPlayer.currentTime = 0;
this.videoPlayer.play();
}
playLocalAudio(audioName: string) {
cc.audioEngine.stopAll();
const audio = cc.find(`JJ_Video_01/res/audio/${audioName}`).getComponent(cc.AudioSource);
cc.audioEngine.playEffect(audio.clip, false);
}
time1: any = null;
isVideoFull: boolean = false;
tempPos: any = null;
fullScreen() {
if (this.isVideoFull) {
return;
}
if (!this._isReadyToPlay) {
return;
}
this.tempPos = {};
console.log("====进入全屏===");
this.isVideoFull = true;
this.videoPlayer.stayOnBottom = true;
cc.find(`JJ_Video_01/Controls/fullscreen`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/Controls/exitfull`).active = this.isVideoFull;
cc.find(`JJ_Video_01/btn_return`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/title`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('JJ_Video_01/video_node');
this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height };
videoContainer.width = this.node.width;
videoContainer.height = this.node.height;
videoContainer.x = 0;
videoContainer.y = 0;
cc.find(`JJ_Video_01/videolist`).active = false;
const controls = cc.find(`JJ_Video_01/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls);
this.tempPos.controlPos = { x: controls.x, y: controls.y };
controls.x = 300; // qsj
if (this.data.dataArr.length<=1){
controls.y = 0 - this.node.height / 2-30;
} else {
controls.y = 0 - this.node.height / 2-30;
}
controlBg.opacity = 240;
controlBg.width = this.node.width;
this.videoPlayer.node.height = this.node.height;
this.videoPlayer.node.width = this.node.width;
this.videoPlayer.node.x = 0;
this.videoPlayer.node.y = 0;
setTimeout(() => {
this.videoPlayer.node.width = Math.min(this.node.width, this.node.height * 16 / 9);
}, 100);
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`JJ_Video_01/Controls`).active = false;
}, 3000);
}
exitFullScreen() {
if (!this.isVideoFull) {
return;
}
console.log("====退出全屏===", this.tempPos);
this.isVideoFull = false;
cc.find(`JJ_Video_01/Controls/fullscreen`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/Controls/exitfull`).active = this.isVideoFull;
cc.find(`JJ_Video_01/btn_return`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/title`).active = !this.isVideoFull;
cc.find(`JJ_Video_01/bg`).active = !this.isVideoFull;
const videoContainer = cc.find('JJ_Video_01/video_node');
videoContainer.width = this.tempPos.videoPos.width;
videoContainer.height = this.tempPos.videoPos.height;
videoContainer.x = this.tempPos.videoPos.x;
videoContainer.y = this.tempPos.videoPos.y;
this.videoPlayer.node.width = this.tempPos.videoPos.width;
this.videoPlayer.node.height = this.tempPos.videoPos.height;
this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y;
cc.find(`JJ_Video_01/videolist`).active = this.data.dataArr.length>1;
const controls = cc.find(`JJ_Video_01/Controls`);
const controlBg = cc.find(`bg_video_bottom`, controls);
controls.x = this.tempPos.controlPos.x;
controls.y = this.tempPos.controlPos.y;
controlBg.opacity = 255;
controlBg.width = 1259;
if (this.time1) {
clearTimeout(this.time1);
}
}
onDestroy() {
if (this.time1) {
clearTimeout(this.time1);
}
}
exitGame() {
this.data.templateName="JJ_Video_01";
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.exitGame(this.data, true);
} else {
console.log("==触发返回事件==");
}
}
update(dt: number) {
console.log("==VIDEO==",this.node.active);
if (!this._isReadyToPlay) {
return;
}
if (this.videoPlayer) {
const ct = this.videoPlayer.currentTime;
if (ct) {
this.updateBarByTime(ct);
}
if (this.videoPlayer.isPlaying()) {
if (this.playButton.node.active) {
this.playButton.node.active = false;
this.restartButton.node.active = false;
}
if (!this.pauseButton.node.active) {
this.pauseButton.node.active = true;
}
} else {
if (!this.playButton.node.active) {
this.playButton.node.active = true;
}
if (this.pauseButton.node.active) {
this.pauseButton.node.active = false;
}
if (this.restartButton.node.active) {
this.playButton.node.active = false;
}
}
}
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "ed52eb63-fc85-4f55-b5f9-b56aabff79cf",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e0e698b1-03bb-4e00-a907-4be459ef4eeb",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
export const defaultData = {
"dataArr": [
{
"title": "The Old Man",
"cover": "http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/c37a3945121274a1f7d95717327539ec.mp4"
},
{
"title": "Where has my little dog gone",
"cover": "http://staging-teach.cdn.ireadabc.com/f6f4bbef497409fef3c8f1d375893829.png",
"video_url": "http://staging-teach.cdn.ireadabc.com/d9df7ef1ba8d7e20613e83984d2d7b9a.mp4"
}
]
};
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "cf76d7b2-4e91-4e3f-b8ee-06159c3cd83d",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
export function getPosByAngle(angle, len) {
const radian = angle * Math.PI / 180;
const x = Math.sin(radian) * len;
const y = Math.cos(radian) * len;
return { x, y };
}
export function getAngleByPos(px, py, mx, my) {
const x = Math.abs(px - mx);
const y = Math.abs(py - my);
const z = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
const cos = y / z;
const radina = Math.acos(cos); // 用反三角函数求弧度
let angle = Math.floor(180 / (Math.PI / radina) * 100) / 100; // 将弧度转换成角度
if (mx > px && my > py) {// 鼠标在第四象限
angle = 180 - angle;
}
if (mx === px && my > py) {// 鼠标在y轴负方向上
angle = 180;
}
if (mx > px && my === py) {// 鼠标在x轴正方向上
angle = 90;
}
if (mx < px && my > py) {// 鼠标在第三象限
angle = 180 + angle;
}
if (mx < px && my === py) {// 鼠标在x轴负方向
angle = 270;
}
if (mx < px && my < py) {// 鼠标在第二象限
angle = 360 - angle;
}
// console.log('angle: ', angle);
return angle;
}
export function exchangeNodePos(baseNode, targetNode) {
return baseNode.convertToNodeSpaceAR(targetNode._parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y)));
}
export function RandomInt(a, b = 0) {
let max = Math.max(a, b);
let min = Math.min(a, b);
return Math.floor(Math.random() * (max - min) + min);
}
export function randomSortByArr(arr) {
const newArr = [];
const tmpArr = arr.concat();
while (tmpArr.length > 0) {
const randomIndex = Math.floor(tmpArr.length * Math.random());
newArr.push(tmpArr[randomIndex]);
tmpArr.splice(randomIndex, 1);
}
return newArr;
}
export function setSprNodeMaxLen(sprNode, maxW, maxH) {
const sx = maxW / sprNode.width;
const sy = maxH / sprNode.height;
const s = Math.min(sx, sy);
sprNode.scale = Math.round(s * 1000) / 1000;
}
export function localPosTolocalPos(baseNode, targetNode) {
const worldPos = targetNode.parent.convertToWorldSpaceAR(cc.v2(targetNode.x, targetNode.y));
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function worldPosToLocalPos(worldPos, baseNode) {
const localPos = baseNode.parent.convertToNodeSpaceAR(cc.v2(worldPos.x, worldPos.y));
return localPos;
}
export function getScaleRateBy2Node(baseNode, targetNode, maxFlag = true) {
const worldRect1 = targetNode.getBoundingBoxToWorld();
const worldRect2 = baseNode.getBoundingBoxToWorld();
const sx = worldRect1.width / worldRect2.width;
const sy = worldRect1.height / worldRect2.height;
if (maxFlag) {
return Math.max(sx, sy);
} else {
return Math.min(sx, sy);
}
}
export function getDistance(start, end) {
var pos = cc.v2(start.x - end.x, start.y - end.y);
var dis = Math.sqrt(pos.x * pos.x + pos.y * pos.y);
return dis;
}
export function playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
}
export function btnClickAnima(btn, time = 0.15, rate = 1.05) {
btn.tmpScale = btn.scale;
btn.on(cc.Node.EventType.TOUCH_START, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.scale * rate })
.start()
})
btn.on(cc.Node.EventType.TOUCH_CANCEL, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.tmpScale })
.start()
})
btn.on(cc.Node.EventType.TOUCH_END, () => {
cc.tween(btn)
.to(time / 2, { scale: btn.tmpScale })
.start()
})
}
export function setNetImg(item, res, { w, h }, custom = true) {
return new Promise((resolve, reject) => {
if (!item) return console.warn("图片更换失败,传入了错误的item");
let node = item.node ? item.node : item;
if (!res) {
if (node) node.active = false;
return console.warn("图片更换失败,传入了错误的res");
}
if (!node) return console.warn("图片更换失败,传入了错误的item");
if (node.net_url == res) return;
node.active = false;//
cc.loader.load({ url: res }, (err, texture) => {
if (err && !texture) return resolve(console.warn('loading loadRes warn-> ' + texture));
if (!cc.isValid(node)) return console.info("节点已销毁");
let nw = node.width = texture.width;
let nh = node.height = texture.height;
let component = node.getComponent(cc.Sprite);
let spriteFrame = new cc.SpriteFrame(texture);
component.spriteFrame = spriteFrame;
node.net_url = res;
if (!cc.isValid(node)) return console.info("节点已销毁");
if (!node) return console.warn("节点已销毁");
if (w && h && custom) {
let scaleX = w / nw;
let scaleY = h / nh;
let scale = scaleX <= scaleY ? scaleX : scaleY;
node.width = nw * scale;
node.height = nh * scale;
}
node.active = true;
resolve({ w: nw, h: nh });
});
})
}
export function getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
}
})
}
export function getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
}
export function getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(spr);
}
})
}
export function playAudio(audioClip, cb = null) {
if (audioClip) {
const audioId = cc.audioEngine.playEffect(audioClip, false);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
}
}
export async function asyncDelay(time) {
return new Promise((resolve, reject) => {
try {
cc.tween(cc.find('Canvas'))
.delay(time)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
})
}
export async function asyncLoadDragonBoneAnime(node, { skeJsonData: { url: skeJsonDataUrl }, texJsonData: { url: texJsonDataUrl }, texPngData: { url: texPngDataUrl } }) {
if (!texPngDataUrl || !texJsonDataUrl || !texPngDataUrl
|| texPngDataUrl == '' || texJsonDataUrl == '' || texPngDataUrl == '') {
return;
}
return new Promise((resolve, reject) => {
if (node.animaNode) {
node.animaNode.removeFromParent();
}
const animaNode = new cc.Node();
animaNode.name = 'animaNode';
animaNode.parent = node;
animaNode.active = true;
node.animaNode = animaNode;
const dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
const loadTexture = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
if (error) {
reject(error);
}
resolve(texture);
});
});
const loadTexJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texJsonDataUrl, (error, atlasJson) => {
if (error) {
reject(error);
}
resolve(atlasJson);
});
});
const loadSkeJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(skeJsonDataUrl, (error, dragonBonesJson) => {
if (error) {
reject(error);
}
resolve(dragonBonesJson);
});
});
Promise.all([loadTexture, loadTexJsonData, loadSkeJsonData]).then(([texture, atlasJson, dragonBonesJson]) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson.json);
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson.json);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
//设置
let defaultArmature = dragonBonesJson.json.armature[0];//aramture 所有的骨骼名称
dragonDisplay.armatureName = defaultArmature.name;
resolve(animaNode);
});
});
}
export class FireworkSettings {
baseNode; // 父节点
nodeList; // 火花节点的array
pos; // 发射点
side; // 发射方向
range; // 扩散范围
number; // 发射数量
scalseRange; // 缩放范围
constructor(baseNode, nodeList,
pos = cc.v2(0, 0),
side = cc.v2(0, 100),
range = 50,
number = 100,
scalseRange = 0
) {
this.baseNode = baseNode;
this.nodeList = nodeList;
this.pos = pos;
this.side = side;
this.range = range;
this.number = number;
this.scalseRange = scalseRange;
}
static copy(firework) {
return new FireworkSettings(
firework.baseNode,
firework.nodeList,
firework.pos,
firework.side,
firework.range,
firework.number,
);
}
}
export async function showFireworks(fireworkSettings) {
const { baseNode, nodeList, pos, side, range, number, scalseRange } = fireworkSettings;
new Array(number).fill(' ').forEach(async (_, i) => {
let rabbonNode = new cc.Node();
rabbonNode.parent = baseNode;
rabbonNode.x = pos.x;
rabbonNode.y = pos.y;
rabbonNode.angle = 60 * Math.random() - 30;
let node = cc.instantiate(nodeList[RandomInt(nodeList.length)]);
node.parent = rabbonNode;
node.active = true;
node.x = 0;
node.y = 0;
node.angle = 0;
node.scale = (Math.random() - 0.5) * scalseRange + 1;
const rate = Math.random();
const angle = Math.PI * (Math.random() * 2 - 1);
await asyncTweenBy(rabbonNode, 0.3, {
x: side.x * rate + Math.cos(angle) * range * rate,
y: side.y * rate + Math.sin(angle) * range * rate
}, {
easing: 'quadIn'
});
cc.tween(rabbonNode)
.by(8, { y: -2000 })
.start();
cc.tween(rabbonNode)
.to(5, { scale: (Math.random() - 0.5) * scalseRange + 1 })
.start();
rabbonFall(rabbonNode);
await asyncDelay(Math.random());
cc.tween(node)
.by(0.15, { x: -10, angle: -10 })
.by(0.3, { x: 20, angle: 20 })
.by(0.15, { x: -10, angle: -10 })
.union()
.repeatForever()
.start();
cc.tween(rabbonNode)
.delay(5)
.to(0.3, { opacity: 0 })
.call(() => {
node.stopAllActions();
node.active = false;
node.parent = null;
node = null;
})
.start();
});
}
async function rabbonFall(node) {
const time = 1 + Math.random();
const offsetX = RandomInt(-200, 200) * time;
await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 });
rabbonFall(node);
}
export async function asyncTweenTo(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
try {
cc.tween(node)
.to(duration, obj, ease)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
});
}
export async function asyncTweenBy(node, duration, obj, ease = undefined) {
return new Promise((resolve, reject) => {
try {
cc.tween(node)
.by(duration, obj, ease)
.call(() => {
resolve(null);
})
.start();
} catch (e) {
reject(e);
}
});
}
export function showTrebleFirework(baseNode, rabbonList) {
const middle = new FireworkSettings(baseNode, rabbonList);
middle.pos = cc.v2(0, -400);
middle.side = cc.v2(0, 1000);
middle.range = 200;
middle.number = 100;
middle.scalseRange = 0.4;
const left = FireworkSettings.copy(middle);
left.pos = cc.v2(-600, -400);
left.side = cc.v2(200, 1000);
const right = FireworkSettings.copy(middle);
right.pos = cc.v2(600, -400);
right.side = cc.v2(-200, 1000);
showFireworks(middle);
showFireworks(left);
showFireworks(right);
}
export function onHomeworkFinish(data) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.onHomeworkFinish(() => {}, data);
} else {
console.log('onHomeworkFinish', data);
}
}
export function jumpToBundle(bundleName) {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.loadOnlineBundle(bundleName);
} else {
console.log('jump to bundle: ' + bundleName);
}
}
export function jumpToLogin() {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.loadOnlineBundle("NJ_login");
} else {
console.log('jump to bundle: NJ_login');
}
}
export function asyncCallNetworkApiGet(apiName, data) {
return new Promise((resolve, reject) => {
callNetworkApiGet(apiName, data, (res => {
resolve(res);
}));
});
}
export function asyncCallNetworkApiPost(uri, data) {
return new Promise((resolve, reject) => {
callNetworkApiPost(uri, data, (res) => {
resolve(res);
});
});
}
export function callNetworkApiPost(uri, data, callBack) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.callNetworkApiPost(uri, data, callBack);
return;
}
const baseUrl = 'http://staging-openapi.iteachabc.com';
const xhr = new XMLHttpRequest();
const url = `${baseUrl}${uri}`;
xhr.open("POST", url, true);
xhr.setRequestHeader('content-type', 'application/json');
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
callBack(JSON.parse(xhr.responseText));
}
}
xhr.send(JSON.stringify(data));
}
export function callNetworkApiGet(uri, data, callBack) {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
if (middleLayer) {
middleLayer.callNetworkApiGet(uri, data, callBack);
return;
}
const baseUrl = 'http://staging-openapi.iteachabc.com';
let queryStr = '?';
const params = [];
for (const key in data) {
if (Object.hasOwnProperty.call(data, key)) {
params.push(`${key}=${data[key]}`);
}
}
queryStr += params.join("&");
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
callBack(xhr.responseText);
}
};
const url = `${baseUrl}${uri}${queryStr}`;
console.log('url = ' + url);
xhr.open('GET', url, true);
xhr.send();
}
function httpHeadCall(requsetUrl, callback) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requsetUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if ((xhr.status >= 200 && xhr.status < 400)) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e)
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e)
}
};
export function getVideoUrl(video_url, callback) {
const url1 = video_url;
const url2 = url1.replace(/.mp4$/g, "_l.mp4");
httpHeadCall(url2, (success) => {
if (success) {
console.log('return url2: ', url2);
callback(url2);
} else {
console.log('return url1: ', url1);
callback(url1);
}
})
};
export function buttonOnceClick(button, callback, scale = 1.0) {
button.addComponent(cc.Button);
const func = () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
cc.tween(button)
.to(0.1, { scale: scale * 1.1 })
.to(0.1, { scale: scale })
.call(() => {
button['cantClick'] = false;
callback && callback();
})
.start();
}
button.off('click');
button.once('click', func);
}
export function buttonOnClick(button, callback, scale = 1.0) {
button.on('click', () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
callback && callback();
button['cantClick'] = false;
});
}
export function asyncGetSpriteFrimeByUrl(url) {
return new Promise((resolve, reject) => {
cc.loader.load({ url }, (err, img) => {
if (err) {
reject(err);
return;
}
const spriteFrame = new cc.SpriteFrame(img)
resolve(spriteFrame);
})
});
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "d950c9d5-2271-41d2-a2f6-37b3cf9d569b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "a0910f9d-063b-4f28-ad70-008cb77f6673",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "13f89b4a-cdb6-40c6-85dd-5cdb8ad917e5",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9467816a-a150-4a80-864c-1630f46876d5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 460,
"height": 1080,
"platformSettings": {},
"subMetas": {
"bg_bg": {
"ver": "1.0.4",
"uuid": "7b1b9a24-6ffe-428a-94f7-a4167e2f58c9",
"rawTextureUuid": "9467816a-a150-4a80-864c-1630f46876d5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 460,
"height": 1080,
"rawWidth": 460,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5231ba36-fe05-472a-8ac4-522754ab8fb5",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 548,
"platformSettings": {},
"subMetas": {
"bg_bottom": {
"ver": "1.0.4",
"uuid": "234ab084-10f0-444b-9317-05a2e79fc865",
"rawTextureUuid": "5231ba36-fe05-472a-8ac4-522754ab8fb5",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 548,
"rawWidth": 1920,
"rawHeight": 548,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "23b8aafb-c37c-45e2-900b-152c979928f2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 223,
"height": 274,
"platformSettings": {},
"subMetas": {
"bg_left": {
"ver": "1.0.4",
"uuid": "6f7064ca-1a2b-40d6-9fd1-bee219ca78a8",
"rawTextureUuid": "23b8aafb-c37c-45e2-900b-152c979928f2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 223,
"height": 274,
"rawWidth": 223,
"rawHeight": 274,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "abf0b0cd-2c1f-4998-a7ad-8d460f9488fc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 327,
"platformSettings": {},
"subMetas": {
"bg_right": {
"ver": "1.0.4",
"uuid": "8274ddd3-3e42-4e68-aa18-1cfc3385f7c7",
"rawTextureUuid": "abf0b0cd-2c1f-4998-a7ad-8d460f9488fc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 200,
"height": 327,
"rawWidth": 200,
"rawHeight": 327,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1ec7d2ee-8183-490b-b0d4-a1f54df4ac22",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 971,
"height": 717,
"platformSettings": {},
"subMetas": {
"bg_video_bg": {
"ver": "1.0.4",
"uuid": "bbf1e3a9-27e1-420a-adf7-4bede4e54e51",
"rawTextureUuid": "1ec7d2ee-8183-490b-b0d4-a1f54df4ac22",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 971,
"height": 717,
"rawWidth": 971,
"rawHeight": 717,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2368a4b6-479f-4a0b-80e3-ef03b62fb202",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1255,
"height": 891,
"platformSettings": {},
"subMetas": {
"bg_video_bg2": {
"ver": "1.0.4",
"uuid": "bdfd467d-5c1a-41e7-9271-27892b0b7769",
"rawTextureUuid": "2368a4b6-479f-4a0b-80e3-ef03b62fb202",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1255,
"height": 891,
"rawWidth": 1255,
"rawHeight": 891,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "80283efa-d05b-4f13-8b37-6a34d35349e8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 971,
"height": 717,
"platformSettings": {},
"subMetas": {
"bg_video_bg_mask": {
"ver": "1.0.4",
"uuid": "4942db0a-b739-4f31-987a-a9b8c76ed038",
"rawTextureUuid": "80283efa-d05b-4f13-8b37-6a34d35349e8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 81.5,
"trimX": 50,
"trimY": 6,
"width": 870,
"height": 542,
"rawWidth": 971,
"rawHeight": 717,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "79c3bd4b-f24a-4b59-a849-7e0cd4c2187d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 417,
"height": 256,
"platformSettings": {},
"subMetas": {
"bg_video_chosen": {
"ver": "1.0.4",
"uuid": "9db8ec1a-5f28-4f9c-99ef-b66018fd54e5",
"rawTextureUuid": "79c3bd4b-f24a-4b59-a849-7e0cd4c2187d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 417,
"height": 256,
"rawWidth": 417,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3baa58ea-b70f-4443-9297-6c714c2e1ad7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 417,
"height": 256,
"platformSettings": {},
"subMetas": {
"bg_video_chosen_mask": {
"ver": "1.0.4",
"uuid": "116e7f0f-5a2d-4bd5-947e-7248356ea211",
"rawTextureUuid": "3baa58ea-b70f-4443-9297-6c714c2e1ad7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 8,
"trimX": 25,
"trimY": 6,
"width": 367,
"height": 228,
"rawWidth": 417,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "57f3ede2-4bf5-4324-922b-6243e0f55ea4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 348,
"height": 228,
"platformSettings": {},
"subMetas": {
"bg_video_unchosen": {
"ver": "1.0.4",
"uuid": "5ffb0180-b8f3-4086-8e95-6c4652eaa3ac",
"rawTextureUuid": "57f3ede2-4bf5-4324-922b-6243e0f55ea4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 348,
"height": 228,
"rawWidth": 348,
"rawHeight": 228,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8352083c-cf27-417d-b2b9-bb6df90744be",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 636,
"height": 55,
"platformSettings": {},
"subMetas": {
"bg_videotime_bg": {
"ver": "1.0.4",
"uuid": "a03aadf0-e818-47f3-bab6-4f77bbfd969c",
"rawTextureUuid": "8352083c-cf27-417d-b2b9-bb6df90744be",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 11,
"trimX": 13,
"trimY": 2,
"width": 610,
"height": 29,
"rawWidth": 636,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4fe753b6-8bb6-4ad5-8c80-a0560ac569d6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 636,
"height": 55,
"platformSettings": {},
"subMetas": {
"bg_videotime_progress": {
"ver": "1.0.4",
"uuid": "5e42909c-f0ec-4b12-9feb-f695eee4def5",
"rawTextureUuid": "4fe753b6-8bb6-4ad5-8c80-a0560ac569d6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 636,
"height": 55,
"rawWidth": 636,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "45afad3b-bde7-4f10-bb6f-fb39b4ff1951",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_downsize": {
"ver": "1.0.4",
"uuid": "381a6930-a3ed-432a-9297-e1eeef2a0082",
"rawTextureUuid": "45afad3b-bde7-4f10-bb6f-fb39b4ff1951",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6221b93a-64fb-4125-a6a5-fc245cf77b40",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 103,
"height": 103,
"platformSettings": {},
"subMetas": {
"btn_last": {
"ver": "1.0.4",
"uuid": "d0893e19-3900-461f-b09e-ecc435b815ba",
"rawTextureUuid": "6221b93a-64fb-4125-a6a5-fc245cf77b40",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 103,
"height": 103,
"rawWidth": 103,
"rawHeight": 103,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1e1f7dfb-c23a-406a-aeca-e961cffefbfb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 103,
"height": 103,
"platformSettings": {},
"subMetas": {
"btn_next": {
"ver": "1.0.4",
"uuid": "c528c2a2-e7b9-4f8b-9cd2-5cdd956ae9c0",
"rawTextureUuid": "1e1f7dfb-c23a-406a-aeca-e961cffefbfb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 103,
"height": 103,
"rawWidth": 103,
"rawHeight": 103,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "deec6641-b22a-4b0c-a8c0-f2b41769c0c7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_play": {
"ver": "1.0.4",
"uuid": "623242fc-e6b2-41a3-929d-d5594ba9c99b",
"rawTextureUuid": "deec6641-b22a-4b0c-a8c0-f2b41769c0c7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6be1c5a5-6bf2-4607-b335-3c366e3d56e8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 132,
"height": 132,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "b657058c-bcb3-456e-894f-6c8fa554dc16",
"rawTextureUuid": "6be1c5a5-6bf2-4607-b335-3c366e3d56e8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 2,
"trimY": 2,
"width": 128,
"height": 130,
"rawWidth": 132,
"rawHeight": 132,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7af0f94a-d2c1-43c4-bed0-b1641d46e996",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_stop": {
"ver": "1.0.4",
"uuid": "bc7f3310-02e0-4bb5-a1be-aca4ddf1f34a",
"rawTextureUuid": "7af0f94a-d2c1-43c4-bed0-b1641d46e996",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "126e2084-2f8b-48a1-9a46-38ca2cdaf454",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"btn_zoomin": {
"ver": "1.0.4",
"uuid": "f9e619b2-4f7a-40cf-99c6-2f303cfd5a6e",
"rawTextureUuid": "126e2084-2f8b-48a1-9a46-38ca2cdaf454",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 120,
"height": 120,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "01139abc-ab61-4bbd-bd17-b4552b071eca",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"尺寸": {
"ver": "1.0.4",
"uuid": "bf300679-7480-41b8-a896-bb88dec4fc03",
"rawTextureUuid": "01139abc-ab61-4bbd-bd17-b4552b071eca",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "31364ae0-1b3d-49e2-96af-6f2987a3c289",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"看动画": {
"ver": "1.0.4",
"uuid": "acb84a7d-725a-41af-895c-6235fa395d0c",
"rawTextureUuid": "31364ae0-1b3d-49e2-96af-6f2987a3c289",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "715805a4-91bc-4372-9375-ae7d3689dbe3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"看动画2": {
"ver": "1.0.4",
"uuid": "8267a57b-24ea-470d-a60c-4417e501f313",
"rawTextureUuid": "715805a4-91bc-4372-9375-ae7d3689dbe3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "0db8f105-0469-496e-9a19-de25f8e1a078",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c4461482-277e-4334-a337-e231d5c6c210",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1920,
"height": 1080,
"platformSettings": {},
"subMetas": {
"bg": {
"ver": "1.0.4",
"uuid": "230a8c53-5419-48e0-b987-5c718771adae",
"rawTextureUuid": "c4461482-277e-4334-a337-e231d5c6c210",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1920,
"height": 1080,
"rawWidth": 1920,
"rawHeight": 1080,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0846a64a-4e41-4c32-a0e7-50b295868e4a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 286,
"height": 310,
"platformSettings": {},
"subMetas": {
"bg_empty": {
"ver": "1.0.4",
"uuid": "944a3bf1-6b91-4340-b033-b6527cf1ad1d",
"rawTextureUuid": "0846a64a-4e41-4c32-a0e7-50b295868e4a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 286,
"height": 310,
"rawWidth": 286,
"rawHeight": 310,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8be4f122-1ff2-4c2c-af27-cfc67069585d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1259,
"height": 98,
"platformSettings": {},
"subMetas": {
"bg_video_bottom": {
"ver": "1.0.4",
"uuid": "72b5c33b-1bcd-40f5-8898-1b908ef71364",
"rawTextureUuid": "8be4f122-1ff2-4c2c-af27-cfc67069585d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1259,
"height": 98,
"rawWidth": 1259,
"rawHeight": 98,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e82ab03b-7e15-4f00-9c2e-a8281348876d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1320,
"height": 776,
"platformSettings": {},
"subMetas": {
"bg_video_shadow": {
"ver": "1.0.4",
"uuid": "3cf9eefa-37d7-448e-a7e0-80de8cc47b43",
"rawTextureUuid": "e82ab03b-7e15-4f00-9c2e-a8281348876d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1320,
"height": 776,
"rawWidth": 1320,
"rawHeight": 776,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "46c337fa-a31f-4a42-88d8-9c938bdf5382",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_replay": {
"ver": "1.0.4",
"uuid": "7e012503-182b-4fc2-8f4d-23e76503c89f",
"rawTextureUuid": "46c337fa-a31f-4a42-88d8-9c938bdf5382",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "aae5ec29-b039-4a0c-a7fe-e202e56ad910",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 96,
"height": 73,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "f5eae37f-321e-4b9e-8450-3ba46b5f28f3",
"rawTextureUuid": "aae5ec29-b039-4a0c-a7fe-e202e56ad910",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 96,
"height": 73,
"rawWidth": 96,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8c04c8c6-2011-4c26-a162-8e6bc1b2fc93",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_start": {
"ver": "1.0.4",
"uuid": "fa13fc3a-cb55-440f-bb3a-b2b73491b3b9",
"rawTextureUuid": "8c04c8c6-2011-4c26-a162-8e6bc1b2fc93",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2317ac66-eda4-4f75-89ba-966cb182197e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 91,
"height": 91,
"platformSettings": {},
"subMetas": {
"btn_stop": {
"ver": "1.0.4",
"uuid": "c402b64f-941c-4bd0-85db-3f834d3b1692",
"rawTextureUuid": "2317ac66-eda4-4f75-89ba-966cb182197e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 91,
"height": 91,
"rawWidth": 91,
"rawHeight": 91,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "bd105ac3-de17-40ae-8bf0-f545dfee5714",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 68,
"height": 68,
"platformSettings": {},
"subMetas": {
"btn_tiao": {
"ver": "1.0.4",
"uuid": "862af720-a49b-474b-8d78-a5cf87c3396c",
"rawTextureUuid": "bd105ac3-de17-40ae-8bf0-f545dfee5714",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 68,
"height": 68,
"rawWidth": 68,
"rawHeight": 68,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2eb50849-d568-445f-9c6f-f3de2f7c16a3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 257,
"height": 177,
"platformSettings": {},
"subMetas": {
"empty_white": {
"ver": "1.0.4",
"uuid": "32473ad1-d356-44b3-aa5e-e3c84bbe1110",
"rawTextureUuid": "2eb50849-d568-445f-9c6f-f3de2f7c16a3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 257,
"height": 177,
"rawWidth": 257,
"rawHeight": 177,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d2f31295-e818-45cf-b5ae-0df7a89dca1b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 226,
"height": 126,
"platformSettings": {},
"subMetas": {
"example": {
"ver": "1.0.4",
"uuid": "ee6bb029-abb1-4396-b6a3-6bfcbb9a4b40",
"rawTextureUuid": "d2f31295-e818-45cf-b5ae-0df7a89dca1b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 226,
"height": 126,
"rawWidth": 226,
"rawHeight": 126,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "73ccd1b2-bb55-4bef-847a-3da7d10b5854",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 55,
"height": 55,
"platformSettings": {},
"subMetas": {
"exitfull": {
"ver": "1.0.4",
"uuid": "048268d5-c9ec-433b-bd6c-fee3af71dfec",
"rawTextureUuid": "73ccd1b2-bb55-4bef-847a-3da7d10b5854",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 55,
"height": 55,
"rawWidth": 55,
"rawHeight": 55,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "3a7ae2d9-2f74-491e-bf06-47e0330054e6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 73,
"height": 73,
"platformSettings": {},
"subMetas": {
"fullscreen": {
"ver": "1.0.4",
"uuid": "030c0d71-916f-4e2e-80c2-9d970c3d76b5",
"rawTextureUuid": "3a7ae2d9-2f74-491e-bf06-47e0330054e6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 73,
"height": 73,
"rawWidth": 73,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "84feebf3-dbfb-4dc2-9ca7-595fd4d270bd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 445,
"height": 309,
"platformSettings": {},
"subMetas": {
"item": {
"ver": "1.0.4",
"uuid": "0054f180-ec54-4d48-820f-430b50aa5927",
"rawTextureUuid": "84feebf3-dbfb-4dc2-9ca7-595fd4d270bd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 445,
"height": 309,
"rawWidth": 445,
"rawHeight": 309,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6e5dc990-c0c2-4103-9645-a202baef1d2c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 445,
"height": 309,
"platformSettings": {},
"subMetas": {
"item_active": {
"ver": "1.0.4",
"uuid": "1d1ea559-dedf-496f-ade2-168f862b1ff3",
"rawTextureUuid": "6e5dc990-c0c2-4103-9645-a202baef1d2c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 445,
"height": 309,
"rawWidth": 445,
"rawHeight": 309,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b36de116-53f1-49d2-af55-3a26afbaba00",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 790,
"height": 9,
"platformSettings": {},
"subMetas": {
"process": {
"ver": "1.0.4",
"uuid": "adeb3c7d-e716-4dc0-b432-a23b2ccb56f4",
"rawTextureUuid": "b36de116-53f1-49d2-af55-3a26afbaba00",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 790,
"height": 9,
"rawWidth": 790,
"rawHeight": 9,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 11,
"borderRight": 9,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "970c8ed7-bc4a-473c-bbd7-5e763f5eaba3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 789,
"height": 9,
"platformSettings": {},
"subMetas": {
"processbg": {
"ver": "1.0.4",
"uuid": "458dd19d-48b4-4e9f-84f2-4c8c60dfbd68",
"rawTextureUuid": "970c8ed7-bc4a-473c-bbd7-5e763f5eaba3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 789,
"height": 9,
"rawWidth": 789,
"rawHeight": 9,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 15,
"borderRight": 15,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "f9c1bae0-4412-4891-bd12-210989097d70",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 280,
"height": 125,
"platformSettings": {},
"subMetas": {
"text_tips": {
"ver": "1.0.4",
"uuid": "65e83e12-5b8c-4109-9dac-014ef1cdbae8",
"rawTextureUuid": "f9c1bae0-4412-4891-bd12-210989097d70",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1,
"trimX": 16,
"trimY": 9,
"width": 248,
"height": 109,
"rawWidth": 280,
"rawHeight": 125,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "14be17ee-79b4-43a8-82c8-ee89af219a5e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"frameRate":24,"name":"img_audio","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"armatureName","aabb":{"x":-27.5,"y":-21,"width":55,"height":42},"bone":[{"name":"root"},{"length":14,"name":"1","parent":"root","transform":{"x":-25.4036,"skX":-90,"skY":-90}},{"length":14,"name":"2","parent":"root","transform":{"x":-19.3116,"skX":-90,"skY":-90}},{"length":19,"name":"3","parent":"root","transform":{"x":-12.9746,"skX":-90,"skY":-90}},{"length":15,"name":"4","parent":"root","transform":{"x":-7.1302,"skX":-90,"skY":-90}},{"length":21,"name":"5","parent":"root","transform":{"x":-0.9168,"skX":-90,"skY":-90}},{"length":17,"name":"6","parent":"root","transform":{"x":5.4841,"skX":-90,"skY":-90}},{"length":18,"name":"7","parent":"root","transform":{"x":12.4269,"skX":-90,"skY":-90}},{"length":16,"name":"8","parent":"root","transform":{"x":19.0094,"skX":-90,"skY":-90}},{"length":17,"name":"9","parent":"root","transform":{"x":25.5843,"skX":-90,"skY":-90}}],"slot":[{"name":"9","parent":"9"},{"name":"8","parent":"8"},{"name":"7","parent":"7"},{"name":"6","parent":"6"},{"name":"5","parent":"5"},{"name":"4","parent":"4"},{"name":"3","parent":"3"},{"name":"2","parent":"2"},{"name":"1","parent":"1"}],"skin":[{"slot":[{"name":"6","display":[{"name":"6","transform":{"y":0.02,"skX":90,"skY":90}}]},{"name":"7","display":[{"name":"7","transform":{"y":0.07,"skX":90,"skY":90}}]},{"name":"8","display":[{"name":"8","transform":{"x":0.5,"y":-0.51,"skX":90,"skY":90}}]},{"name":"1","display":[{"name":"1","transform":{"y":0.4,"skX":90,"skY":90}}]},{"name":"2","display":[{"name":"2","transform":{"y":-0.19,"skX":90,"skY":90}}]},{"name":"3","display":[{"name":"3","transform":{"y":-0.03,"skX":90,"skY":90}}]},{"name":"4","display":[{"name":"4","transform":{"x":0.5,"y":-0.37,"skX":90,"skY":90}}]},{"name":"9","display":[{"name":"9","transform":{"y":-0.58,"skX":90,"skY":90}}]},{"name":"5","display":[{"name":"5","transform":{"y":-0.08,"skX":90,"skY":90}}]}]}],"animation":[{"duration":24,"playTimes":0,"name":"newAnimation","bone":[{"name":"1","scaleFrame":[{"duration":6,"tweenEasing":0},{"duration":18,"tweenEasing":0,"x":0.3},{"duration":0}]},{"name":"2","scaleFrame":[{"duration":8,"tweenEasing":0},{"duration":16,"tweenEasing":0,"x":0.15},{"duration":0}]},{"name":"3","scaleFrame":[{"duration":10,"tweenEasing":0},{"duration":14,"tweenEasing":0,"x":0.1},{"duration":0}]},{"name":"4","scaleFrame":[{"duration":12,"tweenEasing":0},{"duration":12,"tweenEasing":0,"x":0.2},{"duration":0}]},{"name":"5","scaleFrame":[{"duration":14,"tweenEasing":0},{"duration":10,"tweenEasing":0,"x":0.3},{"duration":0}]},{"name":"6","scaleFrame":[{"duration":16,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":0.2},{"duration":0}]},{"name":"7","scaleFrame":[{"duration":18,"tweenEasing":0},{"duration":6,"tweenEasing":0,"x":0.1},{"duration":0}]},{"name":"8","scaleFrame":[{"duration":20,"tweenEasing":0},{"duration":4,"tweenEasing":0,"x":0.25},{"duration":0}]},{"name":"9","scaleFrame":[{"duration":6,"tweenEasing":0},{"duration":18,"tweenEasing":0,"x":0.25},{"duration":0}]}]}],"defaultActions":[{"gotoAndPlay":"newAnimation"}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "657bd8d8-d6e4-46d6-93f3-b9af5d0de932",
"subMetas": {}
}
\ No newline at end of file
{"name":"img_audio","SubTexture":[{"name":"9","x":16,"height":12,"y":50,"width":5},{"name":"8","x":24,"height":21,"y":27,"width":6},{"name":"7","x":1,"height":42,"y":1,"width":6},{"name":"6","x":16,"height":26,"y":1,"width":6},{"name":"5","x":9,"height":12,"y":43,"width":5},{"name":"4","x":16,"height":19,"y":29,"width":6},{"name":"3","x":9,"height":40,"y":1,"width":5},{"name":"2","x":24,"height":24,"y":1,"width":6},{"name":"1","x":1,"height":12,"y":45,"width":5}],"height":64,"imagePath":"img_audio_tex.png","width":32}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d653f007-3ed5-471e-bd26-0760310e94c4",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "04cd5c01-a3a3-464c-b3bb-13a75e8189d4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 32,
"height": 64,
"platformSettings": {},
"subMetas": {
"img_audio_tex": {
"ver": "1.0.4",
"uuid": "7a9225b9-0f70-4590-8b6a-e4f677a925c0",
"rawTextureUuid": "04cd5c01-a3a3-464c-b3bb-13a75e8189d4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 1,
"trimY": 1,
"width": 29,
"height": 61,
"rawWidth": 32,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{"name":"loading","version":"5.5","armature":[{"name":"Armature","ik":[],"bone":[{"name":"root","transform":{}},{"name":"组_1","transform":{"x":2.05,"skY":-90,"y":40.15,"skX":-90},"length":65,"parent":"root"},{"name":"A","transform":{"x":74.1475,"skY":90,"y":-2.05,"skX":90},"parent":"组_1"}],"aabb":{"x":-139.5,"height":180,"y":-90,"width":279},"defaultActions":[{"gotoAndPlay":"ufo"}],"animation":[{"name":"ufo","frame":[],"bone":[{"name":"root","rotateFrame":[],"translateFrame":[],"scaleFrame":[]},{"name":"组_1","rotateFrame":[{"duration":15,"rotate":8.3771,"curve":[0,0,0.5,1]},{"duration":15,"rotate":10.9763,"tweenEasing":0},{"duration":0,"rotate":8.3771}],"translateFrame":[{"curve":[0,0,0.5,1],"duration":15},{"tweenEasing":0,"y":13.0573,"duration":15},{"duration":0}],"scaleFrame":[]},{"name":"A","rotateFrame":[{"duration":10,"tweenEasing":0},{"duration":10,"rotate":-9.1133,"tweenEasing":0},{"duration":10,"rotate":-13.9913,"tweenEasing":0},{"duration":0}],"translateFrame":[{"tweenEasing":0,"duration":10},{"tweenEasing":0,"x":-6.4977,"y":1.2205,"duration":10},{"tweenEasing":0,"x":4.0509,"y":-0.6604,"duration":10},{"duration":0}],"scaleFrame":[]}],"playTimes":0,"ffd":[],"slot":[{"name":"组_1","displayFrame":[],"colorFrame":[]},{"name":"A","displayFrame":[{"duration":10},{"duration":10,"value":1},{"duration":10,"value":2},{"duration":0}],"colorFrame":[]}],"ik":[],"duration":30}],"slot":[{"name":"组_1","color":{},"parent":"组_1"},{"name":"A","color":{},"z":1,"parent":"A"}],"skin":[{"name":"","slot":[{"name":"A","display":[{"name":"ufo/A","transform":{"skY":-0.0263,"y":-1.0025,"skX":-0.0263},"type":"image","path":"ufo/A"},{"name":"ufo/B","transform":{"x":4.5,"skY":-0.0263,"y":-1.0025,"skX":-0.0263},"type":"image","path":"ufo/B"},{"name":"ufo/C","transform":{"x":-4.5,"skY":-0.0263,"y":-0.5025,"skX":-0.0263},"type":"image","path":"ufo/C"}]},{"name":"组_1","display":[{"name":"ufo/组_1","transform":{"x":40.15,"skY":89.9737,"y":-2.05,"skX":89.9737},"type":"image","path":"ufo/组_1"}]}]}],"frameRate":24,"type":"Armature"}],"frameRate":24,"isGlobal":0}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "28406e16-1b55-480d-a4d6-55e499df4abc",
"subMetas": {}
}
\ No newline at end of file
{"name":"loading","imagePath":"loading_tex.png","SubTexture":[{"name":"ufo/组_1","x":1,"height":180,"y":1,"width":279},{"name":"ufo/A","x":282,"height":80,"y":1,"width":83},{"name":"ufo/B","x":282,"height":80,"y":83,"width":60},{"name":"ufo/C","x":367,"height":83,"y":1,"width":58}],"height":256,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "6a7875cf-9c9d-410c-a0c5-4b85ff9cfc98",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5eca6fb1-1cad-4833-8005-512a139e78be",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 256,
"platformSettings": {},
"subMetas": {
"loading_tex": {
"ver": "1.0.4",
"uuid": "8f9e1134-35fe-4850-90e9-76988fd69f3f",
"rawTextureUuid": "5eca6fb1-1cad-4833-8005-512a139e78be",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -43,
"offsetY": 37,
"trimX": 1,
"trimY": 1,
"width": 424,
"height": 180,
"rawWidth": 512,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6ee3be57-355f-4b0f-a280-1132563ae163",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "06bdc83e-4dcb-4f4e-b3e6-492612f4cfdf",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "6b475e36-fe38-403c-96b2-f4a4052389de",
"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