This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
/
zzz_LengthBlock.go
91 lines (74 loc) · 2.67 KB
/
zzz_LengthBlock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// LengthBlock represents a babylon.js LengthBlock.
// Block used to get the length of a vector
type LengthBlock struct {
*NodeMaterialBlock
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (l *LengthBlock) JSObject() js.Value { return l.p }
// LengthBlock returns a LengthBlock JavaScript class.
func (ba *Babylon) LengthBlock() *LengthBlock {
p := ba.ctx.Get("LengthBlock")
return LengthBlockFromJSObject(p, ba.ctx)
}
// LengthBlockFromJSObject returns a wrapped LengthBlock JavaScript class.
func LengthBlockFromJSObject(p js.Value, ctx js.Value) *LengthBlock {
return &LengthBlock{NodeMaterialBlock: NodeMaterialBlockFromJSObject(p, ctx), ctx: ctx}
}
// LengthBlockArrayToJSArray returns a JavaScript Array for the wrapped array.
func LengthBlockArrayToJSArray(array []*LengthBlock) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// NewLengthBlock returns a new LengthBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#constructor
func (ba *Babylon) NewLengthBlock(name string) *LengthBlock {
args := make([]interface{}, 0, 1+0)
args = append(args, name)
p := ba.ctx.Get("LengthBlock").New(args...)
return LengthBlockFromJSObject(p, ba.ctx)
}
// GetClassName calls the GetClassName method on the LengthBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#getclassname
func (l *LengthBlock) GetClassName() string {
retVal := l.p.Call("getClassName")
return retVal.String()
}
// Output returns the Output property of class LengthBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#output
func (l *LengthBlock) Output() *NodeMaterialConnectionPoint {
retVal := l.p.Get("output")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetOutput sets the Output property of class LengthBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#output
func (l *LengthBlock) SetOutput(output *NodeMaterialConnectionPoint) *LengthBlock {
l.p.Set("output", output.JSObject())
return l
}
// Value returns the Value property of class LengthBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#value
func (l *LengthBlock) Value() *NodeMaterialConnectionPoint {
retVal := l.p.Get("value")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetValue sets the Value property of class LengthBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lengthblock#value
func (l *LengthBlock) SetValue(value *NodeMaterialConnectionPoint) *LengthBlock {
l.p.Set("value", value.JSObject())
return l
}