polats commited on
Commit
c3662d7
Β·
verified Β·
1 Parent(s): 8b1ebc8

Deploy Karate Wiener (kimodo kata maker)

Browse files
.gitattributes CHANGED
@@ -100,3 +100,12 @@ assets/default_scene.webp filter=lfs diff=lfs merge=lfs -text
100
  assets/citizen_skin_color.png filter=lfs diff=lfs merge=lfs -text
101
  comic_sheet_v0.png filter=lfs diff=lfs merge=lfs -text
102
  comic_koma_sample.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
100
  assets/citizen_skin_color.png filter=lfs diff=lfs merge=lfs -text
101
  comic_sheet_v0.png filter=lfs diff=lfs merge=lfs -text
102
  comic_koma_sample.png filter=lfs diff=lfs merge=lfs -text
103
+ comic_klein_out/final_bubbles_1234.png filter=lfs diff=lfs merge=lfs -text
104
+ comic_klein_out/final_bubbles_7.png filter=lfs diff=lfs merge=lfs -text
105
+ comic_klein_out/final_notext_1234.png filter=lfs diff=lfs merge=lfs -text
106
+ comic_klein_out/final_notext_7.png filter=lfs diff=lfs merge=lfs -text
107
+ comic_klein_out/raw_bubbles_1234.png filter=lfs diff=lfs merge=lfs -text
108
+ comic_klein_out/raw_bubbles_7.png filter=lfs diff=lfs merge=lfs -text
109
+ comic_klein_out/raw_notext_1234.png filter=lfs diff=lfs merge=lfs -text
110
+ comic_klein_out/raw_notext_7.png filter=lfs diff=lfs merge=lfs -text
111
+ comic_klein_test.png filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -1316,7 +1316,11 @@ def _render_preview_html(
1316
  let dojoSplatRoot = null;
1317
  let dojoSplatHelper = null;
1318
  let dojoSplatObjectUrl = null;
1319
- let dojoRoomSize = 8.0;
 
 
 
 
1320
  let dojoRoomHeight = 3.2;
1321
  let dojoSplatBaseBounds = null;
1322
  const dojoFloorSurfaceY = 0.0;
@@ -1546,7 +1550,9 @@ def _render_preview_html(
1546
  if (!dojoSplatRoot) return;
1547
  const robust = dojoSplatBaseBounds && dojoSplatBaseBounds.robust ? dojoSplatBaseBounds.robust : null;
1548
  const rawMax = robust && robust.footprint > 0 ? robust.footprint : (dojoSplatBaseBounds && dojoSplatBaseBounds.maxDim > 0 ? dojoSplatBaseBounds.maxDim : 1.0);
1549
- const target = Math.max(1.0, dojoRoomSize);
 
 
1550
  const scale = target / rawMax;
1551
  const localFloorY = robust ? robust.floorY : 0;
1552
  const localCenterX = robust ? (robust.minX + robust.maxX) * 0.5 : 0;
@@ -3316,7 +3322,7 @@ def _coerce_dojo_inputs(payload_json: str | dict | None) -> tuple[str, int, int,
3316
  mode = str(raw.get("mode") or "splat").strip().lower()
3317
  if mode not in ("splat", "panorama"):
3318
  mode = "splat"
3319
- room_size = float(raw.get("room_size", 8.0) if raw.get("room_size", 8.0) not in ("", None) else 8.0)
3320
  room_height = float(raw.get("room_height", 3.2) if raw.get("room_height", 3.2) not in ("", None) else 3.2)
3321
  use_panorama_skybox = bool(raw.get("use_panorama_skybox", False))
3322
  if seed < 0:
 
1316
  let dojoSplatRoot = null;
1317
  let dojoSplatHelper = null;
1318
  let dojoSplatObjectUrl = null;
1319
+ // Room size is the dojo FLOOR FOOTPRINT in world metres β€” the same units as the
1320
+ // ~1.7m character (SMPLX_HEIGHT). fitDojoSplat normalises every splat to this span,
1321
+ // so the character/room proportion is fixed: 6.5m β‰ˆ 3.8 character-heights across
1322
+ // (the character spans ~26% of the floor β€” a believable small dojo).
1323
+ let dojoRoomSize = 6.5;
1324
  let dojoRoomHeight = 3.2;
1325
  let dojoSplatBaseBounds = null;
1326
  const dojoFloorSurfaceY = 0.0;
 
1550
  if (!dojoSplatRoot) return;
1551
  const robust = dojoSplatBaseBounds && dojoSplatBaseBounds.robust ? dojoSplatBaseBounds.robust : null;
1552
  const rawMax = robust && robust.footprint > 0 ? robust.footprint : (dojoSplatBaseBounds && dojoSplatBaseBounds.maxDim > 0 ? dojoSplatBaseBounds.maxDim : 1.0);
1553
+ // Normalise the splat footprint to `dojoRoomSize` metres so it stays proportional
1554
+ // to the ~SMPLX_HEIGHT-tall character (room span β‰ˆ dojoRoomSize / 1.7 body-heights).
1555
+ const target = Math.max(SMPLX_HEIGHT * 1.5, dojoRoomSize);
1556
  const scale = target / rawMax;
1557
  const localFloorY = robust ? robust.floorY : 0;
1558
  const localCenterX = robust ? (robust.minX + robust.maxX) * 0.5 : 0;
 
3322
  mode = str(raw.get("mode") or "splat").strip().lower()
3323
  if mode not in ("splat", "panorama"):
3324
  mode = "splat"
3325
+ room_size = float(raw.get("room_size", 6.5) if raw.get("room_size", 6.5) not in ("", None) else 6.5)
3326
  room_height = float(raw.get("room_height", 3.2) if raw.get("room_height", 3.2) not in ("", None) else 3.2)
3327
  use_panorama_skybox = bool(raw.get("use_panorama_skybox", False))
3328
  if seed < 0:
comic_klein_out/final_bubbles_1234.png ADDED

Git LFS Details

  • SHA256: 3d6ab5edf1381aec5365442e4c92f6aef931c762bbaf5b7e64cf81d606501e9e
  • Pointer size: 131 Bytes
  • Size of remote file: 816 kB
comic_klein_out/final_bubbles_7.png ADDED

Git LFS Details

  • SHA256: 798cfb196175e71da6386d653ddd5cd93ebb9077dfd447f1e140e96bdd51f540
  • Pointer size: 131 Bytes
  • Size of remote file: 883 kB
comic_klein_out/final_notext_1234.png ADDED

Git LFS Details

  • SHA256: 6d5606e5bbe275d8d4471f8b4908be41cfffc9863d2e0719d2e4f6ca0ab7dade
  • Pointer size: 131 Bytes
  • Size of remote file: 849 kB
comic_klein_out/final_notext_7.png ADDED

Git LFS Details

  • SHA256: e00b5713cb41565aabf49595a30468c808cd3a4437f9f4eb685a2aef82baf790
  • Pointer size: 131 Bytes
  • Size of remote file: 883 kB
comic_klein_out/raw_bubbles_1234.png ADDED

Git LFS Details

  • SHA256: eb17f101e5db63014be0564e0e553f5045c6491696d411634b4fdd7b17d1db26
  • Pointer size: 131 Bytes
  • Size of remote file: 822 kB
comic_klein_out/raw_bubbles_7.png ADDED

Git LFS Details

  • SHA256: ef8fd613da4838d76591192b6d28256f1ec081651bb2bda142a6c623a6e75a7e
  • Pointer size: 131 Bytes
  • Size of remote file: 893 kB
comic_klein_out/raw_notext_1234.png ADDED

Git LFS Details

  • SHA256: 761d7259269ffc226bd60c21745ed86120215675056034414b07d5006d739669
  • Pointer size: 131 Bytes
  • Size of remote file: 860 kB
comic_klein_out/raw_notext_7.png ADDED

Git LFS Details

  • SHA256: b8a31cec25b993a37f138409d1fa0ac6976be528b31baa279a4a390410029e5c
  • Pointer size: 131 Bytes
  • Size of remote file: 893 kB
comic_klein_test.png ADDED

Git LFS Details

  • SHA256: 65e97d924b870690dc12c157eba8a95aa7b83b907d8ae1efbbb6e9548ff05ded
  • Pointer size: 132 Bytes
  • Size of remote file: 2.34 MB
tabs/dojo.drawer.html CHANGED
@@ -52,8 +52,8 @@
52
  <span>Use panorama as skybox in splat</span>
53
  </label>
54
  <label class="kimodo-dojo-range" for="kimodo-dojo-room-size">
55
- <span>Room size <output id="kimodo-dojo-room-size-value">8.0</output>m</span>
56
- <input id="kimodo-dojo-room-size" type="range" min="3" max="14" value="8" step="0.5" />
57
  </label>
58
  <label class="kimodo-dojo-range" for="kimodo-dojo-room-height">
59
  <span>Room height <output id="kimodo-dojo-room-height-value">3.2</output>m</span>
 
52
  <span>Use panorama as skybox in splat</span>
53
  </label>
54
  <label class="kimodo-dojo-range" for="kimodo-dojo-room-size">
55
+ <span>Room size <output id="kimodo-dojo-room-size-value">6.5</output>m <small style="color:#8a7a5a">(β‰ˆ char Γ—<span id="kimodo-dojo-room-ratio">3.8</span>)</small></span>
56
+ <input id="kimodo-dojo-room-size" type="range" min="3" max="14" value="6.5" step="0.5" />
57
  </label>
58
  <label class="kimodo-dojo-range" for="kimodo-dojo-room-height">
59
  <span>Room height <output id="kimodo-dojo-room-height-value">3.2</output>m</span>
tabs/dojo.tab.js CHANGED
@@ -9,11 +9,11 @@
9
  // Community starters β€” tapping one opens the create view prefilled, so generating
10
  // produces a real flux + splat scene (which then lands under "Mine").
11
  const COMMUNITY_SEED = [
12
- { name: 'Classic dojo', mode: 'splat', settings: { room_size: 8, room_height: 3.2 },
13
  prompt: 'A traditional martial arts dojo room, polished wooden floor, training mats, wooden wall panels, warm lantern light, full room visible, high detail, no people, no text.' },
14
- { name: 'Mountain dojo', mode: 'panorama', settings: { room_size: 10, room_height: 4 },
15
  prompt: 'An outdoor mountain dojo courtyard at sunrise, stone tiles, wooden gates, misty trees, full environment visible, high detail, no people, no text.' },
16
- { name: 'Neon dojo', mode: 'splat', settings: { room_size: 8, room_height: 3.2 },
17
  prompt: 'A futuristic neon martial arts training room, glossy floor, holographic wall panels, dramatic rim light, full room visible, no people, no text.' }
18
  ];
19
 
@@ -129,7 +129,7 @@
129
  function roomSettings() {
130
  const els = dojoEls();
131
  return {
132
- room_size: Math.max(1, Number(els.roomSize && els.roomSize.value) || 8),
133
  room_height: Math.max(1, Number(els.roomHeight && els.roomHeight.value) || 3.2),
134
  use_panorama_skybox: !!(els.skybox && els.skybox.checked)
135
  };
@@ -145,11 +145,14 @@
145
  if (frame && frame.contentWindow) frame.contentWindow.postMessage({ kind: 'dojo-scene', scene: payload, image: payload.image }, '*');
146
  }
147
 
 
148
  function updateRoomLabels() {
149
  const els = dojoEls();
150
  const settings = roomSettings();
151
  if (els.roomSizeValue) els.roomSizeValue.textContent = settings.room_size.toFixed(1);
152
  if (els.roomHeightValue) els.roomHeightValue.textContent = settings.room_height.toFixed(1);
 
 
153
  }
154
 
155
  function sendRoomSettings() {
 
9
  // Community starters β€” tapping one opens the create view prefilled, so generating
10
  // produces a real flux + splat scene (which then lands under "Mine").
11
  const COMMUNITY_SEED = [
12
+ { name: 'Classic dojo', mode: 'splat', settings: { room_size: 6.5, room_height: 3.2 },
13
  prompt: 'A traditional martial arts dojo room, polished wooden floor, training mats, wooden wall panels, warm lantern light, full room visible, high detail, no people, no text.' },
14
+ { name: 'Mountain dojo', mode: 'splat', settings: { room_size: 7.5, room_height: 4 },
15
  prompt: 'An outdoor mountain dojo courtyard at sunrise, stone tiles, wooden gates, misty trees, full environment visible, high detail, no people, no text.' },
16
+ { name: 'Neon dojo', mode: 'splat', settings: { room_size: 6.5, room_height: 3.2 },
17
  prompt: 'A futuristic neon martial arts training room, glossy floor, holographic wall panels, dramatic rim light, full room visible, no people, no text.' }
18
  ];
19
 
 
129
  function roomSettings() {
130
  const els = dojoEls();
131
  return {
132
+ room_size: Math.max(1, Number(els.roomSize && els.roomSize.value) || 6.5),
133
  room_height: Math.max(1, Number(els.roomHeight && els.roomHeight.value) || 3.2),
134
  use_panorama_skybox: !!(els.skybox && els.skybox.checked)
135
  };
 
145
  if (frame && frame.contentWindow) frame.contentWindow.postMessage({ kind: 'dojo-scene', scene: payload, image: payload.image }, '*');
146
  }
147
 
148
+ var CHAR_HEIGHT_M = 1.7; // character β‰ˆ SMPLX_HEIGHT β€” room size is shown relative to it
149
  function updateRoomLabels() {
150
  const els = dojoEls();
151
  const settings = roomSettings();
152
  if (els.roomSizeValue) els.roomSizeValue.textContent = settings.room_size.toFixed(1);
153
  if (els.roomHeightValue) els.roomHeightValue.textContent = settings.room_height.toFixed(1);
154
+ const ratio = document.getElementById('kimodo-dojo-room-ratio');
155
+ if (ratio) ratio.textContent = (settings.room_size / CHAR_HEIGHT_M).toFixed(1);
156
  }
157
 
158
  function sendRoomSettings() {