Tween.js errors
Hey everyone.
I'm starting to play around with Tween.js to tween between several FacePaint objects. While adding a Tween Alpha component to them worked for a short while, the animation now will not display and I'm getting several errors including the types
- 14:50:08 ReferenceError: identifier 'TWEEN' undefined
at startTween (Tween/TweenTypes/TweenAlpha:57)
at [anon] (Tween/TweenTypes/TweenAlpha:39) preventsyield
- 15:01:23 Input was declared but not set at (WorldObjectController [EDIT_ME]) IdleAnimAudio
These have persisted through a restart of both the program and my computer, a rebuild of the object with script in my working file, a fresh download and import of the Tween package, a test of Tween Transform on an unrelated 3D mesh object, and a test run of the Tween features on fresh default Face Paint and Animated Object templates. It functions on the demo animations flawlessly, but as soon as I add a Script component to a custom object and choose a Tween from the resources list, the first listed error fires immediately and the latter fires when I reset the lens. I'm sort of perplexed!
Thanks for any guidance.
Hi Zach, can you please try dragging TweenManager to the top of your Objects panel so it executes first? Alternatively, set any Tween type you add to LensTurnedOn instead of Initialized.
Hi Travis,
Both solutions still return an Input declared but not set type error.
Thanks!
The Input declared message is just a warning in the IdleAnim script letting you know that you haven't provided a sound for the animation player. If you don't intend to have audio playing with your 3D animation, you can simply ignore this message.
I should clarify that in addition to the error, the Face Mask effect is also not longer animating in the way that I achieved briefly before with TweenAlpha. Sorry for being vague.
In case it helps anyone, cracking open TweenAlpha.js and adding the line
updateComponentValue( script.sceneObject, "Component.FaceMaskVisual", value );
inside the updateValue function seems to have fixed stuff. No clue why it worked out of the box and now but not inbetween, but there ya go.
Ah got it!
We'll update TweenAlpha to support more components in the future. Thanks!
How to I get the TweenManager? It doesn't show up in helper scripts.
Hi Abigail,
Check out our Guide here!
Cheers,
Karolina
Hey y'all pretty desperate to get help on my question - https://support.lensstudio.snapchat.com/hc/en-us/community/posts/360048056111-Scaling-person-videos-in-preview
Can you help me resize the preview persons?