Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Path defined object.fill and rotation problem
Started by sjmuse Feb 13 2015 05:04 AM

No replies to this topic
path transition
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sjmuse

[GLOBAL: userInfoPane.html]
sjmuse
  • Observer

  • 7 posts
  • Corona SDK

Hi. I have a some problem.

 

I want to rotate object that has path values.

 

Below sample codes are works.

But if remove the commentation(included path), it does not rotate.

local canvas = display.newRect(self.group, 0, -80, 800, 200)
    canvas.blendMode = "add"
    --canvas.path.x1 =  90
    --canvas.path.x3 =  30
    --canvas.path.y3 =  80
    --canvas.path.x4 = -90
    --canvas.path.y4 =  60
    canvas.fill =
    {
        type = "image",
        filename = "myimage.png", --image-path,
    }

    local function closure()
        transition.to(canvas.fill, { delta = true, rotation = 10, onComplete = closure })
    end

    closure()

For resolve, I tried this.

 

1. Define the 'enterFrame' event

2. The desired rotation value calculate in enterFrame

3. Make object.fill as nil

4. Refill image and set rotation value.

 

Okay. It works but It may not be a good idea.

Maybe Is this a bug?

 

 

 




[topic_controls]
[/topic_controls]