Commit 6308c426 authored by liujiaxin's avatar liujiaxin

update .gitignore

parent 5de85225
File deleted
......@@ -8,3 +8,4 @@
/publish/publish/ios
/publish/publish/*.zip
/node_modules
play/.history
{
"ver": "2.0.1",
"uuid": "17e37c00-52ee-45df-9795-d534124a9d06",
"downloadMode": 0,
"duration": 0.401917,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "73a669bb-5d2b-4085-a40c-3a5d4564e32c",
"downloadMode": 0,
"duration": 0.636667,
"subMetas": {}
}
\ No newline at end of file
export const defaultData = {
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/8ffac3f84cfc0922f9f4726a01573aae.jpg",
"rect": {
"x": 350.64,
"y": 0,
"width": 275.72,
"height": 366
}
},
"hotZoneItemArr": [{
"id": "1637814752903",
"index": 0,
"audio_url": "http://staging-teach.cdn.ireadabc.com/190e0bec7c2c45936f4c5e8d2e76ca8c.mp3",
"itemType": "rect",
"fontScale": 0.76328125,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.76328125,
"skeJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/3466fc145510a329e9f61dfd535bf95d.json",
"name": "猫_ske.json"
},
"texJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/e45a23326fb71daf6315b75965fef44d.json",
"name": "猫_tex.json"
},
"texPngData": {
"url": "http://staging-teach.cdn.ireadabc.com/e6a86345144c118fbf0ef07b1c9076e3.png",
"name": "猫_tex.png"
},
"dragDot": {
"x": 488.5,
"y": 181.91712898751734
},
"gIdx": "0",
"labelText": "2.3",
"posX": 627,
"posY": 457.5,
"rect": {
"x": 47.22,
"y": 186,
"width": 77.14,
"height": 73.61
}
}, {
"id": "1637814801418",
"index": 1,
"audio_url": "http://staging-teach.cdn.ireadabc.com/6f0b27f38ecabcbe0ea6747ecbc2a4ef.mp3",
"itemType": "rect",
"fontScale": 0.76328125,
"imgScale": 1,
"imgSizeW": 0,
"imgSizeH": 0,
"mapScale": 0.76328125,
"skeJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/55951c794b414ab58cca023642819e37.json",
"name": "母鸡_ske.json"
},
"texJsonData": {
"url": "http://staging-teach.cdn.ireadabc.com/47b93323b1d1e1e6020704c537f46820.json",
"name": "母鸡_tex.json"
},
"texPngData": {
"url": "http://staging-teach.cdn.ireadabc.com/dd66021ff860b02a559d59817c71e27f.png",
"name": "母鸡_tex.png"
},
"dragDot": {
"x": 488.5,
"y": 181.91712898751734
},
"gIdx": "0",
"labelText": "4",
"posX": 848,
"posY": 68.5,
"rect": {
"x": 175.35,
"y": 34.08,
"width": 98.14,
"height": 25.22
}
}],
"begin_audio": "http://staging-teach.cdn.ireadabc.com/ce8446cedac3c367f4625c5a9b2c6095.mp3",
"end_audio": "http://staging-teach.cdn.ireadabc.com/0436231aed1f91741e0d67b235240df6.mp3",
"playing_audio": "http://staging-teach.cdn.ireadabc.com/5a653a762babdfb2499d10a5efa8e837.mp3"
}
/*
{
"begin_audio": "https://staging-teach.cdn.ireadabc.com/1286422024027254.mp3",
"begin_time_point":[
{"time": 5.368, "node": "house", "name": "normal"},
......@@ -28,3 +117,4 @@ export const defaultData = {
// "text": "This is a test label.",
// "audio_url": "http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"
}
*/
\ No newline at end of file
......@@ -352,3 +352,42 @@ export function onHomeworkFinish() {
console.log('onHomeworkFinish');
}
}
export function loadDragonBones(dragonDisplay,{tex, atlas, ske}) {
return new Promise((resolve, reject) => {
cc.loader.load({ url: tex, type: 'png' }, (error, texture) => {
if (error) {
reject();
return;
}
cc.loader.load({ url: atlas, type: 'txt' }, (error, atlasJson) => {
if (error) {
reject();
return;
}
cc.loader.load({ url: ske, type: 'txt' }, (error, dragonBonesJson) => {
if (error) {
reject();
return;
}
const atlasObj = new dragonBones.DragonBonesAtlasAsset()
atlasObj.uuid = atlas
atlasObj.atlasJson = atlasJson
atlasObj.texture = texture
const asset = new dragonBones.DragonBonesAsset()
asset.uuid = ske
asset.dragonBonesJson = dragonBonesJson;
const armatureName = asset._dragonBonesJsonData.armature[0].name || 'default';
dragonDisplay.armatureName = armatureName;
dragonDisplay.dragonAtlasAsset = atlasObj
dragonDisplay.dragonAsset = asset;
resolve(asset._dragonBonesJsonData.armature[0].aabb);
});
});
});
});
}
\ 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