Skip to content

How do I tween this data format? #109

@renjianfeng

Description

@renjianfeng

Please excuse my English is not my native language

I want to tween use this data here:
{position:{x:300,y:200},rotation:30}

Here's what I expected to do:

var tween = createjs.Tween.get(myTarget)
			.to({position:{x:300,y:200},rotation:30},400)
			.set({label:"hello!"})
			.wait(500).to({alpha:0,visible:false},1000)
			.call(onComplete);

But now I have to:

var tween1 = createjs.Tween.get(myTarget).position
			.to({x:300},400)
			.set({label:"hello!"})
			.wait(500).to({alpha:0,visible:false},1000)
			.call(onComplete);

			var tween2 = createjs.Tween.get(myTarget)
			.to({rotation:30},400)
			.set({label:"hello!"})
			.wait(500).to({alpha:0,visible:false},1000)
			.call(onComplete);

How do you use only one tween to process data in this format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions