This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
/
zzz_HighlightsPostProcess.go
86 lines (73 loc) · 2.52 KB
/
zzz_HighlightsPostProcess.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
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// HighlightsPostProcess represents a babylon.js HighlightsPostProcess.
// Extracts highlights from the image
//
// See: https://doc.babylonjs.com/how_to/how_to_use_postprocesses
type HighlightsPostProcess struct {
*PostProcess
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (h *HighlightsPostProcess) JSObject() js.Value { return h.p }
// HighlightsPostProcess returns a HighlightsPostProcess JavaScript class.
func (ba *Babylon) HighlightsPostProcess() *HighlightsPostProcess {
p := ba.ctx.Get("HighlightsPostProcess")
return HighlightsPostProcessFromJSObject(p, ba.ctx)
}
// HighlightsPostProcessFromJSObject returns a wrapped HighlightsPostProcess JavaScript class.
func HighlightsPostProcessFromJSObject(p js.Value, ctx js.Value) *HighlightsPostProcess {
return &HighlightsPostProcess{PostProcess: PostProcessFromJSObject(p, ctx), ctx: ctx}
}
// HighlightsPostProcessArrayToJSArray returns a JavaScript Array for the wrapped array.
func HighlightsPostProcessArrayToJSArray(array []*HighlightsPostProcess) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// NewHighlightsPostProcessOpts contains optional parameters for NewHighlightsPostProcess.
type NewHighlightsPostProcessOpts struct {
SamplingMode *float64
Engine *Engine
Reusable *bool
TextureType *float64
}
// NewHighlightsPostProcess returns a new HighlightsPostProcess object.
//
// https://doc.babylonjs.com/api/classes/babylon.highlightspostprocess#constructor
func (ba *Babylon) NewHighlightsPostProcess(name string, options float64, camera *Camera, opts *NewHighlightsPostProcessOpts) *HighlightsPostProcess {
if opts == nil {
opts = &NewHighlightsPostProcessOpts{}
}
args := make([]interface{}, 0, 3+4)
args = append(args, name)
args = append(args, options)
args = append(args, camera.JSObject())
if opts.SamplingMode == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.SamplingMode)
}
if opts.Engine == nil {
args = append(args, js.Undefined())
} else {
args = append(args, opts.Engine.JSObject())
}
if opts.Reusable == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.Reusable)
}
if opts.TextureType == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.TextureType)
}
p := ba.ctx.Get("HighlightsPostProcess").New(args...)
return HighlightsPostProcessFromJSObject(p, ba.ctx)
}