wireface 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wireface.js +179 -41
- package/dist/wireface.min.js +1 -1
- package/examples/editor.html +273 -117
- package/package.json +1 -1
- package/wireface.js +179 -41
package/wireface.js
CHANGED
|
@@ -168,10 +168,25 @@
|
|
|
168
168
|
overlayTracksMesh: true,
|
|
169
169
|
moodTransitionTime: 0.6,
|
|
170
170
|
lineColor: '#ffffff', pupilColor: '#ffffff',
|
|
171
|
+
// Per-feature minimal-line overrides. null = inherit lineColor (backward
|
|
172
|
+
// compat with v1.0.x presets). Each feature can be hidden individually
|
|
173
|
+
// even when the master `minimal` is on. Each has its own thickness
|
|
174
|
+
// multiplier on top of the global `lineThickness`.
|
|
175
|
+
mouthColor: null, eyeColor: null, noseColor: null,
|
|
176
|
+
minimalMouth: true, minimalEyes: true, minimalNose: true, minimalBrows: true,
|
|
177
|
+
mouthLineThickness: 1.0, eyeLineThickness: 1.0, noseLineThickness: 1.0, browLineThickness: 1.0,
|
|
171
178
|
baseColor: '#ffffff', fadeColor: '#000000', depthFade: 0.0,
|
|
179
|
+
// exponent applied to the per-vertex fade weight. >1 darkens the back
|
|
180
|
+
// faster (so silhouette edges actually reach fadeColor in wire mode);
|
|
181
|
+
// <1 brightens it. 1.0 = linear, original behavior.
|
|
182
|
+
depthFadeCurve: 1.0,
|
|
172
183
|
irisColor: '#000000', irisSize: 1.6,
|
|
173
184
|
browColor: '#ffffff',
|
|
174
185
|
jawExtend: 0.0, mouthGrow: 0.0,
|
|
186
|
+
// experimental — static z push of upper-mouth and lower-jaw regions for
|
|
187
|
+
// animal / crocodile-mouth distortions. Stack on top of jawExtend (which
|
|
188
|
+
// is jawOpen-driven). Default 0 = current behavior.
|
|
189
|
+
upperJawProtrude: 0.0, lowerJawProtrude: 0.0,
|
|
175
190
|
cameraView: 'three-q', // initial view
|
|
176
191
|
};
|
|
177
192
|
|
|
@@ -272,15 +287,23 @@
|
|
|
272
287
|
wireMat.alpha = 1;
|
|
273
288
|
wireMat.useVertexColor = true;
|
|
274
289
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
290
|
+
/* one material per minimal-line feature so each can have its own color
|
|
291
|
+
independent of the others. lineColor is the shared fallback; if a
|
|
292
|
+
per-feature color (mouthColor/eyeColor/noseColor) is null the feature
|
|
293
|
+
inherits lineColor at apply time. */
|
|
294
|
+
function makeMinimalMat(name) {
|
|
295
|
+
const m = new BABYLON.StandardMaterial(name, scene);
|
|
296
|
+
m.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
|
297
|
+
m.disableLighting = true;
|
|
298
|
+
m.specularColor = new BABYLON.Color3(0, 0, 0);
|
|
299
|
+
return m;
|
|
300
|
+
}
|
|
301
|
+
const mouthMat = makeMinimalMat('mouthMat');
|
|
302
|
+
const eyeMat = makeMinimalMat('eyeMat');
|
|
303
|
+
const noseMat = makeMinimalMat('noseMat');
|
|
304
|
+
const browMat = makeMinimalMat('browMat');
|
|
305
|
+
// legacy alias — some downstream code still references minimalMat
|
|
306
|
+
const minimalMat = mouthMat;
|
|
284
307
|
|
|
285
308
|
const minimalGroup = new BABYLON.TransformNode('minimal', scene);
|
|
286
309
|
minimalGroup.parent = faceRoot;
|
|
@@ -311,8 +334,12 @@
|
|
|
311
334
|
let z = (1 - xRel*xRel * 0.55 - yRel*yRel * 0.55) * 0.22;
|
|
312
335
|
if (z < -0.05) z = -0.05;
|
|
313
336
|
|
|
314
|
-
// eye sockets recess (gaussian — broad and bowl-shaped)
|
|
315
|
-
|
|
337
|
+
// eye sockets recess (gaussian — broad and bowl-shaped).
|
|
338
|
+
// Centered at yRel=0.20 → UV v=0.40 to align with the eye opening
|
|
339
|
+
// (eye-hole puncture, minimal-line eyelid overlay, eye_blink shapes
|
|
340
|
+
// are all at v=0.40). Original v011 used yRel=0.30 which placed the
|
|
341
|
+
// bowl above the eye opening.
|
|
342
|
+
const eyeY = 0.20;
|
|
316
343
|
const eyeL_d = ((xRel + 0.45) / 0.30) ** 2 + ((yRel - eyeY) / 0.18) ** 2;
|
|
317
344
|
const eyeR_d = ((xRel - 0.45) / 0.30) ** 2 + ((yRel - eyeY) / 0.18) ** 2;
|
|
318
345
|
const eyeRecess = 0.045 * config.eyeDepth;
|
|
@@ -732,6 +759,45 @@
|
|
|
732
759
|
}
|
|
733
760
|
}
|
|
734
761
|
|
|
762
|
+
/* Static jaw-protrude passes — push the upper-mouth and lower-jaw
|
|
763
|
+
regions forward (z+) independent of jawOpen. Used together they
|
|
764
|
+
form the snout / animal / crocodile-mouth distortion. Each is a
|
|
765
|
+
smooth tent ramp in v-space:
|
|
766
|
+
- upper: peaks at v=0.62 (just above the mouth), tapers off by
|
|
767
|
+
v=0.45 (top) and v=0.72 (mouth line)
|
|
768
|
+
- lower: peaks at v=0.85 (chin tip), tapers off by v=0.70 (mouth)
|
|
769
|
+
and v=1.0 (bottom of grid)
|
|
770
|
+
Magnitude is `protrude * 0.18` for both — at amt=3 (slider max),
|
|
771
|
+
lower jaw juts forward ~0.54 z-units which is comparable to the
|
|
772
|
+
nose tip's z=0.22, giving a clearly elongated jaw silhouette. */
|
|
773
|
+
function applyUpperJawProtrude(disp) {
|
|
774
|
+
const amt = config.upperJawProtrude;
|
|
775
|
+
if (amt < 0.001) return;
|
|
776
|
+
const push = amt * 0.18;
|
|
777
|
+
for (let i = 0; i < baseUVs.length; i++) {
|
|
778
|
+
const v = baseUVs[i].v;
|
|
779
|
+
if (v < 0.45 || v > 0.72) continue;
|
|
780
|
+
// tent: 0 at edges, 1 at v=0.62
|
|
781
|
+
const w = v < 0.62 ? (v - 0.45) / 0.17 : (0.72 - v) / 0.10;
|
|
782
|
+
disp[i].z += push * w;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
function applyLowerJawProtrude(disp) {
|
|
786
|
+
const amt = config.lowerJawProtrude;
|
|
787
|
+
if (amt < 0.001) return;
|
|
788
|
+
const push = amt * 0.18;
|
|
789
|
+
for (let i = 0; i < baseUVs.length; i++) {
|
|
790
|
+
const v = baseUVs[i].v;
|
|
791
|
+
if (v < 0.70) continue;
|
|
792
|
+
// tent: 0 at v=0.70, 1 at v=0.85, tapers to 0.5 at v=1.0
|
|
793
|
+
let w;
|
|
794
|
+
if (v < 0.85) w = (v - 0.70) / 0.15;
|
|
795
|
+
else w = 1 - (v - 0.85) / 0.30; // ramp down past chin tip
|
|
796
|
+
if (w < 0) w = 0;
|
|
797
|
+
disp[i].z += push * w;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
735
801
|
function applyMouthAnchors(disp) {
|
|
736
802
|
if (!config.mouthAnchor) return;
|
|
737
803
|
const p = computeMouthParams();
|
|
@@ -894,12 +960,18 @@
|
|
|
894
960
|
return out;
|
|
895
961
|
}
|
|
896
962
|
|
|
897
|
-
|
|
898
|
-
|
|
963
|
+
/* makeTube creates a new tube OR updates an existing one in-place.
|
|
964
|
+
Final radius = baseRadius * featureMul * config.lineThickness — applied
|
|
965
|
+
in BOTH new and instance forms. Babylon's CreateTube instance-form
|
|
966
|
+
applies opts.radius every call (it does not preserve the radius from
|
|
967
|
+
construction), so updateMinimal MUST pass the current featureMul each
|
|
968
|
+
frame or the tube collapses to (base × 1 × lineThickness). */
|
|
969
|
+
function makeTube(name, points, radius, mat, featureMul, instance) {
|
|
970
|
+
const r = radius * (featureMul == null ? 1 : featureMul) * config.lineThickness;
|
|
899
971
|
const opts = { path: points, radius: r, tessellation: 6, updatable: true };
|
|
900
972
|
if (instance) opts.instance = instance;
|
|
901
973
|
const tube = BABYLON.MeshBuilder.CreateTube(name, opts, scene);
|
|
902
|
-
if (!instance) { tube.material =
|
|
974
|
+
if (!instance) { tube.material = mat || mouthMat; tube.parent = minimalGroup; }
|
|
903
975
|
return tube;
|
|
904
976
|
}
|
|
905
977
|
|
|
@@ -992,39 +1064,44 @@
|
|
|
992
1064
|
if (noseLeftMesh) { noseLeftMesh.dispose(); noseLeftMesh = null; }
|
|
993
1065
|
if (noseRightMesh) { noseRightMesh.dispose(); noseRightMesh = null; }
|
|
994
1066
|
const { upper, lower } = mouthLipPaths();
|
|
995
|
-
mouthUpperMesh = makeTube('mouth_u', upper, 0.010);
|
|
996
|
-
mouthLowerMesh = makeTube('mouth_l', lower, 0.010);
|
|
1067
|
+
mouthUpperMesh = makeTube('mouth_u', upper, 0.010, mouthMat, config.mouthLineThickness);
|
|
1068
|
+
mouthLowerMesh = makeTube('mouth_l', lower, 0.010, mouthMat, config.mouthLineThickness);
|
|
997
1069
|
for (const eye of eyeData) {
|
|
998
|
-
const u = makeTube('eye_' + eye.side + '_u', eyePath(eye, true), 0.0085);
|
|
999
|
-
const l = makeTube('eye_' + eye.side + '_l', eyePath(eye, false), 0.0085);
|
|
1070
|
+
const u = makeTube('eye_' + eye.side + '_u', eyePath(eye, true), 0.0085, eyeMat, config.eyeLineThickness);
|
|
1071
|
+
const l = makeTube('eye_' + eye.side + '_l', eyePath(eye, false), 0.0085, eyeMat, config.eyeLineThickness);
|
|
1000
1072
|
eyeMeshes.push({ eye, upper: u, lower: l });
|
|
1001
1073
|
}
|
|
1002
1074
|
for (const brow of browData) {
|
|
1003
|
-
const m = makeTube('brow_' + brow.side, browPath(brow), 0.011);
|
|
1004
|
-
m.material = browMat;
|
|
1075
|
+
const m = makeTube('brow_' + brow.side, browPath(brow), 0.011, browMat, config.browLineThickness);
|
|
1005
1076
|
browMeshes.push({ brow, mesh: m });
|
|
1006
1077
|
}
|
|
1007
1078
|
const np = nosePaths();
|
|
1008
|
-
noseBridgeMesh = makeTube('nose_b', np.bridge, 0.009);
|
|
1009
|
-
noseLeftMesh = makeTube('nose_l', np.leftN, 0.0085);
|
|
1010
|
-
noseRightMesh = makeTube('nose_r', np.rightN, 0.0085);
|
|
1079
|
+
noseBridgeMesh = makeTube('nose_b', np.bridge, 0.009, noseMat, config.noseLineThickness);
|
|
1080
|
+
noseLeftMesh = makeTube('nose_l', np.leftN, 0.0085, noseMat, config.noseLineThickness);
|
|
1081
|
+
noseRightMesh = makeTube('nose_r', np.rightN, 0.0085, noseMat, config.noseLineThickness);
|
|
1011
1082
|
applyMinimalVisibility();
|
|
1083
|
+
applyMinimalSubVisibility();
|
|
1012
1084
|
}
|
|
1013
1085
|
|
|
1014
1086
|
function updateMinimal() {
|
|
1015
1087
|
if (!mouthUpperMesh) return;
|
|
1088
|
+
// Babylon's CreateTube instance-form applies opts.radius EVERY call —
|
|
1089
|
+
// it doesn't preserve the radius from construction. So we must pass the
|
|
1090
|
+
// current per-feature thickness multiplier on every frame, otherwise
|
|
1091
|
+
// the tube collapses back to (base × 1 × lineThickness) and the
|
|
1092
|
+
// per-feature slider has no visible effect.
|
|
1016
1093
|
const mp = mouthLipPaths();
|
|
1017
|
-
makeTube('', mp.upper, 0.010, mouthUpperMesh);
|
|
1018
|
-
makeTube('', mp.lower, 0.010, mouthLowerMesh);
|
|
1094
|
+
makeTube('', mp.upper, 0.010, null, config.mouthLineThickness, mouthUpperMesh);
|
|
1095
|
+
makeTube('', mp.lower, 0.010, null, config.mouthLineThickness, mouthLowerMesh);
|
|
1019
1096
|
for (const em of eyeMeshes) {
|
|
1020
|
-
makeTube('', eyePath(em.eye, true), 0.0085, em.upper);
|
|
1021
|
-
makeTube('', eyePath(em.eye, false), 0.0085, em.lower);
|
|
1097
|
+
makeTube('', eyePath(em.eye, true), 0.0085, null, config.eyeLineThickness, em.upper);
|
|
1098
|
+
makeTube('', eyePath(em.eye, false), 0.0085, null, config.eyeLineThickness, em.lower);
|
|
1022
1099
|
}
|
|
1023
|
-
for (const bm of browMeshes) makeTube('', browPath(bm.brow), 0.011, bm.mesh);
|
|
1100
|
+
for (const bm of browMeshes) makeTube('', browPath(bm.brow), 0.011, null, config.browLineThickness, bm.mesh);
|
|
1024
1101
|
const np = nosePaths();
|
|
1025
|
-
makeTube('', np.bridge, 0.009, noseBridgeMesh);
|
|
1026
|
-
makeTube('', np.leftN, 0.0085, noseLeftMesh);
|
|
1027
|
-
makeTube('', np.rightN, 0.0085, noseRightMesh);
|
|
1102
|
+
makeTube('', np.bridge, 0.009, null, config.noseLineThickness, noseBridgeMesh);
|
|
1103
|
+
makeTube('', np.leftN, 0.0085, null, config.noseLineThickness, noseLeftMesh);
|
|
1104
|
+
makeTube('', np.rightN, 0.0085, null, config.noseLineThickness, noseRightMesh);
|
|
1028
1105
|
}
|
|
1029
1106
|
|
|
1030
1107
|
/* ── per-frame face update ── */
|
|
@@ -1045,6 +1122,8 @@
|
|
|
1045
1122
|
applyFeatureScales(_dispBuf);
|
|
1046
1123
|
applyJawExtension(_dispBuf);
|
|
1047
1124
|
applyMouthGrow(_dispBuf);
|
|
1125
|
+
applyUpperJawProtrude(_dispBuf);
|
|
1126
|
+
applyLowerJawProtrude(_dispBuf);
|
|
1048
1127
|
applyMouthAnchors(_dispBuf);
|
|
1049
1128
|
applyEyeAnchors(_dispBuf);
|
|
1050
1129
|
// write final positions
|
|
@@ -1054,12 +1133,20 @@
|
|
|
1054
1133
|
_posBuf[3*i+2] = baseVertices[i].z + _dispBuf[i].z;
|
|
1055
1134
|
}
|
|
1056
1135
|
mesh.updateVerticesData(BABYLON.VertexBuffer.PositionKind, _posBuf);
|
|
1057
|
-
// depth fade colors
|
|
1136
|
+
// depth fade colors. raw t = (zMax - z) / zRange, then exponentiated by
|
|
1137
|
+
// depthFadeCurve. >1 darkens back faster (so silhouette edges actually
|
|
1138
|
+
// hit fadeColor in wire mode despite line interpolation lifting them);
|
|
1139
|
+
// <1 brightens back. Then scaled by depthFade.
|
|
1058
1140
|
if (config.depthFade > 0.001) {
|
|
1059
|
-
const zRange = (_zMax - _zMin) || 1
|
|
1141
|
+
const zRange = (_zMax - _zMin) || 1;
|
|
1142
|
+
const f = config.depthFade;
|
|
1143
|
+
const curve = config.depthFadeCurve > 0 ? config.depthFadeCurve : 1;
|
|
1060
1144
|
for (let i = 0; i < baseVertices.length; i++) {
|
|
1061
1145
|
const z = _posBuf[3*i + 2];
|
|
1062
|
-
|
|
1146
|
+
let t = (_zMax - z) / zRange;
|
|
1147
|
+
if (t < 0) t = 0; else if (t > 1) t = 1;
|
|
1148
|
+
if (curve !== 1) t = Math.pow(t, curve);
|
|
1149
|
+
t *= f;
|
|
1063
1150
|
_colBuf[4*i ] = _baseRGB[0] * (1 - t) + _fadeRGB[0] * t;
|
|
1064
1151
|
_colBuf[4*i+1] = _baseRGB[1] * (1 - t) + _fadeRGB[1] * t;
|
|
1065
1152
|
_colBuf[4*i+2] = _baseRGB[2] * (1 - t) + _fadeRGB[2] * t;
|
|
@@ -1275,10 +1362,44 @@
|
|
|
1275
1362
|
}
|
|
1276
1363
|
}
|
|
1277
1364
|
|
|
1278
|
-
/* ── color application ──
|
|
1365
|
+
/* ── color application ──
|
|
1366
|
+
Per-feature mouth/eye/nose materials inherit lineColor when their
|
|
1367
|
+
per-feature override is null. So applyLineColor pushes into all three
|
|
1368
|
+
inheriting materials; the per-feature setters override that. */
|
|
1279
1369
|
function applyLineColor(hex) {
|
|
1280
1370
|
config.lineColor = hex;
|
|
1281
|
-
|
|
1371
|
+
const c = BABYLON.Color3.FromHexString(hex);
|
|
1372
|
+
if (!config.mouthColor) mouthMat.emissiveColor = c;
|
|
1373
|
+
if (!config.eyeColor) eyeMat.emissiveColor = c;
|
|
1374
|
+
if (!config.noseColor) noseMat.emissiveColor = c;
|
|
1375
|
+
}
|
|
1376
|
+
function applyMouthColor(hex) {
|
|
1377
|
+
config.mouthColor = hex;
|
|
1378
|
+
mouthMat.emissiveColor = BABYLON.Color3.FromHexString(hex || config.lineColor);
|
|
1379
|
+
}
|
|
1380
|
+
function applyEyeColor(hex) {
|
|
1381
|
+
config.eyeColor = hex;
|
|
1382
|
+
eyeMat.emissiveColor = BABYLON.Color3.FromHexString(hex || config.lineColor);
|
|
1383
|
+
}
|
|
1384
|
+
function applyNoseColor(hex) {
|
|
1385
|
+
config.noseColor = hex;
|
|
1386
|
+
noseMat.emissiveColor = BABYLON.Color3.FromHexString(hex || config.lineColor);
|
|
1387
|
+
}
|
|
1388
|
+
function applyBrowColor(hex) {
|
|
1389
|
+
config.browColor = hex;
|
|
1390
|
+
browMat.emissiveColor = BABYLON.Color3.FromHexString(hex);
|
|
1391
|
+
}
|
|
1392
|
+
/* per-feature visibility — independent of master `minimal` (which still
|
|
1393
|
+
hides the whole minimalGroup). Each feature toggles its own meshes. */
|
|
1394
|
+
function applyMinimalSubVisibility() {
|
|
1395
|
+
const setVis = (m, v) => { if (m) m.isVisible = v; };
|
|
1396
|
+
setVis(mouthUpperMesh, !!config.minimalMouth);
|
|
1397
|
+
setVis(mouthLowerMesh, !!config.minimalMouth);
|
|
1398
|
+
for (const em of eyeMeshes) { setVis(em.upper, !!config.minimalEyes); setVis(em.lower, !!config.minimalEyes); }
|
|
1399
|
+
for (const bm of browMeshes) setVis(bm.mesh, !!config.minimalBrows);
|
|
1400
|
+
setVis(noseBridgeMesh, !!config.minimalNose);
|
|
1401
|
+
setVis(noseLeftMesh, !!config.minimalNose);
|
|
1402
|
+
setVis(noseRightMesh, !!config.minimalNose);
|
|
1282
1403
|
}
|
|
1283
1404
|
function applyPupilColor(hex) {
|
|
1284
1405
|
config.pupilColor = hex;
|
|
@@ -1300,10 +1421,6 @@
|
|
|
1300
1421
|
config.irisColor = hex;
|
|
1301
1422
|
if (irisMat) irisMat.emissiveColor = BABYLON.Color3.FromHexString(hex);
|
|
1302
1423
|
}
|
|
1303
|
-
function applyBrowColor(hex) {
|
|
1304
|
-
config.browColor = hex;
|
|
1305
|
-
browMat.emissiveColor = BABYLON.Color3.FromHexString(hex);
|
|
1306
|
-
}
|
|
1307
1424
|
|
|
1308
1425
|
/* ── views ── */
|
|
1309
1426
|
const VIEWS = {
|
|
@@ -1335,8 +1452,12 @@
|
|
|
1335
1452
|
applyFadeColor(config.fadeColor);
|
|
1336
1453
|
applyLineColor(config.lineColor);
|
|
1337
1454
|
applyBrowColor(config.browColor);
|
|
1455
|
+
if (config.mouthColor) applyMouthColor(config.mouthColor);
|
|
1456
|
+
if (config.eyeColor) applyEyeColor(config.eyeColor);
|
|
1457
|
+
if (config.noseColor) applyNoseColor(config.noseColor);
|
|
1338
1458
|
applyPupilColor(config.pupilColor);
|
|
1339
1459
|
applyIrisColor(config.irisColor);
|
|
1460
|
+
applyMinimalSubVisibility();
|
|
1340
1461
|
applyGlow();
|
|
1341
1462
|
setView(config.cameraView);
|
|
1342
1463
|
|
|
@@ -1373,6 +1494,15 @@
|
|
|
1373
1494
|
if (rc.eyeHoleSize !== undefined && rc.eyeHoleSize !== config.eyeHoleSize) needRebuild = true;
|
|
1374
1495
|
if (rc.eyeDepth !== undefined && rc.eyeDepth !== config.eyeDepth) needRebuild = true;
|
|
1375
1496
|
|
|
1497
|
+
// any per-feature thickness change requires rebuilding the affected
|
|
1498
|
+
// tubes (CreateTube radius is fixed at construction)
|
|
1499
|
+
const featureThicknessChanged =
|
|
1500
|
+
rc.lineThickness !== undefined ||
|
|
1501
|
+
rc.mouthLineThickness !== undefined ||
|
|
1502
|
+
rc.eyeLineThickness !== undefined ||
|
|
1503
|
+
rc.noseLineThickness !== undefined ||
|
|
1504
|
+
rc.browLineThickness !== undefined;
|
|
1505
|
+
|
|
1376
1506
|
Object.assign(config, rc);
|
|
1377
1507
|
if (p.lineColor) applyLineColor(p.lineColor);
|
|
1378
1508
|
if (p.pupilColor) applyPupilColor(p.pupilColor);
|
|
@@ -1382,6 +1512,9 @@
|
|
|
1382
1512
|
if (rc.pupilColor) applyPupilColor(rc.pupilColor);
|
|
1383
1513
|
if (rc.irisColor) applyIrisColor(rc.irisColor);
|
|
1384
1514
|
if (rc.browColor) applyBrowColor(rc.browColor);
|
|
1515
|
+
if (rc.mouthColor !== undefined) applyMouthColor(rc.mouthColor);
|
|
1516
|
+
if (rc.eyeColor !== undefined) applyEyeColor(rc.eyeColor);
|
|
1517
|
+
if (rc.noseColor !== undefined) applyNoseColor(rc.noseColor);
|
|
1385
1518
|
|
|
1386
1519
|
if (needRebuild) {
|
|
1387
1520
|
rebuildMesh();
|
|
@@ -1393,10 +1526,15 @@
|
|
|
1393
1526
|
applyFaceFlip();
|
|
1394
1527
|
applyMeshVisibility();
|
|
1395
1528
|
applyMinimalVisibility();
|
|
1396
|
-
if (
|
|
1529
|
+
if (featureThicknessChanged) rebuildMinimalLines();
|
|
1397
1530
|
if (rc.irisSize !== undefined || rc.pupils !== undefined) rebuildPupils();
|
|
1398
1531
|
if (rc.lipVertAmp !== undefined || rc.lipPressForce !== undefined) identifyAnchorRings();
|
|
1399
1532
|
}
|
|
1533
|
+
// per-feature visibility toggles always apply (cheap; no rebuild)
|
|
1534
|
+
if (rc.minimalMouth !== undefined || rc.minimalEyes !== undefined ||
|
|
1535
|
+
rc.minimalNose !== undefined || rc.minimalBrows !== undefined) {
|
|
1536
|
+
applyMinimalSubVisibility();
|
|
1537
|
+
}
|
|
1400
1538
|
if (rc.glow !== undefined) applyGlow();
|
|
1401
1539
|
// channel gains
|
|
1402
1540
|
if (p.channelGains) {
|