Commit f22e8a60 authored by 范雪寒's avatar 范雪寒

feat: 素材准备

parent 429b4c9c
export const defaultData = {
"title": "asdf asd fa asdf",
"titleAudio": "http://staging-teach.cdn.ireadabc.com/23376490a9ba0f4a3fe0618fc1c935e1.mp3",
"titleLetter": "F",
"titleLetterAudio": "http://staging-teach.cdn.ireadabc.com/dfb27b510e121a1045a3b7613a530e43.mp3",
"middleImg": "http://staging-teach.cdn.ireadabc.com/a4a3de34fa5afdb8df150b95101450b1.png",
"middleImgAudio": "http://staging-teach.cdn.ireadabc.com/9f2fb9b0e8bee93e843e7d687e7aea50.mp3",
"totalAudio": "http://staging-teach.cdn.ireadabc.com/c0e467e1950cb24b1e581737a1344cb4.mp3",
"group": [
[
{
"word": "abcdefgh",
"img": "http://staging-teach.cdn.ireadabc.com/213871779bc2404f84bfa94672dd0e74.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "c",
"color": "#FF0000",
"line": true,
"number": 2,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#FF0000",
"line": true,
"number": 2,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": true,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#888888",
"line": true,
"number": 3,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "h",
"color": "#888888",
"line": true,
"number": 3,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "aaabbtttsss",
"img": "http://staging-teach.cdn.ireadabc.com/6fdf6169f0934dc6f2613196b21c55c6.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 2,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#888888",
"line": true,
"number": 3,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 0,
"group": 1,
"point": true,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "t",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": true,
"showOptions": false
},
{
"letter": "t",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "t",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "abababababab",
"img": "http://staging-teach.cdn.ireadabc.com/a328e3509dbf9ff14864fbfae8ce5bff.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "a",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 3,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 3,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 2,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": true,
"number": 2,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#888888",
"line": true,
"number": 1,
"group": 4,
"point": false,
"showOptions": false
}
]
}
],
[
{
"word": "ffdsasdfdssd",
"img": "http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": true,
"number": 3,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": true,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#888888",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": true,
"number": 1,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "qwsazxsaqwsa",
"img": "http://staging-teach.cdn.ireadabc.com/b4e3adf72519e2fc84fbdd4295626cab.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "q",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 2,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "z",
"color": "#888888",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "x",
"color": "#000000",
"line": true,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 1,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "q",
"color": "#000000",
"line": true,
"number": 3,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "nfgjuyjfghjnfg",
"img": "http://staging-teach.cdn.ireadabc.com/1c0f70ca6dbd1dc3cf6d29dc41c3bcbc.jpg",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "n",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "j",
"color": "#000000",
"line": true,
"number": 1,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "u",
"color": "#000000",
"line": true,
"number": 1,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "y",
"color": "#000000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "j",
"color": "#000000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": true,
"number": 3,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#000000",
"line": true,
"number": 3,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "h",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "j",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "n",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#888888",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
}
],
[
{
"word": "asssssss",
"img": "http://staging-teach.cdn.ireadabc.com/8418701467317d8a6061fac70ae9ef70.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 1,
"group": 0,
"point": true,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#888888",
"line": true,
"number": 3,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "qqqwwweeeee",
"img": "http://staging-teach.cdn.ireadabc.com/042226388ed1ed5b8451e3baf199062d.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "q",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "q",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "q",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": true,
"number": 3,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "e",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "qqwwddxxzzaa",
"img": "http://staging-teach.cdn.ireadabc.com/c2cba286bea68ca7110c7bb5b0f66adb.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "q",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "q",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "w",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "x",
"color": "#000000",
"line": true,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "x",
"color": "#000000",
"line": true,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "z",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "z",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 2,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": true,
"number": 2,
"group": 4,
"point": false,
"showOptions": false
}
]
}
],
[
{
"word": "hmfghfgsd",
"img": "http://staging-teach.cdn.ireadabc.com/d54fee99c198156ed66f4ec92de54f8e.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "h",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "m",
"color": "#888888",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "h",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#FF0000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#888888",
"line": true,
"number": 3,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "kdufslbiasdf",
"img": "http://staging-teach.cdn.ireadabc.com/39d5605e3fa8dcd8b0a59ff0e852eac1.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "k",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "u",
"color": "#FF0000",
"line": true,
"number": 1,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": true,
"showOptions": false
},
{
"letter": "l",
"color": "#FF0000",
"line": true,
"number": 2,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "i",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#888888",
"line": true,
"number": 3,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "s",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "d",
"color": "#888888",
"line": true,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
},
{
"word": "dfagoiytncjfkbauj",
"img": "http://staging-teach.cdn.ireadabc.com/b845bbf273c9c33a8abe940a27bf954b.png",
"audio": "",
"groups": [
"0",
"0",
"0",
"0",
"0"
],
"letterDataList": [
{
"letter": "d",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 0,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#FF0000",
"line": true,
"number": 2,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "g",
"color": "#000000",
"line": false,
"number": 0,
"group": 1,
"point": false,
"showOptions": false
},
{
"letter": "o",
"color": "#FF0000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "i",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "y",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "t",
"color": "#000000",
"line": false,
"number": 0,
"group": 2,
"point": false,
"showOptions": false
},
{
"letter": "n",
"color": "#888888",
"line": true,
"number": 2,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "c",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "j",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "f",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "k",
"color": "#000000",
"line": false,
"number": 0,
"group": 3,
"point": false,
"showOptions": false
},
{
"letter": "b",
"color": "#888888",
"line": true,
"number": 2,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "a",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "u",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
},
{
"letter": "j",
"color": "#000000",
"line": false,
"number": 0,
"group": 4,
"point": false,
"showOptions": false
}
]
}
]
],
"groupTitle": [
"asdf fsd fs ss sdf ds",
"asdfsd fas df asd fa",
"xzcvxczv cx vcxz vczx ",
"qw erqwe r qwer q"
]
}
\ No newline at end of file
import {
MySprite,
Label,
removeItemFromArr,
hideItem,
showItem,
moveItem,
tweenChange,
} from '../Unit';
import TWEEN from '@tweenjs/tween.js';
export class Game {
_parent = null;
_z = 0;
children: any = [this];
constructor(parent) {
this._parent = parent;
}
initData(data) {
}
_initView() {
this._checkFonts(() => {
this.initView();
});
}
_fontNameList = [];
_checkFonts(cb) {
let unloaded = false;
document['fonts'].forEach((font) => {
if (font.status === 'unloaded') {
unloaded = true;
}
});
if (unloaded) {
setTimeout(() => this._checkFonts(cb), 100);
return;
}
cb();
}
initView() {
}
_currentPlayingAudioName;
playAudio(key, now = true, callback = null) {
if (this._currentPlayingAudioName != '') {
const audio = this._parent.audioObj[this._currentPlayingAudioName];
if (audio) {
if (now) {
if (!audio.paused) {
audio.pause();
// audio.currentTime = 0;
}
}
}
}
this._currentPlayingAudioName = key;
this._parent.playAudio(key, now, () => {
this._currentPlayingAudioName = '';
if (callback) {
callback();
}
});
}
getAudioObj(key) {
return this._parent.audioObj[key];
}
_editMode = false;
setEditMode(flg) {
this._editMode = flg;
}
isEditMode() {
return this._editMode;
}
_save;
setSaveFunc(save) {
this._save = save;
}
addChild(node, z = 1) {
this._parent.renderArr.push(node);
if (this.children.indexOf(node) === -1) {
this.children.push(node);
node._z = z;
}
this.children.sort((a, b) => {
return a._z - b._z;
});
}
removeChildren() {
for (let i = 0; i < this.children.length; i++) {
if (this.children[i]) {
if (this.children[i] !== this) {
let child = this.children.splice(i, 1);
removeItemFromArr(this._parent.renderArr, child);
i--;
}
}
}
}
removeChild(child) {
const index = this.children.indexOf(child);
if (index !== -1) {
this.children.splice(index, 1);
}
removeItemFromArr(this._parent.renderArr, child);
}
_checkHitPosition(node, pos) {
let rightNode = null;
if (node.visible && node.alpha > 0 && node._touchEnabled && node._checkHitPosition(pos)) {
rightNode = node;
}
if (node.children.length > 1) {
for (var i = 1; i < node.children.length; ++i) {
if (node.children[i] != node) {
let result = this._checkHitPosition(node.children[i], pos);
if (result != null) {
rightNode = result;
}
}
}
}
return rightNode;
}
_currentTouchSprite = null;
_onTouchBegan(pos) {
let result = this._checkHitPosition(this, pos);
if (result == null) {
return;
}
if (result._onTouchBeganListener &&
typeof (result._onTouchBeganListener) == 'function') {
result._onTouchBeganListener(pos);
}
this._currentTouchSprite = result;
}
_onTouchMove(pos) {
if (this._currentTouchSprite == null) {
return;
}
if (this._currentTouchSprite._onTouchMoveListener &&
typeof (this._currentTouchSprite._onTouchMoveListener) == 'function') {
this._currentTouchSprite._onTouchMoveListener(pos);
}
}
_onTouchEnd(pos) {
if (this._currentTouchSprite == null) {
return;
}
if (this._currentTouchSprite._checkHitPosition(pos)) {
if (this._currentTouchSprite._onTouchEndListener &&
typeof (this._currentTouchSprite._onTouchEndListener) == 'function') {
this._currentTouchSprite._onTouchEndListener(pos);
}
this._currentTouchSprite = null;
} else {
if (this._currentTouchSprite._onTouchCancelListener &&
typeof (this._currentTouchSprite._onTouchCancelListener) == 'function') {
this._currentTouchSprite._onTouchCancelListener(pos);
}
this._currentTouchSprite = null;
}
}
getChildByName(name) {
for (var i = 1; i < this.children.length; ++i) {
let node = this.children[i];
if (node.getName() == name) {
return node;
}
}
return null;
}
seekChildByName(name) {
let result = this.getChildByName(name);
if (result == null) {
for (var i = 1; i < this.children.length; ++i) {
let node = this.children[i];
if (typeof (node.seekChildByName) == 'function') {
result = node.seekChildByName(name);
if (result != null) {
return result;
}
}
}
}
return result;
}
getScreenSize() {
return {
width: this._parent.canvasWidth,
height: this._parent.canvasHeight
};
}
getDefaultScreenSize() {
return {
width: this._parent.canvasBaseW,
height: this._parent.canvasBaseH
};
}
getFullScaleXY() {
let screenSize = this.getScreenSize();
let defaultSize = this.getDefaultScreenSize();
return Math.max(screenSize.height / defaultSize.height, screenSize.width / defaultSize.width);
}
_showMode = false;
showModeOn() {
this._showMode = true;
}
showModeOff() {
this._showMode = false;
}
isShowMode() {
return this._showMode;
}
}
// 节点名
class Nameable {
_parent = null;
constructor(parent) {
this._parent = parent;
}
_name = 'name';
setName(name) {
this._name = name;
}
getName() {
return this._name;
}
getChildByName(name) {
for (var i = 1; i < this._parent.children.length; ++i) {
let node = this._parent.children[i];
if (node.getName() == name) {
return node;
}
}
return null;
}
seekChildByName(name) {
let result = this.getChildByName(name);
if (result == null) {
for (var i = 1; i < this._parent.children.length; ++i) {
let node = this._parent.children[i];
if (typeof (node.seekChildByName) == 'function') {
result = node.seekChildByName(name);
if (result != null) {
return result;
}
}
}
}
return result;
}
}
class UserData {
// 用户自定义数据
userData = {};
get(key) {
return this.userData[key];
}
set(key, value) {
this.userData[key] = value;
}
}
export class MyLabel extends Label {
_nameable = new Nameable(this);
setName(name) {
this._nameable.setName(name);
}
getName() {
return this._nameable.getName();
}
getChildByName(name) {
return this._nameable.getChildByName(name);
}
seekChildByName(name) {
return this._nameable.seekChildByName(name);
}
// 位置
setPosition(x: any = 0, y = undefined) {
if (y !== undefined) {
this.x = x;
this.y = y;
} else {
this.x = x.x;
this.y = x.y;
}
}
setPositionX(x = 0) {
this.x = x;
}
setPositionY(y = 0) {
this.y = y;
}
_userData = new UserData();
get(key) {
return this._userData.get(key);
}
set(key, value) {
this._userData.set(key, value);
}
_touchEnabled = false;
// _swallowTouches = false; // TODO:多重触摸以后用到了再说
_onTouchBeganListener = null;
_onTouchMoveListener = null;
_onTouchEndListener = null;
_onTouchCancelListener = null;
addTouchBeganListener(func) {
this._touchEnabled = true;
this._onTouchBeganListener = func;
}
addTouchMoveListener(func) {
this._touchEnabled = true;
this._onTouchMoveListener = func;
}
addTouchEndListener(func) {
this._touchEnabled = true;
this._onTouchEndListener = func;
}
addTouchCancelListener(func) {
this._touchEnabled = true;
this._onTouchCancelListener = func;
}
_checkHitPosition(pos) {
const rect = this.getBoundingBox();
if (this._checkPointInRect(pos.x, pos.y, rect)) {
return true;
}
return false;
}
_checkPointInRect(x, y, rect) {
if (x >= rect.x && x <= rect.x + rect.width) {
if (y >= rect.y && y <= rect.y + rect.height) {
return true;
}
}
return false;
}
drawText() {
if (!this.text) {
return;
}
this.ctx.font = `${this.fontSize}px ${this.fontName}`;
this.ctx.textAlign = this.textAlign;
this.ctx.textBaseline = 'middle';
this.ctx.fontWeight = this.fontWeight;
let x = -(this.anchorX) * this._width;
let y = 0;
if (this._outlineFlag) {
this.ctx.lineWidth = this._outLineWidth;
this.ctx.strokeStyle = this._outLineColor;
this.ctx.strokeText(this.text, x, y);
}
this.ctx.fillStyle = this.fontColor;
if (this.outline > 0) {
this.ctx.lineWidth = this.outline;
this.ctx.strokeStyle = this.outlineColor;
this.ctx.strokeText(this.text, x, y);
}
this.ctx.fillText(this.text, x, y);
// console.log('汪汪汪: ' + this.scaleX * this.anchorX);
// console.log('汪汪汪: ' + this._width);
}
}
export class TouchSprite extends MySprite {
_nameable = new Nameable(this);
setName(name) {
this._nameable.setName(name);
}
getName() {
return this._nameable.getName();
}
getChildByName(name) {
return this._nameable.getChildByName(name);
}
seekChildByName(name) {
return this._nameable.seekChildByName(name);
}
_touchEnabled = false;
// _swallowTouches = false; // TODO:多重触摸以后用到了再说
_onTouchBeganListener = null;
_onTouchMoveListener = null;
_onTouchEndListener = null;
_onTouchCancelListener = null;
addTouchBeganListener(func) {
this._touchEnabled = true;
this._onTouchBeganListener = func;
}
addTouchMoveListener(func) {
this._touchEnabled = true;
this._onTouchMoveListener = func;
}
addTouchEndListener(func) {
this._touchEnabled = true;
this._onTouchEndListener = func;
}
addTouchCancelListener(func) {
this._touchEnabled = true;
this._onTouchCancelListener = func;
}
_checkHitPosition(pos) {
const rect = this.getBoundingBox();
if (this._checkPointInRect(pos.x, pos.y, rect)) {
return true;
}
return false;
}
_checkPointInRect(x, y, rect) {
if (x >= rect.x && x <= rect.x + rect.width) {
if (y >= rect.y && y <= rect.y + rect.height) {
return true;
}
}
return false;
}
// 位置
setPosition(x: any = 0, y = undefined) {
if (y !== undefined) {
this.x = x;
this.y = y;
} else {
this.x = x.x;
this.y = x.y;
}
}
setPositionX(x = 0) {
this.x = x;
}
setPositionY(y = 0) {
this.y = y;
}
// 用户自定义数据
_userData = new UserData();
get(key) {
return this._userData.get(key);
}
set(key, value) {
this._userData.set(key, value);
}
}
export function blinkItem(item: TouchSprite, time = 0.7) {
let interval = item.get('_blinkInterval');
if (interval) {
clearInterval(interval);
}
interval = setInterval(() => {
showItem(item, time, () => {
hideItem(item, time);
});
}, time * 2 * 1000);
item.set('_blinkInterval', interval);
}
export function stopBlinkItem(item: TouchSprite) {
let interval = item.get('_blinkInterval');
if (interval) {
clearInterval(interval);
}
item.set('_blinkInterval', null);
item.alpha = 0;
}
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 Between(a, b, c) {
let max = Math.max(a, b, c);
let min = Math.min(a, b, c);
return [a, b, c].find((number) => number != max && number != min);
}
export function shake(item, time = 0.5, rate = 1) {
let shakeSelf = function (item, time, callback, rate) {
const offX = 15 * item.scaleX * rate;
const offY = 15 * item.scaleX * rate;
const baseX = item.x;
const baseY = item.y;
const easing = TWEEN.Easing.Sinusoidal.InOut;
const move2 = () => {
moveItem(item, baseX, baseY, time * 9 / 16, () => {
if (callback) {
callback();
}
}, easing);
};
const move1 = () => {
moveItem(item, baseX + offX, baseY + offY, time * 7 / 16, () => {
move2();
}, easing);
};
move1();
}
shakeSelf(item, time, shake.bind(this, item, time, rate), rate);
}
export async function asyncDelayTime(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(123);
}, time * 1000);
})
}
export async function asyncTweenChange(node, obj, time, easing = null) {
return new Promise((resolve, reject) => {
tweenChange(node, obj, time, () => {
resolve(0);
}, easing);
});
}
\ No newline at end of file
import {
Game,
TouchSprite,
RandomInt,
Between,
MyLabel,
blinkItem,
stopBlinkItem,
asyncDelayTime,
asyncTweenChange,
} from './Game';
import {
Label,
jelly,
showPopParticle,
tweenChange,
rotateItem,
scaleItem,
delayCall,
hideItem,
showItem,
moveItem,
shake,
ShapeRect,
} from './../Unit';
import TWEEN from '@tweenjs/tween.js';
import { defaultData } from './DefaultData';
export class MyGame extends Game {
images = null;
data = null;
status = null;
initData(data) {
this.images = data.images;
this.status = {};
if (!data.data || Object.is(data.data, {}) || !data.data.tittle) {
this.data = defaultData;
} else {
this.data = data.data;
let imgUrlList = [];
let audioUrlList = [];
// imgUrlList.push(...this.data.bottomLineCards.map(card => card.img));
// audioUrlList.push(this.data.tittle.audio);
imgUrlList = imgUrlList.filter((data) => data != null && data != '');
audioUrlList = audioUrlList.filter((data) => data != null && data != '');
this.preLoadData(imgUrlList, audioUrlList);
}
}
preLoadData(imgUrlList, audioUrlList) {
imgUrlList.forEach((data) => {
this._parent.addUrlToImages(data);
});
audioUrlList.forEach((data) => {
this._parent.addUrlToAudioObj(data);
});
}
initView() {
// 初始化标题
this.initTittle();
// 初始化中间部分
this.initMiddle();
}
initBg() {
}
initTittle() {
console.log('汪汪汪 ')
const titleBg = new TouchSprite();
titleBg.init(this.images.get('img_title_bg'));
this.addChild(titleBg);
// titleBg.x = this.getFullScaleXY();
// titleBg.y = titleBg.height / 2 * this.mapScale;
// titleBg.setScaleXY(this.mapScale);
// this.renderArr.push(titleBg);
// const titleLetter = new Label(this.ctx);
// titleLetter.x = titleBg.width * 1 / 8;
// titleLetter.y = 0;
// titleLetter.fontSize = 48;
// titleLetter.fontColor = "#facf46";
// titleLetter.fontName = 'BerlinSansFBDemi';
// titleLetter.anchorX = 0;
// titleLetter.anchorY = 0.5;
// titleLetter.text = this.data.titleLetter;
// titleBg.addChild(titleLetter);
// const titleLabel = new Label(this.ctx);
// titleLabel.x = titleBg.width * 5 / 8;
// titleLabel.y = 0;
// titleLabel.fontSize = 36;
// titleLabel.fontColor = "#000000";
// titleLabel.fontName = 'FuturaStd';
// titleLabel.anchorX = 0;
// titleLabel.anchorY = 0.5;
// titleLabel.text = this.data.title;
// titleBg.addChild(titleLabel);
}
initMiddle() {
// const bg = new MySprite(this.ctx, this.images.get('img_grey_bg'));
// bg.x = this.canvasWidth / 2;
// bg.y = this.canvasHeight / 2;
// bg.setScaleXY(this.mapScale);
// bg.alpha = 0.5;
// this.renderArr.push(bg);
// this.bg = bg;
}
}
......@@ -9,11 +9,27 @@
}
@font-face
{
font-family: 'BerlinSansFBDemi';
src: url("../../assets/font/BerlinSansFBDemi-Bold.TTF") ;
}
@font-face
{
font-family: 'FuturaStd';
src: url("../../assets/font/FuturaStd-Medium.otf") ;
}
@font-face
{
font-family: 'GOTHICB';
src: url("../../assets/font/GOTHICB_1.TTF") ;
}
@font-face
{
font-family: 'BRLNSDB';
src: url("../../assets/font/BRLNSDB.TTF") ;
font-family: 'ahronbd';
src: url("../../assets/font/ahronbd-1.ttf") ;
}
<div class="game-container" #wrap>
<canvas id="canvas" #canvas></canvas>
</div>
<span style="position: absolute; top: 0px; font-family: BerlinSansFBDemi">&nbsp;</span>
<span style="position: absolute; top: 0px; font-family: FuturaStd">&nbsp;</span>
<span style="position: absolute; top: 0px; font-family: GOTHICB">&nbsp;</span>
<span style="position: absolute; top: 0px; font-family: ahronbd">&nbsp;</span>
import {Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core';
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener } from '@angular/core';
import {
Label, MySprite, tweenChange,
Label,
MySprite, tweenChange,
} from './Unit';
import {res, resAudio} from './resources';
import { res, resAudio } from './resources';
import {Subject} from 'rxjs';
import {debounceTime} from 'rxjs/operators';
import { Subject } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
import TWEEN from '@tweenjs/tween.js';
import { MyGame } from "./game/MyGame";
@Component({
selector: 'app-play',
templateUrl: './play.component.html',
......@@ -16,8 +23,8 @@ import TWEEN from '@tweenjs/tween.js';
})
export class PlayComponent implements OnInit, OnDestroy {
@ViewChild('canvas', {static: true }) canvas: ElementRef;
@ViewChild('wrap', {static: true }) wrap: ElementRef;
@ViewChild('canvas', { static: true }) canvas: ElementRef;
@ViewChild('wrap', { static: true }) wrap: ElementRef;
// 数据
data;
......@@ -33,7 +40,6 @@ export class PlayComponent implements OnInit, OnDestroy {
mx; // 点击x坐标
my; // 点击y坐标
// 资源
rawImages = new Map(res);
rawAudios = new Map(resAudio);
......@@ -51,26 +57,44 @@ export class PlayComponent implements OnInit, OnDestroy {
canvasLeft;
canvasTop;
saveKey = 'test_001211';
saveKey = 'test_00111';
btnLeft;
btnRight;
pic1;
pic2;
canTouch = true;
curPic;
game;
@HostListener('window:resize', ['$event'])
onResize(event) {
this.winResizeEventStream.next();
}
ngOnInit() {
this.data = {};
// 获取数据
const getData = (<any> window).courseware.getData;
const getData = (<any>window).courseware.getData;
getData((data) => {
if (data && typeof data == 'object') {
this.data = data;
}
// console.log('data:' , data);
this.game = new MyGame(this);
this.game.initData({
images: this.images,
data: this.data,
});
// 初始化 各事件监听
this.initListener();
......@@ -92,16 +116,6 @@ export class PlayComponent implements OnInit, OnDestroy {
ngOnDestroy() {
window['curCtx'] = null;
window.cancelAnimationFrame(this.animationId);
this.cleanAudio();
}
cleanAudio() {
if (this.audioObj) {
for (const key in this.audioObj) {
this.audioObj[key].pause();
}
}
}
......@@ -109,9 +123,27 @@ export class PlayComponent implements OnInit, OnDestroy {
// 预加载资源
this.loadResources().then(() => {
this.addServerListener();
window["air"].hideAirClassLoading(this.saveKey, this.data);
this.init();
this.update();
});
}
start() {
console.log(' in start');
this.init();
this.update();
}
addServerListener() {
const c = (<any>window).courseware;
if (!c || !c.onEvent) {
return;
}
c.onEvent('course-in-screen', (data, next) => { // 学生端 初始化时调用
this.start();
next();
});
}
......@@ -129,6 +161,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.canvas.nativeElement.width = this.wrap.nativeElement.clientWidth;
this.canvas.nativeElement.height = this.wrap.nativeElement.clientHeight;
this.ctx = this.canvas.nativeElement.getContext('2d');
this.canvas.nativeElement.width = this.canvasWidth;
this.canvas.nativeElement.height = this.canvasHeight;
......@@ -136,6 +169,11 @@ export class PlayComponent implements OnInit, OnDestroy {
window['curCtx'] = this.ctx;
}
updateItem(item) {
if (item) {
item.update();
......@@ -151,6 +189,12 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
initListener() {
this.winResizeEventStream
......@@ -159,6 +203,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderAfterResize();
});
// ---------------------------------------------
const setParentOffset = () => {
const rect = this.canvas.nativeElement.getBoundingClientRect();
......@@ -182,6 +227,7 @@ export class PlayComponent implements OnInit, OnDestroy {
};
// ---------------------------------------------
let firstTouch = true;
const touchDownFunc = (e) => {
......@@ -218,6 +264,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.mapUp(e);
};
const element = this.canvas.nativeElement;
const addTouchListener = () => {
......@@ -248,6 +295,7 @@ export class PlayComponent implements OnInit, OnDestroy {
addTouchListener();
}
playAudio(key, now = false, callback = null) {
const audio = this.audioObj[key];
......@@ -266,6 +314,8 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
loadResources() {
const pr = [];
this.rawImages.forEach((value, key) => {// 预加载图片
......@@ -305,8 +355,9 @@ export class PlayComponent implements OnInit, OnDestroy {
preloadAudio(url) {
return new Promise((resolve, reject) => {
const audio = new Audio();
resolve({})
audio.oncanplay = (a) => {
resolve(null);
//resolve();
};
audio.onerror = () => {
reject();
......@@ -316,12 +367,17 @@ export class PlayComponent implements OnInit, OnDestroy {
});
}
renderAfterResize() {
this.canvasWidth = this.wrap.nativeElement.clientWidth;
this.canvasHeight = this.wrap.nativeElement.clientHeight;
this.init();
}
checkClickTarget(target) {
const rect = target.getBoundingBox();
......@@ -354,6 +410,10 @@ export class PlayComponent implements OnInit, OnDestroy {
return false;
}
addUrlToAudioObj(key, url = null, vlomue = 1, loop = false, callback = null) {
const audioObj = this.audioObj;
......@@ -383,42 +443,64 @@ export class PlayComponent implements OnInit, OnDestroy {
this.rawImages.set(url, url);
}
// ======================================================编写区域==========================================================================
/**
* 添加默认数据 便于无数据时的展示
*/
initDefaultData() {
if (!this.data.pic_url) {
this.data.pic_url = 'assets/play/default/pic.jpg';
this.data.pic_url_2 = 'assets/play/default/pic.jpg';
}
// if (!this.data.pic_url) {
// this.data.pic_url = 'assets/play/default/pic.jpg';
// this.data.pic_url_2 = 'assets/play/default/pic.jpg';
// }
}
/**
* 添加预加载图片
*/
initImg() {
this.addUrlToImages(this.data.pic_url);
this.addUrlToImages(this.data.pic_url_2);
// this.addUrlToImages(this.data.pic_url);
// this.addUrlToImages(this.data.pic_url_2);
}
/**
* 添加预加载音频
*/
initAudio() {
// 音频资源
this.addUrlToAudioObj(this.data.audio_url);
this.addUrlToAudioObj(this.data.audio_url_2);
// this.addUrlToAudioObj(this.data.audio_url);
// this.addUrlToAudioObj(this.data.audio_url_2);
for (let item of this.rawAudios) {
if (item[0] != item[1]) {
// 音效
this.addUrlToAudioObj(item[0], this.rawAudios.get(item[0]), 0.3);
}
}
// 音效
this.addUrlToAudioObj('click', this.rawAudios.get('click'), 0.3);
}
/**
* 初始化数据
*/
initData() {
const sx = this.canvasWidth / this.canvasBaseW;
const sy = this.canvasHeight / this.canvasBaseH;
const s = Math.min(sx, sy);
......@@ -427,36 +509,82 @@ export class PlayComponent implements OnInit, OnDestroy {
// this.mapScale = sx;
// this.mapScale = sy;
this.renderArr = [];
}
/**
* 初始化试图
*/
initView() {
this.game._initView();
}
lastPage() {
if (this.curPic == this.pic1) {
return;
}
this.canTouch = false;
const moveLen = this.canvasWidth;
tweenChange(this.pic1, { x: this.pic1.x + moveLen }, 1);
tweenChange(this.pic2, { x: this.pic2.x + moveLen }, 1, () => {
this.canTouch = true;
this.curPic = this.pic1;
});
}
mapDown(event) {
if (!this.canTouch) {
nextPage() {
if (this.curPic == this.pic2) {
return;
}
// if ( this.checkClickTarget(this.btnLeft) ) {
// this.btnLeftClicked();
// return;
// }
this.canTouch = false;
const moveLen = this.canvasWidth;
tweenChange(this.pic1, { x: this.pic1.x - moveLen }, 1);
tweenChange(this.pic2, { x: this.pic2.x - moveLen }, 1, () => {
this.canTouch = true;
this.curPic = this.pic2;
});
}
mapMove(event) {
pic1Clicked() {
this.playAudio(this.data.audio_url);
}
pic2Clicked() {
this.playAudio(this.data.audio_url_2);
}
mapUp(event) {
mapDown(event) {
this.game._onTouchBegan({ x: this.mx, y: this.my });
}
mapMove(event) {
this.game._onTouchMove({ x: this.mx, y: this.my });
}
mapUp(event) {
this.game._onTouchEnd({ x: this.mx, y: this.my });
}
update() {
// ----------------------------------------------------------
this.animationId = window.requestAnimationFrame(this.update.bind(this));
// 清除画布内容
......@@ -465,6 +593,13 @@ export class PlayComponent implements OnInit, OnDestroy {
TWEEN.update();
// ----------------------------------------------------------
this.updateArr(this.renderArr);
}
}
const res = [
// ['bg', "assets/play/bg.jpg"],
['btn_left', "assets/play/btn_left.png"],
['btn_right', "assets/play/btn_right.png"],
// ['text_bg', "assets/play/text_bg.png"],
['btn_close', 'assets/play/btn_close.png'],
['img_grey_bg', 'assets/play/img_grey_bg.png'],
['img_line_grey', 'assets/play/img_line_grey.png'],
['img_title_bg', 'assets/play/img_title_bg.png'],
['btn_pause', 'assets/play/btn_pause.png'],
['img_group_bg_1', 'assets/play/img_group_bg_1.png'],
['img_line_purple', 'assets/play/img_line_purple.png'],
['img_white_bg', 'assets/play/img_white_bg.png'],
['btn_play', 'assets/play/btn_play.png'],
['img_group_bg_2', 'assets/play/img_group_bg_2.png'],
['img_line_red', 'assets/play/img_line_red.png'],
['img_win_bg', 'assets/play/img_win_bg.png'],
['btn_switch', 'assets/play/btn_switch.png'],
['img_line_black', 'assets/play/img_line_black.png'],
['img_oval_bg', 'assets/play/img_oval_bg.png '],
];
const resAudio = [
['click', "assets/play/music/click.mp3"],
// ['click', "assets/play/music/click.mp3"],
];
export {res, resAudio};
export { res, resAudio };
......@@ -7,7 +7,7 @@
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script type="text/javascript" src="https://staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script>
<script type="text/javascript" src="//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air.js"></script>
</head>
<body>
......
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