webapi: github.com/gowebapi/webapi/device/webvr Index | Files

package webvr

import "github.com/gowebapi/webapi/device/webvr"

Package webvr is for accessing virtual reality (VR) devices, including sensors and head-mounted displays on the Web.

NOTE: Development of the WebVR API has halted in favor of being replaced the WebXR Device API. Several browsers will continue to support this version of the API in the meantime.

Index

Package Files

doc.go webvr.go

type Display Uses

type Display struct {
    domcore.EventTarget
}

class: VRDisplay

func DisplayFromJS Uses

func DisplayFromJS(value js.Wrapper) *Display

DisplayFromJS is casting a js.Wrapper into Display.

func (*Display) CancelAnimationFrame Uses

func (_this *Display) CancelAnimationFrame(handle int)

func (*Display) Capabilities Uses

func (_this *Display) Capabilities() *DisplayCapabilities

Capabilities returning attribute 'capabilities' with type DisplayCapabilities (idl: VRDisplayCapabilities).

func (*Display) DepthFar Uses

func (_this *Display) DepthFar() float64

DepthFar returning attribute 'depthFar' with type float64 (idl: double).

func (*Display) DepthNear Uses

func (_this *Display) DepthNear() float64

DepthNear returning attribute 'depthNear' with type float64 (idl: double).

func (*Display) DisplayId Uses

func (_this *Display) DisplayId() uint

DisplayId returning attribute 'displayId' with type uint (idl: unsigned long).

func (*Display) DisplayName Uses

func (_this *Display) DisplayName() string

DisplayName returning attribute 'displayName' with type string (idl: DOMString).

func (*Display) ExitPresent Uses

func (_this *Display) ExitPresent() (_result *javascript.PromiseVoid)

func (*Display) GetEyeParameters Uses

func (_this *Display) GetEyeParameters(whichEye Eye) (_result *EyeParameters)

func (*Display) GetFrameData Uses

func (_this *Display) GetFrameData(frameData *FrameData) (_result bool)

func (*Display) GetLayers Uses

func (_this *Display) GetLayers() (_result []*LayerInit)

func (*Display) GetPose Uses

func (_this *Display) GetPose() (_result *Pose)

func (*Display) IsConnected Uses

func (_this *Display) IsConnected() bool

IsConnected returning attribute 'isConnected' with type bool (idl: boolean).

func (*Display) IsPresenting Uses

func (_this *Display) IsPresenting() bool

IsPresenting returning attribute 'isPresenting' with type bool (idl: boolean).

func (*Display) RequestAnimationFrame Uses

func (_this *Display) RequestAnimationFrame(callback *htmlcommon.FrameRequestCallback) (_result int)

func (*Display) RequestPresent Uses

func (_this *Display) RequestPresent(layers []*LayerInit) (_result *javascript.PromiseVoid)

func (*Display) ResetPose Uses

func (_this *Display) ResetPose()

func (*Display) SetDepthFar Uses

func (_this *Display) SetDepthFar(value float64)

SetDepthFar setting attribute 'depthFar' with type float64 (idl: double).

func (*Display) SetDepthNear Uses

func (_this *Display) SetDepthNear(value float64)

SetDepthNear setting attribute 'depthNear' with type float64 (idl: double).

func (*Display) StageParameters Uses

func (_this *Display) StageParameters() *StageParameters

StageParameters returning attribute 'stageParameters' with type StageParameters (idl: VRStageParameters).

func (*Display) SubmitFrame Uses

func (_this *Display) SubmitFrame()

type DisplayCapabilities Uses

type DisplayCapabilities struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VRDisplayCapabilities

func DisplayCapabilitiesFromJS Uses

func DisplayCapabilitiesFromJS(value js.Wrapper) *DisplayCapabilities

DisplayCapabilitiesFromJS is casting a js.Wrapper into DisplayCapabilities.

func (*DisplayCapabilities) CanPresent Uses

func (_this *DisplayCapabilities) CanPresent() bool

CanPresent returning attribute 'canPresent' with type bool (idl: boolean).

func (*DisplayCapabilities) HasExternalDisplay Uses

func (_this *DisplayCapabilities) HasExternalDisplay() bool

HasExternalDisplay returning attribute 'hasExternalDisplay' with type bool (idl: boolean).

func (*DisplayCapabilities) HasOrientation Uses

func (_this *DisplayCapabilities) HasOrientation() bool

HasOrientation returning attribute 'hasOrientation' with type bool (idl: boolean).

func (*DisplayCapabilities) HasPosition Uses

func (_this *DisplayCapabilities) HasPosition() bool

HasPosition returning attribute 'hasPosition' with type bool (idl: boolean).

func (*DisplayCapabilities) JSValue Uses

func (_this *DisplayCapabilities) JSValue() js.Value

func (*DisplayCapabilities) MaxLayers Uses

func (_this *DisplayCapabilities) MaxLayers() uint

MaxLayers returning attribute 'maxLayers' with type uint (idl: unsigned long).

type DisplayEvent Uses

type DisplayEvent struct {
    domcore.Event
}

class: VRDisplayEvent

func DisplayEventFromJS Uses

func DisplayEventFromJS(value js.Wrapper) *DisplayEvent

DisplayEventFromJS is casting a js.Wrapper into DisplayEvent.

func NewVRDisplayEvent Uses

func NewVRDisplayEvent(_type string, eventInitDict *DisplayEventInit) (_result *DisplayEvent)

func (*DisplayEvent) Display Uses

func (_this *DisplayEvent) Display() *Display

Display returning attribute 'display' with type Display (idl: VRDisplay).

func (*DisplayEvent) Reason Uses

func (_this *DisplayEvent) Reason() *DisplayEventReason

Reason returning attribute 'reason' with type DisplayEventReason (idl: VRDisplayEventReason).

type DisplayEventInit Uses

type DisplayEventInit struct {
    Bubbles    bool
    Cancelable bool
    Composed   bool
    Display    *Display
    Reason     DisplayEventReason
}

dictionary: VRDisplayEventInit

func DisplayEventInitFromJS Uses

func DisplayEventInitFromJS(value js.Wrapper) *DisplayEventInit

DisplayEventInitFromJS is allocating a new DisplayEventInit object and copy all values from input javascript object

func (*DisplayEventInit) JSValue Uses

func (_this *DisplayEventInit) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type DisplayEventReason Uses

type DisplayEventReason int

enum: VRDisplayEventReason

const (
    Mounted DisplayEventReason = iota
    Navigation
    Requested
    Unmounted
)

func DisplayEventReasonFromJS Uses

func DisplayEventReasonFromJS(value js.Value) DisplayEventReason

DisplayEventReasonFromJS is converting a javascript value into a DisplayEventReason enum value.

func (*DisplayEventReason) JSValue Uses

func (this *DisplayEventReason) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (DisplayEventReason) Value Uses

func (this DisplayEventReason) Value() string

Value is converting this into javascript defined string value

type Eye Uses

type Eye int

enum: VREye

const (
    Left Eye = iota
    Right
)

func EyeFromJS Uses

func EyeFromJS(value js.Value) Eye

EyeFromJS is converting a javascript value into a Eye enum value.

func (*Eye) JSValue Uses

func (this *Eye) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (Eye) Value Uses

func (this Eye) Value() string

Value is converting this into javascript defined string value

type EyeParameters Uses

type EyeParameters struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VREyeParameters

func EyeParametersFromJS Uses

func EyeParametersFromJS(value js.Wrapper) *EyeParameters

EyeParametersFromJS is casting a js.Wrapper into EyeParameters.

func (*EyeParameters) FieldOfView Uses

func (_this *EyeParameters) FieldOfView() *FieldOfView

FieldOfView returning attribute 'fieldOfView' with type FieldOfView (idl: VRFieldOfView).

func (*EyeParameters) JSValue Uses

func (_this *EyeParameters) JSValue() js.Value

func (*EyeParameters) Offset Uses

func (_this *EyeParameters) Offset() *javascript.Float32Array

Offset returning attribute 'offset' with type javascript.Float32Array (idl: Float32Array).

func (*EyeParameters) RenderHeight Uses

func (_this *EyeParameters) RenderHeight() uint

RenderHeight returning attribute 'renderHeight' with type uint (idl: unsigned long).

func (*EyeParameters) RenderWidth Uses

func (_this *EyeParameters) RenderWidth() uint

RenderWidth returning attribute 'renderWidth' with type uint (idl: unsigned long).

type FieldOfView Uses

type FieldOfView struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VRFieldOfView

func FieldOfViewFromJS Uses

func FieldOfViewFromJS(value js.Wrapper) *FieldOfView

FieldOfViewFromJS is casting a js.Wrapper into FieldOfView.

func (*FieldOfView) DownDegrees Uses

func (_this *FieldOfView) DownDegrees() float64

DownDegrees returning attribute 'downDegrees' with type float64 (idl: double).

func (*FieldOfView) JSValue Uses

func (_this *FieldOfView) JSValue() js.Value

func (*FieldOfView) LeftDegrees Uses

func (_this *FieldOfView) LeftDegrees() float64

LeftDegrees returning attribute 'leftDegrees' with type float64 (idl: double).

func (*FieldOfView) RightDegrees Uses

func (_this *FieldOfView) RightDegrees() float64

RightDegrees returning attribute 'rightDegrees' with type float64 (idl: double).

func (*FieldOfView) UpDegrees Uses

func (_this *FieldOfView) UpDegrees() float64

UpDegrees returning attribute 'upDegrees' with type float64 (idl: double).

type FrameData Uses

type FrameData struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VRFrameData

func FrameDataFromJS Uses

func FrameDataFromJS(value js.Wrapper) *FrameData

FrameDataFromJS is casting a js.Wrapper into FrameData.

func NewVRFrameData Uses

func NewVRFrameData() (_result *FrameData)

func (*FrameData) JSValue Uses

func (_this *FrameData) JSValue() js.Value

func (*FrameData) LeftProjectionMatrix Uses

func (_this *FrameData) LeftProjectionMatrix() *javascript.Float32Array

LeftProjectionMatrix returning attribute 'leftProjectionMatrix' with type javascript.Float32Array (idl: Float32Array).

func (*FrameData) LeftViewMatrix Uses

func (_this *FrameData) LeftViewMatrix() *javascript.Float32Array

LeftViewMatrix returning attribute 'leftViewMatrix' with type javascript.Float32Array (idl: Float32Array).

func (*FrameData) Pose Uses

func (_this *FrameData) Pose() *Pose

Pose returning attribute 'pose' with type Pose (idl: VRPose).

func (*FrameData) RightProjectionMatrix Uses

func (_this *FrameData) RightProjectionMatrix() *javascript.Float32Array

RightProjectionMatrix returning attribute 'rightProjectionMatrix' with type javascript.Float32Array (idl: Float32Array).

func (*FrameData) RightViewMatrix Uses

func (_this *FrameData) RightViewMatrix() *javascript.Float32Array

RightViewMatrix returning attribute 'rightViewMatrix' with type javascript.Float32Array (idl: Float32Array).

func (*FrameData) Timestamp Uses

func (_this *FrameData) Timestamp() float64

Timestamp returning attribute 'timestamp' with type float64 (idl: double).

type LayerInit Uses

type LayerInit struct {
    Source      *Union
    LeftBounds  []float32
    RightBounds []float32
}

dictionary: VRLayerInit

func LayerInitFromJS Uses

func LayerInitFromJS(value js.Wrapper) *LayerInit

LayerInitFromJS is allocating a new LayerInit object and copy all values from input javascript object

func (*LayerInit) JSValue Uses

func (_this *LayerInit) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Pose Uses

type Pose struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VRPose

func PoseFromJS Uses

func PoseFromJS(value js.Wrapper) *Pose

PoseFromJS is casting a js.Wrapper into Pose.

func (*Pose) AngularAcceleration Uses

func (_this *Pose) AngularAcceleration() *javascript.Float32Array

AngularAcceleration returning attribute 'angularAcceleration' with type javascript.Float32Array (idl: Float32Array).

func (*Pose) AngularVelocity Uses

func (_this *Pose) AngularVelocity() *javascript.Float32Array

AngularVelocity returning attribute 'angularVelocity' with type javascript.Float32Array (idl: Float32Array).

func (*Pose) JSValue Uses

func (_this *Pose) JSValue() js.Value

func (*Pose) LinearAcceleration Uses

func (_this *Pose) LinearAcceleration() *javascript.Float32Array

LinearAcceleration returning attribute 'linearAcceleration' with type javascript.Float32Array (idl: Float32Array).

func (*Pose) LinearVelocity Uses

func (_this *Pose) LinearVelocity() *javascript.Float32Array

LinearVelocity returning attribute 'linearVelocity' with type javascript.Float32Array (idl: Float32Array).

func (*Pose) Orientation Uses

func (_this *Pose) Orientation() *javascript.Float32Array

Orientation returning attribute 'orientation' with type javascript.Float32Array (idl: Float32Array).

func (*Pose) Position Uses

func (_this *Pose) Position() *javascript.Float32Array

Position returning attribute 'position' with type javascript.Float32Array (idl: Float32Array).

type PromiseSequenceDisplay Uses

type PromiseSequenceDisplay struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Promise

func PromiseSequenceDisplayFromJS Uses

func PromiseSequenceDisplayFromJS(value js.Wrapper) *PromiseSequenceDisplay

PromiseSequenceDisplayFromJS is casting a js.Wrapper into PromiseSequenceDisplay.

func (*PromiseSequenceDisplay) Catch Uses

func (_this *PromiseSequenceDisplay) Catch(onRejected *PromiseSequenceDisplayOnRejected) (_result *PromiseSequenceDisplay)

func (*PromiseSequenceDisplay) Finally Uses

func (_this *PromiseSequenceDisplay) Finally(onFinally *javascript.PromiseFinally) (_result *PromiseSequenceDisplay)

func (*PromiseSequenceDisplay) JSValue Uses

func (_this *PromiseSequenceDisplay) JSValue() js.Value

func (*PromiseSequenceDisplay) Then Uses

func (_this *PromiseSequenceDisplay) Then(onFulfilled *PromiseSequenceDisplayOnFulfilled, onRejected *PromiseSequenceDisplayOnRejected) (_result *PromiseSequenceDisplay)

type PromiseSequenceDisplayOnFulfilled Uses

type PromiseSequenceDisplayOnFulfilled js.Func

PromiseSequenceDisplayOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseSequenceDisplayOnFulfilledToJS Uses

func PromiseSequenceDisplayOnFulfilledToJS(callback PromiseSequenceDisplayOnFulfilledFunc) *PromiseSequenceDisplayOnFulfilled

type PromiseSequenceDisplayOnFulfilledFunc Uses

type PromiseSequenceDisplayOnFulfilledFunc func(value []*Display)

callback: PromiseTemplateOnFulfilled

func PromiseSequenceDisplayOnFulfilledFromJS Uses

func PromiseSequenceDisplayOnFulfilledFromJS(_value js.Value) PromiseSequenceDisplayOnFulfilledFunc

type PromiseSequenceDisplayOnRejected Uses

type PromiseSequenceDisplayOnRejected js.Func

PromiseSequenceDisplayOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseSequenceDisplayOnRejectedToJS Uses

func PromiseSequenceDisplayOnRejectedToJS(callback PromiseSequenceDisplayOnRejectedFunc) *PromiseSequenceDisplayOnRejected

type PromiseSequenceDisplayOnRejectedFunc Uses

type PromiseSequenceDisplayOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseSequenceDisplayOnRejectedFromJS Uses

func PromiseSequenceDisplayOnRejectedFromJS(_value js.Value) PromiseSequenceDisplayOnRejectedFunc

type StageParameters Uses

type StageParameters struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: VRStageParameters

func StageParametersFromJS Uses

func StageParametersFromJS(value js.Wrapper) *StageParameters

StageParametersFromJS is casting a js.Wrapper into StageParameters.

func (*StageParameters) JSValue Uses

func (_this *StageParameters) JSValue() js.Value

func (*StageParameters) SittingToStandingTransform Uses

func (_this *StageParameters) SittingToStandingTransform() *javascript.Float32Array

SittingToStandingTransform returning attribute 'sittingToStandingTransform' with type javascript.Float32Array (idl: Float32Array).

func (*StageParameters) SizeX Uses

func (_this *StageParameters) SizeX() float32

SizeX returning attribute 'sizeX' with type float32 (idl: float).

func (*StageParameters) SizeZ Uses

func (_this *StageParameters) SizeZ() float32

SizeZ returning attribute 'sizeZ' with type float32 (idl: float).

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package webvr imports 5 packages (graph) and is imported by 2 packages. Updated 2019-09-19. Refresh now. Tools for package owners.