swift: How to insert animated watermark into the video, or how to merge two videos

So I have a video from camera and array of images – result of screen capturing, basically the list of screenshots.
I want to merge them and add ability for User to save the resulted video on the phone. Let’s insert static image as a watermark as well as animated (video in video) watermark into the main video.

Continue reading “swift: How to insert animated watermark into the video, or how to merge two videos”

Social Share Toolbar

How to add pixel-perfect physics to an SKSpriteNode

To perfect the collision detection, basically to ignore transparency during the interest we can use SKPhysicsBody. The idea here is to have two images – one is what User sees, another is very simplified version for SpriteKit engine – simplified from color and geometry standpoint. The more complex “collision body” is the more resources it will spend during each frame to calculate collisions. Just for instance here’s the actual image and it’s “mask”

Now we are ready for some code
Continue reading “How to add pixel-perfect physics to an SKSpriteNode”

Social Share Toolbar