diff options
| author | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-22 13:52:04 +0900 |
|---|---|---|
| committer | Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> | 2026-10-22 13:52:04 +0900 |
| commit | 958ee87460019dc101418f1136ce49b7b593f3e3 (patch) | |
| tree | 4a6c75bb68721507268c9316073d0d7022f0b3c9 /public/bluebey-studio | |
| parent | 92b0483c65d2404a096d67a276395e9198499e95 (diff) | |
bluebey-studio: 通常ドラッグでカメラ中心点、Shiftでぶるべーを移動するよう入れ替え
Diffstat (limited to 'public/bluebey-studio')
| -rw-r--r-- | public/bluebey-studio/guide.html | 4 | ||||
| -rw-r--r-- | public/bluebey-studio/index.html | 2 | ||||
| -rw-r--r-- | public/bluebey-studio/src/main.js | 19 |
3 files changed, 13 insertions, 12 deletions
diff --git a/public/bluebey-studio/guide.html b/public/bluebey-studio/guide.html index 987c228..bf5cb36 100644 --- a/public/bluebey-studio/guide.html +++ b/public/bluebey-studio/guide.html @@ -110,8 +110,8 @@ </ol> <h3>パソコンでの操作</h3> <ul> - <li>ぶるべーをつかんでドラッグすると、姿を変えずに移動できます(カメラの基準点は動きません)。</li> - <li>Shift を押しながらドラッグすると、カメラ(見ている基準点)を動かせます。</li> + <li>ぶるべーをつかんでドラッグすると、カメラ(見ている基準点)を動かせます。</li> + <li>Shift を押しながらドラッグすると、ぶるべーを移動できます。</li> <li>向きは、全身とボーンのスライダーや回転ギズモで調整できます。</li> <li>モデルをクリックすると、その場所に近いボーンが選ばれます。</li> <li>「元に戻す/やり直す(パネル上部の矢印アイコン)」「すべてをランダムに(?!アイコン)」は、どのタブでも使えます。</li> diff --git a/public/bluebey-studio/index.html b/public/bluebey-studio/index.html index f4993e8..bc0730d 100644 --- a/public/bluebey-studio/index.html +++ b/public/bluebey-studio/index.html @@ -136,7 +136,7 @@ if (window.matchMedia('(max-width: 768px), (max-height: 500px) and (pointer: coa <h3>ポーズ</h3> <ul> <li>右パネルの「ポーズ」でボーンを選び、X/Y/Zのスライダーを動かします。「ポーズ例」から始めると早いです。</li> - <li>ぶるべーをつかんでドラッグすると移動できます。Shiftを押しながらドラッグすると、カメラ(見ている基準点)を動かせます。</li> + <li>ぶるべーをつかんでドラッグすると、カメラ(見ている基準点)を動かせます。Shiftを押しながらドラッグすると、ぶるべーを移動できます。</li> <li>モデルをクリックすると、その場所にいちばん近いボーンが選ばれます。</li> <li>ギズモ(回転の輪)を直接ドラッグしても回せます。</li> <li>スライダーの値は「休めの姿勢(レストポーズ)」からの差分です。<code>0,0,0</code> で元の姿勢。</li> diff --git a/public/bluebey-studio/src/main.js b/public/bluebey-studio/src/main.js index 063a6fc..8d69154 100644 --- a/public/bluebey-studio/src/main.js +++ b/public/bluebey-studio/src/main.js @@ -2320,11 +2320,12 @@ async function init() { help?.addEventListener('click', (event) => { if (event.target === help) toggleHelp(false); }); // --- the mouse on the character ---------------------------------------- - // Dragging the model slides it across the view; holding Shift and dragging - // moves the camera's reference point instead (the phone's two-finger drag). - // Bone posing lives in the panel, so the mouse never grabs a bone (see `Rig` - // in src/rig.js). On a small screen the panel is a sheet over the view, so a - // tap on the view first just dismisses the sheet. + // Dragging the model moves the camera's reference point, so the scene slides + // under the cursor; holding Shift and dragging moves the character itself. + // On touch, dragging the model always moves the character (the phone + // gestures). Bone posing lives in the panel, so the mouse never grabs a bone + // (see `Rig` in src/rig.js). On a small screen the panel is a sheet over the + // view, so a tap on the view first just dismisses the sheet. const dragRay = new THREE.Raycaster(); const dragNdc = new THREE.Vector2(); const dragHitAt = (event) => { @@ -2358,7 +2359,7 @@ async function init() { const root = state.pose.root ?? [0, 0, 0]; modelDrag = { pointerId: event.pointerId, - pan: event.shiftKey, + pan: event.pointerType === 'mouse' ? !event.shiftKey : false, x: event.clientX, y: event.clientY, lastX: event.clientX, @@ -2376,7 +2377,7 @@ async function init() { const dy = event.clientY - modelDrag.y; const k = dragScale(); if (modelDrag.pan) { - // Shift+drag: move the camera's reference point (the same effect as the + // Plain drag: move the camera's reference point (the same effect as the // two-finger drag on a phone). The character stays where it is. // Use the step since the previous event, not the total from the press: // pointermove fires many times per drag, so adding the total every time @@ -2395,8 +2396,8 @@ async function init() { for (const cam of Object.values(view.cameras ?? {})) cam.position.add(move); view.captureInto(state.view); } else { - // Plain drag: slide the character, leaving the camera's reference point - // alone (the one-finger drag on a phone). + // Shift+drag (or any touch drag on the character): slide the character, + // leaving the camera's reference point alone. state.pose.root = [ round2(modelDrag.root[0] + dx * k), round2(modelDrag.root[1] - dy * k), |
