-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 320f2ad
Showing
564 changed files
with
19,744 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
|
||
# change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# we recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[{package,bower}.json] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.DS_Store | ||
node_modules/ | ||
/dist/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Document</title> | ||
</head> | ||
<style> | ||
label { | ||
display: block; | ||
cursor: pointer; | ||
} | ||
</style> | ||
<body> | ||
<h3>模型加载有问提请刷新页面重新点击</h3> | ||
<h4>模型加载可能会慢</h4> | ||
<div class="radio-container"></div> | ||
</body> | ||
<script src="./L2Dwidget.min.js"></script> | ||
<script> | ||
const radioContainer = document.querySelector('.radio-container') | ||
const model = ['live2d-widget-model-chitose', | ||
'live2d-widget-model-epsilon2_1', | ||
'live2d-widget-model-gf', | ||
'live2d-widget-model-haru-01', | ||
'live2d-widget-model-haru-02', | ||
'live2d-widget-model-haruto', | ||
'live2d-widget-model-hibiki', | ||
'live2d-widget-model-hijiki', | ||
'live2d-widget-model-izumi', | ||
'live2d-widget-model-koharu', | ||
'live2d-widget-model-miku', | ||
'live2d-widget-model-ni-j', | ||
'live2d-widget-model-nico', | ||
'live2d-widget-model-nietzsche', | ||
'live2d-widget-model-nipsilon', | ||
'live2d-widget-model-nito', | ||
'live2d-widget-model-shizuku', | ||
'live2d-widget-model-tororo', | ||
'live2d-widget-model-tsumiki', | ||
'live2d-widget-model-unitychan', | ||
'live2d-widget-model-wanko', | ||
'live2d-widget-model-z16',] | ||
const modelData = [ | ||
{ | ||
name: 'live2d-widget-model-z16', | ||
dir: './live2d-widget-model-z16/assets/z16.model.json', | ||
width: 150, | ||
height: 300 | ||
}, | ||
{ | ||
name: 'live2d-widget-model-wanko', | ||
dir: './live2d-widget-model-wanko/assets/wanko.model.json', | ||
width: 200, | ||
height: 200 | ||
}, { | ||
name: 'live2d-widget-model-unitychan', | ||
dir: './live2d-widget-model-unitychan/assets/unitychan.model.json', | ||
width: 200, | ||
height: 200 | ||
}, { | ||
name: 'live2d-widget-model-tsumiki', | ||
dir: './live2d-widget-model-tsumiki/assets/tsumiki.model.json', | ||
width: 150, | ||
height: 300 | ||
}, { | ||
name: 'live2d-widget-model-tororo', | ||
dir: './live2d-widget-model-tororo/assets/tororo.model.json', | ||
width: 150, | ||
height: 300 | ||
}, { | ||
name: 'live2d-widget-model-tororo', | ||
dir: './live2d-widget-model-tororo/assets/tororo.model.json', | ||
width: 150, | ||
height: 300 | ||
}, { | ||
name: 'live2d-widget-model-shizuku', | ||
dir: './live2d-widget-model-shizuku/assets/shizuku.model.json', | ||
width: 150, | ||
height: 300 | ||
}, | ||
{ | ||
name: 'live2d-widget-model-nito', | ||
dir: './live2d-widget-model-nito/assets/nito.model.json', | ||
width: 200, | ||
height: 200 | ||
}, | ||
{ | ||
name: 'live2d-widget-model-nipsilon', | ||
dir: './live2d-widget-model-nito/assets/nito.model.json', | ||
width: 200, | ||
height: 200 | ||
}, | ||
{ | ||
name: 'live2d-widget-model-nietzsche', | ||
dir: './live2d-widget-model-nietzsche/assets/nietzche.model.json', | ||
width: '', | ||
height: '' | ||
}, { | ||
name: '', | ||
dir: '', | ||
width: '', | ||
height: '' | ||
}, { | ||
name: '', | ||
dir: '', | ||
width: '', | ||
height: '' | ||
}, { | ||
name: '', | ||
dir: '', | ||
width: '', | ||
height: '' | ||
}, { | ||
name: '', | ||
dir: '', | ||
width: '', | ||
height: '' | ||
}, { | ||
name: '', | ||
dir: '', | ||
width: '', | ||
height: '' | ||
}, | ||
] | ||
|
||
const radioHtml = model.reduce(((last, current) => last + `<label for="${current}"><input type="radio" id="${current}" name="modelName" class="modelRadio" value="${current}">${current}</label>`), '') | ||
|
||
radioContainer.innerHTML = radioHtml | ||
|
||
const radios = document.querySelectorAll('.modelRadio') | ||
|
||
radios.forEach((dom) => { | ||
dom.addEventListener('change', function () { | ||
|
||
let dir = '' | ||
|
||
switch(this.value){ | ||
case 'live2d-widget-model-gf': | ||
dir = `./${this.value}/assets/Gantzert_Felixander.model.json` | ||
break | ||
case 'live2d-widget-model-epsilon2_1': | ||
dir =`./${this.value}/assets/Epsilon2.1.model.json` | ||
break | ||
case 'live2d-widget-model-haru-01': | ||
dir = `./live2d-widget-model-haru/01/assets/haru01.model.json` | ||
break | ||
case 'live2d-widget-model-haru-02': | ||
dir = `./live2d-widget-model-haru/02/assets/haru02.model.json` | ||
break | ||
case 'live2d-widget-model-ni-j' : | ||
dir = `./${this.value}/assets/ni-j.model.json` | ||
break | ||
default: | ||
dir = `./${this.value}/assets/${this.value.split('-').splice(2).reverse().join('.')}.json` | ||
} | ||
|
||
L2Dwidget.init(getOptions(dir)) | ||
}) | ||
}) | ||
</script> | ||
<script> | ||
|
||
|
||
function getOptions(dir) { | ||
return { | ||
model: { | ||
jsonPath: dir, | ||
}, | ||
display: { | ||
superSample: 2, | ||
width: 150, | ||
height: 300, | ||
position: 'right', | ||
hOffset: 0, | ||
vOffset: 0, | ||
}, | ||
mobile: { | ||
show: true, | ||
scale: 1, | ||
motion: true, | ||
}, | ||
react: { | ||
opacityDefault: 0.85, | ||
opacityOnHover: 0.2, | ||
}, | ||
} | ||
|
||
} | ||
|
||
</script> | ||
<script> | ||
// live2d-widget-model-haru/01 (use npm install --save ) | ||
// live2d-widget-model-haru/02 (use npm install --save live2d-widget-model-haru) | ||
|
||
</script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"Sample 1.0.0","model":"moc/chitose.moc","textures":["moc/chitose.2048/texture_00.png"],"motions":{"null":[{"file":"mtn/chitose_handwave.mtn"},{"file":"mtn/chitose_kime01.mtn"},{"file":"mtn/chitose_kime02.mtn"}],"idle":[{"file":"mtn/chitose_idle.mtn"}]},"expressions":[{"name":"f01.exp.json","file":"exp/f01.exp.json"},{"name":"f02.exp.json","file":"exp/f02.exp.json"},{"name":"f03.exp.json","file":"exp/f03.exp.json"},{"name":"f04.exp.json","file":"exp/f04.exp.json"},{"name":"f05.exp.json","file":"exp/f05.exp.json"},{"name":"f06.exp.json","file":"exp/f06.exp.json"},{"name":"f07.exp.json","file":"exp/f07.exp.json"}],"physics":"chitose.physics.json","pose":"chitose.pose.json"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Physics","physics_hair":[{"label":"FRONT","setup":{"length":0.15,"regist":1,"mass":0.25},"src":[{"id":"PARAM_BODY_ANGLE_X","ptype":"x","scale":0.015,"weight":0.5},{"id":"PARAM_BODY_ANGLE_Z","ptype":"angle","scale":2.4,"weight":0.5},{"id":"PARAM_ANGLE_X","ptype":"x","scale":0.005,"weight":2},{"id":"PARAM_ANGLE_Z","ptype":"angle","scale":0.8,"weight":2}],"targets":[{"id":"PARAM_HAIR_FRONT","ptype":"angle","scale":0.025,"weight":1}]},{"label":"BACK","setup":{"length":0.2,"regist":1,"mass":0.5},"src":[{"id":"PARAM_BODY_ANGLE_X","ptype":"x","scale":0.015,"weight":0.5},{"id":"PARAM_BODY_ANGLE_Z","ptype":"angle","scale":2.4,"weight":0.5},{"id":"PARAM_ANGLE_X","ptype":"x","scale":0.005,"weight":2},{"id":"PARAM_ANGLE_Z","ptype":"angle","scale":0.8,"weight":2}],"targets":[{"id":"PARAM_HAIR_BACK","ptype":"angle","scale":0.025,"weight":1}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Pose","parts_visible":[{"group":[{"id":"PARTS_01_ARM_L_A"}]},{"group":[{"id":"PARTS_01_ARM_R_A"},{"id":"PARTS_01_ARM_R_B"}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_L_OPEN","val":0,"def":1},{"id":"PARAM_EYE_L_SMILE","val":1},{"id":"PARAM_EYE_R_OPEN","val":0,"def":1},{"id":"PARAM_EYE_R_SMILE","val":1},{"id":"PARAM_BROW_L_FORM","val":1},{"id":"PARAM_BROW_R_FORM","val":1},{"id":"PARAM_MOUTH_FORM","val":1}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_L_OPEN","val":0.86,"def":1},{"id":"PARAM_EYE_R_OPEN","val":0.86,"def":1},{"id":"PARAM_EYE_FORM","val":0.39},{"id":"PARAM_EYE_BALL_X","val":0.01},{"id":"PARAM_EYE_BALL_Y","val":-0.5},{"id":"PARAM_BROW_L_Y","val":0.35},{"id":"PARAM_BROW_R_Y","val":0.35},{"id":"PARAM_BROW_L_X","val":-0.5},{"id":"PARAM_BROW_R_X","val":-0.5},{"id":"PARAM_BROW_L_ANGLE","val":0.5},{"id":"PARAM_BROW_R_ANGLE","val":0.5},{"id":"PARAM_BROW_L_FORM","val":-1},{"id":"PARAM_BROW_R_FORM","val":-1},{"id":"PARAM_MOUTH_FORM","val":-1}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_FORM","val":-1},{"id":"PARAM_BROW_L_X","val":-0.76},{"id":"PARAM_BROW_R_X","val":-0.76},{"id":"PARAM_BROW_L_ANGLE","val":-0.65},{"id":"PARAM_BROW_R_ANGLE","val":-0.65},{"id":"PARAM_BROW_L_FORM","val":-1},{"id":"PARAM_BROW_R_FORM","val":-1},{"id":"PARAM_MOUTH_FORM","val":-2}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_L_OPEN","val":1.07,"def":1},{"id":"PARAM_EYE_R_OPEN","val":1.07,"def":1},{"id":"PARAM_EYE_FORM","val":0.68},{"id":"PARAM_BROW_L_Y","val":0.65},{"id":"PARAM_BROW_R_Y","val":0.65},{"id":"PARAM_BROW_L_X","val":-0.17},{"id":"PARAM_BROW_R_X","val":-0.17},{"id":"PARAM_BROW_L_ANGLE","val":0.32},{"id":"PARAM_BROW_R_ANGLE","val":0.31},{"id":"PARAM_BROW_L_FORM","val":-0.45},{"id":"PARAM_BROW_R_FORM","val":-0.46},{"id":"PARAM_MOUTH_FORM","val":-1.34},{"id":"PARAM_CHEEK","val":1}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_L_OPEN","val":1.05,"def":1},{"id":"PARAM_EYE_R_OPEN","val":1.05,"def":1},{"id":"PARAM_EYE_FORM","val":0.62},{"id":"PARAM_BROW_L_Y","val":1},{"id":"PARAM_BROW_R_Y","val":1},{"id":"PARAM_BROW_L_ANGLE","val":0.65},{"id":"PARAM_BROW_R_ANGLE","val":0.65},{"id":"PARAM_BROW_L_FORM","val":-0.55},{"id":"PARAM_BROW_R_FORM","val":-0.55},{"id":"PARAM_MOUTH_FORM","val":0.5},{"id":"PARAM_SWEAT","val":1}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Live2D Expression","fade_in":500,"fade_out":500,"params":[{"id":"PARAM_EYE_L_OPEN","val":1.3,"def":1},{"id":"PARAM_EYE_R_OPEN","val":1.3,"def":1},{"id":"PARAM_EYE_BALL_FORM","val":-1},{"id":"PARAM_BROW_L_Y","val":1},{"id":"PARAM_BROW_R_Y","val":1},{"id":"PARAM_BROW_L_X","val":0.45},{"id":"PARAM_BROW_R_X","val":0.45},{"id":"PARAM_BROW_L_ANGLE","val":-0.26},{"id":"PARAM_BROW_R_ANGLE","val":-0.26},{"id":"PARAM_BROW_L_FORM","val":0.75},{"id":"PARAM_BROW_R_FORM","val":0.75},{"id":"PARAM_MOUTH_FORM","val":-2},{"id":"PARAM_SWEAT","val":1}]} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
37 changes: 37 additions & 0 deletions
37
live2d-widget-model-chitose/assets/mtn/chitose_handwave.mtn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.