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_BoneAxesViewer.go
180 lines (151 loc) · 5.21 KB
/
zzz_BoneAxesViewer.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
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// BoneAxesViewer represents a babylon.js BoneAxesViewer.
// The BoneAxesViewer will attach 3 axes to a specific bone of a specific mesh
//
// See: https://www.babylonjs-playground.com/#0DE8F4#8
type BoneAxesViewer struct {
*AxesViewer
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (b *BoneAxesViewer) JSObject() js.Value { return b.p }
// BoneAxesViewer returns a BoneAxesViewer JavaScript class.
func (ba *Babylon) BoneAxesViewer() *BoneAxesViewer {
p := ba.ctx.Get("BoneAxesViewer")
return BoneAxesViewerFromJSObject(p, ba.ctx)
}
// BoneAxesViewerFromJSObject returns a wrapped BoneAxesViewer JavaScript class.
func BoneAxesViewerFromJSObject(p js.Value, ctx js.Value) *BoneAxesViewer {
return &BoneAxesViewer{AxesViewer: AxesViewerFromJSObject(p, ctx), ctx: ctx}
}
// BoneAxesViewerArrayToJSArray returns a JavaScript Array for the wrapped array.
func BoneAxesViewerArrayToJSArray(array []*BoneAxesViewer) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// NewBoneAxesViewerOpts contains optional parameters for NewBoneAxesViewer.
type NewBoneAxesViewerOpts struct {
ScaleLines *float64
}
// NewBoneAxesViewer returns a new BoneAxesViewer object.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#constructor
func (ba *Babylon) NewBoneAxesViewer(scene *Scene, bone *Bone, mesh *Mesh, opts *NewBoneAxesViewerOpts) *BoneAxesViewer {
if opts == nil {
opts = &NewBoneAxesViewerOpts{}
}
args := make([]interface{}, 0, 3+1)
args = append(args, scene.JSObject())
args = append(args, bone.JSObject())
args = append(args, mesh.JSObject())
if opts.ScaleLines == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.ScaleLines)
}
p := ba.ctx.Get("BoneAxesViewer").New(args...)
return BoneAxesViewerFromJSObject(p, ba.ctx)
}
// Dispose calls the Dispose method on the BoneAxesViewer object.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#dispose
func (b *BoneAxesViewer) Dispose() {
b.p.Call("dispose")
}
// Update calls the Update method on the BoneAxesViewer object.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#update
func (b *BoneAxesViewer) Update() {
b.p.Call("update")
}
// Bone returns the Bone property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#bone
func (b *BoneAxesViewer) Bone() *Bone {
retVal := b.p.Get("bone")
return BoneFromJSObject(retVal, b.ctx)
}
// SetBone sets the Bone property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#bone
func (b *BoneAxesViewer) SetBone(bone *Bone) *BoneAxesViewer {
b.p.Set("bone", bone.JSObject())
return b
}
// Mesh returns the Mesh property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#mesh
func (b *BoneAxesViewer) Mesh() *Mesh {
retVal := b.p.Get("mesh")
return MeshFromJSObject(retVal, b.ctx)
}
// SetMesh sets the Mesh property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#mesh
func (b *BoneAxesViewer) SetMesh(mesh *Mesh) *BoneAxesViewer {
b.p.Set("mesh", mesh.JSObject())
return b
}
// Pos returns the Pos property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#pos
func (b *BoneAxesViewer) Pos() *Vector3 {
retVal := b.p.Get("pos")
return Vector3FromJSObject(retVal, b.ctx)
}
// SetPos sets the Pos property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#pos
func (b *BoneAxesViewer) SetPos(pos *Vector3) *BoneAxesViewer {
b.p.Set("pos", pos.JSObject())
return b
}
// Xaxis returns the Xaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#xaxis
func (b *BoneAxesViewer) Xaxis() *Vector3 {
retVal := b.p.Get("xaxis")
return Vector3FromJSObject(retVal, b.ctx)
}
// SetXaxis sets the Xaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#xaxis
func (b *BoneAxesViewer) SetXaxis(xaxis *Vector3) *BoneAxesViewer {
b.p.Set("xaxis", xaxis.JSObject())
return b
}
// Yaxis returns the Yaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#yaxis
func (b *BoneAxesViewer) Yaxis() *Vector3 {
retVal := b.p.Get("yaxis")
return Vector3FromJSObject(retVal, b.ctx)
}
// SetYaxis sets the Yaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#yaxis
func (b *BoneAxesViewer) SetYaxis(yaxis *Vector3) *BoneAxesViewer {
b.p.Set("yaxis", yaxis.JSObject())
return b
}
// Zaxis returns the Zaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#zaxis
func (b *BoneAxesViewer) Zaxis() *Vector3 {
retVal := b.p.Get("zaxis")
return Vector3FromJSObject(retVal, b.ctx)
}
// SetZaxis sets the Zaxis property of class BoneAxesViewer.
//
// https://doc.babylonjs.com/api/classes/babylon.boneaxesviewer#zaxis
func (b *BoneAxesViewer) SetZaxis(zaxis *Vector3) *BoneAxesViewer {
b.p.Set("zaxis", zaxis.JSObject())
return b
}