svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
10.95k stars 1.07k forks source link

Custom Bezier Function #1308

Closed JustinSteinberg closed 10 months ago

JustinSteinberg commented 10 months ago

Bug report

For support questions, please use stackoverflow with the tag svg.js or head to our chat over at gitter.

Fiddle

Modify this fiddle to demonstrate the problem clearly, just fork it and paste the resulting fiddle in your issue. Please make sure this is a minimal example, containing only the minimum necessary code to help us troubleshoot your problem.

Explanation

When trying to use the custom bezier timing funciton for the animation, runner.ease(SVG.easing.beziere(x1,y1,x2,y2))... the console states that the easing function is not defined.

(As seen below, svgText.js is my own file)

svgText.js:38 Uncaught TypeError: SVG.easing.beziere is not a function at SVGGElement. (svgText.js:38:127) at SVGGElement.handle (jquery-3.7.0.min.js:2:44360) at SVGGElement.dispatch (jquery-3.7.0.min.js:2:39997) at v.handle (jquery-3.7.0.min.js:2:37968)

Fuzzyma commented 10 months ago

What bundle are you using? If you use npm you probably want to import easing instead of using SVG.easing

Fuzzyma commented 10 months ago

cant reproduce and will therefore close.