Skip to the content
The demo app

The demo app

The demo has five scenes, all made in code: a gold ring, a still life of gold, chrome and glass, a glass ball, a prism of dense flint glass, and a pool with moving water. Drag to move the light. The controls change the metal’s roughness, the glass’s index of refraction and whether it disperses, and the light’s size.

A gold ring gathers light into a cardioid inside itself.
Gold, chrome and glass on one table, each throwing its own light.
A glass ball focuses the light into a bright spot inside its shadow.
Dense flint glass bends each color by its own amount and splits white light.
Moving water bends sunlight into a net of light on the tiles.
-scene ring -azimuth -60 -elevation 28

#Run it

Terminal
cd Demo && xcodegen generate && open KausticsDemo.xcodeproj

It needs XcodeGen. To run it on a device, put your team in Demo/Config/Local.xcconfig:

DEVELOPMENT_TEAM = ...

Frame times in the Simulator say little about a device. Profile on hardware.

#Launch arguments

Launch arguments make stills repeatable.

Argument Does
-scene ring Starts on ring, stillLife, glass, prism or pool.
-azimuth 40 -elevation 18 Puts the light there, in degrees about the scene’s pivot.
-time 3.5 Freezes the water at that time.
-dispersion NO Starts the glass ball and the prism without dispersion.
-hideUI YES Hides the overlay.
-hideCasters YES Hides the casters, leaving the light and shadows they throw.