func (_this *EyeParameters) Offset() *javascript.Float32Array {
	var ret *javascript.Float32Array
	value := _this.Value_JS.Get("offset")
	ret = javascript.Float32ArrayFromJS(value)
	return ret
}
Offset returning attribute 'offset' with
type javascript.Float32Array (idl: Float32Array).
package webvr
import "syscall/js"
import (
	"github.com/gowebapi/webapi/core/jsarray"
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/html/htmlcommon"
	"github.com/gowebapi/webapi/javascript"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type DisplayEventReason int
const (
	Mounted DisplayEventReason = iota
	Navigation
	Requested
	Unmounted
)
var vRDisplayEventReasonToWasmTable = []string{
	"mounted", "navigation", "requested", "unmounted",
}
var vRDisplayEventReasonFromWasmTable = map[string]DisplayEventReason{
	"mounted": Mounted, "navigation": Navigation, "requested": Requested, "unmounted": Unmounted,
}
func (this *DisplayEventReason) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this DisplayEventReason) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(vRDisplayEventReasonToWasmTable) {
		return vRDisplayEventReasonToWasmTable[idx]
	}
	panic("unknown input value")
}
func DisplayEventReasonFromJS(value js.Value) DisplayEventReason {
	key := value.String()
	conv, ok := vRDisplayEventReasonFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type Eye int
const (
	Left Eye = iota
	Right
)
var vREyeToWasmTable = []string{
	"left", "right",
}
var vREyeFromWasmTable = map[string]Eye{
	"left": Left, "right": Right,
}
func (this *Eye) JSValue() js.Value {
	return js.ValueOf(this.Value())
}
func (this Eye) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(vREyeToWasmTable) {
		return vREyeToWasmTable[idx]
	}
	panic("unknown input value")
}
func EyeFromJS(value js.Value) Eye {
	key := value.String()
	conv, ok := vREyeFromWasmTable[key]
	if !ok {
		panic("unable to convert '" + key + "'")
	}
	return conv
}
type PromiseSequenceDisplayOnFulfilledFunc func(value []*Display)
type PromiseSequenceDisplayOnFulfilled js.Func
func PromiseSequenceDisplayOnFulfilledToJS(callback PromiseSequenceDisplayOnFulfilledFunc) *PromiseSequenceDisplayOnFulfilled {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDisplayOnFulfilled(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 []*Display  
		)
		__length0 := args[0].Length()
		__array0 := make([]*Display, __length0, __length0)
		for __idx0 := 0; __idx0 < __length0; __idx0++ {
			var __seq_out0 *Display
			__seq_in0 := args[0].Index(__idx0)
			__seq_out0 = DisplayFromJS(__seq_in0)
			__array0[__idx0] = __seq_out0
		}
		_p0 = __array0
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDisplayOnFulfilledFromJS(_value js.Value) PromiseSequenceDisplayOnFulfilledFunc {
	return func(value []*Display) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := js.Global().Get("Array").New(len(value))
		for __idx0, __seq_in0 := range value {
			__seq_out0 := __seq_in0.JSValue()
			_p0.SetIndex(__idx0, __seq_out0)
		}
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type PromiseSequenceDisplayOnRejectedFunc func(reason js.Value)
type PromiseSequenceDisplayOnRejected js.Func
func PromiseSequenceDisplayOnRejectedToJS(callback PromiseSequenceDisplayOnRejectedFunc) *PromiseSequenceDisplayOnRejected {
	if callback == nil {
		return nil
	}
	ret := PromiseSequenceDisplayOnRejected(js.FuncOf(func(this js.Value, args []js.Value) interface{} {
		var (
			_p0 js.Value  
		)
		_p0 = args[0]
		callback(_p0)
		return nil
	}))
	return &ret
}
func PromiseSequenceDisplayOnRejectedFromJS(_value js.Value) PromiseSequenceDisplayOnRejectedFunc {
	return func(reason js.Value) {
		var (
			_args [1]interface{}
			_end  int
		)
		_p0 := reason
		_args[0] = _p0
		_end++
		_value.Invoke(_args[0:_end]...)
		return
	}
}
type DisplayEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Display    *Display
	Reason     DisplayEventReason
}
func (_this *DisplayEventInit) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Bubbles
	out.Set("bubbles", value0)
	value1 := _this.Cancelable
	out.Set("cancelable", value1)
	value2 := _this.Composed
	out.Set("composed", value2)
	value3 := _this.Display.JSValue()
	out.Set("display", value3)
	value4 := _this.Reason.JSValue()
	out.Set("reason", value4)
	return out
}
func DisplayEventInitFromJS(value js.Wrapper) *DisplayEventInit {
	input := value.JSValue()
	var out DisplayEventInit
	var (
		value0 bool                
		value1 bool                
		value2 bool                
		value3 *Display            
		value4 DisplayEventReason  
	)
	value0 = (input.Get("bubbles")).Bool()
	out.Bubbles = value0
	value1 = (input.Get("cancelable")).Bool()
	out.Cancelable = value1
	value2 = (input.Get("composed")).Bool()
	out.Composed = value2
	value3 = DisplayFromJS(input.Get("display"))
	out.Display = value3
	value4 = DisplayEventReasonFromJS(input.Get("reason"))
	out.Reason = value4
	return &out
}
type LayerInit struct {
	Source      *Union
	LeftBounds  []float32
	RightBounds []float32
}
func (_this *LayerInit) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Source.JSValue()
	out.Set("source", value0)
	value1 := jsarray.Float32ToJS(_this.LeftBounds)
	out.Set("leftBounds", value1)
	value2 := jsarray.Float32ToJS(_this.RightBounds)
	out.Set("rightBounds", value2)
	return out
}
func LayerInitFromJS(value js.Wrapper) *LayerInit {
	input := value.JSValue()
	var out LayerInit
	var (
		value0 *Union     
		value1 []float32  
		value2 []float32  
	)
	if input.Get("source").Type() != js.TypeNull && input.Get("source").Type() != js.TypeUndefined {
		value0 = UnionFromJS(input.Get("source"))
	}
	out.Source = value0
	value1 = jsarray.Float32ToGo(input.Get("leftBounds"))
	out.LeftBounds = value1
	value2 = jsarray.Float32ToGo(input.Get("rightBounds"))
	out.RightBounds = value2
	return &out
}
type Display struct {
	domcore.EventTarget
}
func DisplayFromJS(value js.Wrapper) *Display {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &Display{}
	ret.Value_JS = input
	return ret
}
func (_this *Display) IsConnected() bool {
	var ret bool
	value := _this.Value_JS.Get("isConnected")
	ret = (value).Bool()
	return ret
}
func (_this *Display) IsPresenting() bool {
	var ret bool
	value := _this.Value_JS.Get("isPresenting")
	ret = (value).Bool()
	return ret
}
func (_this *Display) Capabilities() *DisplayCapabilities {
	var ret *DisplayCapabilities
	value := _this.Value_JS.Get("capabilities")
	ret = DisplayCapabilitiesFromJS(value)
	return ret
}
func (_this *Display) StageParameters() *StageParameters {
	var ret *StageParameters
	value := _this.Value_JS.Get("stageParameters")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		ret = StageParametersFromJS(value)
	}
	return ret
}
func (_this *Display) DisplayId() uint {
	var ret uint
	value := _this.Value_JS.Get("displayId")
	ret = (uint)((value).Int())
	return ret
}
func (_this *Display) DisplayName() string {
	var ret string
	value := _this.Value_JS.Get("displayName")
	ret = (value).String()
	return ret
}
func (_this *Display) DepthNear() float64 {
	var ret float64
	value := _this.Value_JS.Get("depthNear")
	ret = (value).Float()
	return ret
}
func (_this *Display) SetDepthNear(value float64) {
	input := value
	_this.Value_JS.Set("depthNear", input)
}
func (_this *Display) DepthFar() float64 {
	var ret float64
	value := _this.Value_JS.Get("depthFar")
	ret = (value).Float()
	return ret
}
func (_this *Display) SetDepthFar(value float64) {
	input := value
	_this.Value_JS.Set("depthFar", input)
}
func (_this *Display) GetEyeParameters(whichEye Eye) (_result *EyeParameters) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := whichEye.JSValue()
	_args[0] = _p0
	_end++
	_returned := _this.Value_JS.Call("getEyeParameters", _args[0:_end]...)
	var (
		_converted *EyeParameters  
	)
	_converted = EyeParametersFromJS(_returned)
	_result = _converted
	return
}
func (_this *Display) GetFrameData(frameData *FrameData) (_result bool) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := frameData.JSValue()
	_args[0] = _p0
	_end++
	_returned := _this.Value_JS.Call("getFrameData", _args[0:_end]...)
	var (
		_converted bool  
	)
	_converted = (_returned).Bool()
	_result = _converted
	return
}
func (_this *Display) GetPose() (_result *Pose) {
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _this.Value_JS.Call("getPose", _args[0:_end]...)
	var (
		_converted *Pose  
	)
	_converted = PoseFromJS(_returned)
	_result = _converted
	return
}
func (_this *Display) ResetPose() {
	var (
		_args [0]interface{}
		_end  int
	)
	_this.Value_JS.Call("resetPose", _args[0:_end]...)
	return
}
func (_this *Display) RequestAnimationFrame(callback *htmlcommon.FrameRequestCallback) (_result int) {
	var (
		_args [1]interface{}
		_end  int
	)
	var __callback0 js.Value
	if callback != nil {
		__callback0 = (*callback).Value
	} else {
		__callback0 = js.Null()
	}
	_p0 := __callback0
	_args[0] = _p0
	_end++
	_returned := _this.Value_JS.Call("requestAnimationFrame", _args[0:_end]...)
	var (
		_converted int  
	)
	_converted = (_returned).Int()
	_result = _converted
	return
}
func (_this *Display) CancelAnimationFrame(handle int) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := handle
	_args[0] = _p0
	_end++
	_this.Value_JS.Call("cancelAnimationFrame", _args[0:_end]...)
	return
}
func (_this *Display) RequestPresent(layers []*LayerInit) (_result *javascript.PromiseVoid) {
	var (
		_args [1]interface{}
		_end  int
	)
	_p0 := js.Global().Get("Array").New(len(layers))
	for __idx0, __seq_in0 := range layers {
		__seq_out0 := __seq_in0.JSValue()
		_p0.SetIndex(__idx0, __seq_out0)
	}
	_args[0] = _p0
	_end++
	_returned := _this.Value_JS.Call("requestPresent", _args[0:_end]...)
	var (
		_converted *javascript.PromiseVoid  
	)
	_converted = javascript.PromiseVoidFromJS(_returned)
	_result = _converted
	return
}
func (_this *Display) ExitPresent() (_result *javascript.PromiseVoid) {
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _this.Value_JS.Call("exitPresent", _args[0:_end]...)
	var (
		_converted *javascript.PromiseVoid  
	)
	_converted = javascript.PromiseVoidFromJS(_returned)
	_result = _converted
	return
}
func (_this *Display) GetLayers() (_result []*LayerInit) {
	var (
		_args [0]interface{}
		_end  int
	)
	_returned := _this.Value_JS.Call("getLayers", _args[0:_end]...)
	var (
		_converted []*LayerInit  
	)
	__length0 := _returned.Length()
	__array0 := make([]*LayerInit, __length0, __length0)
	for __idx0 := 0; __idx0 < __length0; __idx0++ {
		var __seq_out0 *LayerInit
		__seq_in0 := _returned.Index(__idx0)
		__seq_out0 = LayerInitFromJS(__seq_in0)
		__array0[__idx0] = __seq_out0
	}
	_converted = __array0
	_result = _converted
	return
}
func (_this *Display) SubmitFrame() {
	var (
		_args [0]interface{}
		_end  int
	)
	_this.Value_JS.Call("submitFrame", _args[0:_end]...)
	return
}
type DisplayCapabilities struct {
	Value_JS js.Value
}
func (_this *DisplayCapabilities) JSValue() js.Value {
	return _this.Value_JS
}
func DisplayCapabilitiesFromJS(value js.Wrapper) *DisplayCapabilities {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &DisplayCapabilities{}
	ret.Value_JS = input
	return ret
}
func (_this *DisplayCapabilities) HasPosition() bool {
	var ret bool
	value := _this.Value_JS.Get("hasPosition")
	ret = (value).Bool()
	return ret
}
func (_this *DisplayCapabilities) HasOrientation() bool {
	var ret bool
	value := _this.Value_JS.Get("hasOrientation")
	ret = (value).Bool()
	return ret
}
func (_this *DisplayCapabilities) HasExternalDisplay() bool {
	var ret bool
	value := _this.Value_JS.Get("hasExternalDisplay")
	ret = (value).Bool()
	return ret
}
func (_this *DisplayCapabilities) CanPresent() bool {
	var ret bool
	value := _this.Value_JS.Get("canPresent")
	ret = (value).Bool()
	return ret
}
func (_this *DisplayCapabilities) MaxLayers() uint {
	var ret uint
	value := _this.Value_JS.Get("maxLayers")
	ret = (uint)((value).Int())
	return ret
}
type DisplayEvent struct {
	domcore.Event
}
func DisplayEventFromJS(value js.Wrapper) *DisplayEvent {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &DisplayEvent{}
	ret.Value_JS = input
	return ret
}
func NewVRDisplayEvent(_type string, eventInitDict *DisplayEventInit) (_result *DisplayEvent) {
	_klass := js.Global().Get("VRDisplayEvent")
	var (
		_args [2]interface{}
		_end  int
	)
	_p0 := _type
	_args[0] = _p0
	_end++
	_p1 := eventInitDict.JSValue()
	_args[1] = _p1
	_end++
	_returned := _klass.New(_args[0:_end]...)
	var (
		_converted *DisplayEvent  
	)
	_converted = DisplayEventFromJS(_returned)
	_result = _converted
	return
}
func (_this *DisplayEvent) Display() *Display {
	var ret *Display
	value := _this.Value_JS.Get("display")
	ret = DisplayFromJS(value)
	return ret
}
func (_this *DisplayEvent) Reason() *DisplayEventReason {
	var ret *DisplayEventReason
	value := _this.Value_JS.Get("reason")
	if value.Type() != js.TypeNull && value.Type() != js.TypeUndefined {
		__tmp := DisplayEventReasonFromJS(value)
		ret = &__tmp
	}
	return ret
}
type EyeParameters struct {
	Value_JS js.Value
}
func (_this *EyeParameters) JSValue() js.Value {
	return _this.Value_JS
}
func EyeParametersFromJS(value js.Wrapper) *EyeParameters {
	input := value.JSValue()
	if typ := input.Type(); typ == js.TypeNull || typ == js.TypeUndefined {
		return nil
	}
	ret := &EyeParameters{}
	ret.Value_JS = input
	return ret
}