engine

Function engine 

Source
pub fn engine() -> Engine
Expand description

Build a new engine with Fidget-specific bindings and settings

  • Mathematical constants (PI, E, TAU, etc.), provided by the resolver function
  • Tree-specific type, overloads, and axes() (tree::register)
  • Custom types (e.g. GLSL-style vectors), provided by types::register
  • Shapes and transforms (shapes::register)
  • An on_progress limit of 50,000 steps (chosen arbitrarily)
  • Max expression and function expression depths of 64 and 32 (also chosen arbitrarily)
  • set_fail_on_invalid_map_property set to true, so that missing map items raise an error
  • A custom resolver (resolver) which provides fallbacks for x, y, z, and mathematical constants (if not defined)