增加背景切换事件,梳理公共事件C0_1

This commit is contained in:
草莓 2024-12-25 00:24:41 +08:00
parent 26aae0282f
commit 469cb98bc7
6 changed files with 3703 additions and 1877 deletions

View File

@ -857,6 +857,7 @@ action
| battle_1_s
| openDoor_s
| closeDoor_s
| changebg_s
| changeFloor_s
| changePos_s
| setViewport_s
@ -1889,6 +1890,20 @@ var code = '{"type": "sleep", "time": '+Int_0+Bool_0+'},\n';
return code;
*/;
changebg_s
: '上一个背景' EvalString? '下一个背景' EvalString? '切换时长' Int '转场方式' Changebg_List Newline
/* changebg_s
tooltip : changebg: 剧情转场
helpUrl : /_docs/#/instruction
default : ["","",30,"引入"]
colour : this.soundColor
allImages : ['EvalString_0','EvalString_1']
var code = '{"type": "changebg", "img1": "'+EvalString_0+'","img2": "'+EvalString_1+'","time": '+Int_0+',"style": "'+Changebg_List_0+'"},\n';
return code;
*/;
drawWarning_s
: '警告坐标x' PosString 'y' PosString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline
@ -4194,6 +4209,10 @@ Bg_Fg_List
: '背景层'|'前景层'
/*Bg_Fg_List ['bg','fg']*/;
Changebg_List
: '引入'|'引出'|'场景切换'
/*Changebg_List ['引入','引出','场景切换']*/;
Bg_Fg2_List
: '背景层'|'前景层'|'自适配'
/*Bg_Fg2_List ['bg','fg','auto']*/;

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
{"viewportLoc":[0,0],"editorLastFloorId":"street01"}
{"viewportLoc":[0,0],"editorLastFloorId":"street02"}

View File

@ -154,31 +154,270 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
"time": 50
},
{
"type": "setCurtain",
"color": [
"type": "changebg",
"img1": "",
"img2": "",
"time": 30,
"style": "引入"
},
{
"type": "over",
"text": "人生不如意事,十常居七八。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"time": 500,
"keep": true
"font": "bold 48px Verdana"
},
"\b[center]人生不如意事,十常居七八。",
"\b[center]世间的万物皆被装缀着不公的色彩。",
"\b[center]没错,就像——",
"\b[center]十几年前的那一天,",
"\b[center]在都市的角落,同许多的生命共同消逝一般。",
"\b[center]没错,就像——",
"\b[center]十几年前的那天起以来,",
"\b[center]无数的生命被那无法逃脱的污泥囚禁一样。",
"\b[center]人生不如意事,十常居七八。",
"\b[center]世间的万物皆被装缀着不公的色彩。",
"\b[center]没错,就像——",
"\b[center]如今,这一天。",
{
"type": "setCurtain",
"time": 500
"type": "over",
"text": "世间的万物皆被装缀着不公的色彩。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "没错,就像——",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "十几年前的那一天,",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "在都市的角落,同许多的生命共同消逝一般。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "没错,就像——",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "十几年前的那天起以来,",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "无数的生命被那无法逃脱的污泥囚禁一样。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "人生不如意事,十常居七八。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "世间的万物皆被装缀着不公的色彩。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "没错,就像——",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "over",
"text": "如今,这一天。",
"image": "",
"time": 3000,
"hidetime": 30,
"sound": "",
"textColor": [
255,
255,
255,
1
],
"boldColor": [
0,
0,
0,
1
],
"font": "bold 48px Verdana"
},
{
"type": "changebg",
"img1": "",
"img2": "other_0001.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
@ -240,6 +479,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0001.png",
"img2": "bg_3563.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_3563.png",
@ -400,6 +646,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_3563.png",
"img2": "other_0002.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "other_0002.png",
@ -560,6 +813,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0002.png",
"img2": "other_0001.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "other_0001.png",
@ -580,6 +840,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0001.png",
"img2": "other_0003.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "other_0003.png",
@ -620,6 +887,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0003.png",
"img2": "",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "",
@ -640,6 +914,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "",
"img2": "other_0003.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "other_0003.png",
@ -680,6 +961,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0003.png",
"img2": "",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "",
@ -825,6 +1113,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
"name": "Blind_Alley.mp3",
"keep": true
},
{
"type": "changebg",
"img1": "",
"img2": "bg_6004.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_6004.png",
@ -945,6 +1240,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_6004.png",
"img2": "other_0004.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "other_0004.png",
@ -1005,6 +1307,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "other_0004.png",
"img2": "bg_3601.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_3601.png",
@ -1065,6 +1374,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_3601.png",
"img2": "bg_3531.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_3531.png",
@ -1347,7 +1663,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
},
{
"type": "cgtext",
"bg": "",
"bg": "bg_3531.png",
"WindowSkin": false,
"head": {
"name": "",
@ -1735,7 +2051,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
},
"name": "凯伊姆",
"time": 50,
"sound": "aiy3100000100.mp3",
"sound": "aiy310000100.mp3",
"text": "「话说回来,那个要落跑的女人呢?」",
"bodyList": [
{
@ -2395,7 +2711,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
},
"name": "凯伊姆",
"time": 50,
"sound": "aiy3100000110.mp3",
"sound": "aiy310000110.mp3",
"text": "「我要走了」",
"bodyList": [
{
@ -2455,7 +2771,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
},
"name": "凯伊姆",
"time": 50,
"sound": "aiy3100000120.mp3",
"sound": "aiy310000120.mp3",
"text": "「啊啊」",
"bodyList": [
{
@ -2509,6 +2825,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_3531.png",
"img2": "bg_3601.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_3601.png",
@ -2709,6 +3032,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_3601.png",
"img2": "bg_3531.png",
"time": 30,
"style": "场景切换"
},
{
"type": "cgtext",
"bg": "bg_3531.png",
@ -2729,6 +3059,13 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
}
]
},
{
"type": "changebg",
"img1": "bg_3531.png",
"img2": "",
"time": 30,
"style": "引出"
},
{
"type": "comment",
"text": "好多立绘,先更这点(吐槽一下)"

View File

@ -25,6 +25,12 @@ main.floors.street01=
],
"direction": "up"
}
],
"5,10": [
{
"type": "insert",
"name": "chapter0"
}
]
},
"changeFloor": {

View File

@ -55,6 +55,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.doAction()
}
})
core.registerEvent("changebg", function (data) {
if (!main.replayChecking && !core.isReplaying()) {
core.changebg(data.img1, data.img2, data.time, data.style)
} else {
core.doAction()
}
})
core.registerEvent("cgtext", function (data) {
if (!main.replayChecking && !core.isReplaying()) {
core.ui.cgText.image = data.bg;
@ -7407,6 +7415,7 @@ core.plugin.animate = {
],
'特效表现': [
MotaActionBlocks['sleep_s'].xmlText(),
MotaActionBlocks['changebg_s'].xmlText(),
MotaActionFunctions.actionParser.parseList({
"type": "wait",
"timeout": 0,
@ -9865,16 +9874,21 @@ core.plugin.animate = {
core.insertAction(data)
core.doAction();
} else if (!core.status.event.data) {
cg.style.display = "none"
core.ui._animateUI('hide', null, () => {
core.doAction()
});
} else {
// 正在淡入淡出的话不执行
if (core.status.event.animateUI) return;
auto = false;
const data = core.clone(core.status.event.data.current);
// 打字机效果显示全部文字
if (core.status.event.interval != null) {
const data = core.clone(core.status.event.data?.current);
data.showAll = true;
data.time = 0
data.text = data.text.replace(/(\\(z))(\[.*?])?/g, ""); //去除打字机暂停效果
@ -9989,7 +10003,10 @@ core.plugin.animate = {
if (auto && !this.WindowSkin && !core.ui.cgText.sound || (core.ui.cgText.sound && !core.musicStatus.soundStatus)) {
setTimeout(() => {
if (auto) {
core.doAction()
cg.style.display = "none"
core.ui._animateUI('hide', null, () => {
core.doAction()
})
}
}, 2000)
}
@ -10001,8 +10018,10 @@ core.plugin.animate = {
core.status.event.interval = null;
if (auto && !this.WindowSkin && !core.ui.cgText.sound || (core.ui.cgText.sound && !core.musicStatus.soundStatus)) setTimeout(() => {
if (auto) {
core.doAction()
cg.style.display = "none"
core.ui._animateUI('hide', null, () => {
core.doAction()
})
}
}, 2000)
}
@ -10064,7 +10083,10 @@ core.plugin.animate = {
if (this.sound && auto && !this.WindowSkin && core.musicStatus.soundStatus) {
setTimeout(() => {
if (auto) {
core.doAction()
cg.style.display = "none"
core.ui._animateUI('hide', null, () => {
core.doAction()
})
}
}, 2000)
}
@ -10094,131 +10116,242 @@ core.plugin.animate = {
core.ui.cgText = new cgText()
},
"旁白": function () {
// 在此增加新插件
const over = document.createElement('canvas'); //over画布设置
over.style.position = 'absolute';
over.style.zIndex = 310;
over.style.display = "none"
over.id = 'over';
main.dom.gameGroup.insertAdjacentElement('afterend', over)
over.style.top = "50%"
over.style.left = "50%"
over.style.transform = "translate(-50%,-50%)"
const ctx = over.getContext("2d");
main.dom.over = over;
// 在此增加新插件
const over = document.createElement('canvas'); //over画布设置
over.style.position = 'absolute';
over.style.zIndex = 310;
over.style.display = "none"
over.id = 'over';
main.dom.gameGroup.insertAdjacentElement('afterend', over)
over.style.top = "50%"
over.style.left = "50%"
over.style.transform = "translate(-50%,-50%)"
const ctx = over.getContext("2d");
main.dom.over = over;
this.over = function (image, time = 3000, hidetime = 100, sound = "", textColor = "#FFFFFF", boldColor = "#000000", font = "bold 48px Verdana", text = "") {
if (!core.isPlaying()) { return core.doAction() }
const img = core.material.images.images?.[image]
over.style.display = "block";
let globalAlpha = 0
core.registerAnimationFrame("overshow", true, () => {
this.over = function (image, time = 3000, hidetime = 100, sound = "", textColor = "#FFFFFF", boldColor = "#000000", font = "bold 48px Verdana", text = "") {
if (!core.isPlaying()) { return core.doAction() }
const img = core.material.images.images?.[image]
over.style.display = "block";
let globalAlpha = 0
core.registerAnimationFrame("overshow", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha++
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha >= hidetime) {
core.unregisterAnimationFrame("overshow")
if (sound && core.material.sounds[sound] && core.musicStatus.soundStatus) {
core.playSound(sound, null, () => {
core.registerAnimationFrame("overhide", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha--
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha <= 0) {
over.style.display = 'none'
core.unregisterAnimationFrame("overhide")
core.doAction()
}
})
})
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
setTimeout(() => {
core.registerAnimationFrame("overhide", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha--
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha <= 0) {
over.style.display = 'none'
core.unregisterAnimationFrame("overhide")
core.doAction();
}
})
}, time)
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha++
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha >= hidetime) {
core.unregisterAnimationFrame("overshow")
if (sound && core.material.sounds[sound] && core.musicStatus.soundStatus) {
core.playSound(sound, null, () => {
core.registerAnimationFrame("overhide", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha--
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha <= 0) {
over.style.display = 'none'
core.unregisterAnimationFrame("overhide")
core.doAction()
}
})
})
} else {
setTimeout(() => {
core.registerAnimationFrame("overhide", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
if (img) { //绘制背景
ctx.drawImage(img, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha--
ctx.globalAlpha = globalAlpha / hidetime
core.setTextAlign(ctx, 'center');
core.fillBoldText(ctx, text, 1014, 624, textColor, boldColor, font)
ctx.restore();
if (globalAlpha <= 0) {
over.style.display = 'none'
core.unregisterAnimationFrame("overhide")
core.doAction();
}
})
}, time)
}
}
})
}
this.changebg = function (img1, img2, time, style) {
let globalAlpha1 = 0
let globalAlpha2 = time
img1 = core.material.images.images?.[img1]
img2 = core.material.images.images?.[img2]
over.style.display = "block";
switch (style) {
case "引入":
core.registerAnimationFrame("bgin", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = globalAlpha1 / time
if (img2) { //绘制背景
ctx.drawImage(img2, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha1++
ctx.restore();
if (globalAlpha1 >= time) {
core.unregisterAnimationFrame("bgin");
over.style.display = "none";
core.doAction()
}
})
break;
case "引出":
core.registerAnimationFrame("bgout", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = globalAlpha2 / time
if (img1) { //绘制背景
ctx.drawImage(img1, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha2--
ctx.restore();
if (globalAlpha2 <= 0) {
core.unregisterAnimationFrame("bgout");
over.style.display = "none";
core.doAction()
}
})
break;
case "场景切换":
core.registerAnimationFrame("changebg", true, () => {
core.clearMap(ctx)
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
ctx.save(); //保存设置
ctx.translate(1248, 0) //重新定位右上角为基准
ctx.rotate(Math.PI / 2) //旋转90度
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
}
ctx.globalAlpha = 1
core.fillRect(ctx, 0, 0, 2028, 1248)
ctx.globalAlpha = globalAlpha2 / time
if (img1) { //绘制背景
ctx.drawImage(img1, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
ctx.globalAlpha = globalAlpha1 / time
if (img2) { //绘制背景
ctx.drawImage(img2, 0, 0, 2028, 1248)
} else {
core.fillRect(ctx, 0, 0, 2028, 1248)
}
globalAlpha2--
globalAlpha1++
ctx.restore();
if (globalAlpha2 <= 0 || globalAlpha1 >= time) {
core.unregisterAnimationFrame("changebg");
over.style.display = "none";
core.doAction()
}
})
break;
}
})
}
}
},
"属性映射": function () {
// 在此增加新插件