package tiny_appkits

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

Module ModelerSource

Sourcetype v3 = float * float * float
Sourcetype shape =
  1. | Cube
  2. | Sphere
  3. | Cylinder
  4. | Cone
  5. | Torus of float
  6. | Ground
Sourcetype look =
  1. | Plain
  2. | Checker
  3. | Marble
  4. | Wood
Sourcetype material = {
  1. color : int;
  2. look : look;
  3. mirror : float;
  4. glass : bool;
}
Sourcetype kind =
  1. | Mesh of shape * material
  2. | Point_light of int
  3. | Sun_light of int
  4. | Camera
Sourcetype boolean =
  1. | Difference
  2. | Union
  3. | Intersect
Sourcetype obj = {
  1. name : string;
  2. kind : kind;
  3. location : v3;
  4. rotation : v3;
  5. scale : v3;
  6. hidden : bool;
  7. modifier : (boolean * string) option;
}
Sourcetype t = obj list
Sourceval grey : material
Sourceval default : t
Sourceval fresh_name : string -> t -> string
Sourceval add : kind -> string -> t -> t * string
Sourceval find : t -> string -> obj option
Sourceval update : string -> (obj -> obj) -> t -> t
Sourceval remove : string list -> t -> t
Sourceval duplicate : string list -> t -> t * string list
Sourceval is_cutter : t -> string -> bool
Sourceval transform : obj -> v3 -> v3
Sourceval to_world : v3 -> v3
Sourceval rotate_point : int -> float -> v3 -> v3
Sourceval translate : v3 -> obj -> obj
Sourceval turn : int -> float -> obj -> obj
Sourceval resize : v3 -> obj -> obj
Sourceval wires : ?target:v3 -> obj -> (v3 * v3) list