git auto update
This commit is contained in:
parent
9d577e1949
commit
ef037496fb
@ -1,7 +1,6 @@
|
|||||||
<!DOCTYPE html><html>
|
<!DOCTYPE html><html>
|
||||||
<head><meta charset="utf-8">
|
<head><meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="./css/main.css">
|
<link rel="stylesheet" href="./css/main.css">
|
||||||
<script>window.EnableDebugMode=true;</script>
|
|
||||||
<script src="./js/0-loadfail.js"></script>
|
<script src="./js/0-loadfail.js"></script>
|
||||||
<script src="./js/1-jsloader.js"></script>
|
<script src="./js/1-jsloader.js"></script>
|
||||||
<script src="./js/2-jsloadentry.js"></script>
|
<script src="./js/2-jsloadentry.js"></script>
|
||||||
|
@ -14,12 +14,11 @@
|
|||||||
scriptManager.loadjs("./js/libutil.js");
|
scriptManager.loadjs("./js/libutil.js");
|
||||||
scriptManager.loadjs("./js/libcubicbezier.js");
|
scriptManager.loadjs("./js/libcubicbezier.js");
|
||||||
scriptManager.loadjs("./js/libwebglcheck.js");
|
scriptManager.loadjs("./js/libwebglcheck.js");
|
||||||
if(window.EnableDebugMode) {
|
|
||||||
scriptManager.loadjs("./js/libpixi_v891gl.dev.min.js");
|
scriptManager.loadjs("./js/libpixi_v891gl.dev.min.js");
|
||||||
} else {
|
//scriptManager.loadjs("./js/libpixi_v891gl.prod.min.js");
|
||||||
scriptManager.loadjs("./js/libpixi_v891gl.prod.min.js");
|
|
||||||
}
|
|
||||||
await scriptManager.waitAll();
|
await scriptManager.waitAll();
|
||||||
await scriptManager.loadjs("./js/libtransition.js");
|
await scriptManager.loadjs("./js/libtransition.js");
|
||||||
await scriptManager.loadjs("./js/libmain.js");
|
await scriptManager.loadjs("./js/libmain.js");
|
||||||
|
scriptManager.loadjs("./js/libclickfx.js");
|
||||||
|
await scriptManager.waitAll();
|
||||||
})();
|
})();
|
14
js/libclickfx.js
Normal file
14
js/libclickfx.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
(function() {
|
||||||
|
if(typeof libmain!="object") {
|
||||||
|
if(typeof loadfail=="function") {
|
||||||
|
loadfail("libclickfx.js: libmain(type of "+(typeof libmain)+") is not an object");
|
||||||
|
} else {
|
||||||
|
window.alert("libclickfx.js: libmain(type of "+(typeof libmain)+") is not an object");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
libmain.scenes.click_fx.interactiveChildren=false;
|
||||||
|
libmain.scenes.click_fx.eventMode="static";
|
||||||
|
libmain.scenes.click_fx.on("tap", add_click_fx);
|
||||||
|
libmain.scenes.click_fx.on("mousedown", add_click_fx);
|
||||||
|
});
|
@ -22,9 +22,9 @@
|
|||||||
libmain.settings.render.show_fps=true;
|
libmain.settings.render.show_fps=true;
|
||||||
libmain.settings.render.use_anti_alias=true;
|
libmain.settings.render.use_anti_alias=true;
|
||||||
libmain.settings.render.resolution=1;
|
libmain.settings.render.resolution=1;
|
||||||
|
libmain.settings.render.ui_scale=1;
|
||||||
|
|
||||||
libmain.settings.game= {};
|
libmain.settings.game= {};
|
||||||
libmain.settings.game.use_anti_alias=true;
|
|
||||||
|
|
||||||
/////////////////////////////////////// init canvas and frame
|
/////////////////////////////////////// init canvas and frame
|
||||||
|
|
||||||
@ -61,6 +61,8 @@
|
|||||||
libmain.scenes.root=new PIXI.Container();
|
libmain.scenes.root=new PIXI.Container();
|
||||||
libmain.scenes.root.boundsArea=new PIXI.Rectangle(0, 0, 0, 0);
|
libmain.scenes.root.boundsArea=new PIXI.Rectangle(0, 0, 0, 0);
|
||||||
libmain.scenes.root.cullArea=libmain.scenes.root.boundsArea;
|
libmain.scenes.root.cullArea=libmain.scenes.root.boundsArea;
|
||||||
|
libmain.scenes.root.cullableChildren=true;
|
||||||
|
|
||||||
libmain.render_tick=function() {
|
libmain.render_tick=function() {
|
||||||
try {
|
try {
|
||||||
libmain.renderer.render(libmain.scenes.root);
|
libmain.renderer.render(libmain.scenes.root);
|
||||||
@ -79,6 +81,8 @@
|
|||||||
|
|
||||||
/////////////////////////////////////// add layered containers
|
/////////////////////////////////////// add layered containers
|
||||||
|
|
||||||
|
libmain.scenes.click_fx=new PIXI.Container();
|
||||||
|
|
||||||
libmain.scenes.menu= {};
|
libmain.scenes.menu= {};
|
||||||
libmain.scenes.menu.root=new PIXI.Container();
|
libmain.scenes.menu.root=new PIXI.Container();
|
||||||
libmain.scenes.menu.startpage=new PIXI.Container();
|
libmain.scenes.menu.startpage=new PIXI.Container();
|
||||||
@ -86,10 +90,10 @@
|
|||||||
libmain.scenes.menu.settings=new PIXI.Container();
|
libmain.scenes.menu.settings=new PIXI.Container();
|
||||||
libmain.scenes.menu.background=new PIXI.Container();
|
libmain.scenes.menu.background=new PIXI.Container();
|
||||||
|
|
||||||
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.startpage, 3);
|
|
||||||
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.pause, 2);
|
|
||||||
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.settings, 1);
|
|
||||||
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.background, 0);
|
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.background, 0);
|
||||||
|
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.settings, 1);
|
||||||
|
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.pause, 2);
|
||||||
|
libmain.scenes.menu.root.addChildAt(libmain.scenes.menu.startpage, 3);
|
||||||
|
|
||||||
libmain.scenes.game= {};
|
libmain.scenes.game= {};
|
||||||
libmain.scenes.game.root=new PIXI.Container();
|
libmain.scenes.game.root=new PIXI.Container();
|
||||||
@ -100,15 +104,16 @@
|
|||||||
libmain.scenes.game.notes=new PIXI.Container();
|
libmain.scenes.game.notes=new PIXI.Container();
|
||||||
libmain.scenes.game.background=new PIXI.Container();
|
libmain.scenes.game.background=new PIXI.Container();
|
||||||
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.hud, 5);
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.screen_fx, 4);
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.judgment_fx, 3);
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.player, 2);
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.notes, 1);
|
|
||||||
libmain.scenes.game.root.addChildAt(libmain.scenes.game.background, 0);
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.background, 0);
|
||||||
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.notes, 1);
|
||||||
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.player, 2);
|
||||||
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.judgment_fx, 3);
|
||||||
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.screen_fx, 4);
|
||||||
|
libmain.scenes.game.root.addChildAt(libmain.scenes.game.hud, 5);
|
||||||
|
|
||||||
libmain.scenes.root.addChildAt(libmain.scenes.menu.root, 1);
|
|
||||||
libmain.scenes.root.addChildAt(libmain.scenes.game.root, 0);
|
libmain.scenes.root.addChildAt(libmain.scenes.game.root, 0);
|
||||||
|
libmain.scenes.root.addChildAt(libmain.scenes.menu.root, 1);
|
||||||
|
libmain.scenes.root.addChildAt(libmain.scenes.click_fx, 2);
|
||||||
|
|
||||||
/////////////////////////////////////// end of setup
|
/////////////////////////////////////// end of setup
|
||||||
|
|
||||||
@ -126,8 +131,7 @@
|
|||||||
libmain.canvas.style.top=res[3]+"px";
|
libmain.canvas.style.top=res[3]+"px";
|
||||||
libmain.scenes.root.boundsArea.width=res[0];
|
libmain.scenes.root.boundsArea.width=res[0];
|
||||||
libmain.scenes.root.boundsArea.height=res[1];
|
libmain.scenes.root.boundsArea.height=res[1];
|
||||||
libmain.renderer.width=res[0];
|
libmain.renderer.resize(res[0], res[1]);
|
||||||
libmain.renderer.height=res[1];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener("resize", libmain.onresize);
|
window.addEventListener("resize", libmain.onresize);
|
||||||
|
@ -7,14 +7,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
libutil.clamp=function(val, min, max) {
|
libutil.clamp=function(val, min, max) {
|
||||||
if(window.EnableDebugMode) {
|
|
||||||
if(max<min) {
|
if(max<min) {
|
||||||
console.warn("clamp(): the max value is less than the min value");
|
console.warn("clamp(): the max value is less than the min value");
|
||||||
var min1 = Math.min(min, max);
|
var min1 = Math.min(min, max);
|
||||||
var max1 = Math.max(min, max);
|
var max1 = Math.max(min, max);
|
||||||
return Math.min(Math.max(val, min1), max1);
|
return Math.min(Math.max(val, min1), max1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return Math.min(Math.max(val, min), max);
|
return Math.min(Math.max(val, min), max);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -29,7 +27,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
libutil.error2str=function(e) {
|
libutil.error2str=function(e) {
|
||||||
if(window.EnableDebugMode&&(typeof e!=="object"||e==null)) {
|
if(typeof e!=="object"||e==null) {
|
||||||
console.error("error2str(): the provided param is not an object");
|
console.error("error2str(): the provided param is not an object");
|
||||||
return String(e);
|
return String(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user