indigo.shared.scenegraph

Type members

Classlikes

final case class Clone(id: CloneId, depth: Depth, transform: CloneTransformData) extends SceneGraphNode
A single clone instance of a cloneblank
final case class CloneBatch(id: CloneId, depth: Depth, transform: CloneTransformData, clones: List[CloneTransformData], staticBatchKey: Option[BindingKey]) extends SceneGraphNode
Represents many clones of the same cloneblank, differentiated only by their transform data.
final case class CloneBlank(id: CloneId, cloneable: Cloneable)
Used as the blueprint for any clones that want to copy it.
final case class CloneId(value: String) extends AnyVal
A CloneId is used to connect a Clone instance to a CloneBlank.
final case class CloneTransformData(position: Point, rotation: Radians, scale: Vector2, alpha: Double, flipHorizontal: Boolean, flipVertical: Boolean)
Represents the standard allowable transformations of a clone.
Companion
object
Companion
class
sealed trait Cloneable
Used to distingush between cloneable and non-clonable scene graph nodes.
final case class DirectionLight(height: Int, color: RGB, power: Double, rotation: Radians) extends Light
Companion
object
Companion
class
sealed trait EventHandling
Tags nodes that can handle events.
final case class Graphic(material: Material, crop: Rectangle, effects: Effects, position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends Renderable with Cloneable
Graphics are used to draw images on the screen, in a cheap efficient but expressive way.
Graphics party trick is it's ability to crop images.
Companion
object
object Graphic
Companion
class
final case class Group(children: List[SceneGraphNodePrimitive], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends SceneGraphNodePrimitive
Used to group elements to allow them to be manipulated as a collection.
Companion
object
object Group
Companion
class
sealed trait Light
sealed trait PlaybackPattern
Companion
object
Companion
class
final case class PointLight(position: Point, height: Int, color: RGB, power: Double, attenuation: Int) extends Light
Companion
object
object PointLight
Companion
class
sealed trait Renderable extends SceneGraphNodePrimitive
Represents nodes with more advanced spacial and visual properties
final case class SceneAudio(sourceA: SceneAudioSource, sourceB: SceneAudioSource, sourceC: SceneAudioSource)
Companion
object
object SceneAudio
Companion
class
final case class SceneAudioSource(bindingKey: BindingKey, playbackPattern: PlaybackPattern, masterVolume: Volume)
Companion
object
Companion
class
sealed trait SceneGraphNode extends Product with Serializable
The parent type of anything that can affect the visual representation of the game.
Companion
object
Companion
class
Represents nodes with a basic spacial presence.
final case class SceneLayer(nodes: List[SceneGraphNode], tint: RGBA, saturation: Double, magnification: Option[Int])
Companion
object
object SceneLayer
Companion
class
final case class SceneUpdateFragment(gameLayer: SceneLayer, lightingLayer: SceneLayer, distortionLayer: SceneLayer, uiLayer: SceneLayer, ambientLight: RGBA, lights: List[Light], audio: SceneAudio, screenEffects: ScreenEffects, cloneBlanks: List[CloneBlank])
A description of what the engine should next present to the player.
SceneUpdateFragments are predicatably composable, so you can make a scene in pieces and then combine them all at the end.
Note that a SceneUpdateFragment represents what is to happen next. It is not a diff. If you remove a sprite from the definition it will not be drawn.
Value Params
ambientLight
The scene's ambient light levels.
audio
Background audio.
cloneBlanks
A list of elements that will be referenced by clones in the main layers.
distortionLayer
The layer that distoration elements are placed on.
gameLayer
The layer game elements are placed on.
lightingLayer
The layer image based lighting elements are placed on.
lights
Dynamic lights.
screenEffects
Effects to be applied at screen level.
uiLayer
The layer that UI elements are placed on.
Companion
object
Companion
class
final case class ScreenEffects(gameColorOverlay: RGBA, uiColorOverlay: RGBA)
Companion
object
Companion
class
final case class SpotLight(position: Point, height: Int, color: RGB, power: Double, attenuation: Int, angle: Radians, rotation: Radians, near: Int, far: Int) extends Light
Companion
object
object SpotLight
Companion
class
final case class Sprite(bindingKey: BindingKey, animationKey: AnimationKey, animationActions: List[AnimationAction], eventHandler: (Rectangle, GlobalEvent) => List[GlobalEvent], effects: Effects, position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends Renderable with EventHandling with Cloneable
Sprites are used to represented key-frame animated screen elements.
Companion
object
object Sprite
Companion
class
final case class Text(text: String, alignment: TextAlignment, fontKey: FontKey, effects: Effects, eventHandler: (Rectangle, GlobalEvent) => List[GlobalEvent], position: Point, rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip) extends Renderable with EventHandling
Used to draw text onto the screen.
Companion
object
object Text
Companion
class
final case class TextLine(text: String, lineBounds: Rectangle)
Represents a single line of text.
final case class Transformer(node: SceneGraphNode, transform: CheapMatrix4) extends SceneGraphNode