Added touch screen gesture support to Away3D 4

Software: Away3D 4.x

Rob Dodson, Newbie
Posted: 02 January 2012 04:08 PM   Total Posts: 15

Hi guys,

I’m currently working on a project which requires multi touch support as well as what used to be known as MovieMaterial in previous versions of Away3D. I forked the current version of Away3D 4 and added support for TransformGestureEvents using a Gesture3DManager class that I wrote, pretty much identical to the Mouse3DManager that already comes with Away3D. Everything should work similar to how you already work with Mouse3DEvents. For example:


plane.addEventListener(GestureEvent3D.GESTURE_ROTATE, onGestureRotate);

private function onGestureRotate(event:GestureEvent3D):void {
  var target:Object3D = event.object;
  target.rotationZ -= event.rotation;
}


GestureEvent3D should support the same event types as TransformGestureEvent (Pan, Rotate, Swipe, Zoom). My dev fork is located here if your’e interested: https://github.com/robdodson/away3d-core-fp11/tree/dev

I’m wondering if this is something that you guys would like to pull into the Away3D project and who I should talk to about further contributions? I’ve already started down the road of writing my own MovieMaterial and I have many aspects of that working however it was using the old BitmapMaterial which I see is no longer supported in the current dev branch of Away3D so I have to figure out how to work with the new stuff. I would love to talk to some team members to get their ideas on how to best use the new TextureMaterial to create a MovieMaterial. My current project requires MovieMaterial so I’ll be writing a solution for this problem one way or the other. I figure if it’s in line with that the team has in mind that could maybe also be a useful contribution.

Thanks!

- rob

   

Avatar
theMightyAtom, Sr. Member
Posted: 03 January 2012 11:26 AM   Total Posts: 669   [ # 1 ]

Great work Rob!
I hope this get’s in there. Will be particularly useful when AIR 3.0 makes it to Android and iOS. Sweet!

   

Rob Dodson, Newbie
Posted: 03 January 2012 06:12 PM   Total Posts: 15   [ # 2 ]

Thanks :D

I’m submitting a pull request to the dev branch on Github. Hopefully that’s the correct workflow..? (I’m pretty new to pull requests on Github)

   

lisophorm, Newbie
Posted: 24 January 2013 11:13 AM   Total Posts: 10   [ # 3 ]

I got a 404. Is it still possible to pull this branch?
Any progress?

Thanks

   

Rob Dodson, Newbie
Posted: 24 January 2013 03:56 PM   Total Posts: 15   [ # 4 ]

Unfortunately I deleted the branch because it was so outdated and I didn’t have time to work on it. Thankfully Github preserved the commits in my pull request. You can find that here: https://github.com/away3d/away3d-core-fp11/pull/202#issuecomment-6738019

You can click on ‘Files Changed’ up at the top. Then click ‘View file @ <hash>’ then click ‘Raw’ and just copy paste the contents to a new file.

Even when I was writing this I was out of sync with the dev branch, so you’ll need to update it to work with 4.x Gold I guess.

There’s also still a few things that never got sorted out. I think I was able to get basic coordinates reported for where a touch took place on a material but if you have a button inside of a material it’s not going to fire a click event just yet. You’d need to translate those coordinates back to the underlying movieclip, detect if it is on top of your button, and then translate that to a click event.

Anyway, hope that’s helpful. Sorry it’s in a shabby state, this was my swan song with Flash smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X