This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zzz_ICustomShaderOptions.go
133 lines (116 loc) · 4.31 KB
/
zzz_ICustomShaderOptions.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
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// ICustomShaderOptions represents a babylon.js ICustomShaderOptions.
// Defines the options associated with the creation of a custom shader for a shadow generator.
type ICustomShaderOptions struct {
p js.Value
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (i *ICustomShaderOptions) JSObject() js.Value { return i.p }
// ICustomShaderOptions returns a ICustomShaderOptions JavaScript class.
func (ba *Babylon) ICustomShaderOptions() *ICustomShaderOptions {
p := ba.ctx.Get("ICustomShaderOptions")
return ICustomShaderOptionsFromJSObject(p, ba.ctx)
}
// ICustomShaderOptionsFromJSObject returns a wrapped ICustomShaderOptions JavaScript class.
func ICustomShaderOptionsFromJSObject(p js.Value, ctx js.Value) *ICustomShaderOptions {
return &ICustomShaderOptions{p: p, ctx: ctx}
}
// ICustomShaderOptionsArrayToJSArray returns a JavaScript Array for the wrapped array.
func ICustomShaderOptionsArrayToJSArray(array []*ICustomShaderOptions) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// Attributes returns the Attributes property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#attributes
func (i *ICustomShaderOptions) Attributes() []string {
retVal := i.p.Get("attributes")
result := []string{}
for ri := 0; ri < retVal.Length(); ri++ {
result = append(result, retVal.Index(ri).String())
}
return result
}
// SetAttributes sets the Attributes property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#attributes
func (i *ICustomShaderOptions) SetAttributes(attributes []string) *ICustomShaderOptions {
i.p.Set("attributes", attributes)
return i
}
// Defines returns the Defines property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#defines
func (i *ICustomShaderOptions) Defines() []string {
retVal := i.p.Get("defines")
result := []string{}
for ri := 0; ri < retVal.Length(); ri++ {
result = append(result, retVal.Index(ri).String())
}
return result
}
// SetDefines sets the Defines property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#defines
func (i *ICustomShaderOptions) SetDefines(defines []string) *ICustomShaderOptions {
i.p.Set("defines", defines)
return i
}
// Samplers returns the Samplers property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#samplers
func (i *ICustomShaderOptions) Samplers() []string {
retVal := i.p.Get("samplers")
result := []string{}
for ri := 0; ri < retVal.Length(); ri++ {
result = append(result, retVal.Index(ri).String())
}
return result
}
// SetSamplers sets the Samplers property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#samplers
func (i *ICustomShaderOptions) SetSamplers(samplers []string) *ICustomShaderOptions {
i.p.Set("samplers", samplers)
return i
}
// ShaderName returns the ShaderName property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#shadername
func (i *ICustomShaderOptions) ShaderName() string {
retVal := i.p.Get("shaderName")
return retVal.String()
}
// SetShaderName sets the ShaderName property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#shadername
func (i *ICustomShaderOptions) SetShaderName(shaderName string) *ICustomShaderOptions {
i.p.Set("shaderName", shaderName)
return i
}
// Uniforms returns the Uniforms property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#uniforms
func (i *ICustomShaderOptions) Uniforms() []string {
retVal := i.p.Get("uniforms")
result := []string{}
for ri := 0; ri < retVal.Length(); ri++ {
result = append(result, retVal.Index(ri).String())
}
return result
}
// SetUniforms sets the Uniforms property of class ICustomShaderOptions.
//
// https://doc.babylonjs.com/api/classes/babylon.icustomshaderoptions#uniforms
func (i *ICustomShaderOptions) SetUniforms(uniforms []string) *ICustomShaderOptions {
i.p.Set("uniforms", uniforms)
return i
}