indigo.shared.scenegraph
package 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 CloneTransformData(position: Point, rotation: Radians, scale: Vector2, alpha: Double, flipHorizontal: Boolean, flipVertical: Boolean)
Represents the standard allowable transformations of a clone.
- Companion
- object
final case class DirectionLight(height: Int, color: RGB, power: Double, rotation: Radians) extends Light
- Companion
- object
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.
Graphics party trick is it's ability to crop images.
- Companion
- object
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
final case class PointLight(position: Point, height: Int, color: RGB, power: Double, attenuation: Int) extends Light
- Companion
- object
final case class SceneAudio(sourceA: SceneAudioSource, sourceB: SceneAudioSource, sourceC: SceneAudioSource)
- Companion
- object
final case class SceneAudioSource(bindingKey: BindingKey, playbackPattern: PlaybackPattern, masterVolume: Volume)
- Companion
- object
final case class SceneLayer(nodes: List[SceneGraphNode], tint: RGBA, saturation: Double, magnification: Option[Int])
- Companion
- object
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
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
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
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