[SOLVED] How to add tween.js to PlayCanvas typescript

Hello all,
I continue in the process of creating an app with playcanvas typescript. I used to work with the playcanvas tweenjs versión.
Do you know how can I continue using it with typescript? how to integrate it?
I tried to migrate to “@tweenjs/tween.js” but it stopped to function as soon as the app enter VR mode :frowning:

thanks for all received help :slight_smile:

Hi @Juan_Pedro_Andres,

The PlayCanvas tween library doesn’t have a npm module or TS types release.

You can still use it in your TS project, search online on how to add a plain JavaScript library to it. You can then link the following file and use it by bypassing any TS type error:

Thanks Leonidas, I will try to follow your advice :slight_smile:

1 Like

Done and working :slight_smile:


Hi Juan,

can you elaborate on how you got it to work?
Did you link tweenjs in the html head or import it in typescript?

I am trying the latter and whatever I do, I get

TypeError: Cannot redefine property: TweenManager