[Behavior] Drag scale

Post your completed addons to share with the community

Post » Mon Apr 01, 2013 10:44 am

Drag scale
( Dependence: touch wrap plugin)
Update: 2013/04/02

Set size by dragging two touch points.
This behavior could not be used on pc since there is only one touch pint (mouse).

Demo
- Single drag sprite to move and select it
- Dragging with two touch points to resize the selected sprite,
Capx

Use "Expression:Scale" to get the scaling. The calculation of this expression is
[code](length between two init dragging points)/(length between two current dragging points)[/code]
Set "Auto scale" to "No" at properties table if user does not want change the size of sprite. Only use it to get the "expression:Scale"

This demo shown the changing of this two dragging points and the "expression:Scale"
- Draw a line between these two touch points.
Capx
(user need to install Canvas plugin to open this capx)rexrainbow2013-04-01 17:51:59
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Mon Apr 01, 2013 2:40 pm

Simple awesome as all other your works @rexrainbow .
B
77
S
20
G
7
Posts: 46
Reputation: 7,840

Post » Mon Apr 01, 2013 5:48 pm

Update:

Fix bug at setting "auto scale" to "Yes"

Update sample capx and demo to support resizing smoothly.
rexrainbow2013-04-01 18:04:05
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Mon Apr 01, 2013 9:49 pm

Hi Rex,
That's a really great plug in !
Any plans to implant the same thing with Rotate ?
Keep up the good work !
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Tue Apr 02, 2013 1:00 am

@Laurent

Do you mean rotation by single dragging?rexrainbow2013-04-02 01:00:28
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Tue Apr 02, 2013 1:18 am

Well, that's not really what I had in mind but that's a pretty neat idea !
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Tue Apr 02, 2013 4:33 am

@Laurent

Behavior: drag rotate (rotation with single dragging) is on my TODO list now.rexrainbow2013-04-02 04:34:03
B
97
S
22
G
177
Posts: 4,111
Reputation: 103,525

Post » Tue Apr 02, 2013 8:46 am

@ rexrainbow
Lovely !
B
20
S
9
G
4
Posts: 197
Reputation: 4,080


Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests