删除部分无用参数

This commit is contained in:
unanmed 2023-06-16 16:11:56 +08:00
parent c70c5b1594
commit a70a17b51e
8 changed files with 25 additions and 68 deletions

View File

@ -5,4 +5,5 @@ public/project/floors/*.js
public/project/items.js public/project/items.js
public/project/floors/*.js public/project/floors/*.js
public/project/maps.js public/project/maps.js
public/_server/**/*.js
script/**/*.js script/**/*.js

View File

@ -636,13 +636,6 @@ return '{' + [
mainStyle_m mainStyle_m
: '主要样式设置:' '标题界面背景图:' EvalString BGNL? Newline
'竖屏标题界面背景图:' EvalString BGNL? Newline
'标题样式;可写 display: none 隐藏标题' EvalString BGNL? Newline
'标题按钮样式:' EvalString BGNL? Newline
'横屏状态栏背景url(...) 0 0/100% 100% no-repeat 可将图片拉伸自适配' BGNL? Newline EvalString BGNL? Newline
'竖屏状态栏背景:' EvalString BGNL? Newline
'竖屏工具栏背景:' EvalString BGNL? Newline
'楼层切换样式:' EvalString BGNL? Newline '楼层切换样式:' EvalString BGNL? Newline
'状态栏颜色' ColorString Colour '边框颜色' ColorString Colour BGNL? Newline '状态栏颜色' ColorString Colour '边框颜色' ColorString Colour BGNL? Newline
'选中框颜色' ColorString Colour '全局字体' EvalString BEND '选中框颜色' ColorString Colour '全局字体' EvalString BEND
@ -652,14 +645,7 @@ tooltip : 主要样式设置
default : ["project/images/bg.jpg", "project/images/bg.jpg", "color: white", "background-color: #32369F; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;", "url(project/materials/ground.png) repeat", "url(project/materials/ground.png) repeat", "url(project/materials/ground.png) repeat", "background-color: black; color: white", "255,255,255,1", "rgba(255,255,255,1)", "204,204,204,1", "rgba(204,204,204,1)", "255,215,0,1", "rgba(255,215,0,1)", "Verdana"] default : ["project/images/bg.jpg", "project/images/bg.jpg", "color: white", "background-color: #32369F; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;", "url(project/materials/ground.png) repeat", "url(project/materials/ground.png) repeat", "url(project/materials/ground.png) repeat", "background-color: black; color: white", "255,255,255,1", "rgba(255,255,255,1)", "204,204,204,1", "rgba(204,204,204,1)", "255,215,0,1", "rgba(255,215,0,1)", "Verdana"]
helpUrl : /_docs/#/instruction helpUrl : /_docs/#/instruction
var code = { var code = {
startBackground: EvalString_0, floorChangingStyle: EvalString_0,
startVerticalBackground: EvalString_1,
startLogoStyle: EvalString_2,
startButtonsStyle: EvalString_3,
statusLeftBackground: EvalString_4,
statusTopBackground: EvalString_5,
toolsBackground: EvalString_6,
floorChangingStyle: EvalString_7,
statusBarColor: JSON.parse('['+ColorString_0+']'), statusBarColor: JSON.parse('['+ColorString_0+']'),
borderColor: JSON.parse('['+ColorString_1+']'), borderColor: JSON.parse('['+ColorString_1+']'),
selectColor: JSON.parse('['+ColorString_2+']'), selectColor: JSON.parse('['+ColorString_2+']'),
@ -4062,8 +4048,8 @@ Floor_Meta_List
/*Floor_Meta_List ['title','name','canFlyTo', 'canFlyFrom', 'canUseQuickShop', 'cannotViewMap', 'cannotMoveDirectly', 'defaultGround', 'ratio', 'upFloor', 'downFloor', 'flyPoint', 'bgm', 'color', 'weather', 'underGround']*/; /*Floor_Meta_List ['title','name','canFlyTo', 'canFlyFrom', 'canUseQuickShop', 'cannotViewMap', 'cannotMoveDirectly', 'defaultGround', 'ratio', 'upFloor', 'downFloor', 'flyPoint', 'bgm', 'color', 'weather', 'underGround']*/;
Global_Attribute_List Global_Attribute_List
: '全局字体'|'横屏左侧状态栏背景'|'竖屏上方状态栏背景'|'竖屏下方道具栏背景'|'边框颜色'|'状态栏文字色'|'选中框颜色'|'楼层转换样式'|'装备列表' : '全局字体'|'边框颜色'|'状态栏文字色'|'选中框颜色'|'楼层转换样式'|'装备列表'
/*Global_Attribute_List ['font','statusLeftBackground','statusTopBackground', 'toolsBackground', 'borderColor', 'statusBarColor', 'selectColor', 'floorChangingStyle', 'equipName']*/; /*Global_Attribute_List ['font', 'borderColor', 'statusBarColor', 'selectColor', 'floorChangingStyle', 'equipName']*/;
Global_Value_List Global_Value_List
: '血网伤害'|'中毒伤害'|'衰弱效果'|'红宝石效果'|'蓝宝石效果'|'绿宝石效果'|'红血瓶效果'|'蓝血瓶效果'|'黄血瓶效果'|'绿血瓶效果'|'破甲比例'|'反击比例'|'净化比例'|'仇恨增加值'|'图块每帧时间'|'上下楼时间' : '血网伤害'|'中毒伤害'|'衰弱效果'|'红宝石效果'|'蓝宝石效果'|'绿宝石效果'|'红血瓶效果'|'蓝血瓶效果'|'黄血瓶效果'|'绿血瓶效果'|'破甲比例'|'反击比例'|'净化比例'|'仇恨增加值'|'图块每帧时间'|'上下楼时间'

View File

@ -129,8 +129,7 @@ ActionParser.prototype.parse = function (obj,type) {
case 'mainStyle': case 'mainStyle':
if(!obj) obj={}; if(!obj) obj={};
return MotaActionBlocks['mainStyle_m'].xmlText([ return MotaActionBlocks['mainStyle_m'].xmlText([
obj.startBackground, obj.startVerticalBackground || obj.startBackground, obj.startLogoStyle, obj.startButtonsStyle, obj.floorChangingStyle,
obj.statusLeftBackground, obj.statusTopBackground, obj.toolsBackground, obj.floorChangingStyle,
obj.statusBarColor, 'rgba('+obj.statusBarColor+')', obj.borderColor, 'rgba('+obj.borderColor+')', obj.statusBarColor, 'rgba('+obj.statusBarColor+')', obj.borderColor, 'rgba('+obj.borderColor+')',
obj.selectColor, 'rgba(' + obj.selectColor + ')', obj.font obj.selectColor, 'rgba(' + obj.selectColor + ')', obj.font
]); ]);

View File

@ -235,23 +235,12 @@ function core() {
animateTime: 0 animateTime: 0
}, },
globalAttribute: { globalAttribute: {
equipName: main.equipName || [], equipName: main.equipName,
statusLeftBackground: borderColor: main.styles.borderColor,
main.styles.statusLeftBackground || statusBarColor: main.styles.statusBarColor,
'url(project/materials/ground.png) repeat', floorChangingStyle: main.styles.floorChangingStyle,
statusTopBackground: selectColor: main.styles.selectColor,
main.styles.statusTopBackground || font: main.styles.font
'url(project/materials/ground.png) repeat',
toolsBackground:
main.styles.toolsBackground ||
'url(project/materials/ground.png) repeat',
borderColor: main.styles.borderColor || [204, 204, 204, 1],
statusBarColor: main.styles.statusBarColor || [255, 255, 255, 1],
floorChangingStyle:
main.styles.floorChangingStyle ||
'background-color: black; color: white',
selectColor: main.styles.selectColor || [255, 215, 0, 1],
font: main.styles.font || 'Verdana'
}, },
curtainColor: null, curtainColor: null,
@ -304,9 +293,7 @@ core.prototype.init = async function (coreData, callback) {
} }
core.loader._load(function () { core.loader._load(function () {
core.extensions._load(function () { core._afterLoadResources(callback);
core._afterLoadResources(callback);
});
}); });
}; };
@ -319,9 +306,7 @@ core.prototype.initSync = function (coreData, callback) {
this._loadPluginSync(); this._loadPluginSync();
core.loader._load(function () { core.loader._load(function () {
core.extensions._load(function () { core._afterLoadResources(callback);
core._afterLoadResources(callback);
});
}); });
}; };

View File

@ -297,13 +297,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
], ],
"startBgm": "title.mp3", "startBgm": "title.mp3",
"styles": { "styles": {
"startBackground": " ",
"startVerticalBackground": " ",
"startLogoStyle": " ",
"startButtonsStyle": " ",
"statusLeftBackground": " ",
"statusTopBackground": " ",
"toolsBackground": "#ddd4",
"floorChangingStyle": " ", "floorChangingStyle": " ",
"statusBarColor": [ "statusBarColor": [
255, 255,

View File

@ -13,6 +13,11 @@ interface AudioPlayerEvent extends EmitableEvent {
end: (node: AudioBufferSourceNode) => void; end: (node: AudioBufferSourceNode) => void;
} }
export type AudioParamOf<T extends AudioNode> = Record<
SelectKey<T, AudioParam>,
number
>;
export class AudioPlayer extends EventEmitter<AudioPlayerEvent> { export class AudioPlayer extends EventEmitter<AudioPlayerEvent> {
static ac: AudioContext = ac; static ac: AudioContext = ac;
static index: number = 0; static index: number = 0;

View File

@ -1,10 +1,8 @@
import { has } from '../../plugin/utils'; import { has } from '../../plugin/utils';
import { AudioPlayer } from './audio'; import { AudioParamOf, AudioPlayer } from './audio';
import resource from '../../data/resource.json'; import resource from '../../data/resource.json';
type Panner = { type Panner = AudioParamOf<PannerNode>;
[P in SelectKey<PannerNode, AudioParam>]: number;
};
export class SoundEffect extends AudioPlayer { export class SoundEffect extends AudioPlayer {
static playIndex = 0; static playIndex = 0;
@ -45,6 +43,11 @@ export class SoundEffect extends AudioPlayer {
/** /**
* 线 * 线
* ```txt
* source -> gain -> destination
* source -> panner -> gain --> destination
* source -> merger -> panner -> gain -> destination
* ```
* @param stereo * @param stereo
*/ */
protected initAudio(stereo: boolean = false) { protected initAudio(stereo: boolean = false) {

15
src/types/status.d.ts vendored
View File

@ -324,21 +324,6 @@ interface TextAttribute {
} }
interface StatusStyle { interface StatusStyle {
/**
* css的background属性
*/
statusLeftBackground: string;
/**
* css的background属性
*/
statusTopBackground: string;
/**
* css的background属性
*/
toolsBackground: string;
/** /**
* *
*/ */