Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Tween arrays and other things #34

Open
marcusx2 opened this issue Aug 21, 2022 · 0 comments
Open

[Feature Request] Tween arrays and other things #34

marcusx2 opened this issue Aug 21, 2022 · 0 comments

Comments

@marcusx2
Copy link

Currently, you can not tween arrays. For example, the following code won't work

var from = {arr : [0, 0]};
this.app.tween(from).to({ar: [1, 1]}, 1, pc.SineOut);

Instead, you have to do

var from = {val1: 0,val2: 0};
this.app.tween(from).to({val1: 1, val2: 1}, 1, pc.SineOut);

The following doesn't work either

var from = {
    myVec1: new pc.Vec4(1, 0.5, 1, 0.5),
    myVec2: new pc.Vec4(1, 0.5, 1, 0.5),
};

It seems that playcanvas-tween can only tween properties that are numbers when using objects. Anything more complex won't work.

@marcusx2 marcusx2 changed the title [feature request] Tween arrays and other things [Feature Request] Tween arrays and other things Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant