Skip to content

Commit

Permalink
Update for v0.19.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ButzYung committed Mar 17, 2024
1 parent 81bdbe2 commit 753308c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
15 changes: 11 additions & 4 deletions images/XR Animator/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,13 @@
"_translation_": {
"_default_": "Hip camera",
"ja": "ヒップカメラ",
"zh": "腰間鏡頭"
"zh": "腰間攝影機"
},
"tooltip": {
"_translation_": {
"_default_": "Hip camera:\nWhen enabled, this option captures your hip position during upper body mocap, but instead of transferring the position to the avatar, the position is used to animate the 3D camera. It's like being the motion actor and the camera man at the same time. Default is \"OFF\".",
"ja": "ヒップカメラ:\nこのオプションを有効にすると、上半身のモーキャプ中に腰の位置がキャプチャされますが、その位置はアバターに転送されるのではなく、3D カメラのアニメーション化に使用されます。 モーションアクターであると同時にカメラマンであるようなものです。 デフォルトは「OFF」です。",
"zh": "腰間鏡頭:\n當此設定為有效時,腰部位置的數據會在上半身動捕時被讀取。 而有別於全身動捕,數據會用作移動 3D 鏡頭而不是人物本身,彷彿同時擔當動作演員及攝影師雙重角色。 預設是「OFF」。"
"_default_": "Hip camera:\nWhen enabled, this option captures your hip position during upper body mocap, but instead of transferring the position to the avatar, the position is used to animate the 3D camera. It's like being the motion actor and the camera man at the same time. This option can be toggled via hotkey (<hotkey>). Default is \"OFF\".",
"ja": "ヒップカメラ:\nこのオプションを有効にすると、上半身のモーキャプ中に腰の位置がキャプチャされますが、その位置はアバターに転送されるのではなく、3D カメラのアニメーション化に使用されます。 モーションアクターであると同時にカメラマンであるようなものです。 このオプションはホットキー (<hotkey>) で切り替えることができます。 デフォルトは「OFF」です。",
"zh": "腰間攝影機:\n當此設定為有效時,腰部位置的數據會在上半身動捕時被讀取。 而有別於全身動捕,數據會用作移動 3D 鏡頭而不是人物本身,彷彿同時擔當動作演員及攝影師雙重角色。 可使用熱鍵 (<hotkey>) 隨時切換。 預設是「OFF」。"
}
}
},
Expand Down Expand Up @@ -1789,6 +1789,13 @@
"zh": " 切換自動「望向鏡頭」模式"
}
},
"hip_camera": {
"_translation_": {
"_default_": " to toggle hip camera mode",
"ja": "でヒップカメラを切り替える",
"zh": " 切換腰間攝影機模式"
}
},
"extra": {
"_translation_": {
"_default_": "・✔️Ctrl+L to toggle 3D camera lock\n・✔️Ctrl+M to mirror the current pose\n・✔️Pause to pause/resume mocap\n・✔️F9 to start video capture\n・✔️F10 to stop video capture\n・✔️F12 to capture still shot",
Expand Down
4 changes: 2 additions & 2 deletions js/SA_system_emulation.min.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions js/scene_auto_fit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// auto fit
// (2024-03-09)
// (2024-03-18)

const v1 = new THREE.Vector3();
const v2 = new THREE.Vector3();
Expand Down Expand Up @@ -749,15 +749,18 @@ function process_gesture() {
br = '上半身2';
break;
case "head":
br = model.get_bone_rotation_by_MMD_name('頭');
pt = model.get_bone_position_by_MMD_name('頭');//.add(v2.set(0, v2.fromArray(model.get_bone_origin_by_MMD_name('頭')).distanceTo(v3.fromArray(model.get_bone_origin_by_MMD_name('首'))), 0).applyQuaternion(br));
br = model.get_bone_rotation_by_MMD_name('頭');
break;
case "camera":
pt = MMD_SA._trackball_camera.object.position.clone();
break;
}

const pos_offset = v2.set(0,0,0);
if (condition.contact_target.position) pos_offset.copy(condition.contact_target.position);
pos_offset.add(_pos_offset);
pt.add(pos_offset.applyQuaternion((typeof br == 'string') ? model.get_bone_rotation_by_MMD_name(br) : br));
if (br) pt.add(pos_offset.applyQuaternion((typeof br == 'string') ? model.get_bone_rotation_by_MMD_name(br) : br));

let z_weight = (System._browser.camera.poseNet._upper_body_only_mode) ? 0.5 : 1/3;
pt.z = pt.z * z_weight + hand_pos.z * (1-z_weight);
Expand Down

0 comments on commit 753308c

Please sign in to comment.