(target)
| 1050 | const fragCount = basePositions.length; |
| 1051 | |
| 1052 | function getFragForTarget(target) { |
| 1053 | const pool = target.wireframe ? fragWireframePool : fragPool; |
| 1054 | let frag = pool.get(target.color).pop(); |
| 1055 | if (!frag) { |
| 1056 | frag = new Entity({ |
| 1057 | model: makeCubeModel({ scale: fragRadius }), |
| 1058 | color: target.color, |
| 1059 | wireframe: target.wireframe |
| 1060 | }); |
| 1061 | frag.color = target.color; |
| 1062 | frag.wireframe = target.wireframe; |
| 1063 | } |
| 1064 | return frag; |
| 1065 | } |
| 1066 | |
| 1067 | return (target, force=1) => { |
| 1068 | // Calculate fragment positions, and what would have been the previous positions |
no test coverage detected