aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/presets.js
diff options
context:
space:
mode:
authorYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 15:16:11 +0900
committerYasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com>2026-10-03 15:16:11 +0900
commit20e722e5ab241d0a2153a3fdcff8fc8fddf1361e (patch)
treeecc8ddeb0b7ce4e47f30d43c5b77d30c7540eb02 /public/bluebey-studio/src/presets.js
parentc6d1df09c66bcfe8388651866d26ed5d05b4d2d2 (diff)
public/bluebey-studio: 見えない壁を2枚にし、ぶるべーに追従させる
見えない壁は2枚まで置けるようにした(壁1・壁2)。板の位置はぶるべーからの相対で持ち、ぶるべーを動かすと壁も一緒に動くようにした。 地面(影を受ける板)が深度を書かないようにし、ぶるべーが地面より下に来ても体やテクスチャが隠れないようにした。
Diffstat (limited to 'public/bluebey-studio/src/presets.js')
-rw-r--r--public/bluebey-studio/src/presets.js38
1 files changed, 24 insertions, 14 deletions
diff --git a/public/bluebey-studio/src/presets.js b/public/bluebey-studio/src/presets.js
index 1130a67..12b14fd 100644
--- a/public/bluebey-studio/src/presets.js
+++ b/public/bluebey-studio/src/presets.js
@@ -40,6 +40,26 @@ function captionDefaults() {
};
}
+/**
+ * 見えない壁 (the invisible wall) settings. The studio offers two, so a corner (or
+ * two opposite cuts) can be made. A wall's position is kept *relative to the
+ * character*, so moving ぶるべー carries its walls along (see src/clip.js).
+ */
+function wallDefaults() {
+ return {
+ on: false,
+ x: 0, y: 0, z: 0, // a point the plane passes through, relative to the character
+ yaw: 0, // turn about Y, degrees
+ tilt: 0, // lean about X, degrees
+ // The guide is the only part of the wall that is ever *drawn* (the wall
+ // itself writes depth but no colour, so it hides what is behind it
+ // without being visible). `guide` shows that rectangle while placing,
+ // which is also when it can be dragged in the viewport.
+ guide: false,
+ size: 1, // the wall's size (a real width and height, not a clip)
+ };
+}
+
export function defaultState() {
return {
version: 1,
@@ -142,21 +162,11 @@ export function defaultState() {
// nothing is drawn along the meeting. Cleaner, but the leaves and
// the body merge into one white shape.
leafBodyLine: true,
- // 見えない壁 (the invisible wall). A placeable clipping plane that hides
- // whatever is behind it, so the character can be buried in the wall and
+ // 見えない壁 (the invisible wall). Up to two placeable rectangles that hide
+ // whatever is behind them, so the character can be buried in a wall and
// only the rest of the body shows. See src/clip.js.
- wall: {
- on: false,
- x: 0, y: 0, z: 0, // a point the plane passes through (world units)
- yaw: 0, // turn about Y, degrees
- tilt: 0, // lean about X, degrees
- // The guide is the only part of the wall that is ever *drawn* (the wall
- // itself writes depth but no colour, so it hides what is behind it
- // without being visible). `guide` shows that rectangle while placing,
- // which is also when it can be dragged in the viewport.
- guide: false,
- size: 1, // the wall's size (a real width and height, not a clip)
- },
+ wall: wallDefaults(),
+ wall2: wallDefaults(),
},
pose: {
bones: {}, // { boneName: [x, y, z] } in degrees, rest = 0,0,0