mroew/blocks/motion

Types

pub type Location {
  Mouse
  Random
}

Constructors

  • Mouse
  • Random
pub type RotationStyle {
  LeftRight
  AllAround
  DontRotate
}

Constructors

  • LeftRight
  • AllAround
  • DontRotate

Functions

pub fn bounce_on_edge(
  cblocks: List(BlockType),
) -> List(BlockType)
pub fn change_x(
  cblocks: List(BlockType),
  dx: Operator,
) -> List(BlockType)
pub fn change_y(
  cblocks: List(BlockType),
  dy: Operator,
) -> List(BlockType)
pub fn direction() -> Operator
pub fn glide(
  cblocks: List(BlockType),
  seconds: Operator,
  x: Operator,
  y: Operator,
) -> List(BlockType)
pub fn glide_sprite(
  cblocks: List(BlockType),
  seconds: Operator,
  sprite: Operator,
) -> List(BlockType)
pub fn glide_to(
  cblocks: List(BlockType),
  seconds: Operator,
  location: Location,
) -> List(BlockType)
pub fn go(
  cblocks: List(BlockType),
  location: Location,
) -> List(BlockType)
pub fn go_sprite(
  cblocks: List(BlockType),
  sprite: Operator,
) -> List(BlockType)
pub fn move(
  cblocks: List(BlockType),
  steps: Operator,
) -> List(BlockType)
pub fn point_to(
  cblocks: List(BlockType),
  location: Location,
) -> List(BlockType)
pub fn point_to_sprite(
  cblocks: List(BlockType),
  sprite: Operator,
) -> List(BlockType)
pub fn position(
  cblocks: List(BlockType),
  x: Operator,
  y: Operator,
) -> List(BlockType)
pub fn rotation_style(
  cblocks: List(BlockType),
  style: RotationStyle,
) -> List(BlockType)
pub fn set_direction(
  cblocks: List(BlockType),
  direction: Operator,
) -> List(BlockType)
pub fn set_x(
  cblocks: List(BlockType),
  x: Operator,
) -> List(BlockType)
pub fn set_y(
  cblocks: List(BlockType),
  y: Operator,
) -> List(BlockType)
pub fn turn(
  cblocks: List(BlockType),
  degrees: Operator,
) -> List(BlockType)
pub fn x() -> Operator
pub fn y() -> Operator
Search Document