Documentation ¶
Index ¶
- func AssertMainFunction(v Value) error
- func IsBool(v_ Value) bool
- func IsFloat(v_ Value) bool
- func IsInt(v_ Value) bool
- func IsSampler2D(v_ Value) bool
- func IsSamplerCube(v_ Value) bool
- func IsScalar(v_ Value) bool
- func IsSimple(v_ Value) bool
- func IsStruct(v Value) bool
- func IsVec(v_ Value) bool
- type Array
- func (v *Array) Check(other_ Value, ctx context.Context) error
- func (v *Array) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Array) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Array) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Array) Length() int
- func (v *Array) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Array) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Array) TypeName() string
- type Callable
- type ContextValue
- func (v *ContextValue) Check(v_ Value, ctx context.Context) error
- func (v *ContextValue) Context() context.Context
- func (v *ContextValue) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *ContextValue) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *ContextValue) GetMember(key string, ctx context.Context) (Value, error)
- func (v *ContextValue) Instantiate(ctx context.Context) (Value, error)
- func (v *ContextValue) Length() int
- func (v *ContextValue) LiteralIntValue() (int, bool)
- func (v *ContextValue) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *ContextValue) SetMember(key string, arg Value, ctx context.Context) error
- func (v *ContextValue) TypeName() string
- type Function
- func (v *Function) Check(other_ Value, ctx context.Context) error
- func (v *Function) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Function) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Function) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Function) Length() int
- func (v *Function) LiteralIntValue() (int, bool)
- func (v *Function) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Function) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Function) TypeName() string
- type FunctionOverloads
- type LiteralInt
- type Sampler2D
- func (v *Sampler2D) Check(other_ Value, ctx context.Context) error
- func (v *Sampler2D) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Sampler2D) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Sampler2D) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Sampler2D) Length() int
- func (v *Sampler2D) LiteralIntValue() (int, bool)
- func (v *Sampler2D) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Sampler2D) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Sampler2D) TypeName() string
- type Sampler2DType
- type SamplerCube
- func (v *SamplerCube) Check(other_ Value, ctx context.Context) error
- func (v *SamplerCube) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *SamplerCube) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *SamplerCube) GetMember(key string, ctx context.Context) (Value, error)
- func (v *SamplerCube) Length() int
- func (v *SamplerCube) LiteralIntValue() (int, bool)
- func (v *SamplerCube) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *SamplerCube) SetMember(key string, arg Value, ctx context.Context) error
- func (v *SamplerCube) TypeName() string
- type SamplerCubeType
- type Scalar
- func (v *Scalar) Check(other_ Value, ctx context.Context) error
- func (v *Scalar) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Scalar) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Scalar) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Scalar) Length() int
- func (v *Scalar) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Scalar) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Scalar) TypeName() string
- type ScalarType
- type Struct
- func (v *Struct) Check(other_ Value, ctx context.Context) error
- func (v *Struct) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Struct) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Struct) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Struct) GetStructable() Structable
- func (v *Struct) Length() int
- func (v *Struct) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Struct) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Struct) TypeName() string
- type StructType
- type Structable
- type TypeData
- func (v *TypeData) Context() context.Context
- func (v *TypeData) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *TypeData) GetMember(key string, ctx context.Context) (Value, error)
- func (v *TypeData) Length() int
- func (v *TypeData) LiteralIntValue() (int, bool)
- func (v *TypeData) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *TypeData) SetMember(key string, arg Value, ctx context.Context) error
- func (v *TypeData) TypeName() string
- type Value
- func NewAnyAllFunction(ctx context.Context) Value
- func NewArray(content Value, length int, ctx context.Context) Value
- func NewBVec2(ctx context.Context) Value
- func NewBVec3(ctx context.Context) Value
- func NewBVec4(ctx context.Context) Value
- func NewBool(ctx context.Context) Value
- func NewBuiltinFunction(args [][]Value, ctx context.Context) Value
- func NewClampFunction(ctx context.Context) Value
- func NewCompareFunction(ctx context.Context) Value
- func NewContextValue(val Value, ctx context.Context) Value
- func NewCrossFunction(ctx context.Context) Value
- func NewDotFunction(ctx context.Context) Value
- func NewFloat(ctx context.Context) Value
- func NewFunction(fn Callable, ctx context.Context) Value
- func NewIVec2(ctx context.Context) Value
- func NewIVec3(ctx context.Context) Value
- func NewIVec4(ctx context.Context) Value
- func NewInt(ctx context.Context) Value
- func NewLengthFunction(ctx context.Context) Value
- func NewMinMaxFunction(ctx context.Context) Value
- func NewMixFunction(ctx context.Context) Value
- func NewNotFunction(ctx context.Context) Value
- func NewOneOrTwoToOneFunction(ctx context.Context) Value
- func NewOneToOneFunction(ctx context.Context) Value
- func NewSampler2D(ctx context.Context) Value
- func NewSampler2DType(ctx context.Context) Value
- func NewSamplerCube(ctx context.Context) Value
- func NewSamplerCubeType(ctx context.Context) Value
- func NewScalar(typeName string, ctx context.Context) Value
- func NewScalarType(name string, ctx context.Context) Value
- func NewSmoothStepFunction(ctx context.Context) Value
- func NewStepFunction(ctx context.Context) Value
- func NewStruct(t Structable, ctx context.Context) Value
- func NewStructType(t Structable, ctx context.Context) Value
- func NewTexture2DFunction(ctx context.Context) Value
- func NewTextureCubeFunction(ctx context.Context) Value
- func NewThreeToOneFunction(ctx context.Context) Value
- func NewTwoToOneFunction(ctx context.Context) Value
- func NewVec(compName string, n int, ctx context.Context) Value
- func NewVec2(ctx context.Context) Value
- func NewVec3(ctx context.Context) Value
- func NewVec4(ctx context.Context) Value
- func NewVecType(compType string, n int, ctx context.Context) Value
- func UnpackContextValue(val Value) Value
- type ValueData
- type Vec
- func (v *Vec) Check(other_ Value, ctx context.Context) error
- func (v *Vec) EvalFunction(args []Value, ctx context.Context) (Value, error)
- func (v *Vec) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
- func (v *Vec) GetMember(key string, ctx context.Context) (Value, error)
- func (v *Vec) Length() int
- func (v *Vec) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
- func (v *Vec) SetMember(key string, arg Value, ctx context.Context) error
- func (v *Vec) TypeName() string
- type VecType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertMainFunction ¶
func IsSampler2D ¶
func IsSamplerCube ¶
Types ¶
type Array ¶
type Array struct { ValueData // contains filtered or unexported fields }
func (*Array) EvalFunction ¶
type ContextValue ¶
type ContextValue struct {
// contains filtered or unexported fields
}
give a different context to a value
func (*ContextValue) Context ¶
func (v *ContextValue) Context() context.Context
func (*ContextValue) EvalFunction ¶
func (*ContextValue) GetIndex ¶
func (v *ContextValue) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
func (*ContextValue) Instantiate ¶
func (v *ContextValue) Instantiate(ctx context.Context) (Value, error)
func (*ContextValue) Length ¶
func (v *ContextValue) Length() int
func (*ContextValue) LiteralIntValue ¶
func (v *ContextValue) LiteralIntValue() (int, bool)
func (*ContextValue) SetIndex ¶
func (v *ContextValue) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
func (*ContextValue) TypeName ¶
func (v *ContextValue) TypeName() string
type Function ¶
type Function struct { ValueData // contains filtered or unexported fields }
func (*Function) EvalFunction ¶
func (*Function) LiteralIntValue ¶
type FunctionOverloads ¶
type FunctionOverloads struct {
// contains filtered or unexported fields
}
type LiteralInt ¶
type LiteralInt struct { Scalar // contains filtered or unexported fields }
func AssertLiteralInt ¶
func AssertLiteralInt(v_ Value) (*LiteralInt, error)
func NewLiteralInt ¶
func NewLiteralInt(i int, ctx context.Context) *LiteralInt
func (*LiteralInt) LiteralIntValue ¶
func (v *LiteralInt) LiteralIntValue() (int, bool)
type Sampler2D ¶
type Sampler2D struct {
ValueData
}
func (*Sampler2D) EvalFunction ¶
func (*Sampler2D) LiteralIntValue ¶
type Sampler2DType ¶
type Sampler2DType struct {
TypeData
}
func (*Sampler2DType) EvalFunction ¶
func (*Sampler2DType) Instantiate ¶
func (v *Sampler2DType) Instantiate(ctx context.Context) (Value, error)
type SamplerCube ¶
type SamplerCube struct {
ValueData
}
func (*SamplerCube) EvalFunction ¶
func (*SamplerCube) GetIndex ¶
func (v *SamplerCube) GetIndex(idx *LiteralInt, ctx context.Context) (Value, error)
func (*SamplerCube) Length ¶
func (v *SamplerCube) Length() int
func (*SamplerCube) LiteralIntValue ¶
func (v *SamplerCube) LiteralIntValue() (int, bool)
func (*SamplerCube) SetIndex ¶
func (v *SamplerCube) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error
func (*SamplerCube) TypeName ¶
func (v *SamplerCube) TypeName() string
type SamplerCubeType ¶
type SamplerCubeType struct {
TypeData
}
func (*SamplerCubeType) Check ¶
func (v *SamplerCubeType) Check(other Value, ctx context.Context) error
func (*SamplerCubeType) EvalFunction ¶
func (*SamplerCubeType) Instantiate ¶
func (v *SamplerCubeType) Instantiate(ctx context.Context) (Value, error)
type Scalar ¶
type Scalar struct { ValueData // contains filtered or unexported fields }
func AssertBool ¶
func AssertFloat ¶
func (*Scalar) EvalFunction ¶
type ScalarType ¶
type ScalarType struct {
TypeData
}
func (*ScalarType) EvalFunction ¶
func (*ScalarType) Instantiate ¶
func (v *ScalarType) Instantiate(ctx context.Context) (Value, error)
type Struct ¶
type Struct struct { ValueData // contains filtered or unexported fields }
func AssertStruct ¶
func (*Struct) EvalFunction ¶
func (*Struct) GetStructable ¶
func (v *Struct) GetStructable() Structable
type StructType ¶
type StructType struct { TypeData // contains filtered or unexported fields }
func (*StructType) EvalFunction ¶
func (*StructType) Instantiate ¶
func (v *StructType) Instantiate(ctx context.Context) (Value, error)
type Structable ¶
type TypeData ¶
type TypeData struct {
// contains filtered or unexported fields
}
func (*TypeData) LiteralIntValue ¶
type Value ¶
type Value interface { Context() context.Context TypeName() string Check(other Value, ctx context.Context) error // types can check values, values can check values Instantiate(ctx context.Context) (Value, error) // only works for types, err if not a type EvalFunction(args []Value, ctx context.Context) (Value, error) // method returns nil Value GetMember(key string, ctx context.Context) (Value, error) SetMember(key string, arg Value, ctx context.Context) error GetIndex(idx *LiteralInt, ctx context.Context) (Value, error) SetIndex(idx *LiteralInt, arg Value, ctx context.Context) error LiteralIntValue() (int, bool) Length() int // mostly 1, more than 1 for vectors and arrays }
func NewAnyAllFunction ¶
func NewClampFunction ¶
func NewCompareFunction ¶
func NewCrossFunction ¶
func NewDotFunction ¶
func NewLengthFunction ¶
func NewMinMaxFunction ¶
func NewMixFunction ¶
func NewNotFunction ¶
func NewOneToOneFunction ¶
func NewSampler2D ¶
func NewSampler2DType ¶
func NewSamplerCube ¶
func NewSamplerCubeType ¶
func NewSmoothStepFunction ¶
func NewStepFunction ¶
func NewStructType ¶
func NewStructType(t Structable, ctx context.Context) Value
func NewTexture2DFunction ¶
func NewTextureCubeFunction ¶
func NewThreeToOneFunction ¶
func NewTwoToOneFunction ¶
func UnpackContextValue ¶
type ValueData ¶
type ValueData struct {
// contains filtered or unexported fields
}
func (*ValueData) LiteralIntValue ¶
type Vec ¶
type Vec struct { ValueData // contains filtered or unexported fields }
func (*Vec) EvalFunction ¶
type VecType ¶
type VecType struct { TypeData // contains filtered or unexported fields }
func (*VecType) EvalFunction ¶
can't vecs also take other vecs as arguments?
Click to show internal directories.
Click to hide internal directories.