This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
/
zzz_LightInformationBlock.go
232 lines (188 loc) · 7.35 KB
/
zzz_LightInformationBlock.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// LightInformationBlock represents a babylon.js LightInformationBlock.
// Block used to get data information from a light
type LightInformationBlock struct {
*NodeMaterialBlock
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (l *LightInformationBlock) JSObject() js.Value { return l.p }
// LightInformationBlock returns a LightInformationBlock JavaScript class.
func (ba *Babylon) LightInformationBlock() *LightInformationBlock {
p := ba.ctx.Get("LightInformationBlock")
return LightInformationBlockFromJSObject(p, ba.ctx)
}
// LightInformationBlockFromJSObject returns a wrapped LightInformationBlock JavaScript class.
func LightInformationBlockFromJSObject(p js.Value, ctx js.Value) *LightInformationBlock {
return &LightInformationBlock{NodeMaterialBlock: NodeMaterialBlockFromJSObject(p, ctx), ctx: ctx}
}
// LightInformationBlockArrayToJSArray returns a JavaScript Array for the wrapped array.
func LightInformationBlockArrayToJSArray(array []*LightInformationBlock) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// NewLightInformationBlock returns a new LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#constructor
func (ba *Babylon) NewLightInformationBlock(name string) *LightInformationBlock {
args := make([]interface{}, 0, 1+0)
args = append(args, name)
p := ba.ctx.Get("LightInformationBlock").New(args...)
return LightInformationBlockFromJSObject(p, ba.ctx)
}
// LightInformationBlockBindOpts contains optional parameters for LightInformationBlock.Bind.
type LightInformationBlockBindOpts struct {
Mesh *Mesh
}
// Bind calls the Bind method on the LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#bind
func (l *LightInformationBlock) Bind(effect *Effect, nodeMaterial *NodeMaterial, opts *LightInformationBlockBindOpts) {
if opts == nil {
opts = &LightInformationBlockBindOpts{}
}
args := make([]interface{}, 0, 2+1)
if effect == nil {
args = append(args, js.Null())
} else {
args = append(args, effect.JSObject())
}
if nodeMaterial == nil {
args = append(args, js.Null())
} else {
args = append(args, nodeMaterial.JSObject())
}
if opts.Mesh == nil {
args = append(args, js.Undefined())
} else {
args = append(args, opts.Mesh.JSObject())
}
l.p.Call("bind", args...)
}
// GetClassName calls the GetClassName method on the LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#getclassname
func (l *LightInformationBlock) GetClassName() string {
retVal := l.p.Call("getClassName")
return retVal.String()
}
// PrepareDefines calls the PrepareDefines method on the LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#preparedefines
func (l *LightInformationBlock) PrepareDefines(mesh *AbstractMesh, nodeMaterial *NodeMaterial, defines js.Value) {
args := make([]interface{}, 0, 3+0)
if mesh == nil {
args = append(args, js.Null())
} else {
args = append(args, mesh.JSObject())
}
if nodeMaterial == nil {
args = append(args, js.Null())
} else {
args = append(args, nodeMaterial.JSObject())
}
args = append(args, defines)
l.p.Call("prepareDefines", args...)
}
// Serialize calls the Serialize method on the LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#serialize
func (l *LightInformationBlock) Serialize() js.Value {
retVal := l.p.Call("serialize")
return retVal
}
// _deserialize calls the _deserialize method on the LightInformationBlock object.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#_deserialize
func (l *LightInformationBlock) _deserialize(serializationObject JSObject, scene *Scene, rootUrl string) {
args := make([]interface{}, 0, 3+0)
if serializationObject == nil {
args = append(args, js.Null())
} else {
args = append(args, serializationObject.JSObject())
}
if scene == nil {
args = append(args, js.Null())
} else {
args = append(args, scene.JSObject())
}
args = append(args, rootUrl)
l.p.Call("_deserialize", args...)
}
// Color returns the Color property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#color
func (l *LightInformationBlock) Color() *NodeMaterialConnectionPoint {
retVal := l.p.Get("color")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetColor sets the Color property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#color
func (l *LightInformationBlock) SetColor(color *NodeMaterialConnectionPoint) *LightInformationBlock {
l.p.Set("color", color.JSObject())
return l
}
// Direction returns the Direction property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#direction
func (l *LightInformationBlock) Direction() *NodeMaterialConnectionPoint {
retVal := l.p.Get("direction")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetDirection sets the Direction property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#direction
func (l *LightInformationBlock) SetDirection(direction *NodeMaterialConnectionPoint) *LightInformationBlock {
l.p.Set("direction", direction.JSObject())
return l
}
// Intensity returns the Intensity property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#intensity
func (l *LightInformationBlock) Intensity() *NodeMaterialConnectionPoint {
retVal := l.p.Get("intensity")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetIntensity sets the Intensity property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#intensity
func (l *LightInformationBlock) SetIntensity(intensity *NodeMaterialConnectionPoint) *LightInformationBlock {
l.p.Set("intensity", intensity.JSObject())
return l
}
// Light returns the Light property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#light
func (l *LightInformationBlock) Light() *Light {
retVal := l.p.Get("light")
return LightFromJSObject(retVal, l.ctx)
}
// SetLight sets the Light property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#light
func (l *LightInformationBlock) SetLight(light *Light) *LightInformationBlock {
l.p.Set("light", light.JSObject())
return l
}
// WorldPosition returns the WorldPosition property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#worldposition
func (l *LightInformationBlock) WorldPosition() *NodeMaterialConnectionPoint {
retVal := l.p.Get("worldPosition")
return NodeMaterialConnectionPointFromJSObject(retVal, l.ctx)
}
// SetWorldPosition sets the WorldPosition property of class LightInformationBlock.
//
// https://doc.babylonjs.com/api/classes/babylon.lightinformationblock#worldposition
func (l *LightInformationBlock) SetWorldPosition(worldPosition *NodeMaterialConnectionPoint) *LightInformationBlock {
l.p.Set("worldPosition", worldPosition.JSObject())
return l
}