@strategicprojects/rpic 0.4.0 → 0.4.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/index.js +11 -0
- package/package.json +1 -1
- package/pkg/rpic_wasm_bg.wasm +0 -0
package/index.js
CHANGED
|
@@ -94,6 +94,17 @@ export function animate(root, animations, gsap) {
|
|
|
94
94
|
function drawOn(group, a, tl) {
|
|
95
95
|
const els = group.querySelectorAll('path, polyline, line, rect, circle, ellipse, polygon');
|
|
96
96
|
els.forEach((el) => {
|
|
97
|
+
// Filled, unstroked elements (arrowheads) can't be dash-traced — pop
|
|
98
|
+
// them in as the shaft reaches the tip instead.
|
|
99
|
+
const fill = el.getAttribute('fill');
|
|
100
|
+
if (el.getAttribute('stroke-width') === '0' || (fill && fill !== 'none' && !el.getAttribute('stroke'))) {
|
|
101
|
+
tl.from(
|
|
102
|
+
el,
|
|
103
|
+
{ opacity: 0, scale: 0, transformOrigin: '50% 50%', duration: Math.min(0.2, a.duration * 0.4), ease: 'back.out(1.7)' },
|
|
104
|
+
a.start + a.duration * 0.8
|
|
105
|
+
);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
97
108
|
let len = 0;
|
|
98
109
|
try {
|
|
99
110
|
len = el.getTotalLength();
|
package/package.json
CHANGED
package/pkg/rpic_wasm_bg.wasm
CHANGED
|
Binary file
|