Documentation ¶
Index ¶
- type GFentityOutput
- type GFentityProps
- type GFexpr
- type GFexternAPI
- type GFgeometryFunc
- type GFprogramDebug
- type GFrpcCallFun
- type GFrpcServeFun
- type GFrpcServerHandler
- type GFruleDef
- type GFruleDefs
- type GFshaderDef
- type GFshaderUniformDef
- type GFstate
- type GFstateChange
- type GFstateChangeOutput
- type GFsymbols
- type GFvariableVal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GFentityOutput ¶
type GFentityOutput struct { IDstr gf_core.GF_ID `json:"id_str"` TypeStr string `json:"type_str"` Props *GFentityProps `json:"props_map"` }
type GFentityProps ¶
type GFentityProps struct { Xf float64 `json:"x_f"` Yf float64 `json:"y_f"` Zf float64 `json:"z_f"` RotationXf float64 `json:"rotation_x_f"` RotationYf float64 `json:"rotation_y_f"` RotationZf float64 `json:"rotation_z_f"` ScaleXf float64 `json:"scale_x_f"` ScaleYf float64 `json:"scale_y_f"` ScaleZf float64 `json:"scale_z_f"` ColorRedF float64 `json:"color_red_f"` ColorGreenF float64 `json:"color_green_f"` ColorBlueF float64 `json:"color_blue_f"` }
type GFexpr ¶
type GFexpr []interface{}
-------------------------------------------------
func CastToExpr ¶
func CastToExpr(pExprLst []interface{}) GFexpr
type GFexternAPI ¶
type GFexternAPI struct { InitEngineFun func(map[string]*GFshaderDef) SetStateFun func(GFstateChange) []interface{} CreateCubeFun GFgeometryFunc CreateSphereFun GFgeometryFunc CreateLineFun GFgeometryFunc AnimateFun func([]map[string]interface{}, float64, bool) //------------------------------------ // RPC // RPC_CALL RPCcall GFrpcCallFun // RPC_SERVE RPCserve GFrpcServeFun }
func GetTestExternAPI ¶
func GetTestExternAPI() GFexternAPI
type GFgeometryFunc ¶
type GFprogramDebug ¶
type GFprogramDebug struct { RulesCallsCounterMap map[string]int StateHistoryLst []*GFstate OutputEntitiesMap map[gf_core.GF_ID]*GFentityOutput // this is the full output built up over program execution // that stores all extern API calls. // this includes both the entities and state operations OutputLst []interface{} }
func Run ¶
func Run(pProgramASTlst GFexpr, pExternAPI GFexternAPI) ([]interface{}, []*GFprogramDebug, error)
type GFrpcCallFun ¶
type GFrpcServeFun ¶
type GFrpcServeFun func(string, []*GFrpcServerHandler, GFexternAPI) // extern_api
type GFrpcServerHandler ¶
type GFruleDefs ¶
type GFshaderDef ¶
type GFshaderDef struct { NameStr string UniformsDefsLst []GFshaderUniformDef VertexCodeStr string FragmentCodeStr string }
type GFshaderUniformDef ¶
type GFstate ¶
type GFstate struct { CreationUNIXtimeF float64 `json:"creation_unix_time_f"` Xf float64 `json:"x_f"` Yf float64 `json:"y_f"` Zf float64 `json:"z_f"` RotationXf float64 `json:"rotation_f"` RotationYf float64 `json:"rotation_f"` RotationZf float64 `json:"rotation_f"` ScaleXf float64 `json:"scale_x_f"` ScaleYf float64 `json:"scale_y_f"` ScaleZf float64 `json:"scale_z_f"` ColorRedF float64 `json:"color_red_f"` ColorGreenF float64 `json:"color_green_f"` ColorBlueF float64 `json:"color_blue_f"` // global max number of iterations for any rule ItersMaxInt int `json:"iters_max_int"` // list of all rules that are executing RulesNamesStackLst []string `json:"rules_names_stack_lst"` // VARIABLES VarsMap map[string]*GFvariableVal `json:"vars_map"` // global iterations number for a particular root expression ItersNumGlobalInt int `json:"iters_num_global_int"` // stack of iteration numbers for each rule as its entered RulesItersNumStackLst []int `json:"rules_iters_num_stack_lst"` // ANIMATIONS - map of animations that are currently active // in a subexpression or its children AnimationsActiveMap map[string]interface{} `json:"animations_active_map"` }
type GFstateChange ¶
type GFstateChange struct { PropertyNameStr string `json:"property_name_str"` SetterTypeStr string `json:"setter_type_str"` ColorRGBlst []float64 `json:"color_rgb_lst"` ColorRGBhexStr string `json:"color_rgb_hex_str"` ColorBackgroundRGBlst []float64 `json:"color_background_rgb_lst"` ColorBackgroundHexStr string `json:"color_background_hex_str"` MaterialTypeStr string `json:"material_type_str"` MaterialValueBool bool `json:"material_value_bool"` MaterialValueStr string `json:"material_value_str"` MaterialShaderNameStr string `json:"material_shader_name_str"` MaterialShaderUniformNameStr string `json:"material_shader_uniform_name_str"` MaterialShaderUniformVal interface{} `json:"material_shader_uniform_val"` LineCmdStr string `json:"line_cmd_str"` AxisTypeStr string `json:"axis_type_str"` OriginTypeStr string `json:"origin_type_str"` Xf float64 `json:"x_f"` Yf float64 `json:"y_f"` Zf float64 `json:"z_f"` RotationXf float64 `json:"rotation_x_f"` RotationYf float64 `json:"rotation_y_f"` RotationZf float64 `json:"rotation_x_f"` }
type GFstateChangeOutput ¶
type GFstateChangeOutput struct { IDstr gf_core.GF_ID `json:"id_str"` Change *GFstateChange `json:"change_map"` }
type GFvariableVal ¶
Click to show internal directories.
Click to hide internal directories.