package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Scratch_runSource

Sourcetype value =
  1. | Num of float
  2. | Str of string
  3. | Bool of bool
  4. | List of int
  5. | Ring of ring
Sourceand ring
Sourceval number : value -> float
Sourceval text : value -> string
Sourcetype rotation =
  1. | All_around
  2. | Left_right
  3. | Dont_rotate
Sourcetype sprite = {
  1. name : string;
  2. x : float;
  3. y : float;
  4. direction : float;
  5. size : float;
  6. visible : bool;
  7. costume : int;
  8. costumes : int;
  9. rotation : rotation;
  10. radius : float;
  11. pen : bool;
  12. pen_hue : float;
  13. pen_size : float;
  14. bubble : value option;
  15. scripts : Scratch_blocks.script list;
}
Sourcetype ink =
  1. | Line of float * float * float * float * float * float
  2. | Stamp of sprite
Sourcetype frame
Sourcetype thread = {
  1. sprite : string;
  2. script : int;
  3. frames : frame list;
  4. result : value option;
}
Sourcetype t = {
  1. sprites : sprite list;
  2. vars : (string * value) list;
  3. cells : (int * value) list;
  4. lists : (int * value list) list;
  5. next_id : int;
  6. ink : ink list;
  7. threads : thread list;
  8. now : float;
  9. timer_start : float;
  10. seed : int;
  11. broadcasts : string list;
  12. halt : bool;
}
Sourcetype input = {
  1. mouse_x : float;
  2. mouse_y : float;
  3. mouse_down : bool;
  4. keys : string list;
  5. time : float;
}
Sourceval sprite : name:string -> costumes:int -> radius:float -> Scratch_blocks.script list -> sprite
Sourceval stage : sprite list -> t
Sourceval green_flag : t -> t
Sourceval stop : t -> t
Sourceval key : string -> t -> t
Sourceval click : string -> t -> t
Sourceval run_script : string -> int -> t -> t
Sourceval step : input -> t -> t
Sourceval report : input -> t -> string -> Scratch_blocks.block -> value * t
Sourceval find : t -> string -> sprite
Sourceval update : t -> sprite -> t
Sourceval variable : t -> string -> value
Sourceval items : t -> int -> value list
Sourceval show : t -> value -> string