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_NullEngine.go
1161 lines (866 loc) · 30.3 KB
/
zzz_NullEngine.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// NullEngine represents a babylon.js NullEngine.
// The null engine class provides support for headless version of babylon.js.
// This can be used in server side scenario or for testing purposes
type NullEngine struct {
*Engine
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (n *NullEngine) JSObject() js.Value { return n.p }
// NullEngine returns a NullEngine JavaScript class.
func (ba *Babylon) NullEngine() *NullEngine {
p := ba.ctx.Get("NullEngine")
return NullEngineFromJSObject(p, ba.ctx)
}
// NullEngineFromJSObject returns a wrapped NullEngine JavaScript class.
func NullEngineFromJSObject(p js.Value, ctx js.Value) *NullEngine {
return &NullEngine{Engine: EngineFromJSObject(p, ctx), ctx: ctx}
}
// NullEngineArrayToJSArray returns a JavaScript Array for the wrapped array.
func NullEngineArrayToJSArray(array []*NullEngine) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// NewNullEngineOpts contains optional parameters for NewNullEngine.
type NewNullEngineOpts struct {
Options *NullEngineOptions
}
// NewNullEngine returns a new NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#constructor
func (ba *Babylon) NewNullEngine(opts *NewNullEngineOpts) *NullEngine {
if opts == nil {
opts = &NewNullEngineOpts{}
}
args := make([]interface{}, 0, 0+1)
if opts.Options == nil {
args = append(args, js.Undefined())
} else {
args = append(args, opts.Options.JSObject())
}
p := ba.ctx.Get("NullEngine").New(args...)
return NullEngineFromJSObject(p, ba.ctx)
}
// AreAllEffectsReady calls the AreAllEffectsReady method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#arealleffectsready
func (n *NullEngine) AreAllEffectsReady() bool {
retVal := n.p.Call("areAllEffectsReady")
return retVal.Bool()
}
// BindBuffers calls the BindBuffers method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#bindbuffers
func (n *NullEngine) BindBuffers(vertexBuffers js.Value, indexBuffer *DataBuffer, effect *Effect) {
args := make([]interface{}, 0, 3+0)
args = append(args, vertexBuffers)
if indexBuffer == nil {
args = append(args, js.Null())
} else {
args = append(args, indexBuffer.JSObject())
}
if effect == nil {
args = append(args, js.Null())
} else {
args = append(args, effect.JSObject())
}
n.p.Call("bindBuffers", args...)
}
// NullEngineBindFramebufferOpts contains optional parameters for NullEngine.BindFramebuffer.
type NullEngineBindFramebufferOpts struct {
FaceIndex *float64
RequiredWidth *float64
RequiredHeight *float64
ForceFullscreenViewport *bool
}
// BindFramebuffer calls the BindFramebuffer method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#bindframebuffer
func (n *NullEngine) BindFramebuffer(texture *InternalTexture, opts *NullEngineBindFramebufferOpts) {
if opts == nil {
opts = &NullEngineBindFramebufferOpts{}
}
args := make([]interface{}, 0, 1+4)
if texture == nil {
args = append(args, js.Null())
} else {
args = append(args, texture.JSObject())
}
if opts.FaceIndex == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.FaceIndex)
}
if opts.RequiredWidth == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.RequiredWidth)
}
if opts.RequiredHeight == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.RequiredHeight)
}
if opts.ForceFullscreenViewport == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.ForceFullscreenViewport)
}
n.p.Call("bindFramebuffer", args...)
}
// BindSamplers calls the BindSamplers method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#bindsamplers
func (n *NullEngine) BindSamplers(effect *Effect) {
args := make([]interface{}, 0, 1+0)
if effect == nil {
args = append(args, js.Null())
} else {
args = append(args, effect.JSObject())
}
n.p.Call("bindSamplers", args...)
}
// NullEngineClearOpts contains optional parameters for NullEngine.Clear.
type NullEngineClearOpts struct {
Stencil *bool
}
// Clear calls the Clear method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#clear
func (n *NullEngine) Clear(color js.Value, backBuffer bool, depth bool, opts *NullEngineClearOpts) {
if opts == nil {
opts = &NullEngineClearOpts{}
}
args := make([]interface{}, 0, 3+1)
args = append(args, color)
args = append(args, backBuffer)
args = append(args, depth)
if opts.Stencil == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.Stencil)
}
n.p.Call("clear", args...)
}
// CreateDynamicVertexBuffer calls the CreateDynamicVertexBuffer method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createdynamicvertexbuffer
func (n *NullEngine) CreateDynamicVertexBuffer(vertices js.Value) *DataBuffer {
args := make([]interface{}, 0, 1+0)
args = append(args, vertices)
retVal := n.p.Call("createDynamicVertexBuffer", args...)
return DataBufferFromJSObject(retVal, n.ctx)
}
// CreateIndexBuffer calls the CreateIndexBuffer method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createindexbuffer
func (n *NullEngine) CreateIndexBuffer(indices js.Value) *DataBuffer {
args := make([]interface{}, 0, 1+0)
args = append(args, indices)
retVal := n.p.Call("createIndexBuffer", args...)
return DataBufferFromJSObject(retVal, n.ctx)
}
// CreateRenderTargetTexture calls the CreateRenderTargetTexture method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createrendertargettexture
func (n *NullEngine) CreateRenderTargetTexture(size JSObject, options bool) *InternalTexture {
args := make([]interface{}, 0, 2+0)
if size == nil {
args = append(args, js.Null())
} else {
args = append(args, size.JSObject())
}
args = append(args, options)
retVal := n.p.Call("createRenderTargetTexture", args...)
return InternalTextureFromJSObject(retVal, n.ctx)
}
// NullEngineCreateShaderProgramOpts contains optional parameters for NullEngine.CreateShaderProgram.
type NullEngineCreateShaderProgramOpts struct {
Context js.Value
}
// CreateShaderProgram calls the CreateShaderProgram method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createshaderprogram
func (n *NullEngine) CreateShaderProgram(pipelineContext *IPipelineContext, vertexCode string, fragmentCode string, defines string, opts *NullEngineCreateShaderProgramOpts) js.Value {
if opts == nil {
opts = &NullEngineCreateShaderProgramOpts{}
}
args := make([]interface{}, 0, 4+1)
if pipelineContext == nil {
args = append(args, js.Null())
} else {
args = append(args, pipelineContext.JSObject())
}
args = append(args, vertexCode)
args = append(args, fragmentCode)
args = append(args, defines)
args = append(args, opts.Context)
retVal := n.p.Call("createShaderProgram", args...)
return retVal
}
// NullEngineCreateTextureOpts contains optional parameters for NullEngine.CreateTexture.
type NullEngineCreateTextureOpts struct {
SamplingMode *float64
OnLoad JSFunc
OnError JSFunc
Buffer js.Value
FallBack *InternalTexture
Format *float64
}
// CreateTexture calls the CreateTexture method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createtexture
func (n *NullEngine) CreateTexture(urlArg string, noMipmap bool, invertY bool, scene *Scene, opts *NullEngineCreateTextureOpts) *InternalTexture {
if opts == nil {
opts = &NullEngineCreateTextureOpts{}
}
args := make([]interface{}, 0, 4+6)
args = append(args, urlArg)
args = append(args, noMipmap)
args = append(args, invertY)
if scene == nil {
args = append(args, js.Null())
} else {
args = append(args, scene.JSObject())
}
if opts.SamplingMode == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.SamplingMode)
}
if opts.OnLoad == nil {
args = append(args, js.Undefined())
} else {
args = append(args, js.FuncOf(opts.OnLoad) /* never freed! */)
}
if opts.OnError == nil {
args = append(args, js.Undefined())
} else {
args = append(args, js.FuncOf(opts.OnError) /* never freed! */)
}
args = append(args, opts.Buffer)
if opts.FallBack == nil {
args = append(args, js.Undefined())
} else {
args = append(args, opts.FallBack.JSObject())
}
if opts.Format == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.Format)
}
retVal := n.p.Call("createTexture", args...)
return InternalTextureFromJSObject(retVal, n.ctx)
}
// CreateVertexBuffer calls the CreateVertexBuffer method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#createvertexbuffer
func (n *NullEngine) CreateVertexBuffer(vertices js.Value) *DataBuffer {
args := make([]interface{}, 0, 1+0)
args = append(args, vertices)
retVal := n.p.Call("createVertexBuffer", args...)
return DataBufferFromJSObject(retVal, n.ctx)
}
// DisplayLoadingUI calls the DisplayLoadingUI method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#displayloadingui
func (n *NullEngine) DisplayLoadingUI() {
n.p.Call("displayLoadingUI")
}
// NullEngineDrawOpts contains optional parameters for NullEngine.Draw.
type NullEngineDrawOpts struct {
InstancesCount *float64
}
// Draw calls the Draw method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#draw
func (n *NullEngine) Draw(useTriangles bool, indexStart float64, indexCount float64, opts *NullEngineDrawOpts) {
if opts == nil {
opts = &NullEngineDrawOpts{}
}
args := make([]interface{}, 0, 3+1)
args = append(args, useTriangles)
args = append(args, indexStart)
args = append(args, indexCount)
if opts.InstancesCount == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.InstancesCount)
}
n.p.Call("draw", args...)
}
// NullEngineDrawArraysTypeOpts contains optional parameters for NullEngine.DrawArraysType.
type NullEngineDrawArraysTypeOpts struct {
InstancesCount *float64
}
// DrawArraysType calls the DrawArraysType method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#drawarraystype
func (n *NullEngine) DrawArraysType(fillMode float64, verticesStart float64, verticesCount float64, opts *NullEngineDrawArraysTypeOpts) {
if opts == nil {
opts = &NullEngineDrawArraysTypeOpts{}
}
args := make([]interface{}, 0, 3+1)
args = append(args, fillMode)
args = append(args, verticesStart)
args = append(args, verticesCount)
if opts.InstancesCount == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.InstancesCount)
}
n.p.Call("drawArraysType", args...)
}
// NullEngineDrawElementsTypeOpts contains optional parameters for NullEngine.DrawElementsType.
type NullEngineDrawElementsTypeOpts struct {
InstancesCount *float64
}
// DrawElementsType calls the DrawElementsType method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#drawelementstype
func (n *NullEngine) DrawElementsType(fillMode float64, indexStart float64, indexCount float64, opts *NullEngineDrawElementsTypeOpts) {
if opts == nil {
opts = &NullEngineDrawElementsTypeOpts{}
}
args := make([]interface{}, 0, 3+1)
args = append(args, fillMode)
args = append(args, indexStart)
args = append(args, indexCount)
if opts.InstancesCount == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.InstancesCount)
}
n.p.Call("drawElementsType", args...)
}
// EnableEffect calls the EnableEffect method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#enableeffect
func (n *NullEngine) EnableEffect(effect *Effect) {
args := make([]interface{}, 0, 1+0)
if effect == nil {
args = append(args, js.Null())
} else {
args = append(args, effect.JSObject())
}
n.p.Call("enableEffect", args...)
}
// GetAttributes calls the GetAttributes method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#getattributes
func (n *NullEngine) GetAttributes(pipelineContext *IPipelineContext, attributesNames []string) []float64 {
args := make([]interface{}, 0, 2+0)
if pipelineContext == nil {
args = append(args, js.Null())
} else {
args = append(args, pipelineContext.JSObject())
}
args = append(args, attributesNames)
retVal := n.p.Call("getAttributes", args...)
result := []float64{}
for ri := 0; ri < retVal.Length(); ri++ {
result = append(result, retVal.Index(ri).Float())
}
return result
}
// GetHardwareScalingLevel calls the GetHardwareScalingLevel method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#gethardwarescalinglevel
func (n *NullEngine) GetHardwareScalingLevel() float64 {
retVal := n.p.Call("getHardwareScalingLevel")
return retVal.Float()
}
// GetLockstepMaxSteps calls the GetLockstepMaxSteps method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#getlockstepmaxsteps
func (n *NullEngine) GetLockstepMaxSteps() float64 {
retVal := n.p.Call("getLockstepMaxSteps")
return retVal.Float()
}
// NullEngineGetRenderHeightOpts contains optional parameters for NullEngine.GetRenderHeight.
type NullEngineGetRenderHeightOpts struct {
UseScreen *bool
}
// GetRenderHeight calls the GetRenderHeight method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#getrenderheight
func (n *NullEngine) GetRenderHeight(opts *NullEngineGetRenderHeightOpts) float64 {
if opts == nil {
opts = &NullEngineGetRenderHeightOpts{}
}
args := make([]interface{}, 0, 0+1)
if opts.UseScreen == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.UseScreen)
}
retVal := n.p.Call("getRenderHeight", args...)
return retVal.Float()
}
// NullEngineGetRenderWidthOpts contains optional parameters for NullEngine.GetRenderWidth.
type NullEngineGetRenderWidthOpts struct {
UseScreen *bool
}
// GetRenderWidth calls the GetRenderWidth method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#getrenderwidth
func (n *NullEngine) GetRenderWidth(opts *NullEngineGetRenderWidthOpts) float64 {
if opts == nil {
opts = &NullEngineGetRenderWidthOpts{}
}
args := make([]interface{}, 0, 0+1)
if opts.UseScreen == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.UseScreen)
}
retVal := n.p.Call("getRenderWidth", args...)
return retVal.Float()
}
// GetUniforms calls the GetUniforms method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#getuniforms
func (n *NullEngine) GetUniforms(pipelineContext *IPipelineContext, uniformsNames []string) js.Value {
args := make([]interface{}, 0, 2+0)
if pipelineContext == nil {
args = append(args, js.Null())
} else {
args = append(args, pipelineContext.JSObject())
}
args = append(args, uniformsNames)
retVal := n.p.Call("getUniforms", args...)
return retVal
}
// HideLoadingUI calls the HideLoadingUI method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#hideloadingui
func (n *NullEngine) HideLoadingUI() {
n.p.Call("hideLoadingUI")
}
// IsDeterministicLockStep calls the IsDeterministicLockStep method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#isdeterministiclockstep
func (n *NullEngine) IsDeterministicLockStep() bool {
retVal := n.p.Call("isDeterministicLockStep")
return retVal.Bool()
}
// ReleaseEffects calls the ReleaseEffects method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#releaseeffects
func (n *NullEngine) ReleaseEffects() {
n.p.Call("releaseEffects")
}
// NullEngineSetAlphaModeOpts contains optional parameters for NullEngine.SetAlphaMode.
type NullEngineSetAlphaModeOpts struct {
NoDepthWriteChange *bool
}
// SetAlphaMode calls the SetAlphaMode method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setalphamode
func (n *NullEngine) SetAlphaMode(mode float64, opts *NullEngineSetAlphaModeOpts) {
if opts == nil {
opts = &NullEngineSetAlphaModeOpts{}
}
args := make([]interface{}, 0, 1+1)
args = append(args, mode)
if opts.NoDepthWriteChange == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.NoDepthWriteChange)
}
n.p.Call("setAlphaMode", args...)
}
// SetArray calls the SetArray method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setarray
func (n *NullEngine) SetArray(uniform js.Value, array []float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setArray", args...)
}
// SetArray2 calls the SetArray2 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setarray2
func (n *NullEngine) SetArray2(uniform js.Value, array []float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setArray2", args...)
}
// SetArray3 calls the SetArray3 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setarray3
func (n *NullEngine) SetArray3(uniform js.Value, array []float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setArray3", args...)
}
// SetArray4 calls the SetArray4 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setarray4
func (n *NullEngine) SetArray4(uniform js.Value, array []float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setArray4", args...)
}
// SetBool calls the SetBool method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setbool
func (n *NullEngine) SetBool(uniform js.Value, bool float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, bool)
n.p.Call("setBool", args...)
}
// SetFloat calls the SetFloat method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloat
func (n *NullEngine) SetFloat(uniform js.Value, value float64) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, value)
n.p.Call("setFloat", args...)
}
// SetFloat2 calls the SetFloat2 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloat2
func (n *NullEngine) SetFloat2(uniform js.Value, x float64, y float64) {
args := make([]interface{}, 0, 3+0)
args = append(args, uniform)
args = append(args, x)
args = append(args, y)
n.p.Call("setFloat2", args...)
}
// SetFloat3 calls the SetFloat3 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloat3
func (n *NullEngine) SetFloat3(uniform js.Value, x float64, y float64, z float64) {
args := make([]interface{}, 0, 4+0)
args = append(args, uniform)
args = append(args, x)
args = append(args, y)
args = append(args, z)
n.p.Call("setFloat3", args...)
}
// SetFloat4 calls the SetFloat4 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloat4
func (n *NullEngine) SetFloat4(uniform js.Value, x float64, y float64, z float64, w float64) {
args := make([]interface{}, 0, 5+0)
args = append(args, uniform)
args = append(args, x)
args = append(args, y)
args = append(args, z)
args = append(args, w)
n.p.Call("setFloat4", args...)
}
// SetFloatArray calls the SetFloatArray method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloatarray
func (n *NullEngine) SetFloatArray(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setFloatArray", args...)
}
// SetFloatArray2 calls the SetFloatArray2 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloatarray2
func (n *NullEngine) SetFloatArray2(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setFloatArray2", args...)
}
// SetFloatArray3 calls the SetFloatArray3 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloatarray3
func (n *NullEngine) SetFloatArray3(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setFloatArray3", args...)
}
// SetFloatArray4 calls the SetFloatArray4 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setfloatarray4
func (n *NullEngine) SetFloatArray4(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setFloatArray4", args...)
}
// SetIntArray calls the SetIntArray method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setintarray
func (n *NullEngine) SetIntArray(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setIntArray", args...)
}
// SetIntArray2 calls the SetIntArray2 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setintarray2
func (n *NullEngine) SetIntArray2(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setIntArray2", args...)
}
// SetIntArray3 calls the SetIntArray3 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setintarray3
func (n *NullEngine) SetIntArray3(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setIntArray3", args...)
}
// SetIntArray4 calls the SetIntArray4 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setintarray4
func (n *NullEngine) SetIntArray4(uniform js.Value, array js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, array)
n.p.Call("setIntArray4", args...)
}
// SetMatrices calls the SetMatrices method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setmatrices
func (n *NullEngine) SetMatrices(uniform js.Value, matrices js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, matrices)
n.p.Call("setMatrices", args...)
}
// SetMatrix2x2 calls the SetMatrix2x2 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setmatrix2x2
func (n *NullEngine) SetMatrix2x2(uniform js.Value, matrix js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, matrix)
n.p.Call("setMatrix2x2", args...)
}
// SetMatrix3x3 calls the SetMatrix3x3 method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setmatrix3x3
func (n *NullEngine) SetMatrix3x3(uniform js.Value, matrix js.Value) {
args := make([]interface{}, 0, 2+0)
args = append(args, uniform)
args = append(args, matrix)
n.p.Call("setMatrix3x3", args...)
}
// NullEngineSetStateOpts contains optional parameters for NullEngine.SetState.
type NullEngineSetStateOpts struct {
ZOffset *float64
Force *bool
ReverseSide *bool
}
// SetState calls the SetState method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setstate
func (n *NullEngine) SetState(culling bool, opts *NullEngineSetStateOpts) {
if opts == nil {
opts = &NullEngineSetStateOpts{}
}
args := make([]interface{}, 0, 1+3)
args = append(args, culling)
if opts.ZOffset == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.ZOffset)
}
if opts.Force == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.Force)
}
if opts.ReverseSide == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.ReverseSide)
}
n.p.Call("setState", args...)
}
// NullEngineSetViewportOpts contains optional parameters for NullEngine.SetViewport.
type NullEngineSetViewportOpts struct {
RequiredWidth *float64
RequiredHeight *float64
}
// SetViewport calls the SetViewport method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#setviewport
func (n *NullEngine) SetViewport(viewport js.Value, opts *NullEngineSetViewportOpts) {
if opts == nil {
opts = &NullEngineSetViewportOpts{}
}
args := make([]interface{}, 0, 1+2)
args = append(args, viewport)
if opts.RequiredWidth == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.RequiredWidth)
}
if opts.RequiredHeight == nil {
args = append(args, js.Undefined())
} else {
args = append(args, *opts.RequiredHeight)
}
n.p.Call("setViewport", args...)
}
// NullEngineUnBindFramebufferOpts contains optional parameters for NullEngine.UnBindFramebuffer.
type NullEngineUnBindFramebufferOpts struct {
DisableGenerateMipMaps *bool
OnBeforeUnbind JSFunc
}
// UnBindFramebuffer calls the UnBindFramebuffer method on the NullEngine object.
//
// https://doc.babylonjs.com/api/classes/babylon.nullengine#unbindframebuffer
func (n *NullEngine) UnBindFramebuffer(texture *InternalTexture, opts *NullEngineUnBindFramebufferOpts) {
if opts == nil {
opts = &NullEngineUnBindFramebufferOpts{}
}
args := make([]interface{}, 0, 1+2)
if texture == nil {
args = append(args, js.Null())