0

I want put animation font in my web site with the plugin "bodymovin" (this pricipe is transform json files in svg), i use framework laravel. I have follow this example : https://codepen.io/airnan/project/editor/ZeNONO

I manage to find my file, an importer my js, I have this error when I want to display my json I do not see what it is? I have forgot something ?

Uncaught TypeError: keyData.e is undefined

And this is my js code :

import Bodymovin from 'bodymovin';

export default class Homepage {
  constructor(options) {

  this.animation = document.querySelector('.js-animation');
  if (this.animation) {
     this.initAnimation();
  }

initAnimation() {
     Bodymovin.loadAnimation({
     container: this.animation,
     renderer: 'svg',
     loop: true,
     autoplay: true,
     path: './img/displacement-header/data-animation.json',
     });
}
Arnold
  • 11
  • 5
  • This usually happens when your animation/json is exported incorrectly. Try to re-export it. You could also try to remove `renderer: 'svg'` and check if there's a different error. – sandrooco Jan 06 '22 at 11:43
  • Ok thanks, i will se for reexporte then, i have remove ```renderer: 'svg'``` and that did not change error. – Arnold Jan 06 '22 at 11:52
  • Is there another way to test my json file to see if the problem is with my export? – Arnold Jan 06 '22 at 13:35
  • You could try the linked codepen (that you can be sure of that it works) locally and use your own file instead of the default data.json. – sandrooco Jan 06 '22 at 13:44

0 Answers0