1

Is there any documentation or tutorials on creating custom transitions in SpriteKit? Is there any way to modify [SKTransition doorwayWithDuration:1]; to show only one door, and to open towards the user?

I found this project on github and modified it to use a single door. https://github.com/mkftr/DoorwayTransition But this only works on Views. Not SKScene.

Is there a way to modify it so that I can get it to work?

I can't find anything out there, documentation or otherwise, explaining any of this. The transitions that come bundled in SpriteKit are too few, and I figured this would be a common problem for many other developers.

Failing all the above, what's the alternative? I'm putting together an interactive book, and would really like a decent page turning transition between scenes.

Note though, I'm not looking for "Page Curl", but more of a "Door opening" transition. But will settle for "Page Curl" if necessary, and someone can explain how to do it.

The book will only be available on iPad.

Beau Nouvelle
  • 6,962
  • 3
  • 39
  • 54

1 Answers1

0

Here's a very good page flip controller you can customize to create a door type book flip:

https://github.com/mpospese/MPFoldTransition

However, this also only works on views. But, you can use that to your advantage.

Since a SKScene is rendered on a SKView (which is a subclassed UIView), you can show each scene on a different SKView and use the flip transition in between each instance.

ZeMoon
  • 20,054
  • 5
  • 57
  • 98
  • 2
    multiple SKView on iOS are problematic as only one updates in realtime – CodeSmile Mar 17 '14 at 08:31
  • @LearnCocos2D so what's another alternative to get this working? Could I create my own with CIFilters? – Beau Nouvelle Apr 04 '14 at 14:42
  • @LearnCocos2D I am using another SKView on a viewController as a form sheet which appears on top of the running instance. It does not stop the presenting viewController's SKView from rendering. – ZeMoon Apr 04 '14 at 14:46
  • @BeauYoung please look at this answer also: http://stackoverflow.com/a/22528395/2043580. – ZeMoon Apr 04 '14 at 14:49