@ -0,0 +1,37 @@
|
||||
{
|
||||
"extends": [
|
||||
"development"
|
||||
],
|
||||
"hints": {
|
||||
"axe/forms": "off",
|
||||
"meta-viewport": "off",
|
||||
"axe/language": [
|
||||
"default",
|
||||
{
|
||||
"html-has-lang": "off"
|
||||
}
|
||||
],
|
||||
"button-type": "off",
|
||||
"axe/parsing": [
|
||||
"default",
|
||||
{
|
||||
"duplicate-id": "off",
|
||||
"duplicate-id-active": "off"
|
||||
}
|
||||
],
|
||||
"axe/structure": [
|
||||
"default",
|
||||
{
|
||||
"list": "off"
|
||||
}
|
||||
],
|
||||
"compat-api/css": [
|
||||
"default",
|
||||
{
|
||||
"ignore": [
|
||||
"user-select"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
{
|
||||
"appName": "指令生成器",
|
||||
"appPackageName": "top.webcat.myapp",
|
||||
"appVersionName": "1.0",
|
||||
"appVersionCode": 100000,
|
||||
"data": {
|
||||
"启用顶栏": false,
|
||||
"顶栏标题": "指令生成器 by OCEAN",
|
||||
"顶栏颜色": "#FF2C2E43",
|
||||
"横屏": true,
|
||||
"显示状态栏": false,
|
||||
"启用进度条": false,
|
||||
"进度条颜色": "#00000000",
|
||||
"支持打开外部应用": true,
|
||||
"提示打开外部应用": true,
|
||||
"启动页面": "index.html"
|
||||
},
|
||||
"indexPages": [
|
||||
|
||||
],
|
||||
"extraHeaders": {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
.particle_color_board {
|
||||
width: 300px;
|
||||
height: 360px;
|
||||
background-color: #f0f0f0;
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.4);
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
left: 8%;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transform: scale(0.5);
|
||||
border-radius: 8px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.particle_color_board .column {
|
||||
color: #3d3d3d;
|
||||
font-size: 12px;
|
||||
line-height: 30px;
|
||||
padding-left: 2%;
|
||||
background-color: #ffffff;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
|
||||
.particle_color_board_close {
|
||||
width: 40px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
transition: 200ms;
|
||||
font-weight: 300;
|
||||
user-select: none;
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
|
||||
.particle_color_board_close:hover {
|
||||
background-color: #ff0000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.particle_color_save,
|
||||
.particle_color_cancel {
|
||||
width: 60px;
|
||||
transition: 300ms;
|
||||
border: solid 1px #bdbdbd;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.particle_color_board .particle_color_save {
|
||||
border: solid 1px #00aaff;
|
||||
}
|
||||
|
||||
.particle_color_save {
|
||||
bottom: 10px;
|
||||
right: 80px;
|
||||
}
|
||||
|
||||
.particle_color_cancel {
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
|
||||
.particle_color_save:hover,
|
||||
.particle_color_cancel:hover {
|
||||
background-color: rgba(0, 170, 255, .2);
|
||||
border: solid 1px #00aaff;
|
||||
}
|
||||
|
||||
.rbga_input_wrap {
|
||||
width: auto;
|
||||
height: auto;
|
||||
/* border: solid 1px red; */
|
||||
float: left;
|
||||
margin-left: 30px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.rbga_range_wrap {
|
||||
float: left;
|
||||
/* border: solid 1px red; */
|
||||
margin-left: 35px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.rbga_range_wrap input {
|
||||
width: 170px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rbga_input_float {
|
||||
float: left;
|
||||
margin-left: 22px;
|
||||
/* border:solid 1px red; */
|
||||
}
|
||||
|
||||
|
||||
.rbga_span {
|
||||
width: 100%;
|
||||
font-size: 13px;
|
||||
color: #afafaf;
|
||||
/* border: solid 1px red; */
|
||||
float: left;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rbga_range_span {
|
||||
height: 20px;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
color: #818181;
|
||||
}
|
||||
|
||||
#alpha_show {
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
color: #818181;
|
||||
line-height: 18px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.rbga_displayed {
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#td_cpt {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.colorBtn {
|
||||
width: 27px;
|
||||
height: 20px;
|
||||
border: dashed 2px transparent;
|
||||
float: left;
|
||||
margin: 5px;
|
||||
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
.feedback_Box {
|
||||
width: 50%;
|
||||
height: 60%;
|
||||
position: fixed;
|
||||
left: 25%;
|
||||
top: 20%;
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
z-index: 1000;
|
||||
pointer-events:none;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.feedback_Box .column {
|
||||
width: 100%;
|
||||
line-height: 40px;
|
||||
background: -webkit-linear-gradient(23deg, #aaffff 0%, #aaff7f 100%);
|
||||
padding-left: 10px;
|
||||
/* border: solid 1px red; */
|
||||
}
|
||||
|
||||
.feedback_Box .content {
|
||||
width: 96%;
|
||||
height: 430px;
|
||||
margin: 2%;
|
||||
/* border: solid 1px red; */
|
||||
}
|
||||
|
||||
.feedback_Box .content * {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#feedback_text {
|
||||
width: 96%;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 1%;
|
||||
font-size: 18px;
|
||||
background-color: #ececec;
|
||||
}
|
||||
|
||||
.put-in {
|
||||
width: 200px;
|
||||
height: 45px;
|
||||
font-size: 17px;
|
||||
border: #cccccc solid 1px;
|
||||
border-radius: 40px;
|
||||
cursor: pointer;
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
.put-in:hover {
|
||||
background-color: #c7c7c7;
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
.canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #FFF;
|
||||
/* border: solid 1px red; */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
.canvas #x_axie,.canvas #y_axie {
|
||||
width: 100%;
|
||||
height: 0.5px;
|
||||
border: none;
|
||||
position: absolute;
|
||||
left: 0%;
|
||||
top: 40%;
|
||||
transform: translate(-50%,-50%);
|
||||
transform-origin: 50% 50%;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.canvas #x_axie {
|
||||
/* background-color: #ff0000; */
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
.canvas #y_axie {
|
||||
/* background-color: #0000ff; */
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
/* 点 */
|
||||
.dot {
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
background-color: #00ff00;
|
||||
/* border-radius: 5px; */
|
||||
border: 1px solid #00aaff;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* 傅里叶指令输出面板 */
|
||||
.fuliye_cmdOut {
|
||||
width: 50%;
|
||||
height: 50px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
border: solid 1px red;
|
||||
}
|
||||
|
||||
.canvas button {
|
||||
width: 48%;
|
||||
height: 40px;
|
||||
border: solid 1px #e5e5e5;
|
||||
transition: 500ms;
|
||||
background-color: transparent;
|
||||
/* box-shadow: 0 0 0 5px rgba(0, 170, 255, 0.0); */
|
||||
border: none;
|
||||
background-color: #e5e5e5;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
.Fourier_copyBtn:nth-of-type(1) {
|
||||
bottom: 1%;
|
||||
left: 1%;
|
||||
}
|
||||
.Fourier_copyBtn:nth-of-type(2) {
|
||||
bottom: 1%;
|
||||
right: 1%;
|
||||
}
|
||||
.Fourier_copyBtn:hover {
|
||||
/* box-shadow: 0 0 0 0px rgba(0, 170, 255, 0.8); */
|
||||
background-color: #d3e9ff;
|
||||
border: solid 1px #00aaff;
|
||||
}
|
||||
|
||||
|
||||
/* 预设参数面板 */
|
||||
.preinstall {
|
||||
width: 340px;
|
||||
height: 450px;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||||
border: solid 1px #d3d3d3;
|
||||
border-radius: 5px;
|
||||
position: fixed;
|
||||
top: 15%;
|
||||
left: 1%;
|
||||
z-index: 999;
|
||||
/* display: none; */
|
||||
transform:scale(0.9);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.preinstall p {
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
margin-left: 5%;
|
||||
margin-right: 5%;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
color: #353261;
|
||||
background-color: rgba(63, 64, 81, 0.1);
|
||||
border-bottom: solid 1px #d3d3d3;
|
||||
text-align: center;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.preinstall table {
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
color: #717171;
|
||||
font-size: 14px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.preinstall table tr td {
|
||||
/* border: 1px solid black; */
|
||||
|
||||
}
|
||||
.preinstall table tr:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.preinstall table tr td:nth-of-type(1) {
|
||||
color: #000000;
|
||||
text-shadow: 0.3px 0.3px 0px rgba(0, 0, 0, 0.5);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.preinstall table tr td:nth-of-type(2) {
|
||||
width: 15px;
|
||||
}
|
||||
.preinstall table tr td button {
|
||||
width: 85%;
|
||||
border: solid 1px #ababab;
|
||||
transition: 300ms;
|
||||
}
|
||||
.preinstall table tr td button:hover {
|
||||
background-color: rgba(0, 170, 255, 0.2);
|
||||
border: solid 1px #00aaff;
|
||||
}
|
||||
.preinstall table tr td p {
|
||||
width: 200px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.addRotor, .deleteRotor {
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
#Fourier_prompt {
|
||||
margin-left: 20%;
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
.setBox {
|
||||
width: 400px;
|
||||
height: 100%;
|
||||
background-color: #333;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
/*transition: 500ms cubic-bezier(0.08, 0.5, 0,1);
|
||||
*/
|
||||
z-index: 999;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.setBox-closeWin {
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
font-size: 25px;
|
||||
font-weight: 100;
|
||||
line-height: 40px;
|
||||
/* border: solid 1px red; */
|
||||
user-select: none;
|
||||
text-align: center;
|
||||
transition: 250ms;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.setBox-closeWin:hover {
|
||||
background-color: #ff3838;
|
||||
}
|
||||
|
||||
.setBox-title {
|
||||
padding-left: 30px;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.setBox ul {
|
||||
/* padding: 5%; */
|
||||
width: 100%;
|
||||
/*border: solid 1px red;
|
||||
*/
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.setBox ul li {
|
||||
line-height: 50px;
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
}
|
||||
.setBox ul li:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.setBox ul li .swith {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
border: none;
|
||||
float: right;
|
||||
transition: 200ms;
|
||||
margin-top: 10px;
|
||||
border-radius: 60px;
|
||||
background-color: #8c8c8c;
|
||||
}
|
||||
|
||||
.swith_round {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 3px;
|
||||
margin-left: 8px;
|
||||
border-radius: 50px;
|
||||
transition: 200ms;
|
||||
transform: translateX(0%);
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 0px 15px rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.swith_round:active {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.options {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
/* border: 1px solid red; */
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
.options .option {
|
||||
width: 22%;
|
||||
height: 60px;
|
||||
float: left;
|
||||
margin: 3px;
|
||||
font-size: 11px;
|
||||
line-height: 90px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
background-color: rgba(255, 255, 255, .2);
|
||||
border: solid 1px rgba(0, 0, 0, .0);
|
||||
transition: 300ms;
|
||||
}
|
||||
|
||||
.options .option:hover {
|
||||
cursor: context-menu;
|
||||
border: solid 1px #c5c5c5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.setPath {
|
||||
color: #55ffff;
|
||||
}
|
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 319 KiB |
After Width: | Height: | Size: 219 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 327 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 2.1 MiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 523 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,36 @@
|
||||
let date = new Date();
|
||||
let hour = date.getHours();
|
||||
if (hour >= 6 && hour <= 8) {
|
||||
$(".Welcome h2").text("早上好");
|
||||
} else if (hour >= 9 && hour <= 11) {
|
||||
$(".Welcome h2").text("上午好");
|
||||
} else if (hour == 12) {
|
||||
$(".Welcome h2").text("中午好");
|
||||
} else if (hour >= 13 && hour <= 18) {
|
||||
$(".Welcome h2").text("下午好");
|
||||
} else if (hour >= 19 && hour <= 24) {
|
||||
$(".Welcome h2").text("晚上好");
|
||||
} else {
|
||||
$(".Welcome h2").text("好好休息,安好一整夜");
|
||||
}
|
||||
|
||||
|
||||
if (localStorage.useTime == undefined) {
|
||||
localStorage.useTime = 1
|
||||
} else {
|
||||
localStorage.useTime = parseInt(localStorage.useTime) + 1;
|
||||
}
|
||||
//alert(localStorage.useTime)
|
||||
if (Math.round(Math.random()) == 0) {
|
||||
$(".Welcome p").text("欢迎使用 colorBlock (/≧▽≦)/~");
|
||||
} else if (Math.round(Math.random()) == 1 && localStorage.useTime != undefined){
|
||||
$(".Welcome p").text("欢迎回来 ✿ヽ(°▽°)ノ✿");
|
||||
}
|
||||
if (localStorage.setting1 == true) {
|
||||
setTimeout(() => {
|
||||
$(".Welcome").css({"transform": "translateY(0%)", "opacity": "1"});
|
||||
setTimeout(() => {
|
||||
$(".Welcome").css({"transform": "translateY(-120%)", "opacity": "0"});
|
||||
}, 2000);
|
||||
}, 300);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
$(document).ready(() => {
|
||||
$(".feedback").click(() => {
|
||||
feedback_toggle(true)
|
||||
blackboardToggle(true)
|
||||
})
|
||||
|
||||
$("#feedback_close").click(() => {
|
||||
feedback_toggle(false)
|
||||
blackboardToggle(false)
|
||||
})
|
||||
})
|
@ -0,0 +1,380 @@
|
||||
function blackboardToggle(bull) {
|
||||
$(".blackboard").css({'pointer-events':bull ? 'all':'none','opacity':bull ? 1:0})
|
||||
}
|
||||
|
||||
function slide_way(nth, animation) { // 三级切换
|
||||
console.log("slide_way:" + nth)
|
||||
var move;
|
||||
if (animation == false) {
|
||||
$(".slide_way").css("transition", "0ms");
|
||||
} else {
|
||||
$(".slide_way").css("transition", "340ms");
|
||||
}
|
||||
if (nth == 0) {
|
||||
move = 0;
|
||||
outPut_swith(false)
|
||||
} else if (nth == 1) {
|
||||
move = -602;
|
||||
outPut_swith(false)
|
||||
} else if (nth == 2) {
|
||||
move = -1204;
|
||||
outPut_swith(true)
|
||||
}
|
||||
|
||||
if (nth == 1) {
|
||||
if (localStorage.cmdOutVersion_Swith == 1) {
|
||||
$(".production_slide").css({"transition":"350ms", "transform": "translateX(-50%)"})
|
||||
$(".production_slide-foucs li:eq(1)").css({'color':'#008aff'})
|
||||
$(".production_slide-foucs li:eq(0)").css({'color':'#666'})
|
||||
localStorage.cmdOutVersion_Swith = 1;
|
||||
}
|
||||
$(".production_slide-foucs").fadeIn()
|
||||
|
||||
} else if (nth != 2){
|
||||
$(".production_slide-foucs").fadeOut();
|
||||
$(".production_slide").css({"transition":"350ms", "transform": "translateX(0%)"})
|
||||
$(".production_slide-foucs li:eq(0)").css({'color':'#008aff'})
|
||||
$(".production_slide-foucs li:eq(1)").css({'color':'#666'})
|
||||
}
|
||||
|
||||
$(".slide_way").css({"transform": "translate(" + move + "px,0)"})
|
||||
|
||||
for (j = 0;j <= SCGWs.length;j ++) {
|
||||
$(SCGWs[j]).css({'background-color': "rgba(0,0,0,.08)","border-bottom": "solid 1px #dddddd", "z-index": 0, "color": "rgba(0,0,0,.6)","top": "3px"});
|
||||
}
|
||||
$(SCGWs[nth]).css({'background-color': "#fff","border-bottom": "solid 1px transparent", "z-index": 1, "color": "#000000","top": "0px"});
|
||||
}
|
||||
|
||||
function copyHandle(content) { // 指令复制
|
||||
if (content != undefined) {
|
||||
let copy = (e) => {
|
||||
e.preventDefault()
|
||||
e.clipboardData.setData('text/plain', content)
|
||||
// alert('成功复制:' + content)
|
||||
document.removeEventListener('copy', copy)
|
||||
}
|
||||
document.addEventListener('copy', copy)
|
||||
document.execCommand("Copy");
|
||||
Messagebox(content);
|
||||
|
||||
$(".output_destination").css({"background-image": "url('img/copy_background1.png')"})
|
||||
} else {
|
||||
Messagebox("内容为空","alert");
|
||||
}
|
||||
}
|
||||
|
||||
function particle_color_board_toggle(bull) {
|
||||
$(".particle_color_board").css({
|
||||
"pointer-events": bull ? "all" : "none",
|
||||
"opacity": bull ? 1 : 0,
|
||||
"transform": bull ? "scale(1)" : "scale(0.9)",
|
||||
"transition": "200ms"
|
||||
})
|
||||
}
|
||||
|
||||
function Messagebox(content, type) {
|
||||
if (type === undefined) {
|
||||
$("#copyText").html("<span style='color:#00fff7;'>成功复制:</span>"+content);
|
||||
$(".Messagebox").css({"background-color": "#55aa00"})
|
||||
} else if (type == "alert") { // 警告
|
||||
$("#copyText").text(content);
|
||||
$(".Messagebox").css({"background-color": "#ff8b38"})
|
||||
} else if (type == "info") { // 信息
|
||||
$("#copyText").text(content);
|
||||
$(".Messagebox").css({"background-color": "#55aaff"})
|
||||
}
|
||||
|
||||
$(".Messagebox").css({
|
||||
"pointer-events": "all",
|
||||
"opacity": "1",
|
||||
"transform": "translate(0, 0%)"
|
||||
})
|
||||
setTimeout(() => {
|
||||
$(".Messagebox").css({
|
||||
"pointer-events": "none",
|
||||
"opacity": "0",
|
||||
"transform": "translate(0, -100%)"
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
function output_cmd(cmd) {
|
||||
|
||||
// 清空 --> 填充指令 --> css改变
|
||||
$(outputs[0]).html("").append(cmd).css({"background-image": "url('img/copy_background.png')"});
|
||||
|
||||
$(".output_destination").css({
|
||||
"transition": "0ms",
|
||||
"transform": "translate(-50%,0%)",
|
||||
"opacity": 0
|
||||
})
|
||||
setTimeout(() => {
|
||||
$(".output_destination").css({
|
||||
"transition": "300ms",
|
||||
"transform": "translate(3%,0%)",
|
||||
"opacity": 1
|
||||
})
|
||||
},2)
|
||||
setTimeout(() => {
|
||||
$(".output_destination").css({
|
||||
"transform": "translate(0%,0%)"
|
||||
})
|
||||
},300)
|
||||
}
|
||||
|
||||
function cpt_animation(V, bull){
|
||||
if (V == "parameter") {
|
||||
if (bull == true) {
|
||||
$("#parameter_cpt").css({"opacity": "1", "transform": "translateX(0px)", "pointer-events": "all"});
|
||||
$("#parameter_cpt_box").css("background-image", "url('img/btn_check1.png')");
|
||||
$("#parameter_row_status").text("开");
|
||||
} else {
|
||||
$("#parameter_cpt").css({"opacity": "0", "transform": "translateX(-50px)", "pointer-events": "none"});
|
||||
$("#parameter_cpt_box").css("background-image", "url('img/btn_check0.png')");
|
||||
$("#parameter_row_status").text("关");
|
||||
}
|
||||
}
|
||||
if (V == "polarparameter") {
|
||||
if (bull == true) {
|
||||
$("#polarparameter_cpt").css({"opacity": "1", "transform": "translateX(0px)", "pointer-events": "all"});
|
||||
$("#polarparameter_cpt_box").css("background-image", "url('img/btn_check1.png')");
|
||||
$("#polarparameter_row_status").text("开");
|
||||
} else {
|
||||
$("#polarparameter_cpt").css({"opacity": "0", "transform": "translateX(-50px)", "pointer-events": "none"});
|
||||
$("#polarparameter_cpt_box").css("background-image", "url('img/btn_check0.png')");
|
||||
$("#polarparameter_row_status").text("关");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function speed_hideExpression_and_hideExpression_pos(n) { // 表达式选择面板 定位
|
||||
$(".hideExpression").css({"margin-top": n + "px"})
|
||||
}
|
||||
|
||||
function setBox(bull){
|
||||
if (bull == true) {
|
||||
$(".setBox").css({"left": "0", "transition": "all 400ms cubic-bezier(0.08, 0.5, 0,1)"})
|
||||
blackboardToggle(bull)
|
||||
} else {
|
||||
$(".setBox").css({"left": "-400px", "transition": "all 400ms cubic-bezier(.3, 0.5, .12, 1)"})
|
||||
blackboardToggle(bull)
|
||||
}
|
||||
}
|
||||
|
||||
function Level_1(nth, t) {
|
||||
Level_1_Tmep = nth;
|
||||
let distance = 80 // 平移距离
|
||||
let time = 300 // 过渡时间
|
||||
let M = ''//" cubic-bezier(0.08, 0.3, 0,1)";
|
||||
if (nth == 0) {
|
||||
$(chunks[0]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "1","pointer-events": "all","transform": "translateX(0px)","z-index": "1"});
|
||||
$(chunks[1]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX("+ distance +"px)","z-index": "0"});
|
||||
$(chunks[2]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX("+ distance +"px)","z-index": "0"});
|
||||
} else if (nth == 1) {
|
||||
$(chunks[1]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "1","pointer-events": "all","transform": "translateX(0px)","z-index": "1"});
|
||||
$(chunks[0]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX(-"+ distance +"px)","z-index": "0"});
|
||||
$(chunks[2]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX("+ distance +"px)","z-index": "0"});
|
||||
} else if (nth == 2) {
|
||||
$(chunks[2]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "1","pointer-events": "all","transform": "translateX(0px)","z-index": "1"});
|
||||
$(chunks[1]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX(-"+ distance +"px)","z-index": "0"});
|
||||
$(chunks[0]).css({"transition": t == true ? ""+ time +"ms" + M: "0ms","opacity": "0","pointer-events": "none","transform": "translateX(-"+ distance +"px)","z-index": "0"});
|
||||
|
||||
if (setoutTime == true) {
|
||||
$("#community_iframe").attr("src", "https://mc.ecylt.top/shequ/");
|
||||
setoutTime = false;
|
||||
}
|
||||
}
|
||||
for (let j = 0;j <= NavigationBar.length;j ++) {
|
||||
$(NavigationBar[j]).css({"background-color": "transparent","color": "#333"});
|
||||
}
|
||||
$(NavigationBar[nth]).css({"background-color": "#fff","color": "#519ef7"});
|
||||
|
||||
// 预设参数面板
|
||||
if (nth == 1) {
|
||||
outPut_swith(false)
|
||||
} else if (nth == 0 && Number(localStorage.WayFocus) == 2) {
|
||||
outPut_swith(true)
|
||||
}
|
||||
|
||||
if (t == false) {
|
||||
preinstall_toggle(false)
|
||||
}
|
||||
}
|
||||
|
||||
function Level_2_listUls(i) {
|
||||
for(let j = 0;j <= chunksResourceBoxs.length;j ++){
|
||||
$(listUls[j]).css({"background-color": "transparent", "color": "#333", "letter-spacing": "0", "padding-left": "0"})
|
||||
$(focuss[j]).css({"background-color": "transparent"})
|
||||
}
|
||||
$(listUls[i]).css({"background-color": "#dfe7ea", "color": "#11006a", "letter-spacing": "2px", "padding-left": "15px"})
|
||||
$(focuss[i]).css({"background-color": "#0072ff"}) // 目录蓝色点缀焦点
|
||||
}
|
||||
|
||||
function Level_2(i) {
|
||||
for(let j = 0;j <= chunksResourceBoxs.length;j ++){
|
||||
$(chunksResourceBoxs[j]).css({"transition": "0ms","opacity": "0","pointer-events": "none","transform": "translateX("+ 30 +"px)","z-index": "-1"});
|
||||
}
|
||||
$(chunksResourceBoxs[i]).css({"transition": "500ms cubic-bezier(0.08, 0.3, 0,1)","opacity": "1","pointer-events": "all","transform": "translateX(0px)","z-index": "1"});
|
||||
|
||||
Level_2_listUls(i);
|
||||
|
||||
optimize(i);
|
||||
|
||||
// 目录栏 - 事件
|
||||
resource_sonList_event(i);
|
||||
|
||||
}
|
||||
|
||||
function optimize(nth) { // 优化处理
|
||||
if (nth == 1) {
|
||||
$(chunks).css({"background-color": "#eff4fa"})
|
||||
let cards = $(".cardBox");
|
||||
for (let i = 0;i < cards.length;i ++ ) {
|
||||
$(complete_commandCards[i]).css({"background-image": "url('img/card/" + i + ".jpg')"});
|
||||
}
|
||||
} else {
|
||||
$(chunks).css({"background-color": "#ffffff"})
|
||||
}
|
||||
if (nth == 4) {
|
||||
$(".download_to_mod").attr('src', 'img/colorblock_logo2.png')
|
||||
|
||||
$(".download_card:eq(0) .download_card_img").css({"background-image": "url('img/download/replay.jpg')"})
|
||||
$(".download_card:eq(1) .download_card_img").css({"background-image": "url('img/download/BSL1.jpg')"})
|
||||
$(".download_card:eq(2) .download_card_img").css({"background-image": "url('img/download/SEUS - DAZZLING.jpg')"})
|
||||
} else if (nth == 2) {
|
||||
|
||||
let Tutorial_imgs = $("#tutorial img");
|
||||
const imgArr = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''];
|
||||
|
||||
for (let i = 0; i < Tutorial_imgs.length; i++) {
|
||||
imgArr[i] = $(Tutorial_imgs[i]).attr('alt');
|
||||
// console.log(imgArr[i])
|
||||
$(Tutorial_imgs[i]).attr('src', imgArr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function TWay() { // 指令生成器 > colorBlock 1.16.5版 > 模式 ——事件
|
||||
|
||||
localStorage.TWay = $("#way").find("option:selected").val(); // 找到列表中选择的目标value
|
||||
let temp = localStorage.TWay;
|
||||
|
||||
|
||||
let nth = temp == "normal" ? 0 : (temp == "parameter" ? 1 : (temp == "polarparameter" ? 2 : (temp == "conditional" ? 3 : (temp == "image" ? 4 : 5))));
|
||||
|
||||
|
||||
localStorage.TWay_nth = nth;
|
||||
|
||||
console.log("TWay nth: " + nth + "\nTWay name: " + temp)
|
||||
|
||||
for (let i = 0;i <= wayTable.length;i ++) $(wayTable[i]).hide()
|
||||
$(wayTable[nth]).show()
|
||||
|
||||
}
|
||||
|
||||
function CRBcontent_scroll(CRB_STop){
|
||||
if (CRB_STop >= 200 && CRB_STopTemp == 0) {
|
||||
$(".CRB1_txt").css({'transition':''+ CRB_times +'ms','left': '-8px', 'opacity':0})
|
||||
setTimeout(()=>{
|
||||
$(".CRB1_txt").text("JAVA 1.12.2").css({'transition':'0ms','left':'8px'})
|
||||
setTimeout(()=>{
|
||||
$(".CRB1_txt").css({'transition':''+ CRB_times +'ms','left': '0px', 'opacity':1})
|
||||
},15)
|
||||
},CRB_times)
|
||||
CRB_STopTemp = 1;
|
||||
} else if (CRB_STop <= 200 && CRB_STopTemp == 1) {
|
||||
$(".CRB1_txt").css({'transition':''+ CRB_times +'ms','left':'-8px', 'opacity':0})
|
||||
setTimeout(()=>{
|
||||
$(".CRB1_txt").text("JAVA 1.16.5").css({'transition':'0ms','left':'8px'})
|
||||
setTimeout(()=>{
|
||||
$(".CRB1_txt").css({'transition':''+ CRB_times +'ms','left': '0px', 'opacity':1})
|
||||
},15)
|
||||
},CRB_times)
|
||||
CRB_STopTemp = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function setting_swith(nth, bull) {
|
||||
let swiths = $("*.swith");
|
||||
let swith_rounds = $("*.swith_round");
|
||||
$(swith_rounds[nth]).css({'transform': bull ? 'translateX(130%)':'translateX(0%)'})
|
||||
$(swiths[nth]).css({'background-color': bull ? '#00aaff':'#8c8c8c'})
|
||||
|
||||
$(swith_rounds[nth]).css({"box-shadow": "0 0 0px 15px rgba(255, 255, 255, 0.3)"})
|
||||
setTimeout(() => {
|
||||
$(swith_rounds[nth]).css({"box-shadow": "0 0 0px 15px rgba(255, 255, 255, 0.0)"})
|
||||
},300)
|
||||
}
|
||||
|
||||
function outPut_swith(bull) {
|
||||
let boxs = $(".output_cmd div");
|
||||
if (bull == false) {
|
||||
$(boxs[0]).fadeIn(200)
|
||||
$(boxs[1]).fadeOut(200)
|
||||
|
||||
// 傅里叶参数预设面版显示与否
|
||||
preinstall_toggle(false)
|
||||
} else {
|
||||
$(boxs[0]).fadeOut(200)
|
||||
$(boxs[1]).fadeIn(200)
|
||||
|
||||
// 傅里叶参数预设面版显示与否
|
||||
preinstall_toggle(true)
|
||||
}
|
||||
}
|
||||
|
||||
function preinstall_toggle(bull) {
|
||||
if (bull == true)
|
||||
$(".preinstall").css({'transition':'240ms','transform':'scale(1)','opacity':'1','pointer-events':'all'})
|
||||
else
|
||||
$(".preinstall").css({'transition':'240ms','transform':'scale(0.9)','opacity':'0','pointer-events':'none'})
|
||||
}
|
||||
|
||||
function feedback_toggle(bull) {
|
||||
$(".feedback_Box").css({'transition':'240ms','transform':bull == true ? 'scale(1)' : 'scale(0.9)','opacity':bull == true ? 1 : 0,'pointer-events':bull == true ? 'all' : 'none'})
|
||||
}
|
||||
|
||||
function resource_sonList_event(nth) {
|
||||
if (nth == 2) {
|
||||
tutorial_list_toggle(true);
|
||||
} else {
|
||||
tutorial_list_toggle(false);
|
||||
}
|
||||
}
|
||||
|
||||
function tutorial_list_toggle(bull) {
|
||||
$("#tutorial_list").css({"transition": '0ms', "opacity": 0})
|
||||
$(".listUl").css({"transition": '0ms', "opacity": 0})
|
||||
setTimeout( () => {
|
||||
$("#tutorial_list").css({
|
||||
"opacity": bull == true ? 1 : 0,
|
||||
"transition": '450ms cubic-bezier(0.08, 0.3, 0,1)',
|
||||
"transform": bull == true ? "translateX(0%)" : "translateX(10%)",
|
||||
'pointer-events': bull == true ? 'all' : 'none'
|
||||
})
|
||||
|
||||
$(".listUl").css({
|
||||
"opacity": bull == true ? 0 : 1,
|
||||
"transition": '450ms cubic-bezier(0.08, 0.3, 0,1)',
|
||||
"transform": bull == true ? "translateX(10%)" : "translateX(0%)",
|
||||
'pointer-events': bull == true ? 'none' : 'all'
|
||||
})
|
||||
|
||||
}, 5)
|
||||
|
||||
$(".directory_head").html(bull == true ? `<span class="directory_head">目录</span> <span class="grey">></span> <span>自编教程</span>` : `<span class="directory_head">目录</span>`)
|
||||
$(".return").css("opacity", bull == true ? 1 : 0)
|
||||
}
|
||||
|
||||
function hasChinese(text) { // 判断是否是中文
|
||||
var pattern = /[\u4E00-\u9FFF\u3400-\u4DFF\uF900-\uFAFF]/;
|
||||
return pattern.test(text);
|
||||
}
|
||||
|
||||
function hasEnglish(text) { // 判断是否是英文
|
||||
var pattern = /[a-zA-Z]/;
|
||||
return pattern.test(text);
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
let tds = $("td");
|
||||
let td_ipts = $("td input[type='text']");
|
||||
document.addEventListener('click', (e) => {
|
||||
copyed = [];
|
||||
/*
|
||||
e.target.innerHTML //获取元素
|
||||
e.target.innerText //获取文本
|
||||
e.target.nodeName //获取标签名
|
||||
*/
|
||||
if(e.target.className == "axis")
|
||||
{
|
||||
//alert()
|
||||
$("* .point").remove()
|
||||
$(tds).append("<div class='point'><div class='angle'></div><p>标题</p></div>")
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//$("* .point").remove()
|
||||
//$(tds[j]).append("<div class='point'><div class='angle'></div><p>标题</p></div>")
|
||||
|
@ -0,0 +1,33 @@
|
||||
windowResize(window.innerWidth);
|
||||
window.addEventListener("resize", () => {
|
||||
var width = window.innerWidth;
|
||||
|
||||
// alert(width)
|
||||
windowResize(width);
|
||||
})
|
||||
|
||||
// 窗口自动适应
|
||||
function windowResize(width) {
|
||||
if (width < 1000) {
|
||||
$(".right_box").css({"width": width + "px","height": "50px", "transform": "translateY(-50%)"})
|
||||
$(".output_destination").css({"height": "190px"});
|
||||
$(".left_box").css({ "transform": "translateX(" + (width - 582/0) / 2 + "px)"})
|
||||
|
||||
$(".canvas").css({"width": "250px","height": "250px", "transform": "translateX(110px)"})
|
||||
$(".fuliye_cmdOut").css({"width":"40%","top":" 0","right":"0%"})
|
||||
$(".Fourier_copyBtn").css({"width": "300px","bottom":"40%"})
|
||||
$(".Fourier_copyBtn:eq(0)").css({"left": "300px", "transform":"translateY(-60px)"})
|
||||
$(".Fourier_copyBtn:eq(1)").css({"right": "-350px"})
|
||||
} else {
|
||||
$(".output_destination").css({"height": "96%"});
|
||||
$(".right_box").css({"width": "380px","height": "530px", "transform": "translateY(0%)"})
|
||||
$(".left_box").css({"transform": "translateX(0%)"})
|
||||
|
||||
$(".canvas").css({"width": "100%","height": "100%", "transform": "translateX(0px)"})
|
||||
$(".fuliye_cmdOut").css({"width":"50%","bottom":"0%"})
|
||||
$(".x_axie, .y_axie").css({"transform": "0px"})
|
||||
$(".Fourier_copyBtn").css({"width": "48%", "bottom":"1%", "transform":"translateY(0px)"})
|
||||
$(".Fourier_copyBtn:eq(0)").css({"left": "1%"})
|
||||
$(".Fourier_copyBtn:eq(1)").css({"right": "1%"})
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
// 模糊搜索
|
||||
$(document).ready(function() {
|
||||
$(".searchInput").on("keyup", function() {
|
||||
var value = $(this).val().toLowerCase();
|
||||
var reg = /^[\u4e00-\u9fa5]+$/;
|
||||
console.log(value + reg.test(value))
|
||||
|
||||
if (reg.test(value) == true) {
|
||||
$("*#Copy_to_value").filter(function() {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
|
||||
});
|
||||
} else if (value == "") {
|
||||
$("*#Copy_to_value").filter(function() {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
//chunksResourceBoxs[0]
|
@ -0,0 +1,88 @@
|
||||
$(".set").click(() => {
|
||||
setBox(true)
|
||||
})
|
||||
$(".setBox-closeWin, .blackboard").click(() => {
|
||||
setBox(false)
|
||||
})
|
||||
// 处理按下键盘的操作
|
||||
var setBoxBull = 0;
|
||||
$(document).keydown((e) => {
|
||||
// ESC键 打开/关闭 设置
|
||||
if (e.keyCode == 27 && setBoxBull == 0) {
|
||||
setBox(true)
|
||||
setBoxBull = 1;
|
||||
} else if (e.keyCode == 27 && setBoxBull == 1) {
|
||||
setBox(false)
|
||||
setBoxBull = 0;
|
||||
}
|
||||
// Ctrl + R 组合键清除缓存
|
||||
if (e.ctrlKey && (e.keyCode == 114 || e.keyCode == 82)) {
|
||||
localStorage.clear();
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
//localStorage.clear();
|
||||
|
||||
// 第一个按钮 ——欢迎问候语
|
||||
var swiths = $("*.setBox ul li");
|
||||
$(swiths[0]).click(() => {
|
||||
if (localStorage.setting1 == 0) {
|
||||
localStorage.setting1 = 1;
|
||||
setting_swith(0, 1);
|
||||
} else {
|
||||
localStorage.setting1 = 0;
|
||||
setting_swith(0, 0);
|
||||
}
|
||||
})
|
||||
$(swiths[1]).click(() => {
|
||||
if (localStorage.setting2 == 0) {
|
||||
localStorage.setting2 = 1;
|
||||
setting_swith(1, 1);
|
||||
} else {
|
||||
localStorage.setting2 = 0;
|
||||
setting_swith(1, 0);
|
||||
}
|
||||
})
|
||||
// 初始化设置
|
||||
// nth 1
|
||||
if (localStorage.setting1 == undefined) {
|
||||
localStorage.setting1 = 1;
|
||||
setting_swith(0, 0);
|
||||
} else
|
||||
setting_swith(0, localStorage.setting1);
|
||||
if (localStorage.setting1 == 0)
|
||||
setting_swith(0, 0);
|
||||
else
|
||||
setting_swith(0, 1);
|
||||
|
||||
|
||||
// nth 2
|
||||
if (localStorage.setting2 == undefined) {
|
||||
localStorage.setting2 = 0;
|
||||
setting_swith(1, 0);
|
||||
} else
|
||||
setting_swith(1, localStorage.setting2);
|
||||
if (localStorage.setting2 == 0)
|
||||
setting_swith(1, 0);
|
||||
else
|
||||
setting_swith(1, 1);
|
||||
|
||||
|
||||
|
||||
// options
|
||||
var opt1Temp = false;
|
||||
var opts = $("*.options .option");
|
||||
for(let i = 0;i <= opts.length;i ++) {
|
||||
$(opts[i]).click(() => {
|
||||
if (i == 0) {
|
||||
if (opt1Temp == false) {
|
||||
opt1Temp = true;
|
||||
$("#day_and_night").css({"background-color":"#00aaff"})
|
||||
} else {
|
||||
opt1Temp = false;
|
||||
$("#day_and_night").css({"background-color":"rgba(255, 255, 255, .2"})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
var MessageboxTemp;
|
||||
|
||||
let Level_1_Tmep = 0;
|
||||
let setoutTime = true;
|
||||
|
||||
|
||||
|
||||
// 资源目录焦点事件
|
||||
var listUl_lis = $(".listUl li");
|
||||
for (i = 0;i <= listUl_lis.length;i ++){
|
||||
$(listUl_lis[i]).before("<div class='focusPrint'></div>")
|
||||
}
|
||||
let focuss = $(".focusPrint");
|
@ -0,0 +1,57 @@
|
||||
function output_cmd_normal() { // 1.12.2原版指令输出函数
|
||||
var axis_x = $("#axis_x").val();
|
||||
var axis_y = $("#axis_y").val();
|
||||
var axis_z = $("#axis_z").val();
|
||||
|
||||
var move_x = $("#move_x").val();
|
||||
var move_y = $("#move_y").val();
|
||||
var move_z = $("#move_z").val();
|
||||
|
||||
var cmdName = $("#cmdName_select").find("option:selected").val();
|
||||
var spread_speed = $("#spread_speed").val();
|
||||
var particle_num = $("#particle_num").val();
|
||||
var vision_range
|
||||
//取 radio 的选择的value值
|
||||
var radio = $("#radio_vision_range #vision_range");
|
||||
for (i=0; i<radio.length; i++) {
|
||||
if (radio[i].checked) {
|
||||
vision_range = "force"
|
||||
}
else {
|
||||
vision_range = "normal"
|
||||
}
|
||||
}
|
||||
|
||||
if (axis_x == '') axis_x = '';
|
||||
if (axis_y == '') axis_y = 1;
|
||||
if (axis_z == '') axis_z = '';
|
||||
|
||||
if (move_x == '') move_x = 0;
|
||||
if (move_y == '') move_y = 0;
|
||||
if (move_z == '') move_z = 0;
|
||||
|
||||
|
||||
var cmd = "/particle " + cmdName + " ~" + axis_x + " ~" + axis_y + " ~" + axis_z + " " + move_x + " " +
|
||||
move_y + " " + move_z + " " + spread_speed + " " + particle_num + " " + vision_range
|
||||
|
||||
|
||||
$(".output_destination").html(""); // 清空
|
||||
|
||||
$(".output_destination").append(cmd)
|
||||
console.log("成功输出:" + cmd)
|
||||
command = cmd;
|
||||
output_cmd(cmd)
|
||||
|
||||
if (localStorage.setting2 == 1)
|
||||
copyHandle(cmd);
|
||||
|
||||
$(".output_destination").css({"background-image": "url('img/copy_background.png')"})
|
||||
}
|
||||
|
||||
|
||||
// 确定生成键
|
||||
var cmd_build_null = false; // 复制时检查是否已生成指令
|
||||
$("#cmd_build").click(() => {
|
||||
output_cmd_normal();
|
||||
|
||||
cmd_build_null = true;
|
||||
});
|
@ -0,0 +1,367 @@
|
||||
var cmd_build = $(".cmd_build");
|
||||
for (let i = 0; i <= cmd_build.length; i++) {
|
||||
$(cmd_build[i + 1]).click(() => {
|
||||
console.log("cmd_build: " + i);
|
||||
|
||||
get_value(i);
|
||||
|
||||
cmd_build_null = true;
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// parameter 动画开关
|
||||
var PCTemp = false;
|
||||
$("#parameter_cpt_box").click(() => {
|
||||
if (PCTemp == false) {
|
||||
cpt_animation("parameter", true);
|
||||
PCTemp = true;
|
||||
} else {
|
||||
cpt_animation("parameter", false);
|
||||
PCTemp = false;
|
||||
}
|
||||
});
|
||||
// polarparameter 动画开关
|
||||
var PPCTemp = false;
|
||||
$("#polarparameter_cpt_box").click(() => {
|
||||
if (PPCTemp == false) {
|
||||
cpt_animation("polarparameter", true);
|
||||
PPCTemp = true;
|
||||
} else {
|
||||
cpt_animation("polarparameter", false);
|
||||
PPCTemp = false;
|
||||
}
|
||||
});
|
||||
|
||||
var command; // 最终指令
|
||||
|
||||
function get_value(way) { // 获取 value
|
||||
|
||||
SPVt = localStorage.SPVt == undefined ? 1:localStorage.SPVt;
|
||||
|
||||
console.log("SPVt: " + SPVt)
|
||||
|
||||
if (way == 0) { // normal
|
||||
let cmdName = $("#normal_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#normal_x").val();
|
||||
let y = $("#normal_y").val();
|
||||
let z = $("#normal_z").val();
|
||||
|
||||
let color = $("#normal_PColor").val();
|
||||
|
||||
let vx = $("#normal_vx").val();
|
||||
let vy = $("#normal_vy").val();
|
||||
let vz = $("#normal_vz").val();
|
||||
|
||||
let rx = $("#normal_rx").val();
|
||||
let ry = $("#normal_ry").val();
|
||||
let rz = $("#normal_rz").val();
|
||||
|
||||
let count = $("#normal_count").val();
|
||||
|
||||
let age = $("#normal_age").val();
|
||||
|
||||
let SE = $("#normal_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (rx == '') rx = 0;
|
||||
if (ry == '') ry = 0;
|
||||
if (rz == '') rz = 0;
|
||||
|
||||
if (count == "") count = 10;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
//console.log(x, y, z, color, vx, vy, vz, rx, ry, rz, count, age, SE);
|
||||
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
cmd = '/particleex normal '+ mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + color + light + ' ' + vx +
|
||||
' ' + vy + ' ' + vz + ' ' + rx + ' ' + ry + ' ' + rz + ' ' + count + ' ' + age + " " + comma + SE + comma;
|
||||
}
|
||||
else if (way == 1) { // parameter
|
||||
let cmdName = $("#parameter_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#parameter_x").val();
|
||||
let y = $("#parameter_y").val();
|
||||
let z = $("#parameter_z").val();
|
||||
|
||||
let color = $("#parameter_pColor").val();
|
||||
|
||||
let vx = $("#parameter_vx").val();
|
||||
let vy = $("#parameter_vy").val();
|
||||
let vz = $("#parameter_vz").val();
|
||||
|
||||
let begin = $("#parameter_domain_begin").val();
|
||||
let end = $("#parameter_domain_end").val();
|
||||
|
||||
let E = $("#parameter_expression").val();
|
||||
|
||||
let step = $("#parameter_step").val();
|
||||
|
||||
// ************动画设置************
|
||||
let cpt;
|
||||
let tick;
|
||||
if (PCTemp == false) {
|
||||
cpt = '';
|
||||
tick = '';
|
||||
}
|
||||
if (PCTemp == true) {
|
||||
cpt = $("#parameter_cpt").val();
|
||||
if (cpt == "") {
|
||||
cpt = '10 ';
|
||||
} else {
|
||||
cpt = $("#parameter_cpt").val() + ' ';
|
||||
}
|
||||
tick = 'tick'
|
||||
}
|
||||
// ************动画设置************
|
||||
|
||||
let age = $("#parameter_age").val();
|
||||
|
||||
let SE = $("#parameter_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (begin == "") begin = -10.0;
|
||||
|
||||
if (end == "") end = 10.0;
|
||||
|
||||
if (step == "") step = 0.1;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
|
||||
cmd = '/particleex ' + tick + 'parameter '+ mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' +
|
||||
color + light + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + begin + ' ' + end +
|
||||
' ' + comma + E + comma + " " + step + ' ' + cpt + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 2) { // polarparameter
|
||||
let cmdName = $("#polarparameter_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#polarparameter_x").val();
|
||||
let y = $("#polarparameter_y").val();
|
||||
let z = $("#polarparameter_z").val();
|
||||
|
||||
let color = $("#polarparameter_pColor").val();
|
||||
|
||||
let vx = $("#parameter_vx").val();
|
||||
let vy = $("#parameter_vy").val();
|
||||
let vz = $("#parameter_vz").val();
|
||||
|
||||
let begin = $("#polarparameter_domain_begin").val();
|
||||
let end = $("#polarparameter_domain_end").val();
|
||||
|
||||
let E = $("#polarparameter_expression").val();
|
||||
|
||||
let step = $("#polarparameter_step").val();
|
||||
|
||||
// ************动画设置************
|
||||
let cpt;
|
||||
let tick;
|
||||
if (PPCTemp == false) {
|
||||
cpt = '';
|
||||
tick = ''
|
||||
} else if (PPCTemp == true) {
|
||||
cpt = $("#polarparameter_cpt").val();
|
||||
if (cpt == "") {
|
||||
cpt = '10 ';
|
||||
} else {
|
||||
cpt = $("#polarparameter_cpt").val() + ' ';
|
||||
}
|
||||
tick = "tick";
|
||||
}
|
||||
// ************动画设置************
|
||||
|
||||
let age = $("#polarparameter_age").val();
|
||||
|
||||
let SE = $("#polarparameter_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (begin == '') begin = -10.0;
|
||||
if (end == '') end = 10.0;
|
||||
|
||||
if (step == '') step = 0.1;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : '';
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240 : '';
|
||||
|
||||
let comma = SPVt == 1 ? "'" : '';
|
||||
|
||||
cmd = '/particleex ' + tick + 'polarparameter ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z +
|
||||
' ' + color + light + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + begin + ' ' + end + ' ' +
|
||||
comma + E + comma + " " + step + ' ' + cpt + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 3) { // conditional
|
||||
let cmdName = $("#conditional_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#conditional_x").val();
|
||||
let y = $("#conditional_y").val();
|
||||
let z = $("#conditional_z").val();
|
||||
|
||||
let color = $("#conditional_pColor").val();
|
||||
|
||||
let vx = $("#conditional_vx").val();
|
||||
let vy = $("#conditional_vy").val();
|
||||
let vz = $("#conditional_vz").val();
|
||||
|
||||
let rx = $("#conditional_rx").val();
|
||||
let ry = $("#conditional_ry").val();
|
||||
let rz = $("#conditional_rz").val();
|
||||
|
||||
let E = $("#conditional_expression").val();
|
||||
|
||||
let step = $("#conditional_step").val();
|
||||
|
||||
let age = $("#conditional_age").val();
|
||||
|
||||
let SE = $("#conditional_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (rx == '') rx = 1;
|
||||
if (ry == '') ry = 1;
|
||||
if (rz == '') rz = 1;
|
||||
|
||||
if (step == "") step = 0.1;
|
||||
|
||||
if (age == "") age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
cmd = '/particleex conditional ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + color + light + ' ' +
|
||||
vx + ' ' + vy + ' ' + vz + ' ' + rx + ' ' + ry + ' ' + rz + ' ' +
|
||||
comma + E + comma + " " + step + ' ' + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 4) { // image
|
||||
let cmdName = $("#image_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#image_x").val();
|
||||
let y = $("#image_y").val();
|
||||
let z = $("#image_z").val();
|
||||
|
||||
let path = $("#image_path").val();
|
||||
|
||||
let scaling = $("#image_scaling").val();
|
||||
|
||||
let rotateX = $("#image_rotateX").val();
|
||||
let rotateY = $("#image_rotateY").val();
|
||||
let rotateZ = $("#image_rotateZ").val();
|
||||
|
||||
let flip = $("#image_flip_select").find("option:selected").val();
|
||||
|
||||
let dpb = $("#image_dpb").val();
|
||||
|
||||
let vx = $("#image_vx").val();
|
||||
let vy = $("#image_vy").val();
|
||||
let vz = $("#image_vz").val();
|
||||
|
||||
let age = $("#image_age").val();
|
||||
|
||||
let SE = $("#image_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (path == '') path = '1.png';
|
||||
|
||||
if (scaling == "") scaling = 0.1;
|
||||
|
||||
if (rotateX == "") rotateX = 0;
|
||||
if (rotateY == "") rotateY = 0;
|
||||
if (rotateZ == "") rotateZ = 0;
|
||||
|
||||
if (dpb == "") dpb = 10.0;
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
|
||||
if (age == "") age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
// 1.16.5
|
||||
cmd = '/particleex image ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + path + ' ' +
|
||||
scaling + ' ' + rotateX + ' ' + rotateY + ' ' + rotateZ + ' ' +
|
||||
flip + ' ' + dpb + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
else {
|
||||
cmd ="";
|
||||
}
|
||||
if (localStorage.setting2 == 1) copyHandle(cmd);
|
||||
console.log(cmd);
|
||||
command = cmd;
|
||||
// 生成指令时同时复制指令
|
||||
|
||||
|
||||
output_cmd(cmd); // 输出至复制栏
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
// right 指令输出窗口的复制事件
|
||||
let outputs = $(".output_destination")
|
||||
var copyTemp = 0;
|
||||
for(let i = 0;i <= outputs.length;i ++) {
|
||||
$(outputs[i]).click(() => {
|
||||
if (cmd_build_null == true)
|
||||
{
|
||||
//var ct = $(outputs[i]).html();
|
||||
copyHandle(command);
|
||||
}
|
||||
else
|
||||
{
|
||||
Messagebox("请先缔造您的指令","alert");
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,364 @@
|
||||
var cmd_build = $(".cmd_build");
|
||||
for (let i = 0; i <= cmd_build.length; i++) {
|
||||
$(cmd_build[i + 1]).click(() => {
|
||||
console.log("cmd_build: " + i);
|
||||
|
||||
get_value(i);
|
||||
|
||||
cmd_build_null = true;
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// parameter 动画开关
|
||||
let PCTemp = false;
|
||||
$("#parameter_cpt_box").click(() => {
|
||||
if (PCTemp == false) {
|
||||
cpt_animation("parameter", true);
|
||||
PCTemp = true;
|
||||
} else {
|
||||
cpt_animation("parameter", false);
|
||||
PCTemp = false;
|
||||
}
|
||||
});
|
||||
// polarparameter 动画开关
|
||||
let PPCTemp = false;
|
||||
$("#polarparameter_cpt_box").click(() => {
|
||||
if (PPCTemp == false) {
|
||||
cpt_animation("polarparameter", true);
|
||||
PPCTemp = true;
|
||||
} else {
|
||||
cpt_animation("polarparameter", false);
|
||||
PPCTemp = false;
|
||||
}
|
||||
});
|
||||
|
||||
var command; // 最终指令
|
||||
|
||||
function get_value(way) { // 获取 value
|
||||
|
||||
SPVt = localStorage.SPVt == undefined ? 1:localStorage.SPVt;
|
||||
console.log("SPVt: " + SPVt)
|
||||
|
||||
if (way == 0) { // normal
|
||||
let cmdName = $("#normal_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#normal_x").val();
|
||||
let y = $("#normal_y").val();
|
||||
let z = $("#normal_z").val();
|
||||
|
||||
let color = $("#normal_PColor").val();
|
||||
|
||||
let vx = $("#normal_vx").val();
|
||||
let vy = $("#normal_vy").val();
|
||||
let vz = $("#normal_vz").val();
|
||||
|
||||
let rx = $("#normal_rx").val();
|
||||
let ry = $("#normal_ry").val();
|
||||
let rz = $("#normal_rz").val();
|
||||
|
||||
let count = $("#normal_count").val();
|
||||
|
||||
let age = $("#normal_age").val();
|
||||
|
||||
let SE = $("#normal_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (rx == '') rx = 0;
|
||||
if (ry == '') ry = 0;
|
||||
if (rz == '') rz = 0;
|
||||
|
||||
if (count == "") count = 10;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
//console.log(x, y, z, color, vx, vy, vz, rx, ry, rz, count, age, SE);
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
cmd = '/particleex normal '+ mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + color + light + ' ' + vx +
|
||||
' ' + vy + ' ' + vz + ' ' + rx + ' ' + ry + ' ' + rz + ' ' + count + ' ' + age + " " + comma + SE + comma;
|
||||
}
|
||||
else if (way == 1) { // parameter
|
||||
let cmdName = $("#parameter_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#parameter_x").val();
|
||||
let y = $("#parameter_y").val();
|
||||
let z = $("#parameter_z").val();
|
||||
|
||||
let color = $("#parameter_pColor").val();
|
||||
|
||||
let vx = $("#parameter_vx").val();
|
||||
let vy = $("#parameter_vy").val();
|
||||
let vz = $("#parameter_vz").val();
|
||||
|
||||
let begin = $("#parameter_domain_begin").val();
|
||||
let end = $("#parameter_domain_end").val();
|
||||
|
||||
let E = $("#parameter_expression").val();
|
||||
|
||||
let step = $("#parameter_step").val();
|
||||
|
||||
// ************动画设置************
|
||||
let cpt;
|
||||
let tick;
|
||||
if (PCTemp == false) {
|
||||
cpt = '';
|
||||
tick = '';
|
||||
}
|
||||
if (PCTemp == true) {
|
||||
cpt = $("#parameter_cpt").val();
|
||||
if (cpt == "") {
|
||||
cpt = '10 ';
|
||||
} else {
|
||||
cpt = $("#parameter_cpt").val() + ' ';
|
||||
}
|
||||
tick = 'tick'
|
||||
}
|
||||
// ************动画设置************
|
||||
|
||||
let age = $("#parameter_age").val();
|
||||
|
||||
let SE = $("#parameter_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)") color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (begin == "") begin = -10.0;
|
||||
|
||||
if (end == "") end = 10.0;
|
||||
|
||||
if (step == "") step = 0.1;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
|
||||
cmd = '/particleex ' + tick + 'parameter '+ mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' +
|
||||
color + light + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + begin + ' ' + end +
|
||||
' ' + comma + E + comma + " " + step + ' ' + cpt + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 2) { // polarparameter
|
||||
let cmdName = $("#polarparameter_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#polarparameter_x").val();
|
||||
let y = $("#polarparameter_y").val();
|
||||
let z = $("#polarparameter_z").val();
|
||||
|
||||
let color = $("#polarparameter_pColor").val();
|
||||
|
||||
let vx = $("#parameter_vx").val();
|
||||
let vy = $("#parameter_vy").val();
|
||||
let vz = $("#parameter_vz").val();
|
||||
|
||||
let begin = $("#polarparameter_domain_begin").val();
|
||||
let end = $("#polarparameter_domain_end").val();
|
||||
|
||||
let E = $("#polarparameter_expression").val();
|
||||
|
||||
let step = $("#polarparameter_step").val();
|
||||
|
||||
// ************动画设置************
|
||||
let cpt;
|
||||
let tick;
|
||||
if (PPCTemp == false) {
|
||||
cpt = '';
|
||||
tick = ''
|
||||
} else if (PPCTemp == true) {
|
||||
cpt = $("#polarparameter_cpt").val();
|
||||
if (cpt == "") {
|
||||
cpt = '10 ';
|
||||
} else {
|
||||
cpt = $("#polarparameter_cpt").val() + ' ';
|
||||
}
|
||||
tick = "tick";
|
||||
}
|
||||
// ************动画设置************
|
||||
|
||||
let age = $("#polarparameter_age").val();
|
||||
|
||||
let SE = $("#polarparameter_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)" || color.length > 7) color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (begin == '') begin = -10.0;
|
||||
if (end == '') end = 10.0;
|
||||
|
||||
if (step == '') step = 0.1;
|
||||
|
||||
if (age == '') age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : '';
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240 : '';
|
||||
|
||||
let comma = SPVt == 1 ? "'" : '';
|
||||
|
||||
cmd = '/particleex ' + tick + 'polarparameter ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z +
|
||||
' ' + color + light + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + begin + ' ' + end + ' ' +
|
||||
comma + E + comma + " " + step + ' ' + cpt + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 3) { // conditional
|
||||
let cmdName = $("#conditional_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#conditional_x").val();
|
||||
let y = $("#conditional_y").val();
|
||||
let z = $("#conditional_z").val();
|
||||
|
||||
let color = $("#conditional_pColor").val();
|
||||
|
||||
let vx = $("#conditional_vx").val();
|
||||
let vy = $("#conditional_vy").val();
|
||||
let vz = $("#conditional_vz").val();
|
||||
|
||||
let rx = $("#conditional_rx").val();
|
||||
let ry = $("#conditional_ry").val();
|
||||
let rz = $("#conditional_rz").val();
|
||||
|
||||
let E = $("#conditional_expression").val();
|
||||
|
||||
let step = $("#conditional_step").val();
|
||||
|
||||
let age = $("#conditional_age").val();
|
||||
|
||||
let SE = $("#conditional_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (color == "(255, 255, 255, 1)" || color.length > 7) color = "1 1 1 1";
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (rx == '') rx = 1;
|
||||
if (ry == '') ry = 1;
|
||||
if (rz == '') rz = 1;
|
||||
|
||||
if (step == "") step = 0.1;
|
||||
|
||||
if (age == "") age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let light = SPVt == 0 ? ' ' + 240: "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
cmd = '/particleex conditional ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + color + light + ' ' +
|
||||
vx + ' ' + vy + ' ' + vz + ' ' + rx + ' ' + ry + ' ' + rz + ' ' +
|
||||
comma + E + comma + " " + step + ' ' + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
|
||||
else if (way == 4) { // image
|
||||
let cmdName = $("#image_cmdName_select").find("option:selected").val();
|
||||
|
||||
let x = $("#image_x").val();
|
||||
let y = $("#image_y").val();
|
||||
let z = $("#image_z").val();
|
||||
|
||||
let path = $("#image_path").val();
|
||||
|
||||
let scaling = $("#image_scaling").val();
|
||||
|
||||
let rotateX = $("#image_rotateX").val();
|
||||
let rotateY = $("#image_rotateY").val();
|
||||
let rotateZ = $("#image_rotateZ").val();
|
||||
|
||||
let flip = $("#image_flip_select").find("option:selected").val();
|
||||
|
||||
let dpb = $("#image_dpb").val();
|
||||
|
||||
let vx = $("#image_vx").val();
|
||||
let vy = $("#image_vy").val();
|
||||
let vz = $("#image_vz").val();
|
||||
|
||||
let age = $("#image_age").val();
|
||||
|
||||
let SE = $("#image_speed_expression").val();
|
||||
|
||||
// 默认 value
|
||||
if (x == '') x = '';
|
||||
if (y == '') y = 1;
|
||||
if (z == '') z = '';
|
||||
|
||||
if (path == '') path = '1.png';
|
||||
|
||||
if (scaling == "") scaling = 0.1;
|
||||
|
||||
if (rotateX == "") rotateX = 0;
|
||||
if (rotateY == "") rotateY = 0;
|
||||
if (rotateZ == "") rotateZ = 0;
|
||||
|
||||
if (dpb == "") dpb = 10.0;
|
||||
|
||||
if (vx == '') vx = 0;
|
||||
if (vy == '') vy = 0;
|
||||
if (vz == '') vz = 0;
|
||||
|
||||
if (age == "") age = 0;
|
||||
|
||||
let mc = SPVt == 1 ? "minecraft:" : "";
|
||||
|
||||
let comma = SPVt == 1 ? "'" : "";
|
||||
|
||||
// 1.16.5
|
||||
cmd = '/particleex image ' + mc + cmdName + ' ~' + x + ' ~' + y + ' ~' + z + ' ' + path + ' ' +
|
||||
scaling + ' ' + rotateX + ' ' + rotateY + ' ' + rotateZ + ' ' +
|
||||
flip + ' ' + dpb + ' ' + vx + ' ' + vy + ' ' + vz + ' ' + age + ' ' + comma + SE + comma;
|
||||
}
|
||||
else {
|
||||
cmd ="";
|
||||
}
|
||||
if (localStorage.setting2 == 1) copyHandle(cmd);
|
||||
console.log(cmd);
|
||||
command = cmd;
|
||||
// 生成指令时同时复制指令
|
||||
|
||||
|
||||
output_cmd(cmd); // 输出至复制栏
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,343 @@
|
||||
|
||||
// 1.12.2
|
||||
var old_particles = [
|
||||
['largeexplode','大型爆炸'],
|
||||
['hugeexplosion','巨型爆炸'],
|
||||
['fireworksSpark','烟花颗粒'],
|
||||
['bubble','水中气泡'],
|
||||
['splash','喷溅水花'],
|
||||
['wake','水准波纹'],
|
||||
['suspended','水准颗粒'],
|
||||
['depthsuspend','虚空粒子'],
|
||||
['crit','物理暴击'],
|
||||
['magicCrit','魔法暴击'],
|
||||
['smoke','黑烟'],
|
||||
['largesmoke','大型黑烟'],
|
||||
['spell','持续药水颗粒'],
|
||||
['instantSpell','瞬间药水颗粒'],
|
||||
['mobSpell','状态效果颗粒'],
|
||||
['mobSpellAmbient','信标效果颗粒'],
|
||||
['witchMagic','女巫颗粒'],
|
||||
['dripWater','方块溅水'],
|
||||
['dripLava','方块溅岩浆'],
|
||||
['angryVillager','村民愤怒'],
|
||||
['happyVillager','村民喜悦'],
|
||||
['townaura','菌丝颗粒'],
|
||||
['note','音符颗粒'],
|
||||
['portal','传送门颗粒'],
|
||||
['enchantmenttable','附魔台符文'],
|
||||
['flame','火苗颗粒'],
|
||||
['lava','岩浆颗粒'],
|
||||
['footstep','脚印'],
|
||||
['reddust','红石充能'],
|
||||
['snowballpoof','雪球颗粒'],
|
||||
['slime','史莱姆颗粒'],
|
||||
['heart','爱心'],
|
||||
['barrier','屏障'],
|
||||
['cloud','云朵'],
|
||||
['snowshovel','血傀儡生成'],
|
||||
['droplet','下雪颗粒'],
|
||||
['mobappearance','远古守卫者的注视'],
|
||||
['endRod','末地烛颗粒'],
|
||||
['dragonbreath','末影龙吐息粒子'],
|
||||
['damageIndicator','玩家造成伤害粒子'],
|
||||
['sweepAttack','剑气'],
|
||||
['fallingdust','落沙'],
|
||||
['blockcrack','摧毁方块'],
|
||||
['blockdust','跌落粒子'],
|
||||
['iconcrack','物品碎裂粒子'],
|
||||
['spit','羊驼攻击'],
|
||||
['totem','不死图腾']
|
||||
];
|
||||
|
||||
// 1.16.5
|
||||
var new_particles = [
|
||||
["ambient_entity_effect","药水"],
|
||||
["angry_villager","村民愤怒"],
|
||||
["ash","粉尘灰"],
|
||||
["barrier","屏障"],
|
||||
["bubble","泡沫"],
|
||||
["bubble_column_up","气泡柱向上"],
|
||||
["bubble_pop","泡泡流行"],
|
||||
["campfire_cosy_smoke","篝火舒适的烟雾"],
|
||||
["campfire_signal_smoke","篝火信号烟雾"],
|
||||
["cloud","云"],
|
||||
["composter","堆肥机粒子"],
|
||||
["crimson_spore","深红孢子"],
|
||||
["crit","暴击"],
|
||||
["current_down","当前下降"],
|
||||
["damage_indicator","损坏指示器"],
|
||||
["dolphin","海豚"],
|
||||
["dragon_breath","龙息"],
|
||||
["dripping_honey","蜂蜜滴"],
|
||||
["dripping_lava","岩浆滴"],
|
||||
["dripping_obsidian_tear","哭泣的黑曜石滴"],
|
||||
["dripping_water","水滴"],
|
||||
["dust","灰尘"],
|
||||
["effect","药水2"],
|
||||
["elder_guardian","老守望者注视"],
|
||||
["enchant","附魔台符文"],
|
||||
["enchanted_hit","附魔命中"],
|
||||
["end_rod","末地烛"],
|
||||
["entity_effect","实体效果"],
|
||||
["explosion","爆炸"],
|
||||
["explosion_emitter","爆炸发射"],
|
||||
["falling_dust","尘灰滴落"],
|
||||
["falling_honey","蜂蜜滴落"],
|
||||
["falling_lava","岩浆滴落"],
|
||||
["falling_nectar","蜜汁滴落"],
|
||||
["falling_obsidian_tear","哭泣的黑曜石滴落"],
|
||||
["falling_water","水滴落"],
|
||||
["firework","烟花颗粒"],
|
||||
["fishing","钓鱼水花"],
|
||||
["flame","火焰颗粒"],
|
||||
["flash","闪光"],
|
||||
["chappy_villager","村民快乐"],
|
||||
["heart","爱心"],
|
||||
["instant_effect","白色颗粒"],
|
||||
["item_slime","史莱姆粒子"],
|
||||
["item_snowball","雪球粒子"],
|
||||
["landing_honey","蜂蜜落下"],
|
||||
["landing_lava","岩浆落下"],
|
||||
["landing_obsidian_tear","哭泣的黑曜石落下"],
|
||||
["large_smoke","大烟"],
|
||||
["lava","岩浆颗粒"],
|
||||
["mycelium","菌丝颗粒"],
|
||||
["nautilus","鹦鹉螺"],
|
||||
["note","乐符"],
|
||||
["poof","死亡烟雾"],
|
||||
["portal","下坠的下界门粒子"],
|
||||
["rain","雨"],
|
||||
["reverse_portal","悬停的下界门粒子"],
|
||||
["smoke","烟"],
|
||||
["sneeze","打喷嚏"],
|
||||
["soul","灵魂颗粒"],
|
||||
["soul_fire_flame","灵魂火焰"],
|
||||
["spit","羊驼吐痰"],
|
||||
["splash","溅起的水花"],
|
||||
["squid_ink","鱿鱼墨水"],
|
||||
["sweep_attack","扫荡剑气"],
|
||||
["totem_of_undying","不朽的图腾"],
|
||||
["underwater","水下气泡"],
|
||||
["warped_spore","翘曲孢子颗粒"],
|
||||
["white_ash","白灰颗粒"],
|
||||
["witch","女巫粒子"]
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var authors = [
|
||||
[`OCEAN`, `https://space.bilibili.com/693976733?spm_id_from=333.1007.0.0`],
|
||||
[`Junior_Mo`,`https://www.mcmod.cn/author/25217.html`],
|
||||
[`故知`, `https://space.bilibili.com/445940350?spm_id_from=333.999.0.0`],
|
||||
|
||||
];
|
||||
// colorblock 指令
|
||||
var complete_command = [
|
||||
// 【作者,名称,指令,地址】
|
||||
[
|
||||
`Junior_Mo`,
|
||||
`正方体`,
|
||||
`particleex conditional minecraft:end_rod ~ ~1 ~ 0 1 1 1 0 0 0 0.5 0.5 0.5 '(abs(y)==0.5&!(abs(z)<0.5))|(abs(x)==0.5&(!(abs(z)<0.5)|!(abs(y)<0.5)))' 0.1 0 'vy=0.01' 1.0 null`,
|
||||
authors[1][1]
|
||||
],
|
||||
[
|
||||
`OCEAN`,
|
||||
'立体球',
|
||||
`particleex polarparameter minecraft:firework ~ ~2 ~ 0 1 0 1 0 0 0 0 550 's1=t;s2=t/50;dis=t/10'`,
|
||||
authors[0][1]
|
||||
],
|
||||
[
|
||||
`Junior_Mo`,
|
||||
'锐角星型',
|
||||
`particleex parameter minecraft:end_rod ~ ~4 ~ 0 1 1 1 0 0 0 -3082 3082 'a=5;u=floor(t/78.5)/25;v=t%157/25;x=a*(cos(u)*cos(v))^3;y=a*(sin(u)*cos(v))^3;z=a*sin(v)^3' 1 0 'a=0.05;(vx,,vy,,vz)=(-sin(a),0,-cos(a),,0,1,0,,cos(a),0,-sin(a))*(x*2*sin(a),,0.1,,z*2*sin(a))' 0.1 0`,
|
||||
authors[1][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'旋转的球体',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~3 ~ 1 1 1 1 0 0 0 -100.0 100.0 's1,s2,dis=t*10,t*PI/200,10' 0.1 0 'a=0.05;(vx,,vy,,vz)=(-sin(a),0,-cos(a),,0,1,0,,cos(a),0,-sin(a))*(x*2*sin(a),,0.1,,z*2*sin(a));cr=sin(t/7)/2+0.5;cg=sin(t/5)/2+0.5;cb=sin(t/3)/2+0.5' 1.0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'粒子缠绕',
|
||||
`particleex normal minecraft:end_rod ~ ~1 ~ 0.5 0 0.5 1 0 0. 0 10 5 5 500 200 'a=0.08;(vx,,vy,,vz)=(-sin(a),0,-cos(a),,0,1,0,,cos(a),0,-sin(a))*(x*2*sin(a),,0,,z*2*sin(a))' 1.0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'心形曲线',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~17 ~ 1 1 1 1 0 0 0 -100.0 100.0 'dis=t/5;s1=t/7;s2'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'围圈',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~2 ~ 0 1 1 1 0 0 0 -100.0 100.0 's1,s2,dis=t*10,t*PI/2000,10' 0.1 0 'a=-0.05;(vx,,vz)=(-sin(a),0,-cos(a),,cos(a),0,-sin(a))*(x*2*sin(a),,0.1,,z*2*sin(a))' 1.0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'竖立的圆',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~2 ~ 0.1 1 1 1 0 0 0 -10.0 10.0 'dis=1;s1=1;s2=t' 0.1 0 0 1.0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'散开的圆',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~1 ~ 0.1 1 1 1 0 0 0 -10.0 10.0 'dis=2;s1=2*t;s2=3' 0.1 0 'i=0.1;(vx,vy,vz)=(x*i,y*i,z*i)' 1.0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`故知`,
|
||||
'菊型球',
|
||||
`particleex rgbapolarparameter minecraft:end_rod ~ ~5 ~ 0 0 0 -60.0 65.0 's1,s2,dis=t*0.2,t*PI/3.1415926,5;cr,cg,cb=sin(t/7)/4+0.75,sin(t/5)/4+0.75,sin(t/3)/4+0.75;s1=s1*dis;s2=s2*dis' 0.1 0 0 1.0 null`,
|
||||
authors[2][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'粒子升华',
|
||||
`particleex normal minecraft:end_rod ~ ~-10 ~ .2 .5 1 1 0 1.5 0 10 5 10 500 0 null`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'七芒星',
|
||||
`particleex tickparameter minecraft:end_rod ~ ~1 ~ .1 1 .6 1 0 0 0 0.0 1000.0 'x=(0.07*sin(0.04*t+0.225)+-0.1*sin(-0.03*t+0.225))*50;z=(0.07*cos(0.04*t+0.225)+-0.1*cos(-0.03*t+0.225))*50' 1 25 0 'vy=0.0'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'桃心',
|
||||
`particleex tickparameter minecraft:end_rod ~ ~3 ~ 0.6 0.2 1 1 0 0 0 -3.0 3.0 'x=(16*pow(sin(t),3))/7;y=(13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t))/7' 0.01 20 0 'vy=0.0'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'V字形',
|
||||
`particleex tickparameter minecraft:end_rod ~ ~1 ~ 0.1 1 1 1 0 0 0 -10.0 10.0 'x=t;y=abs(t)' 0.1 10 0 'vy=0.0'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'触手状',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~1 ~ 1 0.1 1 1 0 0 0 -10.0 10.0 's1=t;s2=0.2;dis=tan(t*6)+5)' 0.01 0 'vy=0.0'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'星星',
|
||||
`particleex parameter minecraft:end_rod ~ ~1 ~ 1 .5 0 1 0 0 0 0.0 1000.0 'x=(0.06*sin(0.02*t+1)+-0.03*sin(-0.03*t+1))*20;z=(0.06*cos(0.02*t+1)+-0.03*cos(-0.03*t+1))*20' 2 0 'vy=0'`,
|
||||
authors[0][1]],
|
||||
[
|
||||
`Junior_Mo`,
|
||||
'螺旋',
|
||||
`particleex tickparameter minecraft:end_rod ~ ~ ~ 1 1 1 1 0 0 0 0.0 30.0 'y=t/4;x=sin(t);z=cos(t)' 0.1 10 0 'cr=sin(t/7)/2+0.5;cg=sin(t/5)/2+0.5;cb=sin(t/3)/2+0.5'`,
|
||||
authors[1][1]],
|
||||
[
|
||||
`OCEAN`,
|
||||
'金葵绽放',
|
||||
`particleex polarparameter minecraft:end_rod ~ ~1 ~ 1 1 0.2 1 0 0 0 -2.0 10.0 's1=t*10;s2=t*PI/20;dis=(random()+2)/10' 0.1 0 'i=0.8*0.7^t;(vx,vy,vz)=(x*i,y*i,z*i)'`,
|
||||
authors[0][1]],
|
||||
|
||||
// wait add...
];
|
||||
|
||||
|
||||
|
||||
// together complete
|
||||
var togetherComplete_commands = [
|
||||
[
|
||||
`地狱之眼`
|
||||
],
|
||||
[
|
||||
`开场命令*4`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.3 1 1 0 0 0 -10.0 10.0 "s=12;x=s*sin(t)^3/100;y=s/3*cos(t)^3/100" 0.01 10 "i=4.7*0.5^t;(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.2 1 1 0 0 0 -10.0 10.0 "s=2;x=cos(t)^3/2*s/100;y=sin(t)^3*s/100" 0.05 8 "i=5*0.48^t;(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.1 1 1 0 0 0 -10.0 10.0 "s=2.4;x=sin(t)*s/100;y=cos(t)*s/100" 0.1 10 "i=5*0.47^t;(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex normal minecraft:end_rod -23 11 112 1 .1 1 1 0 0 0 .1 .1 .1 500 0 "i=2*0.7^t;(vx,vy,vz)=(x*i,y*i,z*i)"`
|
||||
],
|
||||
[
|
||||
`持续命令*4`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.3 1 1 0 0 0 -10.0 10.0 "s=12;x=s*sin(t)^3;y=s/3*cos(t)^3" 0.01 8 "i=0.1*random();(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.1 1 1 0 0 0 -10.0 10.0 "s=2.4;x=sin(t)*s;y=cos(t)*s" 0.1 5 "vy=0.1*y*random()"`,
|
||||
`particleex normal minecraft:end_rod ~ ~1 ~ 0.5 0 0.5 1 0 0 0 10 5 10 5 0 "a=0.1;(vx,,vy,,vz)=(-sin(a),0,-cos(a),,0,1,0,,cos(a),0,-sin(a))*(x*2*sin(a),,0,,z*2*sin(a))" 1.0 null`,
|
||||
`particleex parameter minecraft:end_rod -23 11.1 112 1 0.2 1 1 0 0 0 -10.0 10.0 "s=2;x=cos(t)^3/2*s;y=sin(t)^3*s" 0.05 1000 "s=0.2;vx=sin(floor(t/5)-1)/35;vy=cos(t/5)/35"`
|
||||
],
|
||||
[
|
||||
`收场命令*4`,
|
||||
`particleex clearparticle`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.3 1 1 0 0 0 -10.0 10.0 "s=12;x=s*sin(t)^3;y=s/3*cos(t)^3" 0.01 5 "i=-.5;(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.1 1 1 0 0 0 -10.0 10.0 "s=2.4;x=sin(t)*s;y=cos(t)*s" 0.1 5 "i=-.5;(vx,vy,vz)=(x*i,y*i,z*i)"`,
|
||||
`particleex parameter minecraft:end_rod -23 11 112 1 0.2 1 1 0 0 0 -10.0 10.0 "s=2;x=cos(t)^3/2*s;y=sin(t)^3*s" 0.05 5 "i=-.5;(vx,vy,vz)=(x*i,y*i,z*i)"`
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// colorblock作品填充
|
||||
|
||||
let complete_commandCards;
|
||||
for (let i = 0;i < complete_command.length;i ++) {
|
||||
|
||||
let authors_txt; // 结果文本
|
||||
|
||||
authors_txt = limit_stringLen(i);
|
||||
|
||||
let txt = `<div class="cardBox">
|
||||
<div class='card'>
|
||||
<h3>单击复制</h3>
|
||||
</div>
|
||||
<p class="complete_name">${complete_command[i][1]}</p>
|
||||
<p><span class="UP">UP</span><a id="authors_text" href="${complete_command[i][3]}" title="查看 ${complete_command[i][0]} 的空间" target="_blank">${authors_txt}</a><span class="year">2023-6-18</span></p>
|
||||
</div>`;
|
||||
$(".chunks-resource-box:eq(1) .project").append(txt)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// $(".chunks-resource-box:eq(1) .project").append(`<div class="cardBox"><img src="img/card/end.jpg"></div>`)
|
||||
$(".chunks-resource-box:eq(1) .project").append("<div class='ENDText'>-- END --</div>");
|
||||
|
||||
complete_commandCards = $(".chunks-resource-box:eq(1) .card");
|
||||
for (let i = 0;i < complete_command.length;i ++ ) {
|
||||
$(complete_commandCards[i]).click(() => {
|
||||
console.log(i)
|
||||
copyHandle(complete_command[i][2]);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function limit_stringLen(nth) { // 限制 作者名称的显示长度
|
||||
|
||||
let authors_txt;
|
||||
let maxLength = 8; // 指定的字数阈值
|
||||
let stringLen = 0;
|
||||
let minus = 0; // 与中文占位不同所产生的差值
|
||||
|
||||
for (let j = 0; j < complete_command[nth][0].length; j ++) {
|
||||
// 英文判断
|
||||
let pattern = /[a-zA-Z]/;
|
||||
let isEnglish = pattern.test(complete_command[nth][0][j]);
|
||||
if (isEnglish) {
|
||||
stringLen ++;
|
||||
} else {
|
||||
stringLen += 2;
|
||||
if (stringLen >= 4) {
|
||||
minus ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stringLen > maxLength) {
|
||||
authors_txt = complete_command[nth][0].slice(0, (maxLength - minus)) + "...";
|
||||
console.log(authors_txt);
|
||||
} else {
|
||||
authors_txt = complete_command[nth][0];
|
||||
}
|
||||
return authors_txt;
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
// 拷贝函数 for className == "copyValue"
|
||||
document.addEventListener('click', (e) => {
|
||||
if(e.target.className == "copyValue")
|
||||
{
|
||||
copyHandle(e.target.id);
|
||||
}
|
||||
})
|
@ -0,0 +1,85 @@
|
||||
// expression input text 聚/失焦清空文字事件
|
||||
let expression = $(".expression");
|
||||
let expression_id;
|
||||
for(let i = 0;i <= expression.length;i ++) {
|
||||
var temp_value
|
||||
$(expression[i]).focus(() => {
|
||||
temp_value = $(expression[i]).val();
|
||||
$(expression[i]).attr("value","");
|
||||
});
|
||||
$(expression[i]).blur(() => {
|
||||
$(expression[i]).attr("value", temp_value);
|
||||
});
|
||||
|
||||
// expression 聚/失焦显示提示板 事件
|
||||
// 聚焦 显示
|
||||
$(expression[i]).focus(() => {
|
||||
expression_id = $(expression[i] ).attr("id")
|
||||
console.log(expression_id)
|
||||
$(hideExpression[i]).css({"transform": "scale(1)",'pointer-events':'all',"transition": "0ms","opacity": "1"})
|
||||
|
||||
speed_hideExpression_and_hideExpression_pos(0);
|
||||
})
|
||||
// 失焦 隐藏
|
||||
$(expression[i]).blur(() => {
|
||||
setTimeout(() => {
|
||||
$(hideExpression[i]).css({"transform": "scale(.9)",'pointer-events':'none',"transition": "200ms","opacity": "0"})
|
||||
}, 100);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// speed_expression input text 聚/失焦清空文字事件
|
||||
let speed_expression = $(".speed_expression");
|
||||
let speed_expression_id;
|
||||
for(let i = 0;i <= speed_expression.length;i ++) {
|
||||
var temp_value
|
||||
$(speed_expression[i]).focus(() => {
|
||||
temp_value = $(speed_expression[i]).val();
|
||||
$(speed_expression[i]).attr("value","");
|
||||
});
|
||||
$(speed_expression[i]).blur(() => {
|
||||
$(speed_expression[i]).attr("value", temp_value);
|
||||
});
|
||||
|
||||
// speed_expression 聚/失焦显示提示板 事件
|
||||
// 聚焦 显示
|
||||
$(speed_expression[i]).focus(() => {
|
||||
speed_expression_id = $(speed_expression[i] ).attr("id")
|
||||
console.log(speed_expression_id)
|
||||
$(speed_hideExpression[i]).css({"transform": "scale(1)",'pointer-events':'all',"transition": "0ms","opacity": "1"})
|
||||
|
||||
|
||||
speed_hideExpression_and_hideExpression_pos(-305);
|
||||
})
|
||||
// 失焦 隐藏
|
||||
$(speed_expression[i]).blur(() => {
|
||||
setTimeout(() => {
|
||||
$(speed_hideExpression[i]).css({"transform": "scale(0.9)",'pointer-events':'none',"transition": "200ms","opacity": "0"})
|
||||
}, 100);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
let speed_hideExpression = $("*#speed_hideExpression");
|
||||
let speed_hideExpression_li = $("#speed_hideExpression ul li");
|
||||
let hideExpression = $("*#hideExpression");
|
||||
let hideExpression_li = $("#hideExpression ul li");
|
||||
|
||||
|
||||
// 在表达式选项版中获取 value 速度表达式
|
||||
for (let i = 0;i <= speed_hideExpression_li.length;i ++) {
|
||||
$(speed_hideExpression_li[i]).click(() => {
|
||||
let value = $(speed_hideExpression_li[i]).attr("value");
|
||||
console.log(value);
|
||||
$("#"+speed_expression_id).attr("value", value)
|
||||
})
|
||||
}
|
||||
for (let i = 0;i <= hideExpression_li.length;i ++) {
|
||||
$(hideExpression_li[i]).click(() => {
|
||||
let value = $(hideExpression_li[i]).attr("value");
|
||||
console.log(value);
|
||||
$("#"+expression_id).attr("value", value)
|
||||
})
|
||||
}
|
@ -0,0 +1,201 @@
|
||||
// 《一级》导航栏切换-布局事件
|
||||
var NavigationBar = $(".Navigation-bar button");
|
||||
var chunks = $("*#chunks");
|
||||
localStorage.NavigationBarTemp;
|
||||
for(let i = 0;i <=NavigationBar.length;i ++) {
|
||||
$(NavigationBar[i]).click(()=>{
|
||||
console.log(".Navigation-bar: " + i);
|
||||
Level_1(i, true);
|
||||
localStorage.NavigationBarTemp = i;
|
||||
})
|
||||
}
|
||||
// 《一级》导航栏-布局初始化
|
||||
|
||||
if (localStorage.NavigationBarTemp == undefined) {
|
||||
localStorage.NavigationBarTemp = 0;
|
||||
Level_1(0 ,false);
} else {
|
||||
Level_1(localStorage.NavigationBarTemp, false);
|
||||
}
|
||||
// 《二级》导航栏-子分支切换导航栏 of resource
|
||||
var listUls = $(".listUl li");
|
||||
var chunksResourceBoxs = $("*.chunks-resource-box");
|
||||
localStorage.NavigationBar_listUlsTmep;
|
||||
for(let i = 0;i <=listUls.length;i ++) {
|
||||
$(listUls[i]).click(() => {
|
||||
console.log(i);
|
||||
Level_2(i);
|
||||
localStorage.NavigationBar_listUlsTmep = i;
|
||||
})
|
||||
$(listUls[i]).mouseover(()=>{
|
||||
Level_2_listUls(i);
|
||||
});
|
||||
$(listUls[i]).mouseout(() => {
|
||||
Level_2_listUls(localStorage.NavigationBar_listUlsTmep);
|
||||
});
|
||||
|
||||
}
|
||||
// 《二级》导航栏-子分支切换导航栏-布局初始化
|
||||
if (localStorage.NavigationBar_listUlsTmep == undefined) {
|
||||
Level_2(0);
|
||||
} else {
|
||||
Level_2(localStorage.NavigationBar_listUlsTmep);
|
||||
}
|
||||
|
||||
// 《二级》导航栏-子分支切换导航栏-按钮复制功能
|
||||
document.addEventListener('click', (e) => {
|
||||
copyed = [];
|
||||
/*
|
||||
e.target.innerHTML //获取元素
|
||||
e.target.innerText //获取文本
|
||||
e.target.nodeName //获取标签名
|
||||
*/
|
||||
if(e.target.id == "Copy_to_value")
|
||||
{
|
||||
copyHandle(e.target.value);
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
// .swith_cmd_Generator_way 切换指令生成方式
|
||||
localStorage.WayFocus; // 永久切换存储变量
|
||||
var SCGWs = $(".swith_cmd_Generator_way");
|
||||
for (let i = 0; i <= SCGWs.length; i++) {
|
||||
$(SCGWs[i]).click(() => {
|
||||
|
||||
slide_way(i)
|
||||
|
||||
localStorage.WayFocus = i
|
||||
})
|
||||
}
|
||||
slide_way(localStorage.WayFocus, false)
|
||||
if (localStorage.WayFocus == undefined) {
|
||||
slide_way(0);
|
||||
console.log(localStorage.WayFocus)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var wayTable = $(".wayTable"); // html 表格对象
|
||||
|
||||
// 方式切换的映射的 重要事件!
|
||||
$("#way").change(()=>{
|
||||
TWay();
|
||||
})
|
||||
// 初始化
|
||||
if (localStorage.TWay == undefined) {
|
||||
localStorage.TWay = "normal";
|
||||
|
||||
$("#way").val(localStorage.TWay);
|
||||
} else {
|
||||
$("#way").val(localStorage.TWay);
|
||||
|
||||
console.log(localStorage.TWay)
|
||||
|
||||
}
|
||||
if (localStorage.TWay_nth == undefined) {
|
||||
localStorage.TWay_nth = 0;
|
||||
for (let i = 0;i <= wayTable.length;i ++) $(wayTable[i]).hide()
|
||||
$(wayTable[localStorage.TWay_nth]).show()
|
||||
} else {
|
||||
for (let i = 0;i <= wayTable.length;i ++) $(wayTable[i]).hide()
|
||||
$(wayTable[localStorage.TWay_nth]).show()
|
||||
console.log(localStorage.TWay_nth)
|
||||
}
|
||||
|
||||
|
||||
// colorBlock 其他复制按钮
|
||||
var cmdIpt_copy = $(".cmdIpt_copy");
|
||||
|
||||
for (let i = 0;i <= cmdIpt_copy.length;i ++) {
|
||||
$(cmdIpt_copy[i]).click(() => {
|
||||
console.log(i)
|
||||
if (i == 0) copyHandle("/particleex clearparticle");
|
||||
if (i == 1) copyHandle("/particleex clearcache");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// colorBlock_version swithing - feed back
|
||||
var SPV = $(".switch_particle_version");
|
||||
|
||||
// intialize
|
||||
if (localStorage.SPVt == undefined) {
|
||||
$(SPV).html("⇋ 切换版本 1.16.5").css("color","#00aaff");
|
||||
localStorage.SPVt = 1;
|
||||
} else if (localStorage.SPVt == 1) {
|
||||
$(SPV).html("⇋ 切换版本 1.16.5").css("color","#00aaff");
|
||||
$("*.cmdName_select option").remove();
|
||||
} else {
|
||||
$(SPV).html("⇋ 切换版本 1.12.2").css("color","#e252ff");
|
||||
$("*.cmdName_select option").remove();
|
||||
}
|
||||
|
||||
// command_version swithing - inside event
|
||||
$(SPV).click(() => {
|
||||
|
||||
$("*.cmdName_select option").remove();
|
||||
|
||||
if (localStorage.SPVt == 1) {
|
||||
$(SPV).html("⇋ 切换版本 1.12.2").css("color","#e252ff");
|
||||
|
||||
for(let i = 0;i < old_particles.length;i ++) {
|
||||
$(".cmdName_select").append("<option value='"+ old_particles[i][0] +"'>"+ old_particles[i][1] +"</option>");
|
||||
}
|
||||
Messagebox("已切换为:JAVA 1.12.2 forge 版本", "info")
|
||||
localStorage.SPVt = 0;
|
||||
} else {
|
||||
$(SPV).html("⇋ 切换版本 1.16.5").css("color","#00aaff");
|
||||
|
||||
for(let i = 0;i < new_particles.length;i ++) {
|
||||
$(".cmdName_select").append("<option value='"+ new_particles[i][0] +"'>"+ new_particles[i][1] +"</option>");
|
||||
}
|
||||
Messagebox("已切换为:JAVA 1.16.5 fabirc 版本", "info")
|
||||
localStorage.SPVt = 1;
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// 数据填充 of particle_data.js
|
||||
|
||||
// new particle
|
||||
for(let i = 0;i < new_particles.length;i ++) {
|
||||
|
||||
$(".chunks-resource-box-content").append("<button id='Copy_to_value' title='"+new_particles[i][0]+"' value='minecraft:"+new_particles[i][0]+"'>"+new_particles[i][1] +"</button>");
|
||||
$(".cmdName_select").append(`<option value='`+ new_particles[i][0] +`'>`+ new_particles[i][1] +`</option>`);
|
||||
}
|
||||
|
||||
// old particle
|
||||
$(".chunks-resource-box-content").append("<br><p class='CRB1_title'>JAVA 1.12.2</p>");
|
||||
for(let i = 0;i < old_particles.length;i ++) {
|
||||
|
||||
$(".chunks-resource-box-content").append("<button id='Copy_to_value' title='"+old_particles[i][0]+"' value='"+old_particles[i][0]+"'>"+old_particles[i][1] +"</button>");
|
||||
$("*#cmdName_select, #CB1_cmdName_select").append("<option value='"+ old_particles[i][0] +"'>"+ old_particles[i][1] +"</option>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 黑色透明遮罩 单机自动关闭相关窗口事件
|
||||
$(".blackboard").click(() => {
|
||||
$(".autoClose").css({'transition':'240ms','transform':'scale(0.9)','opacity':'0','pointer-events':'none'})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,193 @@
|
||||
// 声明滚动区域
|
||||
let tutorialScroll = $("#tutorial");
|
||||
// 声明滚动导航列表
|
||||
let tutorial_lists = $("#tutorial_list li");
|
||||
// 声明目标滚动元素
|
||||
let units = $("#tutorial #unit");
|
||||
// 单元与文档顶部的相对距离数组
|
||||
var unitTopArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||
|
||||
// 遍历获取相对距离
|
||||
for (let i = 0; i < tutorial_lists.length; i++) {
|
||||
unitTopArr[i] += Math.round($(units[i]).offset().top - 70, 0);
|
||||
}
|
||||
console.log(unitTopArr)
|
||||
for (let i = 0; i < tutorial_lists.length; i++) {
|
||||
$(tutorial_lists[i]).click(() => {
|
||||
// 获取需滚动目标的 Y 位置值
|
||||
console.log("tutorial nth: " + i);
|
||||
|
||||
|
||||
// 滚动 ing
|
||||
$('#tutorial').animate({
|
||||
scrollTop: unitTopArr[i]
|
||||
}, 300);
|
||||
|
||||
// 高亮显示
|
||||
for (let j = 0; j < tutorial_lists.length; j++) {
|
||||
$(units[j]).css({
|
||||
'color': '#333'
|
||||
})
|
||||
}
|
||||
$(units[i]).css({
|
||||
'color': 'red'
|
||||
})
|
||||
setTimeout(() => {
|
||||
$(units[i]).css({
|
||||
'color': '#333'
|
||||
})
|
||||
}, 300)
|
||||
});
|
||||
}
|
||||
|
||||
$(tutorialScroll).on('scroll', () => {
|
||||
let scrollTop = $(tutorialScroll).scrollTop() - 50;
|
||||
// console.log(scrollTop);
|
||||
for (let i = 0; i < tutorial_lists.length; i++) {
|
||||
if (scrollTop < (unitTopArr[i] + unitTopArr[i]) / 2) {
|
||||
for (let j = 0; j < tutorial_lists.length; j++) {
|
||||
$(tutorial_lists[j]).css({
|
||||
'color': '#666',
|
||||
"font-weight": "300"
|
||||
})
|
||||
}
|
||||
$(tutorial_lists[i]).css({
|
||||
'color': '#0084ff',
|
||||
"font-weight": "600"
|
||||
})
|
||||
break;
|
||||
localStorage.ScrollTemp = unitTopArr[i];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".directory_head").click(() => {
|
||||
tutorial_list_toggle(false);
|
||||
});
|
||||
$(".return").click(() => {
|
||||
tutorial_list_toggle(false);
|
||||
});
|
||||
|
||||
// normal demo case (演示案例)
|
||||
let slide_cards = $(".slide_card .cardBox");
|
||||
for (let i = 0; i < slide_cards.length; i++) {
|
||||
$(slide_cards[i]).click(() => {
|
||||
if (i == 0)
|
||||
copyHandle(complete_command[4][2])
|
||||
else if (i == 1)
|
||||
copyHandle(complete_command[10][2])
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 效果演示栏 card 填充
|
||||
|
||||
// 相对映射数组
|
||||
let indexArr = [
|
||||
normal_index = [],
|
||||
parameter_index = [],
|
||||
polarparameter_index = []
|
||||
];
|
||||
// 相对映射计数 for 相对映射数组
|
||||
let countArr = [
|
||||
normal_count = 0,
|
||||
parameter_count = 0,
|
||||
polarparameter_count = 0
|
||||
];
|
||||
|
||||
// 遍历 - 分类统计
|
||||
for (let i = 0; i < complete_command.length; i++ ) {
|
||||
|
||||
let cmd = complete_command[i][2];
|
||||
|
||||
if (/\bnormal\b/.test(cmd)) {
|
||||
indexArr[0][countArr[0] ++] = i;
|
||||
|
||||
} else if (/\bparameter\b/.test(cmd) || /\btickparameter\b/.test(cmd) || /\brgbaparameter\b/.test(cmd) || /\btickrgbaparameter\b/.test(cmd)) {
|
||||
indexArr[1][countArr[1] ++] = i;
|
||||
|
||||
} else if (/\bpolarparameter\b/.test(cmd) || /\btickpolarparameter\b/.test(cmd) || /\brgbapolarparameter\b/.test(cmd) || /\btickrgbapolarparameter\b/.test(cmd)) {
|
||||
indexArr[2][countArr[2] ++] = i;
|
||||
}
|
||||
|
||||
}
|
||||
// 映射结果
|
||||
console.log(
|
||||
indexArr[0],
|
||||
indexArr[1],
|
||||
indexArr[2]
|
||||
)
|
||||
|
||||
let normal_bar = $(".slide_card:eq(0) .slide_area");
|
||||
let parameter_bar = $(".slide_card:eq(1) .slide_area");
|
||||
let polarparameter_bar = $(".slide_card:eq(2) .slide_area");
|
||||
|
||||
// 遍历输出 - 统计数据至 tutorial 类
|
||||
for (let i = 0; i < indexArr.length; i++) {
|
||||
for (let j = 0; j < indexArr[i].length; j++) {
|
||||
|
||||
// 定位作者空间链接
|
||||
let author_link;
|
||||
for (let k = 0; k < authors.length; k++) {
|
||||
if (complete_command[indexArr[i][j]][0] == authors[k][0]) {
|
||||
author_link = authors[k][1];
|
||||
// console.log(author_link)
|
||||
}
|
||||
}
|
||||
if (i == 0) {
|
||||
$(normal_bar).append(caseSkeleton(i, j, author_link))
|
||||
} else if (i == 1) {
|
||||
$(parameter_bar).append(caseSkeleton(i, j, author_link))
|
||||
} else if (i == 2) {
|
||||
$(polarparameter_bar).append(caseSkeleton(i, j, author_link))
|
||||
}
|
||||
let cardBox0 = $(".slide_card .slide_area:eq(0) .cardBox");
|
||||
let cardBox1 = $(".slide_card .slide_area:eq(1) .cardBox");
|
||||
let cardBox2 = $(".slide_card .slide_area:eq(2) .cardBox");
|
||||
|
||||
// 复制指令功能
|
||||
$(cardBox0[j]).on('click', () => {
|
||||
|
||||
let copyText = complete_command[indexArr[0][j]][2];
|
||||
copyHandle(copyText)
|
||||
console.log('筛选映射: ' + indexArr[0][j])
|
||||
});
|
||||
|
||||
$(cardBox1[j]).on('click', () => {
|
||||
|
||||
let copyText = complete_command[indexArr[1][j]][2];
|
||||
copyHandle(copyText)
|
||||
console.log('筛选映射: ' + indexArr[1][j])
|
||||
});
|
||||
|
||||
$(cardBox2[j]).on('click', () => {
|
||||
|
||||
let copyText = complete_command[indexArr[2][j]][2];
|
||||
copyHandle(copyText)
|
||||
console.log('筛选映射: ' + indexArr[2][j])
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function caseSkeleton(i, j, author_link) { // 数据骨架
|
||||
let case_txt = limit_stringLen(indexArr[i][j]);
|
||||
let case_skeleton = `
|
||||
<div class="cardBox bar">
|
||||
<div class='card' style="background-image: url('img/card/${ indexArr[i][j] }.jpg');">
|
||||
<h3>单击复制</h3>
|
||||
</div>
|
||||
<p class="complete_name">${ complete_command[indexArr[i][j]][1] }</p>
|
||||
<p style="text-indent: 8px!important;margin-top: 3px!important;">
|
||||
<span class="UP">UP</span>
|
||||
<a href="${ author_link }" title="查看 ${ complete_command[indexArr[i][j]][0] } 的空间" target="_blank">${ case_txt }</a>
|
||||
<span class="year">2023-6-18</span>
|
||||
</p>
|
||||
</div>`
|
||||
|
||||
return case_skeleton;
|
||||
}
|
||||
|