SHA256
Добавили свечение односторонних связей
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
client.version=1.20.31
|
client.version=1.20.32
|
||||||
server.version=1.16.19
|
server.version=1.16.19
|
||||||
|
|||||||
@@ -1020,17 +1020,25 @@ export function createForceGraph({ stage, model, onCenterTap, onNodeTap, onNodeL
|
|||||||
const strength = Math.max(0, Math.min(1, Number(ref?.strength) || Number(n.strength) || 0.5));
|
const strength = Math.max(0, Math.min(1, Number(ref?.strength) || Number(n.strength) || 0.5));
|
||||||
const opacity = Math.min(childOpacity, parentOpacity);
|
const opacity = Math.min(childOpacity, parentOpacity);
|
||||||
const shine = Boolean(parent.shining && n.shining) && !n.hidden;
|
const shine = Boolean(parent.shining && n.shining) && !n.hidden;
|
||||||
|
|
||||||
if (ref?.mutual === false) {
|
|
||||||
parts.push(...directedFriendEdgePaths(x1, y1, cpx, cpy, x2, y2, relationColor(relationType), opacity * 0.82));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let edgeStroke = relationColor(relationType);
|
let edgeStroke = relationColor(relationType);
|
||||||
if (reverseRelationType && reverseRelationType !== relationType) {
|
if (reverseRelationType && reverseRelationType !== relationType) {
|
||||||
const gradientId = `fg-relation-gradient-${gradientIndex++}`;
|
const gradientId = `fg-relation-gradient-${gradientIndex++}`;
|
||||||
defs.push(`<linearGradient id="${gradientId}" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="${relationColor(relationType)}"/><stop offset="100%" stop-color="${relationColor(reverseRelationType)}"/></linearGradient>`);
|
defs.push(`<linearGradient id="${gradientId}" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="${relationColor(relationType)}"/><stop offset="100%" stop-color="${relationColor(reverseRelationType)}"/></linearGradient>`);
|
||||||
edgeStroke = `url(#${gradientId})`;
|
edgeStroke = `url(#${gradientId})`;
|
||||||
}
|
}
|
||||||
|
if (ref?.mutual === false) {
|
||||||
|
if (shine) {
|
||||||
|
const gradientId = `fg-directed-shine-${gradientIndex++}`;
|
||||||
|
defs.push(`<linearGradient id="${gradientId}" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="${edgeStroke}" stop-opacity="0.98"/><stop offset="100%" stop-color="${edgeStroke}" stop-opacity="0.06"/></linearGradient>`);
|
||||||
|
const d = `M${x1.toFixed(1)} ${y1.toFixed(1)} Q${cpx.toFixed(1)} ${cpy.toFixed(1)} ${x2.toFixed(1)} ${y2.toFixed(1)}`;
|
||||||
|
parts.push(`<path class="fg-plasma-flare" d="${d}" style="stroke:url(#${gradientId})" stroke-dasharray="20 4" opacity="${(0.42 * opacity).toFixed(3)}" />`);
|
||||||
|
parts.push(`<path class="fg-plasma-tube" d="${d}" style="stroke:url(#${gradientId})" stroke-dasharray="20 4" opacity="${(0.85 * opacity).toFixed(3)}" />`);
|
||||||
|
parts.push(`<path class="fg-plasma-core" d="${d}" style="stroke:url(#${gradientId})" stroke-dasharray="20 4" opacity="${opacity.toFixed(3)}" />`);
|
||||||
|
} else {
|
||||||
|
parts.push(...directedFriendEdgePaths(x1, y1, cpx, cpy, x2, y2, edgeStroke, opacity * 0.82));
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (shine) {
|
if (shine) {
|
||||||
const pnx = -uy;
|
const pnx = -uy;
|
||||||
const pny = ux;
|
const pny = ux;
|
||||||
|
|||||||
Reference in New Issue
Block a user