Questions tagged [tween]

Animation technique of frame interpolation between keyframes.

A tween could be understood as a synonym of animation. Given two keyframes with a number of properties a tween gives intermediate values per keyframe between the two keyframes. Usually this task is achieved by using specific libraries.

http://en.wikipedia.org/wiki/Inbetweening

624 questions
1
vote
1 answer

How to tween/Lerp between two numbers

I want to be able to lerp between two numbers (Actually RGB). Sort of like a slider. Where 0 = (255,0,0), and 1 = (0,255,0). Is there any way to code with without an external library or function? Thanks.
1
vote
2 answers

How to use dotween to ease in out a float?

The goal to tween the "Forward" value. This is example from the dotween exmaples. Instead moving the cube i want to change the "Forward" value between 0 and 1. using UnityEngine; using System.Collections; using DG.Tweening; public class Sequences :…
Sharo SA
  • 131
  • 1
  • 7
1
vote
1 answer

Tween animation is instant instead of smooth, What gives?

Idea is to move from current camera position to a center of a mesh (It's a sphere and I want to be inside of it) when button is clicked. This is the function with a tween, onUpdate is getting called, but it is instant instead of executed over time,…
PsykoloGG
  • 27
  • 6
1
vote
1 answer

Godot/GDScript Grid Movement Tweening

So I've been using KidsCanCode's Godot tutorials/documentation to help me create a Pokemon-like grid-based movement for a project I'm working on. For all intents and purposes, I would like to create a movement system as close to that in the earlier…
1
vote
1 answer

How to read position x of Shape Object when during tween

I have the Circle object that extends shape and am trying to get the value of x or position of the object in 2d plane. During animation (tween) the position does not update and remains static. How do i fix this ? export class Circle extends…
Sudheej
  • 1,873
  • 6
  • 30
  • 57
1
vote
3 answers

Multiple cameras in Three.js

In Three.js, how can I switch from one camera to another, ideally with a smooth transition/tween? Let's assume our scene has two objects, a rock and a tree. For each object, there is a dedicated camera set up to look at it. I want to be able to…
Ben
  • 15,938
  • 19
  • 92
  • 138
1
vote
1 answer

Tween.js not chaining properly

I'm trying to use tween.js to chain some animations, however I find it is not working properly. var car={position:{x:100}}; var tween1 = new TWEEN.Tween(car.position) .to({x: 105}, 1000).onComplete(() => {console.log("done 1 second")}); var…
omega
  • 40,311
  • 81
  • 251
  • 474
1
vote
1 answer

Set MaterialPropertyBlock color alpha in Unity with C#

I am changing the color of a mesh by setting a MaterialPropertyBlock like so mpb = new MaterialPropertyBlock(); Color color = Color.red mpb.SetColor("_Main", color); _meshRenderer.SetPropertyBlock(mpb); The issue is the color is applied at its 100%…
Aggressor
  • 13,323
  • 24
  • 103
  • 182
1
vote
1 answer

Remove Background Image From Expanded Bubble Animation

This is the LINK: https://majorlove.xyz/flavors31g-new-v1/ This animation consists of bubbles with an image at the centre. You can move around different bubbles using touchpad or mouse. When you click on a bubble it expands fullscreen to show some…
1
vote
1 answer

When to use Tween animation in flutter

I am learning how to do animations in flutter and could not understand one thing that is why do we even use Tween for getting values ? The basic function of Tween is to give values in between of the begin and end values like a color or for position…
Viraj Doshi
  • 771
  • 6
  • 26
1
vote
1 answer

best property to manipulate when tweening dom objects with a js library

i'm searching for the best and performant way to animate some elements (with jquery or mootools). for example, if i have to move an element, it's better to: absolutely positioning it and use top or left absolutely positioning it a use margin-top or…
Luke
  • 2,976
  • 6
  • 34
  • 44
1
vote
2 answers

mootools | overwrite propery of a tween without create new tween everytime

Is there a way to overwrite the property of a tween? If I write el.set('tween', {duration: ‘long’, onComplete: callback}); and then el.set('tween', {duration: 200, onComplete: secondcallback }); I can’t replace the old property (callback is…
Luke
  • 2,976
  • 6
  • 34
  • 44
1
vote
1 answer

AS2: Dynamic tween identifier

How do i go about setting the tween identifier dynamically. I have tried eval but it says I need a variable on the left of the assignment operator. here's what I tried: eval ("TweenAX" + circle.current.arrowHead.count) = new…
George Reith
  • 13,132
  • 18
  • 79
  • 148
1
vote
1 answer

Three.js Tweening issue: start value always remains the same

I have a problem for tweening my camera.position . I create a codepen with the minimum of code just to reproduce my issue and I annotate all my code. I also put a lot of console.log() for debugging purpose . Codepen the start point is my…
Cid-Wings
  • 449
  • 1
  • 6
  • 13
1
vote
1 answer

Phaser (3.24.1) How to tween a TileSprite?

I would like to tween a TileSprite by tilePositionX and tilePositionY. scene.load.image('sky', 'assets/images/sky.png'); const sky = scene.add.tileSprite(0, 0, 1000, 600, 'sky'); scene.add.tween(sky); // "Uncaught TypeError: n is null"
Andre
  • 23
  • 8