Jump to content
Search Community

zlobul

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by zlobul

  1. Thanks a lot , that did it ! I'm already using GSAP v3 in my project !
  2. I'm new to PIXI and GSAP . I'm building a wheel of fortune game and almost made it . I'm just struggling to fine tune some things like the wheel rotation. I would like the rotation to start smoothly and accelerate then slowly decrease the speed until it stops at the desired position . I have added a codepen which I used as an example to build my code. As you see it starts spinning with maximum speed on click. Any ideas how to made the acceleration on spin start ? Here is the part of my code: let rounds = this.getRandomNumber(1, 3) const winingSector = this.getRandomNumber(0, 53) const rotation = this.piTwo * rounds + this.finalPoisition(winingSector) const timeLine = new TimelineMax() timeLine.to( this.wheelSprite, gameConfig.rotationTime, { rotation: `+=${rotation}`, onComplete: () => { this.drawWiningLine(winingSector) this.showPrizeText(winingSector) } } )
×
×
  • Create New...