aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bluebey-studio/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bluebey-studio/src/main.js')
-rw-r--r--public/bluebey-studio/src/main.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/public/bluebey-studio/src/main.js b/public/bluebey-studio/src/main.js
index 23ed017..20c6c7d 100644
--- a/public/bluebey-studio/src/main.js
+++ b/public/bluebey-studio/src/main.js
@@ -521,9 +521,9 @@ async function init() {
// Hats are built at runtime, so they are not in the GLB's mesh list. Register
// them with the style system (and the current hat) so they follow flat/line art
// and get an outline hull like every other part.
- hatStyleRegister = (mesh) => styles.addMesh(mesh, { tone: true });
+ hatStyleRegister = (mesh) => styles.addMesh(mesh, { tone: true, lineOnly: true });
hatStyleUnregister = (mesh) => styles.removeMesh(mesh);
- for (const mesh of hatMeshes) styles.addMesh(mesh, { tone: true });
+ for (const mesh of hatMeshes) styles.addMesh(mesh, { tone: true, lineOnly: true });
const face = new Face({
eyeMesh: model.parts.eyeMesh,
mouthMesh: model.parts.mouthMesh,
@@ -980,9 +980,10 @@ async function init() {
);
propRoot.add(group);
// Register with the style system, so フラット and 線画 reach the props too
- // and each part gets an outline hull like the body and the hats.
+ // and each part gets an outline hull like the body and the hats. `lineOnly`
+ // keeps that outline out of リアル/フラット, where the props read by shading.
group.traverse((object) => {
- if (object.isMesh) styles.addMesh(object);
+ if (object.isMesh) styles.addMesh(object, { lineOnly: true });
});
// 看板 only: paint the saved text onto the freshly built face (no-op for
// every other prop, which has no writing surface).
@@ -1839,6 +1840,8 @@ async function init() {
updateKeyLight();
key.intensity = state.render.lightIntensity;
ambient.intensity = state.render.ambient;
+ key.color.set(state.render.lightColor ?? '#ffffff');
+ ambient.color.set(state.render.ambientColor ?? '#ffffff');
renderer.toneMappingExposure = state.render.exposure;
applyBackground();
renderer.shadowMap.needsUpdate = true;