The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Using Tween.js for Simple Animations

  • Hello, 

    I'm trying this solution to create simple animation, but following your tuto, I get an error in the console. What did I miss? 

    Thank you

    Comment actions Permalink
  • Hi Keven, I suspect you didn't add the Tween.JS script to your scene. 

    • Create a new empty object
    • Add a script component
    • Add Tween.JS to the script component
    • Select initialized from the event dropdown

    If it still happens, it might be an order of operations problem. Trying moving the script you're trying to use Tween.JS with to the event "Lens Turned On" which happens after Initialized. This will let Tween.JS initialize and be ready to use prior to you using it. 

    Comment actions Permalink
  • Well, I did have the script in my scene, but it seems I did not name it correctly, now that I have deleted the previous object and create a new one with the proper name, it's working. 

    Thank you. 

    Time to figure out, how to tweak to do what I want, which is creating a baseball bat movement. 

    Comment actions Permalink
  • Hi Travis, thanks so much for putting the TweenJS integration, it's super helpful. 


    Just a quick note, at some point, shouldn't it be natively integrated in the main scripting API?

    In other 3d frameworks, there's usually a way to create animations programmatically on scene objects directly, which is a good middle ground between having to create all the animations in your 3d modeling tool, or modifying the objects' parameters manually on each frame (which is essentially what TweenJS is doing, if I'm not mistaken).

    Anyways, would love to hear your thoughts!

    Comment actions Permalink
  • Also I added type definitions for the TweenManager to my Lens scripting api typings on Github;



    It's pretty helpful.

    Thanks for the nice tool!

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?



Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:



What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!