|
128 | 128 |
|
129 | 129 | // Setup dynamic cursor changes based on Rive's interactive areas |
130 | 130 | function setupDynamicCursor(canvas, riveInstance, stateMachine) { |
| 131 | + // Skip dynamic cursor if canvas is wrapped in an anchor tag |
| 132 | + if (canvas.closest('a')) { |
| 133 | + return; |
| 134 | + } |
| 135 | + |
131 | 136 | canvas.addEventListener('mousemove', (event) => { |
132 | 137 | try { |
133 | 138 | const rect = canvas.getBoundingClientRect(); |
|
255 | 260 | // Docs Animation |
256 | 261 | createRiveAnimation({ |
257 | 262 | canvasSelector: '#docs-rive-canvas', |
258 | | - riveUrl: 'https://cdn.prod.website-files.com/67880ff570cdb1a85eee946f/68825994c55f0eece04ce4e2_d261956a0f627eb6b94c39aa9fcc26f0_docs_animation.riv', |
| 263 | + riveUrl: 'https://cdn.prod.website-files.com/67880ff570cdb1a85eee946f/68825994c55f0eece04ce4e2_9a50e77828a014e927d67fa21d3edf9d_docs_animation.riv', |
259 | 264 | aspectRatio: 404/262, |
260 | 265 | stateMachine: "State Machine 1", |
261 | 266 | fallbackImages: [ |
|
276 | 281 | // AI Animation with custom event handling |
277 | 282 | createRiveAnimation({ |
278 | 283 | canvasSelector: '#ai-rive-canvas', |
279 | | - riveUrl: 'https://cdn.prod.website-files.com/67880ff570cdb1a85eee946f/68825e97fd6225e1c8a7488c_c2966309b38902c92adfe24c2dc8ba5a_ai_animation.riv', |
| 284 | + riveUrl: 'https://cdn.prod.website-files.com/67880ff570cdb1a85eee946f/68825e97fd6225e1c8a7488c_c1ab3eed9babdbd0f2333f092d16e2d1_ai_animation.riv', |
280 | 285 | aspectRatio: 371/99, |
281 | 286 | stateMachine: "State Machine 1", |
282 | 287 | fallbackImages: [ |
|
291 | 296 | alt: 'AI Animation Preview' |
292 | 297 | } |
293 | 298 | ], |
294 | | - eventHandlers: { |
| 299 | + /* eventHandlers: { |
295 | 300 | 'Open URL': (eventData) => { |
296 | 301 | // Custom URL handling for AI animation, URL is defined in the Rive file |
297 | 302 | console.log('AI animation URL event:', eventData.url); |
298 | 303 | window.open(eventData.url, '_blank', 'noopener,noreferrer'); |
299 | 304 | } |
300 | | - } |
| 305 | + } */ |
301 | 306 | }); |
302 | 307 |
|
303 | 308 | // Add additional Rive animations by calling createRiveAnimation() with your config |
|
0 commit comments