@needle-tools/three-mesh-effects 0.0.0-stage → 0.1.0-alpha
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/LICENSE +21 -0
- package/README.md +88 -3
- package/build/deformation-runtime.js +2143 -0
- package/build/deformation-runtime.js.map +7 -0
- package/build/impostor-runtime-needle-engine.js +42 -0
- package/build/impostor-runtime-needle-engine.js.map +7 -0
- package/build/impostor-runtime.js +1333 -0
- package/build/impostor-runtime.js.map +7 -0
- package/build/internal/deformation/cloth-surface.js +288 -0
- package/build/internal/deformation/cloth-surface.js.map +7 -0
- package/build/internal/deformation/fur-surface.js +130 -0
- package/build/internal/deformation/fur-surface.js.map +7 -0
- package/build/internal/deformation/ik-constraints.js +44 -0
- package/build/internal/deformation/ik-constraints.js.map +7 -0
- package/build/internal/deformation/joints-json.js +197 -0
- package/build/internal/deformation/joints-json.js.map +7 -0
- package/build/internal/deformation/limits.js +16 -0
- package/build/internal/deformation/limits.js.map +7 -0
- package/build/internal/deformation/motion-settings.js +12 -0
- package/build/internal/deformation/motion-settings.js.map +7 -0
- package/build/internal/deformation/pin-cloth.js +196 -0
- package/build/internal/deformation/pin-cloth.js.map +7 -0
- package/build/internal/deformation/pin-ik.js +650 -0
- package/build/internal/deformation/pin-ik.js.map +7 -0
- package/build/internal/deformation/pin-types.js +12 -0
- package/build/internal/deformation/pin-types.js.map +7 -0
- package/build/internal/deformation/pin-wiggle.js +249 -0
- package/build/internal/deformation/pin-wiggle.js.map +7 -0
- package/build/internal/deformation/pose-slots.js +84 -0
- package/build/internal/deformation/pose-slots.js.map +7 -0
- package/build/internal/deformation/pose-timeline.js +210 -0
- package/build/internal/deformation/pose-timeline.js.map +7 -0
- package/build/internal/deformation/rig-drivers.js +48 -0
- package/build/internal/deformation/rig-drivers.js.map +7 -0
- package/build/internal/deformation/rig-extension.js +334 -0
- package/build/internal/deformation/rig-extension.js.map +7 -0
- package/build/internal/deformation/rig-runtime.js +2141 -0
- package/build/internal/deformation/rig-runtime.js.map +7 -0
- package/build/internal/deformation/wind.js +34 -0
- package/build/internal/deformation/wind.js.map +7 -0
- package/build/internal/impostor/impostor-metadata.js +77 -0
- package/build/internal/impostor/impostor-metadata.js.map +7 -0
- package/build/internal/impostor/impostor-node-material.js +1331 -0
- package/build/internal/impostor/impostor-node-material.js.map +7 -0
- package/build/internal/impostor/impostor-runtime-support.js +162 -0
- package/build/internal/impostor/impostor-runtime-support.js.map +7 -0
- package/build/internal/impostor/octahedral.js +232 -0
- package/build/internal/impostor/octahedral.js.map +7 -0
- package/build/internal/pixel-impostor/pixel-impostor-display.js +728 -0
- package/build/internal/pixel-impostor/pixel-impostor-display.js.map +7 -0
- package/build/internal/pixel-impostor/pixel-impostor-metadata.js +71 -0
- package/build/internal/pixel-impostor/pixel-impostor-metadata.js.map +7 -0
- package/build/internal/pixel-impostor/pixel-impostor-runtime.js +150 -0
- package/build/internal/pixel-impostor/pixel-impostor-runtime.js.map +7 -0
- package/build/internal/public/deformation-runtime.js +2143 -0
- package/build/internal/public/deformation-runtime.js.map +7 -0
- package/build/internal/public/impostor-runtime-needle-engine.js +42 -0
- package/build/internal/public/impostor-runtime-needle-engine.js.map +7 -0
- package/build/internal/public/impostor-runtime.js +1333 -0
- package/build/internal/public/impostor-runtime.js.map +7 -0
- package/build/internal/public/pixel-impostor-runtime.js +876 -0
- package/build/internal/public/pixel-impostor-runtime.js.map +7 -0
- package/build/internal/public/wrap-effects.js +5640 -0
- package/build/internal/public/wrap-effects.js.map +7 -0
- package/build/internal/rendering/skin-projection.js +4630 -0
- package/build/internal/rendering/skin-projection.js.map +7 -0
- package/build/internal/rendering/surface-query.js +4519 -0
- package/build/internal/rendering/surface-query.js.map +7 -0
- package/build/internal/rendering/wireframe.js +112 -0
- package/build/internal/rendering/wireframe.js.map +7 -0
- package/build/internal/rendering/wrap-preview-settings.js +126 -0
- package/build/internal/rendering/wrap-preview-settings.js.map +7 -0
- package/build/internal/rendering/wrap-preview.js +5610 -0
- package/build/internal/rendering/wrap-preview.js.map +7 -0
- package/build/internal/rendering/wrap-skin.js +4746 -0
- package/build/internal/rendering/wrap-skin.js.map +7 -0
- package/build/pixel-impostor-runtime.js +876 -0
- package/build/pixel-impostor-runtime.js.map +7 -0
- package/build/types/deformation/cloth-surface.d.ts +39 -0
- package/build/types/deformation/cloth-surface.js +1 -0
- package/build/types/deformation/fur-surface.d.ts +27 -0
- package/build/types/deformation/fur-surface.js +1 -0
- package/build/types/deformation/ik-constraints.d.ts +18 -0
- package/build/types/deformation/ik-constraints.js +1 -0
- package/build/types/deformation/joints-json.d.ts +17 -0
- package/build/types/deformation/joints-json.js +1 -0
- package/build/types/deformation/limits.d.ts +23 -0
- package/build/types/deformation/limits.js +1 -0
- package/build/types/deformation/motion-settings.d.ts +9 -0
- package/build/types/deformation/motion-settings.js +1 -0
- package/build/types/deformation/pin-cloth.d.ts +28 -0
- package/build/types/deformation/pin-cloth.js +1 -0
- package/build/types/deformation/pin-ik.d.ts +37 -0
- package/build/types/deformation/pin-ik.js +1 -0
- package/build/types/deformation/pin-types.d.ts +53 -0
- package/build/types/deformation/pin-types.js +1 -0
- package/build/types/deformation/pin-wiggle.d.ts +16 -0
- package/build/types/deformation/pin-wiggle.js +1 -0
- package/build/types/deformation/pose-slots.d.ts +41 -0
- package/build/types/deformation/pose-slots.js +1 -0
- package/build/types/deformation/pose-timeline.d.ts +65 -0
- package/build/types/deformation/pose-timeline.js +1 -0
- package/build/types/deformation/rig-drivers.d.ts +19 -0
- package/build/types/deformation/rig-drivers.js +1 -0
- package/build/types/deformation/rig-extension.d.ts +33 -0
- package/build/types/deformation/rig-extension.js +1 -0
- package/build/types/deformation/rig-runtime.d.ts +95 -0
- package/build/types/deformation/rig-runtime.js +1 -0
- package/build/types/deformation/wind.d.ts +16 -0
- package/build/types/deformation/wind.js +1 -0
- package/build/types/impostor/impostor-metadata.d.ts +61 -0
- package/build/types/impostor/impostor-metadata.js +1 -0
- package/build/types/impostor/impostor-node-material.d.ts +140 -0
- package/build/types/impostor/impostor-node-material.js +1 -0
- package/build/types/impostor/impostor-runtime-support.d.ts +52 -0
- package/build/types/impostor/impostor-runtime-support.js +1 -0
- package/build/types/impostor/octahedral.d.ts +84 -0
- package/build/types/impostor/octahedral.js +1 -0
- package/build/types/pixel-impostor/pixel-impostor-display.d.ts +48 -0
- package/build/types/pixel-impostor/pixel-impostor-display.js +1 -0
- package/build/types/pixel-impostor/pixel-impostor-metadata.d.ts +34 -0
- package/build/types/pixel-impostor/pixel-impostor-metadata.js +1 -0
- package/build/types/pixel-impostor/pixel-impostor-runtime.d.ts +18 -0
- package/build/types/pixel-impostor/pixel-impostor-runtime.js +1 -0
- package/build/types/public/deformation-runtime.d.ts +3 -0
- package/build/types/public/deformation-runtime.js +1 -0
- package/build/types/public/impostor-runtime-needle-engine.d.ts +31 -0
- package/build/types/public/impostor-runtime-needle-engine.js +1 -0
- package/build/types/public/impostor-runtime.d.ts +6 -0
- package/build/types/public/impostor-runtime.js +1 -0
- package/build/types/public/pixel-impostor-runtime.d.ts +3 -0
- package/build/types/public/pixel-impostor-runtime.js +1 -0
- package/build/types/public/wrap-effects.d.ts +4 -0
- package/build/types/public/wrap-effects.js +1 -0
- package/build/types/rendering/skin-projection.d.ts +44 -0
- package/build/types/rendering/skin-projection.js +1 -0
- package/build/types/rendering/surface-query.d.ts +66 -0
- package/build/types/rendering/surface-query.js +1 -0
- package/build/types/rendering/wireframe.d.ts +25 -0
- package/build/types/rendering/wireframe.js +1 -0
- package/build/types/rendering/wrap-preview-settings.d.ts +22 -0
- package/build/types/rendering/wrap-preview-settings.js +1 -0
- package/build/types/rendering/wrap-preview.d.ts +39 -0
- package/build/types/rendering/wrap-preview.js +1 -0
- package/build/types/rendering/wrap-skin.d.ts +14 -0
- package/build/types/rendering/wrap-skin.js +1 -0
- package/build/wrap-effects.js +5640 -0
- package/build/wrap-effects.js.map +7 -0
- package/package.json +94 -6
- package/src/deformation/cloth-surface.ts +223 -0
- package/src/deformation/fur-surface.ts +129 -0
- package/src/deformation/ik-constraints.ts +37 -0
- package/src/deformation/joints-json.ts +94 -0
- package/src/deformation/limits.ts +25 -0
- package/src/deformation/motion-settings.ts +9 -0
- package/src/deformation/pin-cloth.ts +149 -0
- package/src/deformation/pin-ik.ts +582 -0
- package/src/deformation/pin-types.ts +22 -0
- package/src/deformation/pin-wiggle.ts +119 -0
- package/src/deformation/pose-slots.ts +106 -0
- package/src/deformation/pose-timeline.ts +242 -0
- package/src/deformation/rig-drivers.ts +32 -0
- package/src/deformation/rig-extension.ts +87 -0
- package/src/deformation/rig-runtime.ts +416 -0
- package/src/deformation/wind.ts +36 -0
- package/src/impostor/impostor-metadata.js +137 -0
- package/src/impostor/impostor-node-material.js +1581 -0
- package/src/impostor/impostor-runtime-support.js +139 -0
- package/src/impostor/octahedral.js +280 -0
- package/src/pixel-impostor/pixel-impostor-display.js +794 -0
- package/src/pixel-impostor/pixel-impostor-metadata.js +74 -0
- package/src/pixel-impostor/pixel-impostor-runtime.js +78 -0
- package/src/public/deformation-runtime.ts +3 -0
- package/src/public/impostor-runtime-needle-engine.js +56 -0
- package/src/public/impostor-runtime.js +21 -0
- package/src/public/pixel-impostor-runtime.js +5 -0
- package/src/public/wrap-effects.js +21 -0
- package/src/rendering/skin-projection.js +113 -0
- package/src/rendering/surface-query.js +88 -0
- package/src/rendering/wireframe.js +115 -0
- package/src/rendering/wrap-preview-settings.js +123 -0
- package/src/rendering/wrap-preview.js +645 -0
- package/src/rendering/wrap-skin.js +109 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Quaternion, Vector3 } from 'three';
|
|
2
|
+
import type { PinRecord, Point } from './pin-types.js';
|
|
3
|
+
import type { PinParents, HierarchyEdge } from './pin-types.js';
|
|
4
|
+
import { windAcceleration } from './wind.js';
|
|
5
|
+
import { DEFAULT_MOTION } from './motion-settings.js';
|
|
6
|
+
|
|
7
|
+
export type ClothLink = { a: string; b: string; length: number };
|
|
8
|
+
export type ClothCollider = { position: Point; radius: number; driver?: string };
|
|
9
|
+
|
|
10
|
+
/** Connect authored cloth controls along the occupied-volume geodesic, not
|
|
11
|
+
* across the shortest line through empty space. The tree is a coarse fabric
|
|
12
|
+
* constraint network; the ordinary skin remains its portable GLB fallback. */
|
|
13
|
+
export function clothLinks(pins: readonly PinRecord[], parents: PinParents, edges: readonly HierarchyEdge[] = [], components?: ReadonlyMap<string, number>): ClothLink[] {
|
|
14
|
+
const cloth = pins.filter(p => p.cloth && !p.guide), byId = new Map(pins.map(p => [p.id, p]));
|
|
15
|
+
const result: ClothLink[] = [], seen = new Set<string>();
|
|
16
|
+
const add = (a: string, b: string) => {
|
|
17
|
+
if (a === b || !byId.has(a) || !byId.has(b)) return;
|
|
18
|
+
const key = [a, b].sort().join('\0'); if (seen.has(key)) return;
|
|
19
|
+
seen.add(key); result.push({ a, b, length: new Vector3().fromArray(byId.get(a)!.rest).distanceTo(new Vector3().fromArray(byId.get(b)!.rest)) });
|
|
20
|
+
};
|
|
21
|
+
for (const pin of cloth) {
|
|
22
|
+
let parent = parents.get(pin.id);
|
|
23
|
+
const visited = new Set<string>();
|
|
24
|
+
while (parent && byId.get(parent)?.guide && !visited.has(parent)) { visited.add(parent); parent = parents.get(parent); }
|
|
25
|
+
if (parent) add(pin.id, parent);
|
|
26
|
+
}
|
|
27
|
+
// A topology hierarchy may root a sheet at one of its free corners. Cloth
|
|
28
|
+
// still needs body attachments there; otherwise the entire sheet falls as
|
|
29
|
+
// one unconstrained pair or chain despite nearby non-cloth controls.
|
|
30
|
+
for (const pin of cloth) {
|
|
31
|
+
const parent = byId.get(parents.get(pin.id) ?? '');
|
|
32
|
+
if (parent && !parent.cloth && !parent.guide) continue;
|
|
33
|
+
const anchors = edges.filter(edge => (edge.from === pin.id || edge.to === pin.id) &&
|
|
34
|
+
!byId.get(edge.from === pin.id ? edge.to : edge.from)?.cloth &&
|
|
35
|
+
!byId.get(edge.from === pin.id ? edge.to : edge.from)?.guide &&
|
|
36
|
+
Number.isFinite(edge.geodesic ?? edge.cost));
|
|
37
|
+
const same = anchors.filter(edge => !components || components.get(pin.id) === components.get(edge.from === pin.id ? edge.to : edge.from));
|
|
38
|
+
const best = (same.length ? same : anchors).sort((a, b) => (a.geodesic ?? a.cost) - (b.geodesic ?? b.cost))[0];
|
|
39
|
+
if (best) add(pin.id, best.from === pin.id ? best.to : best.from);
|
|
40
|
+
}
|
|
41
|
+
const candidates = edges.filter(e => cloth.some(p => p.id === e.from) && cloth.some(p => p.id === e.to) && Number.isFinite(e.geodesic ?? e.cost)
|
|
42
|
+
&& (!components || components.get(e.from) === components.get(e.to)))
|
|
43
|
+
.sort((a, b) => (a.geodesic ?? a.cost) - (b.geodesic ?? b.cost));
|
|
44
|
+
const root = new Map(cloth.map(p => [p.id, p.id]));
|
|
45
|
+
const find = (id: string): string => { const parent = root.get(id)!; if (parent === id) return id; const top = find(parent); root.set(id, top); return top; };
|
|
46
|
+
for (const edge of candidates) {
|
|
47
|
+
const a = find(edge.from), b = find(edge.to); if (a === b) continue;
|
|
48
|
+
root.set(a, b); add(edge.from, edge.to);
|
|
49
|
+
}
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Small, fixed-step Verlet graph. The editor passes deformed voxel centers;
|
|
54
|
+
* the GLB loader passes the same collider proxy driven by its joint graph. */
|
|
55
|
+
export class PinCloth {
|
|
56
|
+
private particles = new Map<string, { position: Vector3; previous: Vector3 }>();
|
|
57
|
+
private layout = '';
|
|
58
|
+
private windTime = 0;
|
|
59
|
+
reset() { this.particles.clear(); this.layout = ''; this.windTime = 0; }
|
|
60
|
+
step(pins: readonly PinRecord[], parents: PinParents, seconds: number, links: readonly ClothLink[], colliders: readonly ClothCollider[] = [], windStrength = 0): { pins: readonly PinRecord[]; active: boolean } {
|
|
61
|
+
const cloth = pins.filter(p => p.cloth && !p.guide);
|
|
62
|
+
if (!cloth.length) { this.reset(); return { pins, active: false }; }
|
|
63
|
+
const layout = JSON.stringify([cloth.map(p => [p.id, p.rest]), links]);
|
|
64
|
+
if (layout !== this.layout) { this.reset(); this.layout = layout; }
|
|
65
|
+
const byId = new Map(pins.map(p => [p.id, p]));
|
|
66
|
+
for (const pin of cloth) if (!this.particles.has(pin.id)) {
|
|
67
|
+
const position = new Vector3().fromArray(pin.pose.position);
|
|
68
|
+
this.particles.set(pin.id, { position, previous: position.clone() });
|
|
69
|
+
}
|
|
70
|
+
const dt = Math.min(Math.max(seconds, 0), .05), steps = Math.max(1, Math.ceil(dt / (1 / 60))), h = dt / steps;
|
|
71
|
+
const scale = Math.max(1e-4, ...links.map(link => link.length));
|
|
72
|
+
// A sampled voxel shell can contain thousands of spheres. Bin it once
|
|
73
|
+
// per frame, then refresh each particle's nearby set after integration so
|
|
74
|
+
// a fast-moving cloth point cannot retain last frame's collision region.
|
|
75
|
+
let maxRadius = 0;
|
|
76
|
+
for (const collider of colliders) maxRadius = Math.max(maxRadius, collider.radius);
|
|
77
|
+
const cell = Math.max(1e-4, scale * 2 + maxRadius);
|
|
78
|
+
const spatial = cloth.length > 4 && colliders.length > 128;
|
|
79
|
+
const bins = new Map<string, ClothCollider[]>();
|
|
80
|
+
const key = (x: number, y: number, z: number) => `${x},${y},${z}`;
|
|
81
|
+
if (spatial) for (const collider of colliders) {
|
|
82
|
+
const p = collider.position, id = key(Math.floor(p[0] / cell), Math.floor(p[1] / cell), Math.floor(p[2] / cell));
|
|
83
|
+
const bin = bins.get(id) ?? []; bin.push(collider); bins.set(id, bin);
|
|
84
|
+
}
|
|
85
|
+
const candidates = (position: Vector3) => {
|
|
86
|
+
const found: ClothCollider[] = [];
|
|
87
|
+
const search = (collider: ClothCollider) => {
|
|
88
|
+
const p = collider.position, dx = position.x - p[0], dy = position.y - p[1], dz = position.z - p[2], reach = collider.radius + scale * 2;
|
|
89
|
+
if (dx * dx + dy * dy + dz * dz < reach * reach) found.push(collider);
|
|
90
|
+
};
|
|
91
|
+
if (spatial) {
|
|
92
|
+
const x = Math.floor(position.x / cell), y = Math.floor(position.y / cell), z = Math.floor(position.z / cell);
|
|
93
|
+
for (let dz = -1; dz <= 1; dz++) for (let dy = -1; dy <= 1; dy++) for (let dx = -1; dx <= 1; dx++)
|
|
94
|
+
for (const collider of bins.get(key(x + dx, y + dy, z + dz)) ?? []) search(collider);
|
|
95
|
+
} else for (const collider of colliders) search(collider);
|
|
96
|
+
return found;
|
|
97
|
+
};
|
|
98
|
+
for (let substep = 0; substep < steps && dt > 0; substep++) {
|
|
99
|
+
this.windTime += h;
|
|
100
|
+
for (const pin of cloth) {
|
|
101
|
+
const particle = this.particles.get(pin.id)!;
|
|
102
|
+
const motion = pin.motion ?? DEFAULT_MOTION;
|
|
103
|
+
const velocity = particle.position.clone().sub(particle.previous).multiplyScalar(Math.exp(-motion.damping * 3 * h));
|
|
104
|
+
particle.previous.copy(particle.position);
|
|
105
|
+
particle.position.add(velocity).y -= 2.5 * scale * h * h;
|
|
106
|
+
if (windStrength > 0 && motion.strength > 0) particle.position.addScaledVector(windAcceleration(this.windTime, windStrength, scale, particle.position.toArray()), motion.strength * h * h);
|
|
107
|
+
// Pins are sparse controls, not free particles. A soft return to their
|
|
108
|
+
// authored positions keeps broad sheets from drifting indefinitely.
|
|
109
|
+
particle.position.lerp(new Vector3().fromArray(pin.pose.position), 1 - Math.exp(-2 * Math.PI * motion.frequency * h));
|
|
110
|
+
}
|
|
111
|
+
const nearby = new Map(cloth.map(pin => [pin.id, candidates(this.particles.get(pin.id)!.position)]));
|
|
112
|
+
for (let iteration = 0; iteration < 6; iteration++) {
|
|
113
|
+
for (const link of links) {
|
|
114
|
+
const a = this.particles.get(link.a), b = this.particles.get(link.b);
|
|
115
|
+
const pa = a?.position ?? new Vector3().fromArray(byId.get(link.a)?.pose.position ?? [0, 0, 0]);
|
|
116
|
+
const pb = b?.position ?? new Vector3().fromArray(byId.get(link.b)?.pose.position ?? [0, 0, 0]);
|
|
117
|
+
const delta = pa.clone().sub(pb), distance = delta.length(); if (distance < 1e-8) continue;
|
|
118
|
+
const correction = delta.multiplyScalar((distance - link.length) / distance);
|
|
119
|
+
if (a && b) { a.position.addScaledVector(correction, -.5); b.position.addScaledVector(correction, .5); }
|
|
120
|
+
else if (a) a.position.sub(correction); else if (b) b.position.add(correction);
|
|
121
|
+
}
|
|
122
|
+
for (const [id, particle] of this.particles) for (const collider of nearby.get(id) ?? []) {
|
|
123
|
+
const center = collider.position, dx = particle.position.x - center[0], dy = particle.position.y - center[1], dz = particle.position.z - center[2];
|
|
124
|
+
const squared = dx * dx + dy * dy + dz * dz;
|
|
125
|
+
if (squared >= collider.radius * collider.radius) continue;
|
|
126
|
+
if (squared < 1e-16) particle.position.set(center[0], center[1] + collider.radius, center[2]);
|
|
127
|
+
else {
|
|
128
|
+
const factor = collider.radius / Math.sqrt(squared);
|
|
129
|
+
particle.position.set(center[0] + dx * factor, center[1] + dy * factor, center[2] + dz * factor);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
let active = false;
|
|
135
|
+
const result = pins.map(pin => {
|
|
136
|
+
const particle = this.particles.get(pin.id); if (!particle) return pin;
|
|
137
|
+
const target = new Vector3().fromArray(pin.pose.position), offset = particle.position.clone().sub(target);
|
|
138
|
+
const velocity = particle.position.clone().sub(particle.previous);
|
|
139
|
+
if (offset.lengthSq() > scale * scale * 1e-10 || velocity.lengthSq() > scale * scale * 1e-10) active = true;
|
|
140
|
+
const parent = byId.get(parents.get(pin.id) ?? '');
|
|
141
|
+
const rotation = parent ? new Quaternion().setFromUnitVectors(
|
|
142
|
+
target.clone().sub(new Vector3().fromArray(parent.pose.position)).normalize(),
|
|
143
|
+
particle.position.clone().sub(new Vector3().fromArray(parent.pose.position)).normalize()) : new Quaternion();
|
|
144
|
+
return { ...pin, pose: { ...pin.pose, position: particle.position.toArray() as Point,
|
|
145
|
+
rotation: rotation.multiply(new Quaternion().fromArray(pin.pose.rotation)).normalize().toArray() as [number, number, number, number] } };
|
|
146
|
+
});
|
|
147
|
+
return { pins: active ? result : pins, active };
|
|
148
|
+
}
|
|
149
|
+
}
|