Initial Commit
This commit is contained in:
commit
bee5280f17
188 changed files with 1422187 additions and 0 deletions
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Ignore all files
|
||||
*.*
|
||||
|
||||
# Except
|
||||
!*.json
|
||||
!*.js
|
||||
!*.zip
|
||||
!*.7z
|
||||
!*.csv
|
||||
!.gitignore
|
||||
!README.md
|
||||
|
||||
# Images
|
||||
49
README.md
Normal file
49
README.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Apply Patch
|
||||
1. Click Code
|
||||
2. Click Download ZIP
|
||||
3. Extract to game folder and Replace All.
|
||||
|
||||
# How To Contribute
|
||||
TLDR 3 steps.
|
||||
|
||||
Fork the repository.
|
||||
Make the changes.
|
||||
Submit a pull request to the project owner.
|
||||
|
||||
If everything looks good and doesn't break things I'll merge it in.
|
||||
|
||||
Longer Version:
|
||||
|
||||
Things that are needed:
|
||||
* [VSCode](https://code.visualstudio.com/) Make sure you check all the boxes for context menus. 
|
||||
* The Game
|
||||
* [Git](https://git-scm.com/downloads) (Use the default for everything. Just keep clicking Next)
|
||||
* Motivation to learn
|
||||
|
||||
Installation:
|
||||
1. Fork the repo using the fork button at the top. Click Code > HTTPS > Copy URL.
|
||||
2. Right click on the game folder and click 'Open with VSCode' (Shift+Right_Click if you are on Windows 11)
|
||||
3. Click on the Source Control Button and click initialize repository.
|
||||
|
||||

|
||||
|
||||
4. At the top click on Terminal > New Terminal. Enter the following: `git clone [URL_YOU_COPIED_ABOVE]`.
|
||||
5. Copy the contents of the new folder created with git clone into the game folder and replace all.
|
||||
6. Your source control menu should be good to go and look like this.
|
||||
|
||||

|
||||
|
||||
Now you are all setup, all you need to do is play the game and look for any changes that need to be made. Stuff like spelling errors, wrong names, inconsistencies, spacing issues, etc.
|
||||
|
||||
7. Use the FIND functionality to search for what you are trying to fix. For example if a character's name is wrong, type that into the search menu and start looking, then make the change. Try not to mess with any scripts or variables you might see.
|
||||
|
||||

|
||||
|
||||
8. After you are satisfied with your changes it's time to put in a PR. Go to source control to see all your changes. Add a message and click the `Commit` button to save them all.
|
||||
|
||||

|
||||
|
||||
8. Click Sync to push your changes to your fork. Now all that's left is to put in a pull request.
|
||||
9. Go to Pull Requests > New Pull Requests. Look at the arrow, your fork should be pointing to the original repo (mine). Add in details on what you fixed and Submit. If everything looks good I'll merge it in and you would have successfully contributed.
|
||||
|
||||
Got questions? Just shoot me a message, more than happy to walk you through any of the tools.
|
||||
12
package.json
Normal file
12
package.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "",
|
||||
"main": "www/index.html",
|
||||
"js-flags": "--expose-gc",
|
||||
"window": {
|
||||
"title": "",
|
||||
"toolbar": false,
|
||||
"width": 816,
|
||||
"height": 624,
|
||||
"icon": "www/icon/icon.png"
|
||||
}
|
||||
}
|
||||
4603
www/data/Actors.json
Normal file
4603
www/data/Actors.json
Normal file
File diff suppressed because it is too large
Load diff
134922
www/data/Animations.json
Normal file
134922
www/data/Animations.json
Normal file
File diff suppressed because it is too large
Load diff
1526
www/data/Armors.json
Normal file
1526
www/data/Armors.json
Normal file
File diff suppressed because it is too large
Load diff
3608
www/data/Classes.json
Normal file
3608
www/data/Classes.json
Normal file
File diff suppressed because it is too large
Load diff
390949
www/data/CommonEvents.json
Normal file
390949
www/data/CommonEvents.json
Normal file
File diff suppressed because it is too large
Load diff
92
www/data/ContainerProperties.json
Normal file
92
www/data/ContainerProperties.json
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"Scene_Menu": {
|
||||
"WindowLayer": {
|
||||
"2,Window_MenuStatus": {
|
||||
"x": 48,
|
||||
"y": 0,
|
||||
"width": 816,
|
||||
"height": 444,
|
||||
"opacity": 0,
|
||||
"hidden": false,
|
||||
"_customFontSize": 28,
|
||||
"_customPadding": 18,
|
||||
"_customLineHeight": 36,
|
||||
"_customBackOpacity": 192,
|
||||
"_customBackFileName": "",
|
||||
"_customFontFace": ""
|
||||
},
|
||||
"0,Window_MenuCommand": {
|
||||
"x": 0,
|
||||
"y": 516,
|
||||
"width": 816,
|
||||
"height": 108,
|
||||
"opacity": 255,
|
||||
"hidden": false,
|
||||
"_customFontSize": 28,
|
||||
"_customPadding": 18,
|
||||
"_customLineHeight": 36,
|
||||
"_customBackOpacity": 192,
|
||||
"_customBackFileName": "",
|
||||
"_customFontFace": ""
|
||||
},
|
||||
"1,Window_Gold": {
|
||||
"x": 576,
|
||||
"y": 444,
|
||||
"width": 240,
|
||||
"height": 72,
|
||||
"opacity": 255,
|
||||
"hidden": false,
|
||||
"_customFontSize": 28,
|
||||
"_customPadding": 18,
|
||||
"_customLineHeight": 36,
|
||||
"_customBackOpacity": 192,
|
||||
"_customBackFileName": "",
|
||||
"_customFontFace": ""
|
||||
},
|
||||
"3,Window_MenuLabel": {
|
||||
"x": 336,
|
||||
"y": 444,
|
||||
"width": 240,
|
||||
"height": 72,
|
||||
"opacity": 255,
|
||||
"hidden": false,
|
||||
"_customFontSize": 28,
|
||||
"_customPadding": 18,
|
||||
"_customLineHeight": 36,
|
||||
"_customBackOpacity": 192,
|
||||
"_customBackFileName": "",
|
||||
"_customFontFace": ""
|
||||
}
|
||||
},
|
||||
"Scene_Menu": {
|
||||
"1,Sprite": {
|
||||
"x": -48,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"Scene_Title": {
|
||||
"Scene_Title": {
|
||||
"0,Sprite": {
|
||||
"x": 408,
|
||||
"y": 312
|
||||
}
|
||||
},
|
||||
"WindowLayer": {
|
||||
"0,Window_TitleCommand": {
|
||||
"x": 576,
|
||||
"y": 480,
|
||||
"width": 240,
|
||||
"height": 144,
|
||||
"opacity": 0,
|
||||
"hidden": false,
|
||||
"_customFontSize": 28,
|
||||
"_customPadding": 18,
|
||||
"_customLineHeight": 36,
|
||||
"_customBackOpacity": 192,
|
||||
"_customBackFileName": "",
|
||||
"_customFontFace": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12906
www/data/Enemies.json
Normal file
12906
www/data/Enemies.json
Normal file
File diff suppressed because it is too large
Load diff
2346
www/data/Items.json
Normal file
2346
www/data/Items.json
Normal file
File diff suppressed because it is too large
Load diff
17271
www/data/Map001.json
Normal file
17271
www/data/Map001.json
Normal file
File diff suppressed because it is too large
Load diff
2991
www/data/Map002.json
Normal file
2991
www/data/Map002.json
Normal file
File diff suppressed because it is too large
Load diff
3555
www/data/Map003.json
Normal file
3555
www/data/Map003.json
Normal file
File diff suppressed because it is too large
Load diff
2257
www/data/Map004.json
Normal file
2257
www/data/Map004.json
Normal file
File diff suppressed because it is too large
Load diff
2472
www/data/Map005.json
Normal file
2472
www/data/Map005.json
Normal file
File diff suppressed because it is too large
Load diff
3065
www/data/Map006.json
Normal file
3065
www/data/Map006.json
Normal file
File diff suppressed because it is too large
Load diff
11954
www/data/Map007.json
Normal file
11954
www/data/Map007.json
Normal file
File diff suppressed because it is too large
Load diff
10988
www/data/Map008.json
Normal file
10988
www/data/Map008.json
Normal file
File diff suppressed because it is too large
Load diff
21300
www/data/Map009.json
Normal file
21300
www/data/Map009.json
Normal file
File diff suppressed because it is too large
Load diff
23603
www/data/Map010.json
Normal file
23603
www/data/Map010.json
Normal file
File diff suppressed because it is too large
Load diff
3190
www/data/Map011.json
Normal file
3190
www/data/Map011.json
Normal file
File diff suppressed because it is too large
Load diff
4208
www/data/Map012.json
Normal file
4208
www/data/Map012.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map013.json
Normal file
1363
www/data/Map013.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map014.json
Normal file
1363
www/data/Map014.json
Normal file
File diff suppressed because it is too large
Load diff
3705
www/data/Map015.json
Normal file
3705
www/data/Map015.json
Normal file
File diff suppressed because it is too large
Load diff
3328
www/data/Map016.json
Normal file
3328
www/data/Map016.json
Normal file
File diff suppressed because it is too large
Load diff
7874
www/data/Map017.json
Normal file
7874
www/data/Map017.json
Normal file
File diff suppressed because it is too large
Load diff
13688
www/data/Map018.json
Normal file
13688
www/data/Map018.json
Normal file
File diff suppressed because it is too large
Load diff
9250
www/data/Map019.json
Normal file
9250
www/data/Map019.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map020.json
Normal file
1363
www/data/Map020.json
Normal file
File diff suppressed because it is too large
Load diff
20914
www/data/Map021.json
Normal file
20914
www/data/Map021.json
Normal file
File diff suppressed because it is too large
Load diff
16094
www/data/Map022.json
Normal file
16094
www/data/Map022.json
Normal file
File diff suppressed because it is too large
Load diff
22458
www/data/Map023.json
Normal file
22458
www/data/Map023.json
Normal file
File diff suppressed because it is too large
Load diff
9981
www/data/Map024.json
Normal file
9981
www/data/Map024.json
Normal file
File diff suppressed because it is too large
Load diff
13924
www/data/Map025.json
Normal file
13924
www/data/Map025.json
Normal file
File diff suppressed because it is too large
Load diff
14443
www/data/Map026.json
Normal file
14443
www/data/Map026.json
Normal file
File diff suppressed because it is too large
Load diff
14717
www/data/Map027.json
Normal file
14717
www/data/Map027.json
Normal file
File diff suppressed because it is too large
Load diff
4207
www/data/Map028.json
Normal file
4207
www/data/Map028.json
Normal file
File diff suppressed because it is too large
Load diff
6035
www/data/Map029.json
Normal file
6035
www/data/Map029.json
Normal file
File diff suppressed because it is too large
Load diff
7556
www/data/Map030.json
Normal file
7556
www/data/Map030.json
Normal file
File diff suppressed because it is too large
Load diff
19680
www/data/Map031.json
Normal file
19680
www/data/Map031.json
Normal file
File diff suppressed because it is too large
Load diff
11706
www/data/Map032.json
Normal file
11706
www/data/Map032.json
Normal file
File diff suppressed because it is too large
Load diff
15905
www/data/Map033.json
Normal file
15905
www/data/Map033.json
Normal file
File diff suppressed because it is too large
Load diff
19583
www/data/Map034.json
Normal file
19583
www/data/Map034.json
Normal file
File diff suppressed because it is too large
Load diff
19507
www/data/Map035.json
Normal file
19507
www/data/Map035.json
Normal file
File diff suppressed because it is too large
Load diff
3229
www/data/Map036.json
Normal file
3229
www/data/Map036.json
Normal file
File diff suppressed because it is too large
Load diff
46943
www/data/Map037.json
Normal file
46943
www/data/Map037.json
Normal file
File diff suppressed because it is too large
Load diff
4581
www/data/Map038.json
Normal file
4581
www/data/Map038.json
Normal file
File diff suppressed because it is too large
Load diff
4244
www/data/Map039.json
Normal file
4244
www/data/Map039.json
Normal file
File diff suppressed because it is too large
Load diff
3101
www/data/Map040.json
Normal file
3101
www/data/Map040.json
Normal file
File diff suppressed because it is too large
Load diff
13684
www/data/Map044.json
Normal file
13684
www/data/Map044.json
Normal file
File diff suppressed because it is too large
Load diff
3048
www/data/Map048.json
Normal file
3048
www/data/Map048.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map049.json
Normal file
1363
www/data/Map049.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map050.json
Normal file
1363
www/data/Map050.json
Normal file
File diff suppressed because it is too large
Load diff
2561
www/data/Map051.json
Normal file
2561
www/data/Map051.json
Normal file
File diff suppressed because it is too large
Load diff
4207
www/data/Map052.json
Normal file
4207
www/data/Map052.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map053.json
Normal file
1363
www/data/Map053.json
Normal file
File diff suppressed because it is too large
Load diff
4160
www/data/Map054.json
Normal file
4160
www/data/Map054.json
Normal file
File diff suppressed because it is too large
Load diff
3851
www/data/Map055.json
Normal file
3851
www/data/Map055.json
Normal file
File diff suppressed because it is too large
Load diff
3106
www/data/Map056.json
Normal file
3106
www/data/Map056.json
Normal file
File diff suppressed because it is too large
Load diff
4694
www/data/Map057.json
Normal file
4694
www/data/Map057.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map058.json
Normal file
1363
www/data/Map058.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map059.json
Normal file
1363
www/data/Map059.json
Normal file
File diff suppressed because it is too large
Load diff
1363
www/data/Map060.json
Normal file
1363
www/data/Map060.json
Normal file
File diff suppressed because it is too large
Load diff
3048
www/data/Map061.json
Normal file
3048
www/data/Map061.json
Normal file
File diff suppressed because it is too large
Load diff
3949
www/data/Map062.json
Normal file
3949
www/data/Map062.json
Normal file
File diff suppressed because it is too large
Load diff
3631
www/data/Map063.json
Normal file
3631
www/data/Map063.json
Normal file
File diff suppressed because it is too large
Load diff
3542
www/data/Map064.json
Normal file
3542
www/data/Map064.json
Normal file
File diff suppressed because it is too large
Load diff
2829
www/data/Map065.json
Normal file
2829
www/data/Map065.json
Normal file
File diff suppressed because it is too large
Load diff
2638
www/data/Map066.json
Normal file
2638
www/data/Map066.json
Normal file
File diff suppressed because it is too large
Load diff
13330
www/data/Map067.json
Normal file
13330
www/data/Map067.json
Normal file
File diff suppressed because it is too large
Load diff
16009
www/data/Map068.json
Normal file
16009
www/data/Map068.json
Normal file
File diff suppressed because it is too large
Load diff
31620
www/data/Map069.json
Normal file
31620
www/data/Map069.json
Normal file
File diff suppressed because it is too large
Load diff
6403
www/data/Map070.json
Normal file
6403
www/data/Map070.json
Normal file
File diff suppressed because it is too large
Load diff
585
www/data/MapInfos.json
Normal file
585
www/data/MapInfos.json
Normal file
|
|
@ -0,0 +1,585 @@
|
|||
[
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"expanded": true,
|
||||
"name": "OP",
|
||||
"order": 5,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"expanded": true,
|
||||
"name": "フレア部屋",
|
||||
"order": 10,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋",
|
||||
"order": 11,
|
||||
"parentId": 20,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"expanded": true,
|
||||
"name": "Debug",
|
||||
"order": 1,
|
||||
"parentId": 0,
|
||||
"scrollX": 1638,
|
||||
"scrollY": 922
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"expanded": true,
|
||||
"name": "ダンジョン(27,15)",
|
||||
"order": 14,
|
||||
"parentId": 0,
|
||||
"scrollX": 1638,
|
||||
"scrollY": 922
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"expanded": true,
|
||||
"name": "廃坑 入口",
|
||||
"order": 15,
|
||||
"parentId": 5,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"expanded": true,
|
||||
"name": "廃坑 1F",
|
||||
"order": 16,
|
||||
"parentId": 6,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"expanded": false,
|
||||
"name": "廃坑 B2F",
|
||||
"order": 18,
|
||||
"parentId": 6,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 633.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"expanded": true,
|
||||
"name": "廃坑 B1",
|
||||
"order": 17,
|
||||
"parentId": 6,
|
||||
"scrollX": 1234.5,
|
||||
"scrollY": 1512.75
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"expanded": true,
|
||||
"name": "回想部屋",
|
||||
"order": 2,
|
||||
"parentId": 4,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"expanded": true,
|
||||
"name": "商店街",
|
||||
"order": 12,
|
||||
"parentId": 20,
|
||||
"scrollX": 1634,
|
||||
"scrollY": 913
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"expanded": true,
|
||||
"name": "ケンジ部屋",
|
||||
"order": 13,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"expanded": true,
|
||||
"name": "前半",
|
||||
"order": 4,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"expanded": true,
|
||||
"name": "午前",
|
||||
"order": 6,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋(午前)",
|
||||
"order": 8,
|
||||
"parentId": 14,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"expanded": true,
|
||||
"name": "森 入口",
|
||||
"order": 19,
|
||||
"parentId": 5,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"expanded": false,
|
||||
"name": "登山道 山頂",
|
||||
"order": 33,
|
||||
"parentId": 68,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"expanded": true,
|
||||
"name": "市街地",
|
||||
"order": 34,
|
||||
"parentId": 5,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 767.25
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"expanded": true,
|
||||
"name": "BB団本拠地-中枢-",
|
||||
"order": 44,
|
||||
"parentId": 29,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 899.25
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"expanded": true,
|
||||
"name": "午後",
|
||||
"order": 9,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"expanded": false,
|
||||
"name": "BB団本拠地-最深部-",
|
||||
"order": 45,
|
||||
"parentId": 29,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 713.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"expanded": true,
|
||||
"name": "森 エリア2",
|
||||
"order": 21,
|
||||
"parentId": 16,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 923.25
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"expanded": false,
|
||||
"name": "森 エリア1",
|
||||
"order": 20,
|
||||
"parentId": 16,
|
||||
"scrollX": 1426.5,
|
||||
"scrollY": 923.25
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"expanded": false,
|
||||
"name": "森 最深部",
|
||||
"order": 22,
|
||||
"parentId": 16,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"expanded": true,
|
||||
"name": "公園",
|
||||
"order": 35,
|
||||
"parentId": 18,
|
||||
"scrollX": 1378.5,
|
||||
"scrollY": 863.25
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"expanded": true,
|
||||
"name": "住宅街",
|
||||
"order": 36,
|
||||
"parentId": 18,
|
||||
"scrollX": 1378.6666666666667,
|
||||
"scrollY": 1055.3333333333333
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"expanded": true,
|
||||
"name": "商店街",
|
||||
"order": 37,
|
||||
"parentId": 18,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋(午前)(敗北ルート)",
|
||||
"order": 58,
|
||||
"parentId": 59,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"expanded": true,
|
||||
"name": "BB団本拠地1",
|
||||
"order": 38,
|
||||
"parentId": 5,
|
||||
"scrollX": 1078.6666666666667,
|
||||
"scrollY": 755.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"expanded": false,
|
||||
"name": "BB団本拠地2",
|
||||
"order": 39,
|
||||
"parentId": 29,
|
||||
"scrollX": 720.8888888888889,
|
||||
"scrollY": 922.2222222222222
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"expanded": false,
|
||||
"name": "BB団本拠地5",
|
||||
"order": 42,
|
||||
"parentId": 29,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 912.75
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"expanded": true,
|
||||
"name": "水の洞窟 エリア1",
|
||||
"order": 26,
|
||||
"parentId": 5,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 1091.25
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"expanded": false,
|
||||
"name": "水の洞窟 エリア2",
|
||||
"order": 27,
|
||||
"parentId": 32,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 1230.75
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"expanded": false,
|
||||
"name": "水の洞窟 エリア3",
|
||||
"order": 28,
|
||||
"parentId": 32,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 912.75
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"expanded": false,
|
||||
"name": "水の洞窟 エリア4",
|
||||
"order": 29,
|
||||
"parentId": 32,
|
||||
"scrollX": 1126.6666666666667,
|
||||
"scrollY": 604
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"expanded": true,
|
||||
"name": "地下水路 B1",
|
||||
"order": 23,
|
||||
"parentId": 5,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"expanded": false,
|
||||
"name": "地下水路 B2",
|
||||
"order": 24,
|
||||
"parentId": 36,
|
||||
"scrollX": 2161.5,
|
||||
"scrollY": 897.75
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"expanded": false,
|
||||
"name": "地下水路 最深部",
|
||||
"order": 25,
|
||||
"parentId": 36,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"expanded": true,
|
||||
"name": "ギドウ部屋(敗北ルート)",
|
||||
"order": 64,
|
||||
"parentId": 60,
|
||||
"scrollX": 1404,
|
||||
"scrollY": 790.2857142857142
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"expanded": true,
|
||||
"name": "開発室",
|
||||
"order": 3,
|
||||
"parentId": 4,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
"id": 44,
|
||||
"expanded": true,
|
||||
"name": "BB団本拠地-中間地点-",
|
||||
"order": 41,
|
||||
"parentId": 29,
|
||||
"scrollX": 1078.6666666666667,
|
||||
"scrollY": 975.3333333333334
|
||||
},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{
|
||||
"id": 48,
|
||||
"expanded": true,
|
||||
"name": "午前フレア部屋(敗北後)",
|
||||
"order": 7,
|
||||
"parentId": 14,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"expanded": true,
|
||||
"name": "後半(勝利)",
|
||||
"order": 46,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 50,
|
||||
"expanded": true,
|
||||
"name": "午前",
|
||||
"order": 47,
|
||||
"parentId": 49,
|
||||
"scrollX": 1638,
|
||||
"scrollY": 922
|
||||
},
|
||||
{
|
||||
"id": 51,
|
||||
"expanded": true,
|
||||
"name": "午前フレア部屋勝利",
|
||||
"order": 48,
|
||||
"parentId": 50,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 52,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋(午前)勝利",
|
||||
"order": 49,
|
||||
"parentId": 50,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 694.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"expanded": true,
|
||||
"name": "午後",
|
||||
"order": 50,
|
||||
"parentId": 49,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"expanded": true,
|
||||
"name": "フレア部屋(勝利ルート)",
|
||||
"order": 51,
|
||||
"parentId": 53,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 55,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋(勝利ルート)",
|
||||
"order": 52,
|
||||
"parentId": 53,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"expanded": true,
|
||||
"name": "商店街(勝利ルート)",
|
||||
"order": 53,
|
||||
"parentId": 53,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 57,
|
||||
"expanded": true,
|
||||
"name": "ケンジ部屋(勝利ルート)",
|
||||
"order": 54,
|
||||
"parentId": 53,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 58,
|
||||
"expanded": true,
|
||||
"name": "後半(敗北)",
|
||||
"order": 55,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 59,
|
||||
"expanded": true,
|
||||
"name": "午前",
|
||||
"order": 56,
|
||||
"parentId": 58,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"expanded": true,
|
||||
"name": "午後",
|
||||
"order": 59,
|
||||
"parentId": 58,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"expanded": true,
|
||||
"name": "午前フレア部屋(敗北ルート)",
|
||||
"order": 57,
|
||||
"parentId": 59,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"expanded": true,
|
||||
"name": "BB団本拠地3",
|
||||
"order": 40,
|
||||
"parentId": 29,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"expanded": true,
|
||||
"name": "フレア部屋(敗北ルート)",
|
||||
"order": 60,
|
||||
"parentId": 60,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 64,
|
||||
"expanded": true,
|
||||
"name": "司令室部屋(敗北ルート)",
|
||||
"order": 61,
|
||||
"parentId": 60,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 614.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"expanded": true,
|
||||
"name": "商店街(敗北ルート)",
|
||||
"order": 62,
|
||||
"parentId": 60,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 66,
|
||||
"expanded": true,
|
||||
"name": "ケンジ部屋(敗北ルート)",
|
||||
"order": 63,
|
||||
"parentId": 60,
|
||||
"scrollX": 1089.3333333333333,
|
||||
"scrollY": 608.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"expanded": false,
|
||||
"name": "BB団本拠地6",
|
||||
"order": 43,
|
||||
"parentId": 29,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 912.75
|
||||
},
|
||||
{
|
||||
"id": 68,
|
||||
"expanded": true,
|
||||
"name": "登山道1",
|
||||
"order": 30,
|
||||
"parentId": 5,
|
||||
"scrollX": 1213.5,
|
||||
"scrollY": 1656.75
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"expanded": true,
|
||||
"name": "登山道2",
|
||||
"order": 31,
|
||||
"parentId": 68,
|
||||
"scrollX": 1570.5,
|
||||
"scrollY": 1656.75
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"expanded": true,
|
||||
"name": "登山道3",
|
||||
"order": 32,
|
||||
"parentId": 68,
|
||||
"scrollX": 1225.5,
|
||||
"scrollY": 684.75
|
||||
}
|
||||
]
|
||||
12925
www/data/Skills.json
Normal file
12925
www/data/Skills.json
Normal file
File diff suppressed because it is too large
Load diff
1852
www/data/States.json
Normal file
1852
www/data/States.json
Normal file
File diff suppressed because it is too large
Load diff
1525
www/data/System.json
Normal file
1525
www/data/System.json
Normal file
File diff suppressed because it is too large
Load diff
106695
www/data/Tilesets.json
Normal file
106695
www/data/Tilesets.json
Normal file
File diff suppressed because it is too large
Load diff
5543
www/data/Troops.json
Normal file
5543
www/data/Troops.json
Normal file
File diff suppressed because it is too large
Load diff
519
www/data/Weapons.json
Normal file
519
www/data/Weapons.json
Normal file
|
|
@ -0,0 +1,519 @@
|
|||
[
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"animationId": 1,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 101,
|
||||
"name": "----装備--------------------",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 500,
|
||||
"wtypeId": 6
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"animationId": 6,
|
||||
"description": "ピュアフレイムの使う剣。\n",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 97,
|
||||
"name": "ピュアソード",
|
||||
"note": "",
|
||||
"price": 20,
|
||||
"wtypeId": 2,
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
12,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"damage": {
|
||||
"critical": "",
|
||||
"elementId": "",
|
||||
"formula": "",
|
||||
"type": "",
|
||||
"variance": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"animationId": 6,
|
||||
"description": "ピュアフレイムの使う剣。\n",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 97,
|
||||
"name": "ピュアソード+",
|
||||
"note": "",
|
||||
"price": 100,
|
||||
"wtypeId": 2,
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
40,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"damage": {
|
||||
"critical": "",
|
||||
"elementId": "",
|
||||
"formula": "",
|
||||
"type": "",
|
||||
"variance": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"animationId": 6,
|
||||
"description": "ピュアフレイムの使う剣。\n",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 97,
|
||||
"name": "ピュアソード++",
|
||||
"note": "",
|
||||
"price": 1000,
|
||||
"wtypeId": 2,
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"damage": {
|
||||
"critical": "",
|
||||
"elementId": "",
|
||||
"formula": "",
|
||||
"type": "",
|
||||
"variance": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
}
|
||||
]
|
||||
1
www/img/spines/Ecamera/NTFECamera.json
Normal file
1
www/img/spines/Ecamera/NTFECamera.json
Normal file
File diff suppressed because one or more lines are too long
1
www/img/spines/Vcamera/NTFVcamera.json
Normal file
1
www/img/spines/Vcamera/NTFVcamera.json
Normal file
File diff suppressed because one or more lines are too long
445
www/js/libs/fpsmeter.js
Normal file
445
www/js/libs/fpsmeter.js
Normal file
|
|
@ -0,0 +1,445 @@
|
|||
/*! FPSMeter 0.3.1 - 9th May 2013 | https://github.com/Darsain/fpsmeter */
|
||||
(function (m, j) {
|
||||
function s(a, e) {
|
||||
for (var g in e)
|
||||
try {
|
||||
a.style[g] = e[g];
|
||||
} catch (j) {}
|
||||
return a;
|
||||
}
|
||||
function H(a) {
|
||||
return null == a
|
||||
? String(a)
|
||||
: "object" === typeof a || "function" === typeof a
|
||||
? Object.prototype.toString
|
||||
.call(a)
|
||||
.match(/\s([a-z]+)/i)[1]
|
||||
.toLowerCase() || "object"
|
||||
: typeof a;
|
||||
}
|
||||
function R(a, e) {
|
||||
if ("array" !== H(e)) return -1;
|
||||
if (e.indexOf) return e.indexOf(a);
|
||||
for (var g = 0, j = e.length; g < j; g++) if (e[g] === a) return g;
|
||||
return -1;
|
||||
}
|
||||
function I() {
|
||||
var a = arguments,
|
||||
e;
|
||||
for (e in a[1])
|
||||
if (a[1].hasOwnProperty(e))
|
||||
switch (H(a[1][e])) {
|
||||
case "object":
|
||||
a[0][e] = I({}, a[0][e], a[1][e]);
|
||||
break;
|
||||
case "array":
|
||||
a[0][e] = a[1][e].slice(0);
|
||||
break;
|
||||
default:
|
||||
a[0][e] = a[1][e];
|
||||
}
|
||||
return 2 < a.length
|
||||
? I.apply(null, [a[0]].concat(Array.prototype.slice.call(a, 2)))
|
||||
: a[0];
|
||||
}
|
||||
function N(a) {
|
||||
a = Math.round(255 * a).toString(16);
|
||||
return 1 === a.length ? "0" + a : a;
|
||||
}
|
||||
function S(a, e, g, j) {
|
||||
if (a.addEventListener)
|
||||
a[j ? "removeEventListener" : "addEventListener"](e, g, !1);
|
||||
else if (a.attachEvent) a[j ? "detachEvent" : "attachEvent"]("on" + e, g);
|
||||
}
|
||||
function D(a, e) {
|
||||
function g(a, b, d, c) {
|
||||
return y[0 | a][Math.round(Math.min(((b - d) / (c - d)) * J, J))];
|
||||
}
|
||||
function r() {
|
||||
f.legend.fps !== q &&
|
||||
((f.legend.fps = q), (f.legend[T] = q ? "FPS" : "ms"));
|
||||
K = q ? b.fps : b.duration;
|
||||
f.count[T] = 999 < K ? "999+" : K.toFixed(99 < K ? 0 : d.decimals);
|
||||
}
|
||||
function m() {
|
||||
z = A();
|
||||
L < z - d.threshold &&
|
||||
((b.fps -= b.fps / Math.max(1, (60 * d.smoothing) / d.interval)),
|
||||
(b.duration = 1e3 / b.fps));
|
||||
for (c = d.history; c--; )
|
||||
(E[c] = 0 === c ? b.fps : E[c - 1]),
|
||||
(F[c] = 0 === c ? b.duration : F[c - 1]);
|
||||
r();
|
||||
if (d.heat) {
|
||||
if (w.length)
|
||||
for (c = w.length; c--; )
|
||||
w[c].el.style[h[w[c].name].heatOn] = q
|
||||
? g(h[w[c].name].heatmap, b.fps, 0, d.maxFps)
|
||||
: g(h[w[c].name].heatmap, b.duration, d.threshold, 0);
|
||||
if (f.graph && h.column.heatOn)
|
||||
for (c = u.length; c--; )
|
||||
u[c].style[h.column.heatOn] = q
|
||||
? g(h.column.heatmap, E[c], 0, d.maxFps)
|
||||
: g(h.column.heatmap, F[c], d.threshold, 0);
|
||||
}
|
||||
if (f.graph)
|
||||
for (p = 0; p < d.history; p++)
|
||||
u[p].style.height =
|
||||
(q
|
||||
? E[p]
|
||||
? Math.round((O / d.maxFps) * Math.min(E[p], d.maxFps))
|
||||
: 0
|
||||
: F[p]
|
||||
? Math.round((O / d.threshold) * Math.min(F[p], d.threshold))
|
||||
: 0) + "px";
|
||||
}
|
||||
function k() {
|
||||
20 > d.interval
|
||||
? ((x = M(k)), m())
|
||||
: ((x = setTimeout(k, d.interval)), (P = M(m)));
|
||||
}
|
||||
function G(a) {
|
||||
a = a || window.event;
|
||||
a.preventDefault
|
||||
? (a.preventDefault(), a.stopPropagation())
|
||||
: ((a.returnValue = !1), (a.cancelBubble = !0));
|
||||
b.toggle();
|
||||
}
|
||||
function U() {
|
||||
d.toggleOn && S(f.container, d.toggleOn, G, 1);
|
||||
a.removeChild(f.container);
|
||||
}
|
||||
function V() {
|
||||
f.container && U();
|
||||
h = D.theme[d.theme];
|
||||
y = h.compiledHeatmaps || [];
|
||||
if (!y.length && h.heatmaps.length) {
|
||||
for (p = 0; p < h.heatmaps.length; p++) {
|
||||
y[p] = [];
|
||||
for (c = 0; c <= J; c++) {
|
||||
var b = y[p],
|
||||
e = c,
|
||||
g;
|
||||
g = (0.33 / J) * c;
|
||||
var j = h.heatmaps[p].saturation,
|
||||
m = h.heatmaps[p].lightness,
|
||||
n = void 0,
|
||||
k = void 0,
|
||||
l = void 0,
|
||||
t = (l = void 0),
|
||||
v = (n = k = void 0),
|
||||
v = void 0,
|
||||
l = 0.5 >= m ? m * (1 + j) : m + j - m * j;
|
||||
0 === l
|
||||
? (g = "#000")
|
||||
: ((t = 2 * m - l),
|
||||
(k = (l - t) / l),
|
||||
(g *= 6),
|
||||
(n = Math.floor(g)),
|
||||
(v = g - n),
|
||||
(v *= l * k),
|
||||
0 === n || 6 === n
|
||||
? ((n = l), (k = t + v), (l = t))
|
||||
: 1 === n
|
||||
? ((n = l - v), (k = l), (l = t))
|
||||
: 2 === n
|
||||
? ((n = t), (k = l), (l = t + v))
|
||||
: 3 === n
|
||||
? ((n = t), (k = l - v))
|
||||
: 4 === n
|
||||
? ((n = t + v), (k = t))
|
||||
: ((n = l), (k = t), (l -= v)),
|
||||
(g = "#" + N(n) + N(k) + N(l)));
|
||||
b[e] = g;
|
||||
}
|
||||
}
|
||||
h.compiledHeatmaps = y;
|
||||
}
|
||||
f.container = s(document.createElement("div"), h.container);
|
||||
f.count = f.container.appendChild(
|
||||
s(document.createElement("div"), h.count)
|
||||
);
|
||||
f.legend = f.container.appendChild(
|
||||
s(document.createElement("div"), h.legend)
|
||||
);
|
||||
f.graph = d.graph
|
||||
? f.container.appendChild(s(document.createElement("div"), h.graph))
|
||||
: 0;
|
||||
w.length = 0;
|
||||
for (var q in f) f[q] && h[q].heatOn && w.push({ name: q, el: f[q] });
|
||||
u.length = 0;
|
||||
if (f.graph) {
|
||||
f.graph.style.width =
|
||||
d.history * h.column.width +
|
||||
(d.history - 1) * h.column.spacing +
|
||||
"px";
|
||||
for (c = 0; c < d.history; c++)
|
||||
(u[c] = f.graph.appendChild(
|
||||
s(document.createElement("div"), h.column)
|
||||
)),
|
||||
(u[c].style.position = "absolute"),
|
||||
(u[c].style.bottom = 0),
|
||||
(u[c].style.right =
|
||||
c * h.column.width + c * h.column.spacing + "px"),
|
||||
(u[c].style.width = h.column.width + "px"),
|
||||
(u[c].style.height = "0px");
|
||||
}
|
||||
s(f.container, d);
|
||||
r();
|
||||
a.appendChild(f.container);
|
||||
f.graph && (O = f.graph.clientHeight);
|
||||
d.toggleOn &&
|
||||
("click" === d.toggleOn && (f.container.style.cursor = "pointer"),
|
||||
S(f.container, d.toggleOn, G));
|
||||
}
|
||||
"object" === H(a) && a.nodeType === j && ((e = a), (a = document.body));
|
||||
a || (a = document.body);
|
||||
var b = this,
|
||||
d = I({}, D.defaults, e || {}),
|
||||
f = {},
|
||||
u = [],
|
||||
h,
|
||||
y,
|
||||
J = 100,
|
||||
w = [],
|
||||
W = 0,
|
||||
B = d.threshold,
|
||||
Q = 0,
|
||||
L = A() - B,
|
||||
z,
|
||||
E = [],
|
||||
F = [],
|
||||
x,
|
||||
P,
|
||||
q = "fps" === d.show,
|
||||
O,
|
||||
K,
|
||||
c,
|
||||
p;
|
||||
b.options = d;
|
||||
b.fps = 0;
|
||||
b.duration = 0;
|
||||
b.isPaused = 0;
|
||||
b.tickStart = function () {
|
||||
Q = A();
|
||||
};
|
||||
b.tick = function () {
|
||||
z = A();
|
||||
W = z - L;
|
||||
B += (W - B) / d.smoothing;
|
||||
b.fps = 1e3 / B;
|
||||
b.duration = Q < L ? B : z - Q;
|
||||
L = z;
|
||||
};
|
||||
b.pause = function () {
|
||||
x && ((b.isPaused = 1), clearTimeout(x), C(x), C(P), (x = P = 0));
|
||||
return b;
|
||||
};
|
||||
b.resume = function () {
|
||||
x || ((b.isPaused = 0), k());
|
||||
return b;
|
||||
};
|
||||
b.set = function (a, c) {
|
||||
d[a] = c;
|
||||
q = "fps" === d.show;
|
||||
-1 !== R(a, X) && V();
|
||||
-1 !== R(a, Y) && s(f.container, d);
|
||||
return b;
|
||||
};
|
||||
b.showDuration = function () {
|
||||
b.set("show", "ms");
|
||||
return b;
|
||||
};
|
||||
b.showFps = function () {
|
||||
b.set("show", "fps");
|
||||
return b;
|
||||
};
|
||||
b.toggle = function () {
|
||||
b.set("show", q ? "ms" : "fps");
|
||||
return b;
|
||||
};
|
||||
b.hide = function () {
|
||||
b.pause();
|
||||
f.container.style.display = "none";
|
||||
return b;
|
||||
};
|
||||
b.show = function () {
|
||||
b.resume();
|
||||
f.container.style.display = "block";
|
||||
return b;
|
||||
};
|
||||
b.destroy = function () {
|
||||
b.pause();
|
||||
U();
|
||||
b.tick = b.tickStart = function () {};
|
||||
};
|
||||
V();
|
||||
k();
|
||||
}
|
||||
var A,
|
||||
r = m.performance;
|
||||
A =
|
||||
r && (r.now || r.webkitNow)
|
||||
? r[r.now ? "now" : "webkitNow"].bind(r)
|
||||
: function () {
|
||||
return +new Date();
|
||||
};
|
||||
for (
|
||||
var C = m.cancelAnimationFrame || m.cancelRequestAnimationFrame,
|
||||
M = m.requestAnimationFrame,
|
||||
r = ["moz", "webkit", "o"],
|
||||
G = 0,
|
||||
k = 0,
|
||||
Z = r.length;
|
||||
k < Z && !C;
|
||||
++k
|
||||
)
|
||||
M =
|
||||
(C =
|
||||
m[r[k] + "CancelAnimationFrame"] ||
|
||||
m[r[k] + "CancelRequestAnimationFrame"]) &&
|
||||
m[r[k] + "RequestAnimationFrame"];
|
||||
C ||
|
||||
((M = function (a) {
|
||||
var e = A(),
|
||||
g = Math.max(0, 16 - (e - G));
|
||||
G = e + g;
|
||||
return m.setTimeout(function () {
|
||||
a(e + g);
|
||||
}, g);
|
||||
}),
|
||||
(C = function (a) {
|
||||
clearTimeout(a);
|
||||
}));
|
||||
var T =
|
||||
"string" === H(document.createElement("div").textContent)
|
||||
? "textContent"
|
||||
: "innerText";
|
||||
D.extend = I;
|
||||
window.FPSMeter = D;
|
||||
D.defaults = {
|
||||
interval: 100,
|
||||
smoothing: 10,
|
||||
show: "fps",
|
||||
toggleOn: "click",
|
||||
decimals: 1,
|
||||
maxFps: 60,
|
||||
threshold: 100,
|
||||
position: "absolute",
|
||||
zIndex: 10,
|
||||
left: "5px",
|
||||
top: "5px",
|
||||
right: "auto",
|
||||
bottom: "auto",
|
||||
margin: "0 0 0 0",
|
||||
theme: "dark",
|
||||
heat: 0,
|
||||
graph: 0,
|
||||
history: 20,
|
||||
};
|
||||
var X = ["toggleOn", "theme", "heat", "graph", "history"],
|
||||
Y = "position zIndex left top right bottom margin".split(" ");
|
||||
})(window);
|
||||
(function (m, j) {
|
||||
j.theme = {};
|
||||
var s = (j.theme.base = {
|
||||
heatmaps: [],
|
||||
container: {
|
||||
heatOn: null,
|
||||
heatmap: null,
|
||||
padding: "5px",
|
||||
minWidth: "95px",
|
||||
height: "30px",
|
||||
lineHeight: "30px",
|
||||
textAlign: "right",
|
||||
textShadow: "none",
|
||||
},
|
||||
count: {
|
||||
heatOn: null,
|
||||
heatmap: null,
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 0,
|
||||
padding: "5px 10px",
|
||||
height: "30px",
|
||||
fontSize: "24px",
|
||||
fontFamily: "Consolas, Andale Mono, monospace",
|
||||
zIndex: 2,
|
||||
},
|
||||
legend: {
|
||||
heatOn: null,
|
||||
heatmap: null,
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
padding: "5px 10px",
|
||||
height: "30px",
|
||||
fontSize: "12px",
|
||||
lineHeight: "32px",
|
||||
fontFamily: "sans-serif",
|
||||
textAlign: "left",
|
||||
zIndex: 2,
|
||||
},
|
||||
graph: {
|
||||
heatOn: null,
|
||||
heatmap: null,
|
||||
position: "relative",
|
||||
boxSizing: "padding-box",
|
||||
MozBoxSizing: "padding-box",
|
||||
height: "100%",
|
||||
zIndex: 1,
|
||||
},
|
||||
column: { width: 4, spacing: 1, heatOn: null, heatmap: null },
|
||||
});
|
||||
j.theme.dark = j.extend({}, s, {
|
||||
heatmaps: [{ saturation: 0.8, lightness: 0.8 }],
|
||||
container: {
|
||||
background: "#222",
|
||||
color: "#fff",
|
||||
border: "1px solid #1a1a1a",
|
||||
textShadow: "1px 1px 0 #222",
|
||||
},
|
||||
count: { heatOn: "color" },
|
||||
column: { background: "#3f3f3f" },
|
||||
});
|
||||
j.theme.light = j.extend({}, s, {
|
||||
heatmaps: [{ saturation: 0.5, lightness: 0.5 }],
|
||||
container: {
|
||||
color: "#666",
|
||||
background: "#fff",
|
||||
textShadow:
|
||||
"1px 1px 0 rgba(255,255,255,.5), -1px -1px 0 rgba(255,255,255,.5)",
|
||||
boxShadow: "0 0 0 1px rgba(0,0,0,.1)",
|
||||
},
|
||||
count: { heatOn: "color" },
|
||||
column: { background: "#eaeaea" },
|
||||
});
|
||||
j.theme.colorful = j.extend({}, s, {
|
||||
heatmaps: [{ saturation: 0.5, lightness: 0.6 }],
|
||||
container: {
|
||||
heatOn: "backgroundColor",
|
||||
background: "#888",
|
||||
color: "#fff",
|
||||
textShadow: "1px 1px 0 rgba(0,0,0,.2)",
|
||||
boxShadow: "0 0 0 1px rgba(0,0,0,.1)",
|
||||
},
|
||||
column: { background: "#777", backgroundColor: "rgba(0,0,0,.2)" },
|
||||
});
|
||||
j.theme.transparent = j.extend({}, s, {
|
||||
heatmaps: [{ saturation: 0.8, lightness: 0.5 }],
|
||||
container: {
|
||||
padding: 0,
|
||||
color: "#fff",
|
||||
textShadow: "1px 1px 0 rgba(0,0,0,.5)",
|
||||
},
|
||||
count: { padding: "0 5px", height: "40px", lineHeight: "40px" },
|
||||
legend: { padding: "0 5px", height: "40px", lineHeight: "42px" },
|
||||
graph: { height: "40px" },
|
||||
column: {
|
||||
width: 5,
|
||||
background: "#999",
|
||||
heatOn: "backgroundColor",
|
||||
opacity: 0.5,
|
||||
},
|
||||
});
|
||||
})(window, FPSMeter);
|
||||
207
www/js/libs/iphone-inline-video.browser.js
Normal file
207
www/js/libs/iphone-inline-video.browser.js
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
/*! npm.im/iphone-inline-video */
|
||||
var makeVideoPlayableInline = (function () {
|
||||
"use strict"; /*! npm.im/intervalometer */
|
||||
function e(e, n, r, i) {
|
||||
function t(r) {
|
||||
(d = n(t, i)), e(r - (a || r)), (a = r);
|
||||
}
|
||||
var d, a;
|
||||
return {
|
||||
start: function () {
|
||||
d || t(0);
|
||||
},
|
||||
stop: function () {
|
||||
r(d), (d = null), (a = 0);
|
||||
},
|
||||
};
|
||||
}
|
||||
function n(n) {
|
||||
return e(n, requestAnimationFrame, cancelAnimationFrame);
|
||||
}
|
||||
function r(e, n, r, i) {
|
||||
function t(n) {
|
||||
Boolean(e[r]) === Boolean(i) && n.stopImmediatePropagation(), delete e[r];
|
||||
}
|
||||
return e.addEventListener(n, t, !1), t;
|
||||
}
|
||||
function i(e, n, r, i) {
|
||||
function t() {
|
||||
return r[n];
|
||||
}
|
||||
function d(e) {
|
||||
r[n] = e;
|
||||
}
|
||||
i && d(e[n]), Object.defineProperty(e, n, { get: t, set: d });
|
||||
}
|
||||
function t(e, n, r) {
|
||||
r.addEventListener(n, function () {
|
||||
return e.dispatchEvent(new Event(n));
|
||||
});
|
||||
}
|
||||
function d(e, n) {
|
||||
Promise.resolve().then(function () {
|
||||
e.dispatchEvent(new Event(n));
|
||||
});
|
||||
}
|
||||
function a(e) {
|
||||
var n = new Audio();
|
||||
return (
|
||||
t(e, "play", n),
|
||||
t(e, "playing", n),
|
||||
t(e, "pause", n),
|
||||
(n.crossOrigin = e.crossOrigin),
|
||||
(n.src = e.src || e.currentSrc || "data:"),
|
||||
n
|
||||
);
|
||||
}
|
||||
function o(e, n, r) {
|
||||
(m || 0) + 200 < Date.now() && ((e[g] = !0), (m = Date.now())),
|
||||
r || (e.currentTime = n),
|
||||
(A[++k % 3] = (100 * n) | 0);
|
||||
}
|
||||
function u(e) {
|
||||
return e.driver.currentTime >= e.video.duration;
|
||||
}
|
||||
function s(e) {
|
||||
var n = this;
|
||||
n.video.readyState >= n.video.HAVE_FUTURE_DATA
|
||||
? (n.hasAudio ||
|
||||
((n.driver.currentTime =
|
||||
n.video.currentTime + (e * n.video.playbackRate) / 1e3),
|
||||
n.video.loop && u(n) && (n.driver.currentTime = 0)),
|
||||
o(n.video, n.driver.currentTime))
|
||||
: n.video.networkState !== n.video.NETWORK_IDLE ||
|
||||
n.video.buffered.length ||
|
||||
n.video.load(),
|
||||
n.video.ended && (delete n.video[g], n.video.pause(!0));
|
||||
}
|
||||
function c() {
|
||||
var e = this,
|
||||
n = e[b];
|
||||
return e.webkitDisplayingFullscreen
|
||||
? void e[E]()
|
||||
: ("data:" !== n.driver.src &&
|
||||
n.driver.src !== e.src &&
|
||||
(o(e, 0, !0), (n.driver.src = e.src)),
|
||||
void (
|
||||
e.paused &&
|
||||
((n.paused = !1),
|
||||
e.buffered.length || e.load(),
|
||||
n.driver.play(),
|
||||
n.updater.start(),
|
||||
n.hasAudio ||
|
||||
(d(e, "play"),
|
||||
n.video.readyState >= n.video.HAVE_ENOUGH_DATA && d(e, "playing")))
|
||||
));
|
||||
}
|
||||
function v(e) {
|
||||
var n = this,
|
||||
r = n[b];
|
||||
r.driver.pause(),
|
||||
r.updater.stop(),
|
||||
n.webkitDisplayingFullscreen && n[T](),
|
||||
(r.paused && !e) ||
|
||||
((r.paused = !0),
|
||||
r.hasAudio || d(n, "pause"),
|
||||
n.ended && ((n[g] = !0), d(n, "ended")));
|
||||
}
|
||||
function p(e, r) {
|
||||
var i = (e[b] = {});
|
||||
(i.paused = !0),
|
||||
(i.hasAudio = r),
|
||||
(i.video = e),
|
||||
(i.updater = n(s.bind(i))),
|
||||
r
|
||||
? (i.driver = a(e))
|
||||
: (e.addEventListener("canplay", function () {
|
||||
e.paused || d(e, "playing");
|
||||
}),
|
||||
(i.driver = {
|
||||
src: e.src || e.currentSrc || "data:",
|
||||
muted: !0,
|
||||
paused: !0,
|
||||
pause: function () {
|
||||
i.driver.paused = !0;
|
||||
},
|
||||
play: function () {
|
||||
(i.driver.paused = !1), u(i) && o(e, 0);
|
||||
},
|
||||
get ended() {
|
||||
return u(i);
|
||||
},
|
||||
})),
|
||||
e.addEventListener(
|
||||
"emptied",
|
||||
function () {
|
||||
var n = !i.driver.src || "data:" === i.driver.src;
|
||||
i.driver.src &&
|
||||
i.driver.src !== e.src &&
|
||||
(o(e, 0, !0),
|
||||
(i.driver.src = e.src),
|
||||
n ? i.driver.play() : i.updater.stop());
|
||||
},
|
||||
!1
|
||||
),
|
||||
e.addEventListener("webkitbeginfullscreen", function () {
|
||||
e.paused
|
||||
? r && !i.driver.buffered.length && i.driver.load()
|
||||
: (e.pause(), e[E]());
|
||||
}),
|
||||
r &&
|
||||
(e.addEventListener("webkitendfullscreen", function () {
|
||||
i.driver.currentTime = e.currentTime;
|
||||
}),
|
||||
e.addEventListener("seeking", function () {
|
||||
A.indexOf((100 * e.currentTime) | 0) < 0 &&
|
||||
(i.driver.currentTime = e.currentTime);
|
||||
}));
|
||||
}
|
||||
function l(e) {
|
||||
var n = e[b];
|
||||
(e[E] = e.play),
|
||||
(e[T] = e.pause),
|
||||
(e.play = c),
|
||||
(e.pause = v),
|
||||
i(e, "paused", n.driver),
|
||||
i(e, "muted", n.driver, !0),
|
||||
i(e, "playbackRate", n.driver, !0),
|
||||
i(e, "ended", n.driver),
|
||||
i(e, "loop", n.driver, !0),
|
||||
r(e, "seeking"),
|
||||
r(e, "seeked"),
|
||||
r(e, "timeupdate", g, !1),
|
||||
r(e, "ended", g, !1);
|
||||
}
|
||||
function f(e, n, r) {
|
||||
void 0 === n && (n = !0),
|
||||
void 0 === r && (r = !0),
|
||||
(r && !h) ||
|
||||
e[b] ||
|
||||
(p(e, n),
|
||||
l(e),
|
||||
e.classList.add("IIV"),
|
||||
!n && e.autoplay && e.play(),
|
||||
/iPhone|iPod|iPad/.test(navigator.platform) ||
|
||||
console.warn(
|
||||
"iphone-inline-video is not guaranteed to work in emulated environments"
|
||||
));
|
||||
}
|
||||
var m,
|
||||
y =
|
||||
"undefined" == typeof Symbol
|
||||
? function (e) {
|
||||
return "@" + (e || "@") + Math.random();
|
||||
}
|
||||
: Symbol,
|
||||
h =
|
||||
"object-fit" in document.head.style &&
|
||||
/iPhone|iPod/i.test(navigator.userAgent) &&
|
||||
!matchMedia("(-webkit-video-playable-inline)").matches,
|
||||
b = y(),
|
||||
g = y(),
|
||||
E = y("nativeplay"),
|
||||
T = y("nativepause"),
|
||||
A = [],
|
||||
k = 0;
|
||||
return (f.isWhitelisted = h), f;
|
||||
})();
|
||||
629
www/js/libs/lz-string.js
Normal file
629
www/js/libs/lz-string.js
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
var LZString = {
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
_f: String.fromCharCode,
|
||||
compressToBase64: function (e) {
|
||||
if (e == null) return "";
|
||||
var t = "";
|
||||
var n, r, i, s, o, u, a;
|
||||
var f = 0;
|
||||
e = LZString.compress(e);
|
||||
while (f < e.length * 2) {
|
||||
if (f % 2 == 0) {
|
||||
n = e.charCodeAt(f / 2) >> 8;
|
||||
r = e.charCodeAt(f / 2) & 255;
|
||||
if (f / 2 + 1 < e.length) i = e.charCodeAt(f / 2 + 1) >> 8;
|
||||
else i = NaN;
|
||||
} else {
|
||||
n = e.charCodeAt((f - 1) / 2) & 255;
|
||||
if ((f + 1) / 2 < e.length) {
|
||||
r = e.charCodeAt((f + 1) / 2) >> 8;
|
||||
i = e.charCodeAt((f + 1) / 2) & 255;
|
||||
} else r = i = NaN;
|
||||
}
|
||||
f += 3;
|
||||
s = n >> 2;
|
||||
o = ((n & 3) << 4) | (r >> 4);
|
||||
u = ((r & 15) << 2) | (i >> 6);
|
||||
a = i & 63;
|
||||
if (isNaN(r)) {
|
||||
u = a = 64;
|
||||
} else if (isNaN(i)) {
|
||||
a = 64;
|
||||
}
|
||||
t =
|
||||
t +
|
||||
LZString._keyStr.charAt(s) +
|
||||
LZString._keyStr.charAt(o) +
|
||||
LZString._keyStr.charAt(u) +
|
||||
LZString._keyStr.charAt(a);
|
||||
}
|
||||
return t;
|
||||
},
|
||||
decompressFromBase64: function (e) {
|
||||
if (e == null) return "";
|
||||
var t = "",
|
||||
n = 0,
|
||||
r,
|
||||
i,
|
||||
s,
|
||||
o,
|
||||
u,
|
||||
a,
|
||||
f,
|
||||
l,
|
||||
c = 0,
|
||||
h = LZString._f;
|
||||
e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
while (c < e.length) {
|
||||
u = LZString._keyStr.indexOf(e.charAt(c++));
|
||||
a = LZString._keyStr.indexOf(e.charAt(c++));
|
||||
f = LZString._keyStr.indexOf(e.charAt(c++));
|
||||
l = LZString._keyStr.indexOf(e.charAt(c++));
|
||||
i = (u << 2) | (a >> 4);
|
||||
s = ((a & 15) << 4) | (f >> 2);
|
||||
o = ((f & 3) << 6) | l;
|
||||
if (n % 2 == 0) {
|
||||
r = i << 8;
|
||||
if (f != 64) {
|
||||
t += h(r | s);
|
||||
}
|
||||
if (l != 64) {
|
||||
r = o << 8;
|
||||
}
|
||||
} else {
|
||||
t = t + h(r | i);
|
||||
if (f != 64) {
|
||||
r = s << 8;
|
||||
}
|
||||
if (l != 64) {
|
||||
t += h(r | o);
|
||||
}
|
||||
}
|
||||
n += 3;
|
||||
}
|
||||
return LZString.decompress(t);
|
||||
},
|
||||
compressToUTF16: function (e) {
|
||||
if (e == null) return "";
|
||||
var t = "",
|
||||
n,
|
||||
r,
|
||||
i,
|
||||
s = 0,
|
||||
o = LZString._f;
|
||||
e = LZString.compress(e);
|
||||
for (n = 0; n < e.length; n++) {
|
||||
r = e.charCodeAt(n);
|
||||
switch (s++) {
|
||||
case 0:
|
||||
t += o((r >> 1) + 32);
|
||||
i = (r & 1) << 14;
|
||||
break;
|
||||
case 1:
|
||||
t += o(i + (r >> 2) + 32);
|
||||
i = (r & 3) << 13;
|
||||
break;
|
||||
case 2:
|
||||
t += o(i + (r >> 3) + 32);
|
||||
i = (r & 7) << 12;
|
||||
break;
|
||||
case 3:
|
||||
t += o(i + (r >> 4) + 32);
|
||||
i = (r & 15) << 11;
|
||||
break;
|
||||
case 4:
|
||||
t += o(i + (r >> 5) + 32);
|
||||
i = (r & 31) << 10;
|
||||
break;
|
||||
case 5:
|
||||
t += o(i + (r >> 6) + 32);
|
||||
i = (r & 63) << 9;
|
||||
break;
|
||||
case 6:
|
||||
t += o(i + (r >> 7) + 32);
|
||||
i = (r & 127) << 8;
|
||||
break;
|
||||
case 7:
|
||||
t += o(i + (r >> 8) + 32);
|
||||
i = (r & 255) << 7;
|
||||
break;
|
||||
case 8:
|
||||
t += o(i + (r >> 9) + 32);
|
||||
i = (r & 511) << 6;
|
||||
break;
|
||||
case 9:
|
||||
t += o(i + (r >> 10) + 32);
|
||||
i = (r & 1023) << 5;
|
||||
break;
|
||||
case 10:
|
||||
t += o(i + (r >> 11) + 32);
|
||||
i = (r & 2047) << 4;
|
||||
break;
|
||||
case 11:
|
||||
t += o(i + (r >> 12) + 32);
|
||||
i = (r & 4095) << 3;
|
||||
break;
|
||||
case 12:
|
||||
t += o(i + (r >> 13) + 32);
|
||||
i = (r & 8191) << 2;
|
||||
break;
|
||||
case 13:
|
||||
t += o(i + (r >> 14) + 32);
|
||||
i = (r & 16383) << 1;
|
||||
break;
|
||||
case 14:
|
||||
t += o(i + (r >> 15) + 32, (r & 32767) + 32);
|
||||
s = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return t + o(i + 32);
|
||||
},
|
||||
decompressFromUTF16: function (e) {
|
||||
if (e == null) return "";
|
||||
var t = "",
|
||||
n,
|
||||
r,
|
||||
i = 0,
|
||||
s = 0,
|
||||
o = LZString._f;
|
||||
while (s < e.length) {
|
||||
r = e.charCodeAt(s) - 32;
|
||||
switch (i++) {
|
||||
case 0:
|
||||
n = r << 1;
|
||||
break;
|
||||
case 1:
|
||||
t += o(n | (r >> 14));
|
||||
n = (r & 16383) << 2;
|
||||
break;
|
||||
case 2:
|
||||
t += o(n | (r >> 13));
|
||||
n = (r & 8191) << 3;
|
||||
break;
|
||||
case 3:
|
||||
t += o(n | (r >> 12));
|
||||
n = (r & 4095) << 4;
|
||||
break;
|
||||
case 4:
|
||||
t += o(n | (r >> 11));
|
||||
n = (r & 2047) << 5;
|
||||
break;
|
||||
case 5:
|
||||
t += o(n | (r >> 10));
|
||||
n = (r & 1023) << 6;
|
||||
break;
|
||||
case 6:
|
||||
t += o(n | (r >> 9));
|
||||
n = (r & 511) << 7;
|
||||
break;
|
||||
case 7:
|
||||
t += o(n | (r >> 8));
|
||||
n = (r & 255) << 8;
|
||||
break;
|
||||
case 8:
|
||||
t += o(n | (r >> 7));
|
||||
n = (r & 127) << 9;
|
||||
break;
|
||||
case 9:
|
||||
t += o(n | (r >> 6));
|
||||
n = (r & 63) << 10;
|
||||
break;
|
||||
case 10:
|
||||
t += o(n | (r >> 5));
|
||||
n = (r & 31) << 11;
|
||||
break;
|
||||
case 11:
|
||||
t += o(n | (r >> 4));
|
||||
n = (r & 15) << 12;
|
||||
break;
|
||||
case 12:
|
||||
t += o(n | (r >> 3));
|
||||
n = (r & 7) << 13;
|
||||
break;
|
||||
case 13:
|
||||
t += o(n | (r >> 2));
|
||||
n = (r & 3) << 14;
|
||||
break;
|
||||
case 14:
|
||||
t += o(n | (r >> 1));
|
||||
n = (r & 1) << 15;
|
||||
break;
|
||||
case 15:
|
||||
t += o(n | r);
|
||||
i = 0;
|
||||
break;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
return LZString.decompress(t);
|
||||
},
|
||||
compressToUint8Array: function (e) {
|
||||
var t = LZString.compress(e);
|
||||
var n = new Uint8Array(t.length * 2);
|
||||
for (var r = 0, i = t.length; r < i; r++) {
|
||||
var s = t.charCodeAt(r);
|
||||
n[r * 2] = s >>> 8;
|
||||
n[r * 2 + 1] = s % 256;
|
||||
}
|
||||
return n;
|
||||
},
|
||||
decompressFromUint8Array: function (e) {
|
||||
if (e === null || e === undefined) {
|
||||
return LZString.decompress(e);
|
||||
} else {
|
||||
var t = new Array(e.length / 2);
|
||||
for (var n = 0, r = t.length; n < r; n++) {
|
||||
t[n] = e[n * 2] * 256 + e[n * 2 + 1];
|
||||
}
|
||||
return LZString.decompress(String.fromCharCode.apply(null, t));
|
||||
}
|
||||
},
|
||||
compressToEncodedURIComponent: function (e) {
|
||||
return LZString.compressToBase64(e).replace(/=/g, "$").replace(/\//g, "-");
|
||||
},
|
||||
decompressFromEncodedURIComponent: function (e) {
|
||||
if (e) e = e.replace(/$/g, "=").replace(/-/g, "/");
|
||||
return LZString.decompressFromBase64(e);
|
||||
},
|
||||
compress: function (e) {
|
||||
if (e == null) return "";
|
||||
var t,
|
||||
n,
|
||||
r = {},
|
||||
i = {},
|
||||
s = "",
|
||||
o = "",
|
||||
u = "",
|
||||
a = 2,
|
||||
f = 3,
|
||||
l = 2,
|
||||
c = "",
|
||||
h = 0,
|
||||
p = 0,
|
||||
d,
|
||||
v = LZString._f;
|
||||
for (d = 0; d < e.length; d += 1) {
|
||||
s = e.charAt(d);
|
||||
if (!Object.prototype.hasOwnProperty.call(r, s)) {
|
||||
r[s] = f++;
|
||||
i[s] = true;
|
||||
}
|
||||
o = u + s;
|
||||
if (Object.prototype.hasOwnProperty.call(r, o)) {
|
||||
u = o;
|
||||
} else {
|
||||
if (Object.prototype.hasOwnProperty.call(i, u)) {
|
||||
if (u.charCodeAt(0) < 256) {
|
||||
for (t = 0; t < l; t++) {
|
||||
h = h << 1;
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
}
|
||||
n = u.charCodeAt(0);
|
||||
for (t = 0; t < 8; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
} else {
|
||||
n = 1;
|
||||
for (t = 0; t < l; t++) {
|
||||
h = (h << 1) | n;
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = 0;
|
||||
}
|
||||
n = u.charCodeAt(0);
|
||||
for (t = 0; t < 16; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
}
|
||||
a--;
|
||||
if (a == 0) {
|
||||
a = Math.pow(2, l);
|
||||
l++;
|
||||
}
|
||||
delete i[u];
|
||||
} else {
|
||||
n = r[u];
|
||||
for (t = 0; t < l; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
}
|
||||
a--;
|
||||
if (a == 0) {
|
||||
a = Math.pow(2, l);
|
||||
l++;
|
||||
}
|
||||
r[o] = f++;
|
||||
u = String(s);
|
||||
}
|
||||
}
|
||||
if (u !== "") {
|
||||
if (Object.prototype.hasOwnProperty.call(i, u)) {
|
||||
if (u.charCodeAt(0) < 256) {
|
||||
for (t = 0; t < l; t++) {
|
||||
h = h << 1;
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
}
|
||||
n = u.charCodeAt(0);
|
||||
for (t = 0; t < 8; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
} else {
|
||||
n = 1;
|
||||
for (t = 0; t < l; t++) {
|
||||
h = (h << 1) | n;
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = 0;
|
||||
}
|
||||
n = u.charCodeAt(0);
|
||||
for (t = 0; t < 16; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
}
|
||||
a--;
|
||||
if (a == 0) {
|
||||
a = Math.pow(2, l);
|
||||
l++;
|
||||
}
|
||||
delete i[u];
|
||||
} else {
|
||||
n = r[u];
|
||||
for (t = 0; t < l; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
}
|
||||
a--;
|
||||
if (a == 0) {
|
||||
a = Math.pow(2, l);
|
||||
l++;
|
||||
}
|
||||
}
|
||||
n = 2;
|
||||
for (t = 0; t < l; t++) {
|
||||
h = (h << 1) | (n & 1);
|
||||
if (p == 15) {
|
||||
p = 0;
|
||||
c += v(h);
|
||||
h = 0;
|
||||
} else {
|
||||
p++;
|
||||
}
|
||||
n = n >> 1;
|
||||
}
|
||||
while (true) {
|
||||
h = h << 1;
|
||||
if (p == 15) {
|
||||
c += v(h);
|
||||
break;
|
||||
} else p++;
|
||||
}
|
||||
return c;
|
||||
},
|
||||
decompress: function (e) {
|
||||
if (e == null) return "";
|
||||
if (e == "") return null;
|
||||
var t = [],
|
||||
n,
|
||||
r = 4,
|
||||
i = 4,
|
||||
s = 3,
|
||||
o = "",
|
||||
u = "",
|
||||
a,
|
||||
f,
|
||||
l,
|
||||
c,
|
||||
h,
|
||||
p,
|
||||
d,
|
||||
v = LZString._f,
|
||||
m = { string: e, val: e.charCodeAt(0), position: 32768, index: 1 };
|
||||
for (a = 0; a < 3; a += 1) {
|
||||
t[a] = a;
|
||||
}
|
||||
l = 0;
|
||||
h = Math.pow(2, 2);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
switch ((n = l)) {
|
||||
case 0:
|
||||
l = 0;
|
||||
h = Math.pow(2, 8);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
d = v(l);
|
||||
break;
|
||||
case 1:
|
||||
l = 0;
|
||||
h = Math.pow(2, 16);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
d = v(l);
|
||||
break;
|
||||
case 2:
|
||||
return "";
|
||||
}
|
||||
t[3] = d;
|
||||
f = u = d;
|
||||
while (true) {
|
||||
if (m.index > m.string.length) {
|
||||
return "";
|
||||
}
|
||||
l = 0;
|
||||
h = Math.pow(2, s);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
switch ((d = l)) {
|
||||
case 0:
|
||||
l = 0;
|
||||
h = Math.pow(2, 8);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
t[i++] = v(l);
|
||||
d = i - 1;
|
||||
r--;
|
||||
break;
|
||||
case 1:
|
||||
l = 0;
|
||||
h = Math.pow(2, 16);
|
||||
p = 1;
|
||||
while (p != h) {
|
||||
c = m.val & m.position;
|
||||
m.position >>= 1;
|
||||
if (m.position == 0) {
|
||||
m.position = 32768;
|
||||
m.val = m.string.charCodeAt(m.index++);
|
||||
}
|
||||
l |= (c > 0 ? 1 : 0) * p;
|
||||
p <<= 1;
|
||||
}
|
||||
t[i++] = v(l);
|
||||
d = i - 1;
|
||||
r--;
|
||||
break;
|
||||
case 2:
|
||||
return u;
|
||||
}
|
||||
if (r == 0) {
|
||||
r = Math.pow(2, s);
|
||||
s++;
|
||||
}
|
||||
if (t[d]) {
|
||||
o = t[d];
|
||||
} else {
|
||||
if (d === i) {
|
||||
o = f + f.charAt(0);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
u += o;
|
||||
t[i++] = f + o.charAt(0);
|
||||
r--;
|
||||
f = o;
|
||||
if (r == 0) {
|
||||
r = Math.pow(2, s);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
if (typeof module !== "undefined" && module != null) {
|
||||
module.exports = LZString;
|
||||
}
|
||||
524
www/js/libs/pixi-picture.js
Normal file
524
www/js/libs/pixi-picture.js
Normal file
|
|
@ -0,0 +1,524 @@
|
|||
var __extends =
|
||||
(this && this.__extends) ||
|
||||
function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() {
|
||||
this.constructor = d;
|
||||
}
|
||||
d.prototype =
|
||||
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
|
||||
};
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var shaderLib = [
|
||||
{
|
||||
vertUniforms: "",
|
||||
vertCode: "vTextureCoord = aTextureCoord;",
|
||||
fragUniforms: "uniform vec4 uTextureClamp;",
|
||||
fragCode:
|
||||
"vec2 textureCoord = clamp(vTextureCoord, uTextureClamp.xy, uTextureClamp.zw);",
|
||||
},
|
||||
{
|
||||
vertUniforms: "uniform mat3 uTransform;",
|
||||
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
|
||||
fragUniforms: "",
|
||||
fragCode: "vec2 textureCoord = vTextureCoord;",
|
||||
},
|
||||
{
|
||||
vertUniforms: "uniform mat3 uTransform;",
|
||||
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
|
||||
fragUniforms:
|
||||
"uniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;",
|
||||
fragCode:
|
||||
"vec2 textureCoord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;" +
|
||||
"\ntextureCoord = (uMapCoord * vec3(textureCoord, 1.0)).xy;" +
|
||||
"\ntextureCoord = clamp(textureCoord, uClampFrame.xy, uClampFrame.zw);",
|
||||
},
|
||||
];
|
||||
var PictureShader = (function (_super) {
|
||||
__extends(PictureShader, _super);
|
||||
function PictureShader(gl, vert, frag, tilingMode) {
|
||||
var lib = shaderLib[tilingMode];
|
||||
_super.call(
|
||||
this,
|
||||
gl,
|
||||
vert
|
||||
.replace(/%SPRITE_UNIFORMS%/gi, lib.vertUniforms)
|
||||
.replace(/%SPRITE_CODE%/gi, lib.vertCode),
|
||||
frag
|
||||
.replace(/%SPRITE_UNIFORMS%/gi, lib.fragUniforms)
|
||||
.replace(/%SPRITE_CODE%/gi, lib.fragCode)
|
||||
);
|
||||
this.bind();
|
||||
this.tilingMode = tilingMode;
|
||||
this.tempQuad = new PIXI.Quad(gl);
|
||||
this.tempQuad.initVao(this);
|
||||
this.uniforms.uColor = new Float32Array([1, 1, 1, 1]);
|
||||
this.uniforms.uSampler = [0, 1];
|
||||
}
|
||||
PictureShader.blendVert =
|
||||
"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 mapMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n vMapCoord = (mapMatrix * vec3(aVertexPosition, 1.0)).xy;\n}\n";
|
||||
return PictureShader;
|
||||
})(PIXI.Shader);
|
||||
extras.PictureShader = PictureShader;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var overlayFrag =
|
||||
"\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cs2 = Cs * 2.0 - 1.0;\n vec3 screen = Cb + Cs2 - Cb * Cs2;\n vec3 B;\n if (Cb.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cb.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cb.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
|
||||
var HardLightShader = (function (_super) {
|
||||
__extends(HardLightShader, _super);
|
||||
function HardLightShader(gl, tilingMode) {
|
||||
_super.call(
|
||||
this,
|
||||
gl,
|
||||
extras.PictureShader.blendVert,
|
||||
overlayFrag,
|
||||
tilingMode
|
||||
);
|
||||
}
|
||||
return HardLightShader;
|
||||
})(extras.PictureShader);
|
||||
extras.HardLightShader = HardLightShader;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
function mapFilterBlendModesToPixi(gl, array) {
|
||||
if (array === void 0) {
|
||||
array = [];
|
||||
}
|
||||
array[PIXI.BLEND_MODES.OVERLAY] = [
|
||||
new extras.OverlayShader(gl, 0),
|
||||
new extras.OverlayShader(gl, 1),
|
||||
new extras.OverlayShader(gl, 2),
|
||||
];
|
||||
array[PIXI.BLEND_MODES.HARD_LIGHT] = [
|
||||
new extras.HardLightShader(gl, 0),
|
||||
new extras.HardLightShader(gl, 1),
|
||||
new extras.HardLightShader(gl, 2),
|
||||
];
|
||||
return array;
|
||||
}
|
||||
extras.mapFilterBlendModesToPixi = mapFilterBlendModesToPixi;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var normalFrag =
|
||||
"\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n\n vec4 sample = texture2D(uSampler[0], textureCoord);\n gl_FragColor = sample * uColor;\n}\n";
|
||||
var normalVert =
|
||||
"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n}\n";
|
||||
var NormalShader = (function (_super) {
|
||||
__extends(NormalShader, _super);
|
||||
function NormalShader(gl, tilingMode) {
|
||||
_super.call(this, gl, normalVert, normalFrag, tilingMode);
|
||||
}
|
||||
return NormalShader;
|
||||
})(extras.PictureShader);
|
||||
extras.NormalShader = NormalShader;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var overlayFrag =
|
||||
"\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cb2 = Cb * 2.0 - 1.0;\n vec3 screen = Cb2 + Cs - Cb2 * Cs;\n vec3 B;\n if (Cs.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cs.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cs.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
|
||||
var OverlayShader = (function (_super) {
|
||||
__extends(OverlayShader, _super);
|
||||
function OverlayShader(gl, tilingMode) {
|
||||
_super.call(
|
||||
this,
|
||||
gl,
|
||||
extras.PictureShader.blendVert,
|
||||
overlayFrag,
|
||||
tilingMode
|
||||
);
|
||||
}
|
||||
return OverlayShader;
|
||||
})(extras.PictureShader);
|
||||
extras.OverlayShader = OverlayShader;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
function nextPow2(v) {
|
||||
v += v === 0 ? 1 : 0;
|
||||
--v;
|
||||
v |= v >>> 1;
|
||||
v |= v >>> 2;
|
||||
v |= v >>> 4;
|
||||
v |= v >>> 8;
|
||||
v |= v >>> 16;
|
||||
return v + 1;
|
||||
}
|
||||
var PictureRenderer = (function (_super) {
|
||||
__extends(PictureRenderer, _super);
|
||||
function PictureRenderer(renderer) {
|
||||
_super.call(this, renderer);
|
||||
}
|
||||
PictureRenderer.prototype.onContextChange = function () {
|
||||
var gl = this.renderer.gl;
|
||||
this.drawModes = extras.mapFilterBlendModesToPixi(gl);
|
||||
this.normalShader = [
|
||||
new extras.NormalShader(gl, 0),
|
||||
new extras.NormalShader(gl, 1),
|
||||
new extras.NormalShader(gl, 2),
|
||||
];
|
||||
this._tempClamp = new Float32Array(4);
|
||||
this._tempColor = new Float32Array(4);
|
||||
this._tempRect = new PIXI.Rectangle();
|
||||
this._tempRect2 = new PIXI.Rectangle();
|
||||
this._tempRect3 = new PIXI.Rectangle();
|
||||
this._tempMatrix = new PIXI.Matrix();
|
||||
this._tempMatrix2 = new PIXI.Matrix();
|
||||
this._bigBuf = new Uint8Array(1 << 20);
|
||||
this._renderTexture = new PIXI.BaseRenderTexture(1024, 1024);
|
||||
};
|
||||
PictureRenderer.prototype.start = function () {};
|
||||
PictureRenderer.prototype.flush = function () {};
|
||||
PictureRenderer.prototype._getRenderTexture = function (
|
||||
minWidth,
|
||||
minHeight
|
||||
) {
|
||||
if (
|
||||
this._renderTexture.width < minWidth ||
|
||||
this._renderTexture.height < minHeight
|
||||
) {
|
||||
minHeight = nextPow2(minWidth);
|
||||
minHeight = nextPow2(minHeight);
|
||||
this._renderTexture.resize(minWidth, minHeight);
|
||||
}
|
||||
return this._renderTexture;
|
||||
};
|
||||
PictureRenderer.prototype._getBuf = function (size) {
|
||||
var buf = this._bigBuf;
|
||||
if (buf.length < size) {
|
||||
size = nextPow2(size);
|
||||
buf = new Uint8Array(size);
|
||||
this._bigBuf = buf;
|
||||
}
|
||||
return buf;
|
||||
};
|
||||
PictureRenderer.prototype.render = function (sprite) {
|
||||
if (!sprite.texture.valid) {
|
||||
return;
|
||||
}
|
||||
var tilingMode = 0;
|
||||
if (sprite.tileTransform) {
|
||||
tilingMode = this._isSimpleSprite(sprite) ? 1 : 2;
|
||||
}
|
||||
var blendShader = this.drawModes[sprite.blendMode];
|
||||
if (blendShader) {
|
||||
this._renderBlend(sprite, blendShader[tilingMode]);
|
||||
} else {
|
||||
this._renderNormal(sprite, this.normalShader[tilingMode]);
|
||||
}
|
||||
};
|
||||
PictureRenderer.prototype._renderNormal = function (sprite, shader) {
|
||||
var renderer = this.renderer;
|
||||
renderer.bindShader(shader);
|
||||
renderer.state.setBlendMode(sprite.blendMode);
|
||||
this._renderInner(sprite, shader);
|
||||
};
|
||||
PictureRenderer.prototype._renderBlend = function (sprite, shader) {
|
||||
var renderer = this.renderer;
|
||||
var spriteBounds = sprite.getBounds();
|
||||
var renderTarget = renderer._activeRenderTarget;
|
||||
var matrix = renderTarget.projectionMatrix;
|
||||
var flipX = matrix.a < 0;
|
||||
var flipY = matrix.d < 0;
|
||||
var resolution = renderTarget.resolution;
|
||||
var screen = this._tempRect;
|
||||
var fr = renderTarget.sourceFrame || renderTarget.destinationFrame;
|
||||
screen.x = 0;
|
||||
screen.y = 0;
|
||||
screen.width = fr.width;
|
||||
screen.height = fr.height;
|
||||
var bounds = this._tempRect2;
|
||||
var fbw = fr.width * resolution,
|
||||
fbh = fr.height * resolution;
|
||||
bounds.x =
|
||||
(spriteBounds.x + matrix.tx / matrix.a) * resolution + fbw / 2;
|
||||
bounds.y =
|
||||
(spriteBounds.y + matrix.ty / matrix.d) * resolution + fbh / 2;
|
||||
bounds.width = spriteBounds.width * resolution;
|
||||
bounds.height = spriteBounds.height * resolution;
|
||||
if (flipX) {
|
||||
bounds.y = fbw - bounds.width - bounds.x;
|
||||
}
|
||||
if (flipY) {
|
||||
bounds.y = fbh - bounds.height - bounds.y;
|
||||
}
|
||||
var screenBounds = this._tempRect3;
|
||||
var x_1 = Math.floor(Math.max(screen.x, bounds.x));
|
||||
var x_2 = Math.ceil(
|
||||
Math.min(screen.x + screen.width, bounds.x + bounds.width)
|
||||
);
|
||||
var y_1 = Math.floor(Math.max(screen.y, bounds.y));
|
||||
var y_2 = Math.ceil(
|
||||
Math.min(screen.y + screen.height, bounds.y + bounds.height)
|
||||
);
|
||||
var pixelsWidth = x_2 - x_1;
|
||||
var pixelsHeight = y_2 - y_1;
|
||||
if (pixelsWidth <= 0 || pixelsHeight <= 0) {
|
||||
return;
|
||||
}
|
||||
var rt = this._getRenderTexture(pixelsWidth, pixelsHeight);
|
||||
renderer.bindTexture(rt, 1, true);
|
||||
var gl = renderer.gl;
|
||||
if (renderer.renderingToScreen && renderTarget.root) {
|
||||
var buf = this._getBuf(pixelsWidth * pixelsHeight * 4);
|
||||
gl.readPixels(
|
||||
x_1,
|
||||
y_1,
|
||||
pixelsWidth,
|
||||
pixelsHeight,
|
||||
gl.RGBA,
|
||||
gl.UNSIGNED_BYTE,
|
||||
this._bigBuf
|
||||
);
|
||||
gl.texSubImage2D(
|
||||
gl.TEXTURE_2D,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
pixelsWidth,
|
||||
pixelsHeight,
|
||||
gl.RGBA,
|
||||
gl.UNSIGNED_BYTE,
|
||||
this._bigBuf
|
||||
);
|
||||
} else {
|
||||
gl.copyTexSubImage2D(
|
||||
gl.TEXTURE_2D,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
x_1,
|
||||
y_1,
|
||||
pixelsWidth,
|
||||
pixelsHeight
|
||||
);
|
||||
}
|
||||
renderer.bindShader(shader);
|
||||
renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL);
|
||||
if (shader.uniforms.mapMatrix) {
|
||||
var mapMatrix = this._tempMatrix;
|
||||
mapMatrix.a = bounds.width / rt.width / spriteBounds.width;
|
||||
if (flipX) {
|
||||
mapMatrix.a = -mapMatrix.a;
|
||||
mapMatrix.tx =
|
||||
(bounds.x - x_1) / rt.width -
|
||||
(spriteBounds.x + spriteBounds.width) * mapMatrix.a;
|
||||
} else {
|
||||
mapMatrix.tx =
|
||||
(bounds.x - x_1) / rt.width - spriteBounds.x * mapMatrix.a;
|
||||
}
|
||||
mapMatrix.d = bounds.height / rt.height / spriteBounds.height;
|
||||
if (flipY) {
|
||||
mapMatrix.d = -mapMatrix.d;
|
||||
mapMatrix.ty =
|
||||
(bounds.y - y_1) / rt.height -
|
||||
(spriteBounds.y + spriteBounds.height) * mapMatrix.d;
|
||||
} else {
|
||||
mapMatrix.ty =
|
||||
(bounds.y - y_1) / rt.height - spriteBounds.y * mapMatrix.d;
|
||||
}
|
||||
shader.uniforms.mapMatrix = mapMatrix.toArray(true);
|
||||
}
|
||||
this._renderInner(sprite, shader);
|
||||
};
|
||||
PictureRenderer.prototype._renderInner = function (sprite, shader) {
|
||||
var renderer = this.renderer;
|
||||
if (shader.tilingMode > 0) {
|
||||
this._renderWithShader(sprite, shader.tilingMode === 1, shader);
|
||||
} else {
|
||||
this._renderSprite(sprite, shader);
|
||||
}
|
||||
};
|
||||
PictureRenderer.prototype._renderWithShader = function (
|
||||
ts,
|
||||
isSimple,
|
||||
shader
|
||||
) {
|
||||
var quad = shader.tempQuad;
|
||||
var renderer = this.renderer;
|
||||
renderer.bindVao(quad.vao);
|
||||
var vertices = quad.vertices;
|
||||
var _width = ts._width;
|
||||
var _height = ts._height;
|
||||
var _anchorX = ts._anchor._x;
|
||||
var _anchorY = ts._anchor._y;
|
||||
var w0 = _width * (1 - _anchorX);
|
||||
var w1 = _width * -_anchorX;
|
||||
var h0 = _height * (1 - _anchorY);
|
||||
var h1 = _height * -_anchorY;
|
||||
var wt = ts.transform.worldTransform;
|
||||
var a = wt.a;
|
||||
var b = wt.b;
|
||||
var c = wt.c;
|
||||
var d = wt.d;
|
||||
var tx = wt.tx;
|
||||
var ty = wt.ty;
|
||||
vertices[0] = a * w1 + c * h1 + tx;
|
||||
vertices[1] = d * h1 + b * w1 + ty;
|
||||
vertices[2] = a * w0 + c * h1 + tx;
|
||||
vertices[3] = d * h1 + b * w0 + ty;
|
||||
vertices[4] = a * w0 + c * h0 + tx;
|
||||
vertices[5] = d * h0 + b * w0 + ty;
|
||||
vertices[6] = a * w1 + c * h0 + tx;
|
||||
vertices[7] = d * h0 + b * w1 + ty;
|
||||
vertices = quad.uvs;
|
||||
vertices[0] = vertices[6] = -ts.anchor.x;
|
||||
vertices[1] = vertices[3] = -ts.anchor.y;
|
||||
vertices[2] = vertices[4] = 1.0 - ts.anchor.x;
|
||||
vertices[5] = vertices[7] = 1.0 - ts.anchor.y;
|
||||
quad.upload();
|
||||
var tex = ts._texture;
|
||||
var lt = ts.tileTransform.localTransform;
|
||||
var uv = ts.uvTransform;
|
||||
var mapCoord = uv.mapCoord;
|
||||
var uClampFrame = uv.uClampFrame;
|
||||
var uClampOffset = uv.uClampOffset;
|
||||
var w = tex.width;
|
||||
var h = tex.height;
|
||||
var W = _width;
|
||||
var H = _height;
|
||||
var tempMat = this._tempMatrix2;
|
||||
tempMat.set(
|
||||
(lt.a * w) / W,
|
||||
(lt.b * w) / H,
|
||||
(lt.c * h) / W,
|
||||
(lt.d * h) / H,
|
||||
lt.tx / W,
|
||||
lt.ty / H
|
||||
);
|
||||
tempMat.invert();
|
||||
if (isSimple) {
|
||||
tempMat.append(mapCoord);
|
||||
} else {
|
||||
shader.uniforms.uMapCoord = mapCoord.toArray(true);
|
||||
shader.uniforms.uClampFrame = uClampFrame;
|
||||
shader.uniforms.uClampOffset = uClampOffset;
|
||||
}
|
||||
shader.uniforms.uTransform = tempMat.toArray(true);
|
||||
var color = this._tempColor;
|
||||
var alpha = ts.worldAlpha;
|
||||
PIXI.utils.hex2rgb(ts.tint, color);
|
||||
color[0] *= alpha;
|
||||
color[1] *= alpha;
|
||||
color[2] *= alpha;
|
||||
color[3] = alpha;
|
||||
shader.uniforms.uColor = color;
|
||||
renderer.bindTexture(tex, 0, true);
|
||||
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
|
||||
};
|
||||
PictureRenderer.prototype._renderSprite = function (sprite, shader) {
|
||||
var renderer = this.renderer;
|
||||
var quad = shader.tempQuad;
|
||||
renderer.bindVao(quad.vao);
|
||||
var uvs = sprite.texture._uvs;
|
||||
var vertices = quad.vertices;
|
||||
var vd = sprite.vertexData;
|
||||
for (var i = 0; i < 8; i++) {
|
||||
quad.vertices[i] = vd[i];
|
||||
}
|
||||
quad.uvs[0] = uvs.x0;
|
||||
quad.uvs[1] = uvs.y0;
|
||||
quad.uvs[2] = uvs.x1;
|
||||
quad.uvs[3] = uvs.y1;
|
||||
quad.uvs[4] = uvs.x2;
|
||||
quad.uvs[5] = uvs.y2;
|
||||
quad.uvs[6] = uvs.x3;
|
||||
quad.uvs[7] = uvs.y3;
|
||||
quad.upload();
|
||||
var frame = sprite.texture.frame;
|
||||
var base = sprite.texture.baseTexture;
|
||||
var clamp = this._tempClamp;
|
||||
var eps = 0.5 / base.resolution;
|
||||
clamp[0] = (frame.x + eps) / base.width;
|
||||
clamp[1] = (frame.y + eps) / base.height;
|
||||
clamp[2] = (frame.x + frame.width - eps) / base.width;
|
||||
clamp[3] = (frame.y + frame.height - eps) / base.height;
|
||||
shader.uniforms.uTextureClamp = clamp;
|
||||
var color = this._tempColor;
|
||||
PIXI.utils.hex2rgb(sprite.tint, color);
|
||||
var alpha = sprite.worldAlpha;
|
||||
color[0] *= alpha;
|
||||
color[1] *= alpha;
|
||||
color[2] *= alpha;
|
||||
color[3] = alpha;
|
||||
shader.uniforms.uColor = color;
|
||||
renderer.bindTexture(base, 0, true);
|
||||
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
|
||||
};
|
||||
PictureRenderer.prototype._isSimpleSprite = function (ts) {
|
||||
var renderer = this.renderer;
|
||||
var tex = ts._texture;
|
||||
var baseTex = tex.baseTexture;
|
||||
var isSimple =
|
||||
baseTex.isPowerOfTwo &&
|
||||
tex.frame.width === baseTex.width &&
|
||||
tex.frame.height === baseTex.height;
|
||||
if (isSimple) {
|
||||
if (!baseTex._glTextures[renderer.CONTEXT_UID]) {
|
||||
if (baseTex.wrapMode === PIXI.WRAP_MODES.CLAMP) {
|
||||
baseTex.wrapMode = PIXI.WRAP_MODES.REPEAT;
|
||||
}
|
||||
} else {
|
||||
isSimple = baseTex.wrapMode !== PIXI.WRAP_MODES.CLAMP;
|
||||
}
|
||||
}
|
||||
return isSimple;
|
||||
};
|
||||
return PictureRenderer;
|
||||
})(PIXI.ObjectRenderer);
|
||||
extras.PictureRenderer = PictureRenderer;
|
||||
PIXI.WebGLRenderer.registerPlugin("picture", PictureRenderer);
|
||||
PIXI.CanvasRenderer.registerPlugin("picture", PIXI.CanvasSpriteRenderer);
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var PictureSprite = (function (_super) {
|
||||
__extends(PictureSprite, _super);
|
||||
function PictureSprite(texture) {
|
||||
_super.call(this, texture);
|
||||
this.pluginName = "picture";
|
||||
}
|
||||
return PictureSprite;
|
||||
})(PIXI.Sprite);
|
||||
extras.PictureSprite = PictureSprite;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
var PIXI;
|
||||
(function (PIXI) {
|
||||
var extras;
|
||||
(function (extras) {
|
||||
var PictureTilingSprite = (function (_super) {
|
||||
__extends(PictureTilingSprite, _super);
|
||||
function PictureTilingSprite(texture) {
|
||||
_super.call(this, texture);
|
||||
this.pluginName = "picture";
|
||||
}
|
||||
return PictureTilingSprite;
|
||||
})(extras.TilingSprite);
|
||||
extras.PictureTilingSprite = PictureTilingSprite;
|
||||
})((extras = PIXI.extras || (PIXI.extras = {})));
|
||||
})(PIXI || (PIXI = {}));
|
||||
//# sourceMappingURL=pixi-picture.js.map
|
||||
10861
www/js/libs/pixi-spine.js
Normal file
10861
www/js/libs/pixi-spine.js
Normal file
File diff suppressed because it is too large
Load diff
1113
www/js/libs/pixi-tilemap.js
Normal file
1113
www/js/libs/pixi-tilemap.js
Normal file
File diff suppressed because it is too large
Load diff
48989
www/js/libs/pixi.js
Normal file
48989
www/js/libs/pixi.js
Normal file
File diff suppressed because it is too large
Load diff
9
www/js/main.js
Normal file
9
www/js/main.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//=============================================================================
|
||||
// main.js
|
||||
//=============================================================================
|
||||
|
||||
PluginManager.setup($plugins);
|
||||
|
||||
window.onload = function () {
|
||||
SceneManager.run(Scene_Boot);
|
||||
};
|
||||
1604
www/js/plugins.js
Normal file
1604
www/js/plugins.js
Normal file
File diff suppressed because one or more lines are too long
1
www/js/plugins/----------------------.js
Normal file
1
www/js/plugins/----------------------.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
90
www/js/plugins/AltMenuScreen.js
Normal file
90
www/js/plugins/AltMenuScreen.js
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
//=============================================================================
|
||||
// AltMenuScreen.js
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @plugindesc Alternative menu screen layout.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help This plugin does not provide plugin commands.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @plugindesc メニュー画面のレイアウトを変更します。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help このプラグインには、プラグインコマンドはありません。
|
||||
*/
|
||||
|
||||
(function () {
|
||||
var _Scene_Menu_create = Scene_Menu.prototype.create;
|
||||
Scene_Menu.prototype.create = function () {
|
||||
_Scene_Menu_create.call(this);
|
||||
this._statusWindow.x = 0;
|
||||
this._statusWindow.y = this._commandWindow.height;
|
||||
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.numVisibleRows = function () {
|
||||
return 2;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.windowHeight = function () {
|
||||
var h1 = this.fittingHeight(1);
|
||||
var h2 = this.fittingHeight(2);
|
||||
return Graphics.boxHeight - h1 - h2;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.numVisibleRows = function () {
|
||||
return 1;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemImage = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var w = Math.min(rect.width, 144);
|
||||
var h = Math.min(rect.height, 144);
|
||||
var lineHeight = this.lineHeight();
|
||||
this.changePaintOpacity(actor.isBattleMember());
|
||||
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);
|
||||
this.changePaintOpacity(true);
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemStatus = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var x = rect.x;
|
||||
var y = rect.y;
|
||||
var width = rect.width;
|
||||
var bottom = y + rect.height;
|
||||
var lineHeight = this.lineHeight();
|
||||
this.drawActorName(actor, x, y + lineHeight * 0, width);
|
||||
this.drawActorLevel(actor, x, y + lineHeight * 1, width);
|
||||
this.drawActorClass(actor, x, bottom - lineHeight * 4, width);
|
||||
this.drawActorHp(actor, x, bottom - lineHeight * 3, width);
|
||||
this.drawActorMp(actor, x, bottom - lineHeight * 2, width);
|
||||
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
|
||||
};
|
||||
|
||||
var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
|
||||
Window_MenuActor.prototype.initialize = function () {
|
||||
_Window_MenuActor_initialize.call(this);
|
||||
this.y = this.fittingHeight(2);
|
||||
};
|
||||
})();
|
||||
132
www/js/plugins/AltSaveScreen.js
Normal file
132
www/js/plugins/AltSaveScreen.js
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
//=============================================================================
|
||||
// AltSaveScreen.js
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @plugindesc Alternative save/load screen layout.
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help This plugin does not provide plugin commands.
|
||||
*/
|
||||
|
||||
/*:ja
|
||||
* @plugindesc セーブ/ロード画面のレイアウトを変更します。
|
||||
* @author Yoji Ojima
|
||||
*
|
||||
* @help このプラグインには、プラグインコマンドはありません。
|
||||
*/
|
||||
|
||||
(function () {
|
||||
var _Scene_File_create = Scene_File.prototype.create;
|
||||
Scene_File.prototype.create = function () {
|
||||
_Scene_File_create.call(this);
|
||||
this._listWindow.height = this._listWindow.fittingHeight(8);
|
||||
var x = 0;
|
||||
var y = this._listWindow.y + this._listWindow.height;
|
||||
var width = Graphics.boxWidth;
|
||||
var height = Graphics.boxHeight - y;
|
||||
this._statusWindow = new Window_SavefileStatus(x, y, width, height);
|
||||
this._statusWindow.setMode(this.mode());
|
||||
this._listWindow.statusWindow = this._statusWindow;
|
||||
this._listWindow.callUpdateHelp();
|
||||
this.addWindow(this._statusWindow);
|
||||
};
|
||||
|
||||
var _Scene_File_start = Scene_File.prototype.start;
|
||||
Scene_File.prototype.start = function () {
|
||||
_Scene_File_start.call(this);
|
||||
this._listWindow.ensureCursorVisible();
|
||||
this._listWindow.callUpdateHelp();
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.numVisibleRows = function () {
|
||||
return 5;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.spacing = function () {
|
||||
return 8;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.itemHeight = function () {
|
||||
return this.lineHeight() * 2;
|
||||
};
|
||||
|
||||
var _Window_SavefileList_callUpdateHelp =
|
||||
Window_SavefileList.prototype.callUpdateHelp;
|
||||
Window_SavefileList.prototype.callUpdateHelp = function () {
|
||||
_Window_SavefileList_callUpdateHelp.call(this);
|
||||
if (this.active && this.statusWindow) {
|
||||
this.statusWindow.setId(this.index() + 1);
|
||||
}
|
||||
};
|
||||
|
||||
function Window_SavefileStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_SavefileStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_SavefileStatus.prototype.constructor = Window_SavefileStatus;
|
||||
|
||||
Window_SavefileStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
this._id = 1;
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.setMode = function (mode) {
|
||||
this._mode = mode;
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.setId = function (id) {
|
||||
this._id = id;
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.refresh = function () {
|
||||
this.contents.clear();
|
||||
var id = this._id;
|
||||
var valid = DataManager.isThisGameFile(id);
|
||||
var info = DataManager.loadSavefileInfo(id);
|
||||
var rect = this.contents.rect;
|
||||
this.resetTextColor();
|
||||
if (this._mode === "load") {
|
||||
this.changePaintOpacity(valid);
|
||||
}
|
||||
this.drawFileId(id, rect.x, rect.y);
|
||||
if (info) {
|
||||
this.changePaintOpacity(valid);
|
||||
this.drawContents(info, rect, valid);
|
||||
this.changePaintOpacity(true);
|
||||
}
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawFileId = function (id, x, y) {
|
||||
this.drawText(TextManager.file + " " + id, x, y, 180);
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawContents = function (info, rect, valid) {
|
||||
var bottom = rect.y + rect.height;
|
||||
var playtimeY = bottom - this.lineHeight();
|
||||
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
|
||||
if (valid) {
|
||||
this.drawPartyfaces(info, rect.x, bottom - 144);
|
||||
}
|
||||
this.drawText(info.playtime, rect.x, playtimeY, rect.width, "right");
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawPartyfaces = function (info, x, y) {
|
||||
if (info && info.faces) {
|
||||
for (var i = 0; i < info.faces.length; i++) {
|
||||
var data = info.faces[i];
|
||||
this.drawFace(data[0], data[1], x + i * 150, y);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
1198
www/js/plugins/ApngPicture.js
Normal file
1198
www/js/plugins/ApngPicture.js
Normal file
File diff suppressed because it is too large
Load diff
1117
www/js/plugins/BB_CustomSaveWindow.js
Normal file
1117
www/js/plugins/BB_CustomSaveWindow.js
Normal file
File diff suppressed because it is too large
Load diff
786
www/js/plugins/BattleEffectPopup.js
Normal file
786
www/js/plugins/BattleEffectPopup.js
Normal file
|
|
@ -0,0 +1,786 @@
|
|||
//=============================================================================
|
||||
// BattleEffectPopup.js
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (c) 2015 Triacontane
|
||||
// This software is released under the MIT License.
|
||||
// http://opensource.org/licenses/mit-license.php
|
||||
// ----------------------------------------------------------------------------
|
||||
// Version
|
||||
// 1.7.1 2017/08/03 YEP_BattleEngineCore.jsと併用したときに、メッセージの種類によってポップアップ位置が変化する問題を修正
|
||||
// 1.7.0 2017/06/13 行動がガード(耐性によって完全に防がれた)された場合のポップアップを追加
|
||||
// 1.6.0 2017/06/10 行動が無効だった場合のポップアップを追加
|
||||
// 1.5.1 2017/06/10 自動戦闘が有効なアクターがいる場合に一部機能が正常に動作しない問題を修正
|
||||
// 1.5.0 2017/05/30 弱点と耐性のポップアップで弱点や耐性と見なすための閾値を設定できる機能を追加
|
||||
// 1.4.0 2017/05/20 CounterExtend.jsとの併用でスキルによる反撃が表示されない問題を修正。
|
||||
// ポップアップのイタリック体および縁取り表示を行う機能を追加。
|
||||
// 1.3.1 2016/12/18 VE_BasicModule.jsとの競合を解消
|
||||
// 1.3.0 2016/07/14 アクターと敵キャラの通常ダメージにも専用のフラッシュ色を指定できるようになりました。
|
||||
// 1.2.3 2016/07/13 1.2.2の修正が不完全だったのを対応
|
||||
// 1.2.2 2016/07/13 YEP_BattleEngineCore.jsと併用したときに、Missが重複して表示される現象を修正
|
||||
// 1.2.1 2016/07/12 Z座標を指定しているプラグインとの競合を解消するかもしれない
|
||||
// 1.2.0 2016/07/10 行動失敗時(Miss!)も任意の文字または画像に置き換えられるようになりました。
|
||||
// 1.1.0 2016/07/09 ポップアップに任意の画像を指定できるようになりました。
|
||||
// フラッシュするフレーム数を指定できるようになりました。
|
||||
// 1.0.0 2016/07/06 初版
|
||||
// ----------------------------------------------------------------------------
|
||||
// [Blog] : http://triacontane.blogspot.jp/
|
||||
// [Twitter]: https://twitter.com/triacontane/
|
||||
// [GitHub] : https://github.com/triacontane/
|
||||
//=============================================================================
|
||||
|
||||
/*:
|
||||
* @plugindesc 戦闘行動結果ポップアッププラグイン
|
||||
* @author トリアコンタン
|
||||
*
|
||||
* @param クリティカル
|
||||
* @desc クリティカル発生時のポップアップメッセージまたはファイル名です。(img/pictures/)拡張子不要
|
||||
* @default CRITICAL!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param クリティカルカラー
|
||||
* @desc クリティカル発生時の文字のフラッシュ色です。R(赤),G(緑),B(青),A(強さ)の順番でカンマ(,)区切りで指定。
|
||||
* @default 255,0,0,255
|
||||
*
|
||||
* @param 回避
|
||||
* @desc 回避発生時のポップアップメッセージまたはファイル名です。
|
||||
* @default Avoid!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 回避カラー
|
||||
* @desc 回避発生時の文字のフラッシュ色です。
|
||||
* @default 0,128,255,255
|
||||
*
|
||||
* @param ミス
|
||||
* @desc ミス発生時のポップアップメッセージまたはファイル名です。通常のMissは表示されなくなります。
|
||||
* @default Miss!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param ミスカラー
|
||||
* @desc ミス発生時の文字のフラッシュ色です。
|
||||
* @default 0,0,0,0
|
||||
*
|
||||
* @param 無効
|
||||
* @desc 行動が無効(行動は成功したが有効な効果がなかった)だった時のポップアップメッセージまたはファイル名です。
|
||||
* @default Invalid!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 無効カラー
|
||||
* @desc 無効発生時の文字のフラッシュ色です。
|
||||
* @default 0,0,0,0
|
||||
*
|
||||
* @param ガード
|
||||
* @desc 行動がガード(行動は成功したが相手の耐性によって完全に防がれた)された時のポップアップメッセージまたはファイル名です。
|
||||
* @default Guard!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param ガードカラー
|
||||
* @desc ガード発生時の文字のフラッシュ色です。
|
||||
* @default 0,128,255,255
|
||||
*
|
||||
* @param 魔法反射
|
||||
* @desc 魔法反射時のポップアップメッセージまたはファイル名です。
|
||||
* @default Reflection!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 魔法反射カラー
|
||||
* @desc 魔法反射発生時の文字のフラッシュ色です。
|
||||
* @default 0,128,255,255
|
||||
*
|
||||
* @param 反撃
|
||||
* @desc 反撃時のポップアップメッセージまたはファイル名です。
|
||||
* @default Counter!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 反撃カラー
|
||||
* @desc 反撃発生時の文字のフラッシュ色です。
|
||||
* @default 0,128,255,255
|
||||
*
|
||||
* @param 弱点
|
||||
* @desc 弱点時のポップアップメッセージまたはファイル名です。
|
||||
* @default Weakness!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 弱点カラー
|
||||
* @desc 弱点発生時の文字のフラッシュ色です。
|
||||
* @default 0,255,128,255
|
||||
*
|
||||
* @param 弱点閾値
|
||||
* @desc この値以上なら弱点と見なします。百分率で指定します。
|
||||
* @default 200
|
||||
*
|
||||
* @param 耐性
|
||||
* @desc 弱点時のポップアップメッセージまたはファイル名です。
|
||||
* @default Resistance!
|
||||
* @require 1
|
||||
* @dir img/pictures/
|
||||
* @type file
|
||||
*
|
||||
* @param 耐性カラー
|
||||
* @desc 耐性発生時の文字のフラッシュ色です。
|
||||
* @default 0,0,128,255
|
||||
*
|
||||
* @param 耐性閾値
|
||||
* @desc この値以下なら耐性と見なします。百分率で指定します。
|
||||
* @default 50
|
||||
*
|
||||
* @param 味方ダメージカラー
|
||||
* @desc アクターダメージのフラッシュ色です。
|
||||
* @default 0,0,0,0
|
||||
*
|
||||
* @param 敵ダメージカラー
|
||||
* @desc 敵キャラダメージのフラッシュ色です。
|
||||
* @default 0,0,0,0
|
||||
*
|
||||
* @param フォントサイズ
|
||||
* @desc ポップアップのフォントサイズです。
|
||||
* @default 42
|
||||
*
|
||||
* @param メッセージ最大幅
|
||||
* @desc ポップアップメッセージの最大幅です。
|
||||
* @default 240
|
||||
*
|
||||
* @param フラッシュ時間
|
||||
* @desc フラッシュカラーがフェードアウトするまでのフレーム数です。
|
||||
* @default 60
|
||||
*
|
||||
* @param X座標補正
|
||||
* @desc X座標の補正値です。
|
||||
* @default 0
|
||||
*
|
||||
* @param Y座標補正
|
||||
* @desc Y座標の補正値です。
|
||||
* @default -40
|
||||
*
|
||||
* @param イタリック表示
|
||||
* @desc ポップアップがイタリック体で表示されます。
|
||||
* @default OFF
|
||||
*
|
||||
* @param 縁取り表示
|
||||
* @desc ポップアップが縁取り表示されます。
|
||||
* @default OFF
|
||||
*
|
||||
* @param 画像使用
|
||||
* @desc 各種ポップアップに任意のピクチャ(img/pictures)を使用します。メッセージの代わりにファイル名を入力してください。
|
||||
* @default OFF
|
||||
*
|
||||
* @noteParam BEPメッセージ
|
||||
* @noteRequire 1
|
||||
* @noteDir img/pictures/
|
||||
* @noteType file
|
||||
* @noteData items
|
||||
*
|
||||
* @help 戦闘中に行動の結果のメッセージをポップアップします。
|
||||
* ポップアップするのは動的に作成した文字列もしくは用意したピクチャです。
|
||||
* 表示条件は以下の通りです。
|
||||
*
|
||||
* ・失敗(通常のMissは表示されなくなります)
|
||||
* ・回避(通常のMissは表示されなくなります)
|
||||
* ・無効(行動は成功したが有効な効果がなかった)
|
||||
* ・ガード(行動は成功したが相手の耐性によって完全に防がれた)
|
||||
* ・クリティカル
|
||||
* ・反撃
|
||||
* ・魔法反射
|
||||
* ・弱点(ダメージ倍率が1.0を上回った場合)
|
||||
* ・耐性(ダメージ倍率が1.0を下回った場合)
|
||||
* ・ステート付与(ステートごとに設定できます)
|
||||
* ・コモンイベント(プラグインコマンドから実行します)
|
||||
*
|
||||
* ※ガードが表示されるのは、ステート有効度もしくは属性有効度が0%の効果が
|
||||
* 存在し、かつ他に有効な効果がない場合です。
|
||||
* なお、「ステート無効化」で防がれた場合は表示されません。
|
||||
*
|
||||
* また、ポップアップ時にフラッシュカラーを指定することができます。
|
||||
* フラッシュカラーの指定は「赤」「緑」「青」「強さ」の順番で
|
||||
* カンマ区切りで指定してください。
|
||||
*
|
||||
* ステート付与時にメッセージをポップアップをしたい場合
|
||||
* ステートのメモ欄に以下の通り指定してください。
|
||||
* <BEPメッセージ:state> # 付加時にメッセージ「state」が表示されます。
|
||||
* # 画像使用が有効な場合はファイル名を指定します。
|
||||
* <BEPカラー:255,255,255,255> # 付加時のフラッシュカラーを指定します。
|
||||
*
|
||||
* さらに、プラグインコマンドから任意の文字列を自由にポップアップできます。
|
||||
* このコマンドはバトルイベントのみ使用可能です。
|
||||
*
|
||||
* プラグインコマンド詳細
|
||||
* イベントコマンド「プラグインコマンド」から実行。
|
||||
* (パラメータの間は半角スペースで区切る)
|
||||
*
|
||||
* BEP対象者ポップアップ message 255,0,0,255 # 行動の対象者にmessageがポップ。
|
||||
* BEP_TARGET_POPUP message 255,0,0,255 # 上と同じ
|
||||
*
|
||||
* BEP使用者ポップアップ message 255,0,0,255 # 行動の使用者にmessageがポップ。
|
||||
* BEP_USER_POPUP message 255,0,0,255 # 上と同じ
|
||||
*
|
||||
* ※画像使用が有効な場合はファイル名を指定します。
|
||||
*
|
||||
* 競合に関する情報
|
||||
* 当プラグインは以下のプラグインより下に配置してください。
|
||||
*
|
||||
* YEP_BattleEngineCore.js
|
||||
*
|
||||
* 利用規約:
|
||||
* 作者に無断で改変、再配布が可能で、利用形態(商用、18禁利用等)
|
||||
* についても制限はありません。
|
||||
* このプラグインはもうあなたのものです。
|
||||
*/
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
var pluginName = "BattleEffectPopup";
|
||||
var metaTagPrefix = "BEP";
|
||||
|
||||
var getCommandName = function (command) {
|
||||
return (command || "").toUpperCase();
|
||||
};
|
||||
|
||||
var getParamOther = function (paramNames) {
|
||||
if (!Array.isArray(paramNames)) paramNames = [paramNames];
|
||||
for (var i = 0; i < paramNames.length; i++) {
|
||||
var name = PluginManager.parameters(pluginName)[paramNames[i]];
|
||||
if (name) return name;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var getParamString = function (paramNames) {
|
||||
var value = getParamOther(paramNames);
|
||||
return value === null ? "" : value;
|
||||
};
|
||||
|
||||
var getParamBoolean = function (paramNames) {
|
||||
var value = getParamOther(paramNames);
|
||||
return (value || "").toUpperCase() === "ON";
|
||||
};
|
||||
|
||||
var getParamNumber = function (paramNames, min, max) {
|
||||
var value = getParamOther(paramNames);
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
return (parseInt(value, 10) || 0).clamp(min, max);
|
||||
};
|
||||
|
||||
var getParamArrayString = function (paramNames) {
|
||||
var values = getParamString(paramNames).split(",");
|
||||
for (var i = 0; i < values.length; i++) values[i] = values[i].trim();
|
||||
return values;
|
||||
};
|
||||
|
||||
var getParamArrayNumber = function (paramNames, min, max) {
|
||||
var values = getParamArrayString(paramNames);
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
if (!isNaN(parseInt(values[i], 10))) {
|
||||
values[i] = (parseInt(values[i], 10) || 0).clamp(min, max);
|
||||
} else {
|
||||
values.splice(i--, 1);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
};
|
||||
|
||||
var getArgString = function (arg, upperFlg) {
|
||||
arg = convertEscapeCharacters(arg);
|
||||
return upperFlg ? arg.toUpperCase() : arg;
|
||||
};
|
||||
|
||||
var getArgArrayNumber = function (args, min, max) {
|
||||
var values = getArgArrayString(args, false);
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
for (var i = 0; i < values.length; i++)
|
||||
values[i] = (parseInt(values[i], 10) || 0).clamp(min, max);
|
||||
return values;
|
||||
};
|
||||
|
||||
var getArgArrayString = function (args, upperFlg) {
|
||||
var values = getArgString(args, upperFlg).split(",");
|
||||
for (var i = 0; i < values.length; i++) values[i] = values[i].trim();
|
||||
return values;
|
||||
};
|
||||
|
||||
var convertEscapeCharacters = function (text) {
|
||||
if (text == null) text = "";
|
||||
var windowLayer = SceneManager._scene._windowLayer;
|
||||
return windowLayer
|
||||
? windowLayer.children[0].convertEscapeCharacters(text)
|
||||
: text;
|
||||
};
|
||||
|
||||
var getMetaValue = function (object, name) {
|
||||
var metaTagName = metaTagPrefix + (name ? name : "");
|
||||
return object.meta.hasOwnProperty(metaTagName)
|
||||
? object.meta[metaTagName]
|
||||
: undefined;
|
||||
};
|
||||
|
||||
var getMetaValues = function (object, names) {
|
||||
if (!Array.isArray(names)) return getMetaValue(object, names);
|
||||
for (var i = 0, n = names.length; i < n; i++) {
|
||||
var value = getMetaValue(object, names[i]);
|
||||
if (value !== undefined) return value;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var paramCritical = getParamString(["Critical", "クリティカル"]);
|
||||
var paramCriticalColor = getParamArrayNumber(
|
||||
["CriticalColor", "クリティカルカラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramAvoid = getParamString(["Avoid", "回避"]);
|
||||
var paramAvoidColor = getParamArrayNumber(
|
||||
["AvoidColor", "回避カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramMiss = getParamString(["Miss", "ミス"]);
|
||||
var paramMissColor = getParamArrayNumber(["MissColor", "ミスカラー"], 0, 256);
|
||||
var paramInvalid = getParamString(["Invalid", "無効"]);
|
||||
var paramInvalidColor = getParamArrayNumber(
|
||||
["InvalidColor", "無効カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramGuard = getParamString(["Guard", "ガード"]);
|
||||
var paramGuardColor = getParamArrayNumber(
|
||||
["GuardColor", "ガードカラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramReflection = getParamString(["Reflection", "魔法反射"]);
|
||||
var paramReflectionColor = getParamArrayNumber(
|
||||
["ReflectionColor", "魔法反射カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramCounter = getParamString(["Counter", "反撃"]);
|
||||
var paramCounterColor = getParamArrayNumber(
|
||||
["CounterColor", "反撃カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramWeakness = getParamString(["Weakness", "弱点"]);
|
||||
var paramWeaknessColor = getParamArrayNumber(
|
||||
["WeaknessColor", "弱点カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramWeaknessLine = getParamNumber(["WeaknessLine", "弱点閾値"]);
|
||||
var paramResistance = getParamString(["Resistance", "耐性"]);
|
||||
var paramResistanceLine = getParamNumber(["ResistanceLine", "耐性閾値"]);
|
||||
var paramResistanceColor = getParamArrayNumber(
|
||||
["ResistanceColor", "耐性カラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramActorDamageColor = getParamArrayNumber(
|
||||
["ActorDamageColor", "味方ダメージカラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramEnemyDamageColor = getParamArrayNumber(
|
||||
["EnemyDamageColor", "敵ダメージカラー"],
|
||||
0,
|
||||
256
|
||||
);
|
||||
var paramFontSize = getParamNumber(["FontSize", "フォントサイズ"], 16, 128);
|
||||
var paramMaxWidth = getParamNumber(["MaxWidth", "メッセージ最大幅"], 1);
|
||||
var paramFlashDuration = getParamNumber(
|
||||
["FlashDuration", "フラッシュ時間"],
|
||||
1
|
||||
);
|
||||
var paramOffsetX = getParamNumber(["OffsetX", "X座標補正"]);
|
||||
var paramOffsetY = getParamNumber(["OffsetY", "Y座標補正"]);
|
||||
var paramUsingPicture = getParamBoolean(["UsingPicture", "画像使用"]);
|
||||
var paramUsingItalic = getParamBoolean(["UsingItalic", "イタリック表示"]);
|
||||
var paramUsingOutline = getParamBoolean(["UsingOutline", "縁取り表示"]);
|
||||
|
||||
//=============================================================================
|
||||
// Game_Interpreter
|
||||
// プラグインコマンドを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
if (!command.match(new RegExp("^" + metaTagPrefix))) return;
|
||||
this.pluginCommandBattleEffectPopup(
|
||||
command.replace(metaTagPrefix, ""),
|
||||
args
|
||||
);
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.pluginCommandBattleEffectPopup = function (
|
||||
command,
|
||||
args
|
||||
) {
|
||||
switch (getCommandName(command)) {
|
||||
case "使用者ポップアップ":
|
||||
case "_USER_POPUP":
|
||||
BattleManager._subject.startMessagePopup(
|
||||
getArgString(args[0]),
|
||||
getArgArrayNumber(args[1], 0, 256)
|
||||
);
|
||||
break;
|
||||
case "対象者ポップアップ":
|
||||
case "_TARGET_POPUP":
|
||||
var action = BattleManager._action;
|
||||
var unit = action.isForOpponent()
|
||||
? action.opponentsUnit()
|
||||
: action.friendsUnit();
|
||||
var index = BattleManager._subject._lastTargetIndex;
|
||||
var target = unit.members()[index];
|
||||
target.startMessagePopup(
|
||||
getArgString(args[0]),
|
||||
getArgArrayNumber(args[1], 0, 256)
|
||||
);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Action
|
||||
// 弱点によってポップアップを設定します。
|
||||
//=============================================================================
|
||||
var _Game_Action_calcElementRate = Game_Action.prototype.calcElementRate;
|
||||
Game_Action.prototype.calcElementRate = function (target) {
|
||||
var result = _Game_Action_calcElementRate.apply(this, arguments);
|
||||
if (BattleManager.isInputting()) return result;
|
||||
if (result === 0) {
|
||||
target.appointMessagePopup(paramGuard, paramGuardColor);
|
||||
} else if (result >= paramWeaknessLine / 100) {
|
||||
target.appointMessagePopup(paramWeakness, paramWeaknessColor);
|
||||
} else if (result <= paramResistanceLine / 100) {
|
||||
target.appointMessagePopup(paramResistance, paramResistanceColor);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Battler
|
||||
// ポップアップメッセージのリクエストに応答します。
|
||||
//=============================================================================
|
||||
Game_Battler.prototype.clearMessagePopup = function () {
|
||||
this._messagePopup = false;
|
||||
};
|
||||
|
||||
Game_Battler.prototype.isMessagePopupRequested = function () {
|
||||
return this._messagePopup;
|
||||
};
|
||||
|
||||
Game_Battler.prototype.startMessagePopup = function (message, flashColor) {
|
||||
if (message) {
|
||||
this._messagePopup = true;
|
||||
this._message = message;
|
||||
this._flashColor = flashColor;
|
||||
}
|
||||
};
|
||||
|
||||
Game_Battler.prototype.startAppointMessagePopup = function () {
|
||||
this.startMessagePopup(this._appointMessage, this._appointFlashColor);
|
||||
this._appointMessage = "";
|
||||
this._appointFlashColor = null;
|
||||
};
|
||||
|
||||
Game_Battler.prototype.appointMessagePopup = function (message, flashColor) {
|
||||
this._appointMessage = message;
|
||||
this._appointFlashColor = flashColor;
|
||||
};
|
||||
|
||||
Game_Battler.prototype.getMessagePopupText = function () {
|
||||
return this._message;
|
||||
};
|
||||
|
||||
Game_Battler.prototype.getMessagePopupFlashColor = function () {
|
||||
return this._flashColor;
|
||||
};
|
||||
|
||||
var _Game_Battler_stateRate = Game_Battler.prototype.stateRate;
|
||||
Game_Battler.prototype.stateRate = function (stateId) {
|
||||
var rate = _Game_Battler_stateRate.apply(this, arguments);
|
||||
if (rate === 0) {
|
||||
this.result().guarded = true;
|
||||
}
|
||||
return rate;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_ActionResult
|
||||
// 行動が無効だったかどうかを返します。
|
||||
//=============================================================================
|
||||
var _Game_ActionResult_clear = Game_ActionResult.prototype.clear;
|
||||
Game_ActionResult.prototype.clear = function () {
|
||||
_Game_ActionResult_clear.apply(this, arguments);
|
||||
this.guarded = false;
|
||||
};
|
||||
|
||||
Game_ActionResult.prototype.isInvalid = function () {
|
||||
return !this.success && !this.missed && !this.evaded;
|
||||
};
|
||||
|
||||
Game_ActionResult.prototype.isGuarded = function () {
|
||||
return this.guarded && this.isInvalid();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_BattleLog
|
||||
// ポップアップメッセージをリクエストします。
|
||||
//=============================================================================
|
||||
Window_BattleLog.prototype.popupMessage = function (
|
||||
target,
|
||||
message,
|
||||
flashColor
|
||||
) {
|
||||
target.startMessagePopup(message, flashColor);
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayDamage =
|
||||
Window_BattleLog.prototype.displayDamage;
|
||||
Window_BattleLog.prototype.displayDamage = function (target) {
|
||||
_Window_BattleLog_displayDamage.apply(this, arguments);
|
||||
if (target.result().isGuarded()) {
|
||||
this.pushPopupMessage(target, paramGuard, paramGuardColor);
|
||||
} else if (target.result().isInvalid()) {
|
||||
this.pushPopupMessage(target, paramInvalid, paramInvalidColor);
|
||||
}
|
||||
target.startAppointMessagePopup();
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayCritical =
|
||||
Window_BattleLog.prototype.displayCritical;
|
||||
Window_BattleLog.prototype.displayCritical = function (target) {
|
||||
_Window_BattleLog_displayCritical.apply(this, arguments);
|
||||
if (target.result().critical) {
|
||||
this.pushPopupMessage(target, paramCritical, paramCriticalColor);
|
||||
}
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayMiss = Window_BattleLog.prototype.displayMiss;
|
||||
Window_BattleLog.prototype.displayMiss = function (target) {
|
||||
_Window_BattleLog_displayMiss.apply(this, arguments);
|
||||
this.popupMiss(target);
|
||||
};
|
||||
|
||||
Window_BattleLog.prototype.popupMiss = function (target) {
|
||||
this.pushPopupMessage(target, paramMiss, paramMissColor);
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayEvasion =
|
||||
Window_BattleLog.prototype.displayEvasion;
|
||||
Window_BattleLog.prototype.displayEvasion = function (target) {
|
||||
_Window_BattleLog_displayEvasion.apply(this, arguments);
|
||||
this.popupEvasion(target);
|
||||
};
|
||||
|
||||
Window_BattleLog.prototype.popupEvasion = function (target) {
|
||||
this.pushPopupMessage(target, paramAvoid, paramAvoidColor);
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayCounter =
|
||||
Window_BattleLog.prototype.displayCounter;
|
||||
Window_BattleLog.prototype.displayCounter = function (target) {
|
||||
_Window_BattleLog_displayCounter.apply(this, arguments);
|
||||
this.popupCounter(target);
|
||||
};
|
||||
|
||||
Window_BattleLog.prototype.popupCounter = function (target) {
|
||||
this.pushPopupMessage(target, paramCounter, paramCounterColor);
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayReflection =
|
||||
Window_BattleLog.prototype.displayReflection;
|
||||
Window_BattleLog.prototype.displayReflection = function (target) {
|
||||
_Window_BattleLog_displayReflection.apply(this, arguments);
|
||||
this.popupReflection(target);
|
||||
};
|
||||
|
||||
Window_BattleLog.prototype.popupReflection = function (target) {
|
||||
this.pushPopupMessage(target, paramReflection, paramReflectionColor);
|
||||
};
|
||||
|
||||
var _Window_BattleLog_displayAddedStates =
|
||||
Window_BattleLog.prototype.displayAddedStates;
|
||||
Window_BattleLog.prototype.displayAddedStates = function (target) {
|
||||
_Window_BattleLog_displayAddedStates.apply(this, arguments);
|
||||
target
|
||||
.result()
|
||||
.addedStateObjects()
|
||||
.forEach(function (state) {
|
||||
var message = getMetaValues(state, ["Message", "メッセージ"]);
|
||||
if (message) {
|
||||
var flash = getMetaValues(state, ["FlashColor", "カラー"]);
|
||||
if (flash) flash = getArgArrayNumber(flash, 0, 256);
|
||||
this.pushPopupMessage(target, getArgString(message), flash);
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
Window_BattleLog.prototype.pushPopupMessage = function (
|
||||
target,
|
||||
message,
|
||||
flashColor
|
||||
) {
|
||||
this.push("popupMessage", target, message, flashColor);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Sprite_Battler
|
||||
// ポップアップメッセージを作成します。
|
||||
//=============================================================================
|
||||
var _Sprite_Battler_updateDamagePopup =
|
||||
Sprite_Battler.prototype.updateDamagePopup;
|
||||
Sprite_Battler.prototype.updateDamagePopup = function () {
|
||||
this.setupMessagePopup();
|
||||
_Sprite_Battler_updateDamagePopup.apply(this, arguments);
|
||||
};
|
||||
|
||||
var _Sprite_Battler_pushDamageSprite =
|
||||
Sprite_Battler.prototype.pushDamageSprite;
|
||||
Sprite_Battler.prototype.pushDamageSprite = function (sprite) {
|
||||
var damage = this._damages;
|
||||
this._damages = this._damages.filter(function (sprite) {
|
||||
return !sprite.isMessage();
|
||||
});
|
||||
_Sprite_Battler_pushDamageSprite.apply(this, arguments);
|
||||
damage.push(sprite);
|
||||
this._damages = damage;
|
||||
};
|
||||
|
||||
Sprite_Battler.prototype.setupMessagePopup = function () {
|
||||
if (this._battler.isMessagePopupRequested()) {
|
||||
if (this._battler.isSpriteVisible()) {
|
||||
var sprite = new Sprite_PopupMessage();
|
||||
sprite.x = this.x + this.messageOffsetX();
|
||||
sprite.y = this.y + this.messageOffsetY();
|
||||
sprite.setup(this._battler);
|
||||
if (!sprite.z) {
|
||||
this.setZPositionOfPopup(sprite);
|
||||
}
|
||||
this._damages.push(sprite);
|
||||
this.parent.addChild(sprite);
|
||||
}
|
||||
this._battler.clearMessagePopup();
|
||||
}
|
||||
};
|
||||
|
||||
Sprite_Battler.prototype.setZPositionOfPopup = function (sprite) {
|
||||
if (this.z > 0) sprite.z = this.z + 10;
|
||||
if (this._mainSprite && this._mainSprite.z > 0)
|
||||
sprite.z = this._mainSprite.z + 10;
|
||||
};
|
||||
|
||||
Sprite_Battler.prototype.messageOffsetX = function () {
|
||||
return paramOffsetX;
|
||||
};
|
||||
|
||||
Sprite_Battler.prototype.messageOffsetY = function () {
|
||||
return paramOffsetY;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Sprite_Damage
|
||||
// 回避メッセージが有効な場合のミス表示を抑制します。
|
||||
//=============================================================================
|
||||
var _Sprite_Damage_setup = Sprite_Damage.prototype.setup;
|
||||
Sprite_Damage.prototype.setup = function (target) {
|
||||
// for YEP_BattleEngineCore.js
|
||||
var result = target.shiftDamagePopup
|
||||
? target.shiftDamagePopup()
|
||||
: target.result();
|
||||
if ((!result.evaded || !paramAvoid) && (!result.missed || !paramMiss)) {
|
||||
if (target.shiftDamagePopup) {
|
||||
target._damagePopup.unshift(result);
|
||||
}
|
||||
_Sprite_Damage_setup.apply(this, arguments);
|
||||
}
|
||||
this.setupFlash(result, target);
|
||||
};
|
||||
|
||||
Sprite_Damage.prototype.setupFlash = function (result, target) {
|
||||
if (!result.missed && !result.evaded && result.hpAffected) {
|
||||
var color =
|
||||
target instanceof Game_Actor
|
||||
? paramActorDamageColor
|
||||
: paramEnemyDamageColor;
|
||||
if (color && color.length > 0) this.setupFlashEffect(color);
|
||||
}
|
||||
};
|
||||
|
||||
Sprite_Damage.prototype.setupFlashEffect = function (flashColor, duration) {
|
||||
this._flashColor = flashColor.clone();
|
||||
this._flashDuration = duration || paramFlashDuration;
|
||||
};
|
||||
|
||||
Sprite_Damage.prototype.isMessage = function () {
|
||||
return false;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Sprite_PopupMessage
|
||||
// ポップアップメッセージを表示するスプライトです。
|
||||
//=============================================================================
|
||||
function Sprite_PopupMessage() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Sprite_PopupMessage.prototype = Object.create(Sprite_Damage.prototype);
|
||||
Sprite_PopupMessage.prototype.constructor = Sprite_PopupMessage;
|
||||
|
||||
Sprite_PopupMessage.prototype.setup = function (target) {
|
||||
var text = target.getMessagePopupText();
|
||||
var bitmap = paramUsingPicture
|
||||
? this.setupStaticText(text)
|
||||
: this.setupDynamicText(text);
|
||||
var sprite = this.createChildSprite();
|
||||
sprite.bitmap = bitmap;
|
||||
sprite.dy = 0;
|
||||
var flashColor = target.getMessagePopupFlashColor();
|
||||
if (flashColor) {
|
||||
this.setupFlashEffect(flashColor);
|
||||
}
|
||||
};
|
||||
|
||||
Sprite_PopupMessage.prototype.setupDynamicText = function (text) {
|
||||
var bitmap = new Bitmap(paramMaxWidth, paramFontSize + 8);
|
||||
bitmap.fontSize = paramFontSize;
|
||||
if (paramUsingItalic) {
|
||||
bitmap.fontItalic = true;
|
||||
}
|
||||
if (paramUsingOutline) {
|
||||
bitmap.outlineWidth = Math.floor(bitmap.fontSize / 6);
|
||||
bitmap.outlineColor = "gray";
|
||||
}
|
||||
bitmap.drawText(text, 0, 0, bitmap.width, bitmap.height, "center");
|
||||
return bitmap;
|
||||
};
|
||||
|
||||
Sprite_PopupMessage.prototype.setupStaticText = function (textPicture) {
|
||||
return ImageManager.loadPicture(textPicture, 0);
|
||||
};
|
||||
|
||||
Sprite_PopupMessage.prototype.isMessage = function () {
|
||||
return true;
|
||||
};
|
||||
})();
|
||||
266
www/js/plugins/BattlebustPict.js
Normal file
266
www/js/plugins/BattlebustPict.js
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
//=============================================================================
|
||||
// BattlebustPict.js
|
||||
//=============================================================================
|
||||
|
||||
/*:ja
|
||||
* @plugindesc ver1.02 バトル中のピクチャ表示
|
||||
* @author まっつUP
|
||||
*
|
||||
* @param startId
|
||||
* @desc ピクチャの開始ID
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 100
|
||||
* @default 50
|
||||
*
|
||||
* @param middying
|
||||
* @desc デフォルトとは別のピンチ基準。
|
||||
* デフォルトのピンチ基準も使うことに注意。
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 99
|
||||
* @default 50
|
||||
*
|
||||
* @param orizin
|
||||
* @desc ピクチャの原点
|
||||
* 0・・・左上 1・・・中央
|
||||
* @type number
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @default 1
|
||||
*
|
||||
* @param pictX
|
||||
* @desc ピクチャのx座標
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 2000
|
||||
* @default 600
|
||||
*
|
||||
* @param pictY
|
||||
* @desc ピクチャのy座標
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 2000
|
||||
* @default 350
|
||||
*
|
||||
* @param scaleX
|
||||
* @desc ピクチャのx拡大率
|
||||
* @type number
|
||||
* @min -1000
|
||||
* @max 1000
|
||||
* @default 100
|
||||
*
|
||||
* @param scaleY
|
||||
* @desc ピクチャのy拡大率
|
||||
* @type number
|
||||
* @min -1000
|
||||
* @max 1000
|
||||
* @default 100
|
||||
*
|
||||
* @param equipX
|
||||
* @desc スロットごとのx座標
|
||||
* ヘルプ参照
|
||||
* @default 0 0 0 0 0 0
|
||||
*
|
||||
* @param equipY
|
||||
* @desc スロットごとのy座標
|
||||
* ヘルプ参照
|
||||
* @default 0 0 0 0 0 0
|
||||
*
|
||||
* @param indexaddX
|
||||
* @desc アクターのindex(先頭は0)に
|
||||
* この数をかけてx座標を算出します
|
||||
* @type number
|
||||
* @min 1
|
||||
* @max 1000
|
||||
* @default 150
|
||||
*
|
||||
* @param dyingtone
|
||||
* @desc 戦闘不能のアクターのピクチャを
|
||||
* 表示させるときの黒さの強さ(0だと無効です)
|
||||
* @type number
|
||||
* @min 0
|
||||
* @max 255
|
||||
* @default 64
|
||||
*
|
||||
* @help
|
||||
*
|
||||
* RPGで笑顔を・・・
|
||||
*
|
||||
* このヘルプとパラメータの説明をよくお読みになってからお使いください。
|
||||
*
|
||||
* アクター・武器・防具のノートタグ
|
||||
* <BPnormal:x> 通常時
|
||||
* <BPdying:x> 瀕死時
|
||||
* <BPmiddying:x> パラメータ指定瀕死時
|
||||
* xはファイル名、(:とのスペースは無しでお願いします)
|
||||
*
|
||||
* 例<BPnormal:aaa>
|
||||
* 通常時aaa.pngのファイルをピクチャで表示します。
|
||||
*
|
||||
* アクターのノートタグ
|
||||
* <BPnoequip>
|
||||
* このアクターは装備による差分を表示しません。
|
||||
*
|
||||
* equipXはスロットのindexごとにx座標を指定します。
|
||||
* 数値と数値の間は半角スペースを一つだけあけてください。
|
||||
* 装備スロットの数だけ数値を増やしてください。
|
||||
* 0を指定したスロットindexではピクチャの取得・表示を行いません。
|
||||
*
|
||||
* 例:0 0 600 600 0
|
||||
* 装備できる装備品が5つでその順が「武器、盾、頭、体、飾」の場合
|
||||
* 頭、体のピクチャのx座標を600とします。
|
||||
*
|
||||
* equipYも設定方法は同様ですが
|
||||
* こちらは0を指定してもピクチャの取得・表示の分岐を行いません。
|
||||
*
|
||||
* indexaddXは
|
||||
* 実質バトルメンバー数が2以上の時に機能します。
|
||||
*
|
||||
* ピクチャのIDは
|
||||
* アクターの設定のピクチャ
|
||||
* startId + アクターのindex * 10
|
||||
*
|
||||
* アクターの装備のピクチャ
|
||||
* アクターの設定のピクチャ + 装備スロットindex + 1
|
||||
*
|
||||
* となります。
|
||||
*
|
||||
* ピクチャの原点は
|
||||
* イベントコマンド「ピクチャの表示」と同じ扱いです。
|
||||
*
|
||||
* 表示するピクチャの優先度は
|
||||
* dying > middying > normal
|
||||
* です。
|
||||
*
|
||||
* このプラグインを利用する場合は
|
||||
* readmeなどに「まっつUP」の名を入れてください。
|
||||
* また、素材のみの販売はダメです。
|
||||
* 上記以外の規約等はございません。
|
||||
* もちろんツクールMVで使用する前提です。
|
||||
* 何か不具合ありましたら気軽にどうぞ。
|
||||
*
|
||||
* ver1.01 装備差分対応、パラメータを増加。
|
||||
* ver1.02 戦闘不能時の処理追加
|
||||
*
|
||||
* 免責事項:
|
||||
* このプラグインを利用したことによるいかなる損害も制作者は一切の責任を負いません。
|
||||
*
|
||||
*/
|
||||
|
||||
(function () {
|
||||
var parameters = PluginManager.parameters("BattlebustPict");
|
||||
var BPstartId = Number(parameters["startId"] || 50);
|
||||
var BPmiddying = Number(parameters["middying"] || 50) / 100;
|
||||
var BPorizin = Number(parameters["orizin"] || 1);
|
||||
var BPpictX = Number(parameters["pictX"] || 600);
|
||||
var BPpictY = Number(parameters["pictY"] || 350);
|
||||
var BPscaleX = Number(parameters["scaleX"] || 100);
|
||||
var BPscaleY = Number(parameters["scaleY"] || 100);
|
||||
//ループ計算用変数の先定義
|
||||
var calconly = 0;
|
||||
var BPequipX = String(parameters["equipX"]);
|
||||
BPequipX = BPequipX.split(" ");
|
||||
for (var i = 0; i < BPequipX.length; ++i) {
|
||||
calconly = Number(BPequipX[i] || 0);
|
||||
BPequipX[i] = Math.abs(calconly);
|
||||
}
|
||||
|
||||
var BPequipY = String(parameters["equipY"]);
|
||||
BPequipY = BPequipY.split(" ");
|
||||
for (var i = 0; i < BPequipY.length; ++i) {
|
||||
calconly = Number(BPequipY[i] || 0);
|
||||
BPequipY[i] = Math.abs(calconly);
|
||||
}
|
||||
|
||||
var BPindexaddX = Number(parameters["indexaddX"] || 150);
|
||||
var BPdyingtone = Number(parameters["dyingtone"] || 64);
|
||||
|
||||
var _BattleManager_refreshStatus = BattleManager.refreshStatus;
|
||||
BattleManager.refreshStatus = function () {
|
||||
_BattleManager_refreshStatus.call(this);
|
||||
$gameParty.TimingUpdateBP();
|
||||
};
|
||||
|
||||
Game_Actor.prototype.showstandBP = function (id, name, x, y) {
|
||||
if (!name) return;
|
||||
$gameScreen.showPicture(
|
||||
id,
|
||||
name,
|
||||
BPorizin,
|
||||
x,
|
||||
y,
|
||||
BPscaleX,
|
||||
BPscaleY,
|
||||
255,
|
||||
0
|
||||
);
|
||||
if (this.isdyingtone()) {
|
||||
var color = -BPdyingtone;
|
||||
var tone = [color, color, color, 0];
|
||||
$gameScreen.tintPicture(id, tone, 0);
|
||||
}
|
||||
};
|
||||
|
||||
Game_Actor.prototype.baseidBP = function () {
|
||||
return BPstartId + this.index() * 10;
|
||||
};
|
||||
|
||||
Game_Actor.prototype.isBPDying = function () {
|
||||
return this.isAlive() && this._hp / this.mhp <= BPmiddying;
|
||||
};
|
||||
|
||||
Game_Actor.prototype.isdyingtone = function () {
|
||||
return this.isDeathStateAffected() && BPdyingtone > 0;
|
||||
};
|
||||
|
||||
Game_Actor.prototype.getnotetag = function () {
|
||||
var text = "BPnormal";
|
||||
if (this.isDying() || this.isDeathStateAffected()) {
|
||||
text = "BPdying";
|
||||
} else if (this.isBPDying()) {
|
||||
text = "BPmiddying";
|
||||
}
|
||||
return text;
|
||||
};
|
||||
|
||||
Game_Actor.prototype.BPnotepict = function (data, text) {
|
||||
return data.meta[text];
|
||||
};
|
||||
|
||||
Game_Actor.prototype.StandUpdateBP = function (text) {
|
||||
var id = this.baseidBP();
|
||||
var x = BPpictX + this.index() * BPindexaddX;
|
||||
var name = this.BPnotepict(this.actor(), text);
|
||||
this.showstandBP(id, name, x, BPpictY);
|
||||
};
|
||||
|
||||
Game_Actor.prototype.EquipUpdateBP = function (text) {
|
||||
if (this.actor().note.match(/<BPnoequip>/i)) return;
|
||||
var id = this.baseidBP();
|
||||
var equip = this.equips();
|
||||
for (var i = 0; i < BPequipX.length; i++) {
|
||||
id++;
|
||||
if (BPequipX[i] <= 0 || !equip[i]) continue;
|
||||
var x = BPequipX[i] + this.index() * BPindexaddX;
|
||||
var y = BPequipY[i];
|
||||
var name = this.BPnotepict(equip[i], text);
|
||||
this.showstandBP(id, name, x, y);
|
||||
}
|
||||
};
|
||||
|
||||
//オーバーライド(ここで初めてinBattleがtrueになる)
|
||||
var _Game_Unit_onBattleStart = Game_Unit.prototype.onBattleStart;
|
||||
Game_Party.prototype.onBattleStart = function () {
|
||||
_Game_Unit_onBattleStart.call(this);
|
||||
this.TimingUpdateBP();
|
||||
};
|
||||
|
||||
Game_Party.prototype.TimingUpdateBP = function () {
|
||||
this.members().forEach(function (actor) {
|
||||
var text = actor.getnotetag();
|
||||
actor.StandUpdateBP(text);
|
||||
actor.EquipUpdateBP(text);
|
||||
});
|
||||
};
|
||||
})();
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue