@ikijs/editor 0.30.0 → 0.30.1
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/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2224,7 +2224,7 @@ import {
|
|
|
2224
2224
|
var SWAY_RANGE = 20;
|
|
2225
2225
|
var SWAY_CURVE = 1.4;
|
|
2226
2226
|
var HAIR_HANG = 0.35;
|
|
2227
|
-
var
|
|
2227
|
+
var LOCK_HANG = 0.45;
|
|
2228
2228
|
var Z_STOPS = [-30, 0, 30];
|
|
2229
2229
|
function localWarp(parameter, mesh, box, values, f) {
|
|
2230
2230
|
const pts = meshPoints(mesh, box);
|
|
@@ -2405,8 +2405,8 @@ function hairHangWeight(pivotY, bottom) {
|
|
|
2405
2405
|
if (bottom >= pivotY) return () => 0;
|
|
2406
2406
|
return (y) => HAIR_HANG * smoothstep(pivotY, bottom, y);
|
|
2407
2407
|
}
|
|
2408
|
-
function lockHangWeight(
|
|
2409
|
-
return
|
|
2408
|
+
function lockHangWeight(free) {
|
|
2409
|
+
return (y) => LOCK_HANG * free(y);
|
|
2410
2410
|
}
|
|
2411
2411
|
var round1 = (v) => roundTo(v, 0.1);
|
|
2412
2412
|
|
|
@@ -6809,14 +6809,18 @@ function buildPart(spec, b, order, frame, byRole, plan, frontGrid, lips) {
|
|
|
6809
6809
|
break;
|
|
6810
6810
|
case "hair_side_L":
|
|
6811
6811
|
case "hair_side_R": {
|
|
6812
|
-
const
|
|
6813
|
-
|
|
6814
|
-
weight: sideRootBlend(frame, spec.role, b).weight
|
|
6815
|
-
};
|
|
6812
|
+
const { rootEnd, weight } = sideRootBlend(frame, spec.role, b);
|
|
6813
|
+
const attach = { box: box("hair_front"), weight };
|
|
6816
6814
|
warps.push(
|
|
6817
6815
|
lockSway(P10.HairSwayX, mesh, b, swayAmp, attach),
|
|
6818
6816
|
lockSway(P10.HairSwayZ, mesh, b, swayAmp, attach),
|
|
6819
|
-
|
|
6817
|
+
// Under a roll it swings about its root, where it leaves the bangs.
|
|
6818
|
+
tiltHang(
|
|
6819
|
+
mesh,
|
|
6820
|
+
b,
|
|
6821
|
+
[(b.x0 + b.x1) / 2, rootEnd],
|
|
6822
|
+
lockHangWeight(weight)
|
|
6823
|
+
)
|
|
6820
6824
|
);
|
|
6821
6825
|
break;
|
|
6822
6826
|
}
|