Layer

final case
class Layer(nodes: List[SceneNode], lights: List[Light], key: Option[BindingKey], magnification: Option[Int], depth: Option[Depth], visible: Option[Boolean], blending: Option[Blending], camera: Option[Camera])

A layers are used to stack collections screen elements on top of one another.

During the scene render, each layer in depth order is blended into the one below it, a bit like doing a foldLeft over a list. You can control how the blend is performed to create effects.

Layer fields are all either Lists or options to denote that you can have them but that it isn't necessary. Layers are "monoids" which just means that they can be empty and they can be combined. It is important to note that when they combine they are left bias in the case of all optional fields, which means, that if you do: a.show |+| b.hide, the layer will be visible. This may look odd, and maybe it is (time will tell!), but the idea is that you can set empty placeholder layers early in your scene and then add things to them, confident of the outcome.

Value Params
blending

Optionally describes how to blend this layer onto the one below, by default, simply overlays on onto the other.

camera

Optional camera specifically for this layer. If None, fallback to scene camera, or default camera.

depth

Specifically set the depth, defaults to scene order.

key

Optionally set a binding key, allows you to target specific layers when merging SceneUpdateFragments.

lights

Layer level dynamic lights

magnification

Optionally set the magnification, defaults to scene magnification.

nodes

Nodes to render in this layer.

visible

Optionally set the visiblity, defaults to visible

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def ++(moreNodes: List[SceneNode]): Layer
def addLights(newLights: Light*): Layer
def addLights(newLights: List[Light]): Layer
def addNodes(moreNodes: List[SceneNode]): Layer
def addNodes(moreNodes: SceneNode*): Layer
def combine(other: Layer): Layer
def hide: Layer
def modifyCamera(modifier: Camera => Camera): Layer
def show: Layer
def withBlendMaterial(newBlendMaterial: BlendMaterial): Layer
def withBlending(newBlending: Blending): Layer
def withCamera(newCamera: Camera): Layer
def withDepth(newDepth: Depth): Layer
def withEntityBlend(newBlend: Blend): Layer
def withKey(newKey: BindingKey): Layer
def withLayerBlend(newBlend: Blend): Layer
def withLights(newLights: Light*): Layer
def withLights(newLights: List[Light]): Layer
def withMagnification(level: Int): Layer
def withNodes(newNodes: List[SceneNode]): Layer
def withNodes(newNodes: SceneNode*): Layer
def withVisibility(isVisible: Boolean): Layer
def |+|(other: Layer): Layer

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product