Skip to content

Commit

Permalink
_ 开头的骨骼会发光
Browse files Browse the repository at this point in the history
为芙兰的翅膀和眼睛、蕾米的眼睛设置发光效果
  • Loading branch information
ENIACJushi committed Jul 11, 2024
1 parent 34cbb74 commit db35719
Show file tree
Hide file tree
Showing 21 changed files with 823 additions and 732 deletions.
72 changes: 72 additions & 0 deletions SkinPacksConvertor/子骨骼发光.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="utf-8" content="text/html; charset=GBK">
<meta name="viewport" content="width=device-width">
<title>子骨骼发光</title>
</head>
<body>
<h1>子骨骼发光</h1>

<div style="text-indent: 10px;">
<p>模型json</p>
<textarea id="input" name="input" style="padding:10px;" cols="100", rows="50"></textarea>
</div>

<button onclick="process()">处理</button>


<div style="text-indent: 10px;">
<p>输出</p>
<textarea id="output" name="output" style="padding:10px;" cols="100", rows="50"></textarea>
</div>



<hr>

<div style="text-indent: 10px;">

</div>

<!-- 样式 -->
<style type="text/css">
table td{padding:5px;}
</style>

<!-- 主要处理 -->
<script>
function process(){
let input = document.getElementById("input").value;
input = JSON.parse(input);

for(let key in input){
if(key !== "format_version"){
processBone(input[key]["bones"])
}
}

document.getElementById("output").value = JSON.stringify(input, "\n"," ");
}

function processBone(bones){
let _xxx = new Set();
for(let bone of bones){
if(bone["name"].substring(0, 1) === "_"){
_xxx.add(bone["name"]);
}
else if(_xxx.has(bone["parent"])){
bone["name"] = "_" + bone["name"];
_xxx.add(bone["name"]);
}
else if(_xxx.has("_" + bone["parent"])){
bone["parent"] = "_" + bone["parent"];
bone["name"] = "_" + bone["name"];
_xxx.add(bone["name"]);
}
}
}
</script>
</body>
</html>

2 changes: 1 addition & 1 deletion TouHouLittleMaid_RP/attachables/gohei/gohei_cherry.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"materials": {
"default": "entity_alphatest",
"enchanted": "entity_alphatest_glint",
"blending": "danmaku_emissive"
"blending": "danmaku_blending"
},
"textures": {
"default": "textures/items/hakurei_gohei_in_hand",
Expand Down
4 changes: 3 additions & 1 deletion TouHouLittleMaid_RP/entity/maid/maid.entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"materials": {
"default": "warden",
"wing_default": "wing_default",
"wind_solid": "warden"
"wind_solid": "warden",
"blending": "danmaku_blending",
"emissive": "entity_emissive_alpha"
},
"textures": {
"statue_base": "textures/entity/maid/statue_base",
Expand Down
12 changes: 5 additions & 7 deletions TouHouLittleMaid_RP/materials/entity.material
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"power_point:entity":{
"+defines": [ "USE_UV_ANIM", "ALPHA_TEST", "USE_EMISSIVE" ]
},
"danmaku_emissive:entity": {
"+defines": [ "USE_UV_ANIM", "ALPHA_TEST", "USE_EMISSIVE" ]
},
"danmaku_blending:entity": {
"+defines": [ "USE_UV_ANIM", "ALPHA_TEST", "USE_EMISSIVE" ],
"+states": [ "Blending", "DisableCulling","DisableDepthWrite"],
"blendSrc": "SourceAlpha",
"blendDst": "One"
"+states": ["Blending", "DisableCulling", "DisableDepthWrite"],
"+defines": ["USE_EMISSIVE", "USE_UV_ANIM"],
"-defines": ["FANCY"],
"blendSrc": "SourceAlpha",
"blendDst": "One"
},
"wing_default:entity":{
"+states":[
Expand Down
Loading

0 comments on commit db35719

Please sign in to comment.