Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ViewService

Manages the view state

Hierarchy

  • ViewService

Index

Constructors

constructor

Properties

Private _currentViewportJSON

_currentViewportJSON: string

Private _desiredViewportMode

_desiredViewportMode: ViewportMode = this.viewportMode

Private _mode

_mode: ViewportMode = ViewportMode.EMBEDDED

Private _subviewFrustum

_subviewFrustum: PerspectiveFrustum[] = []

Private _subviewPose

_subviewPose: EntityPose[] = []

Private _subviews

_subviews: Subview[] = []

autoLayoutImmersiveMode

autoLayoutImmersiveMode: boolean = true

Automatically layout the element to match the immersive viewport during PresentationMode.IMMERSIVE

autoPublishEmbeddedMode

autoPublishEmbeddedMode: boolean = true

Automatically publish the viewport of the element during PresentationMode.EMBEDDED

Private contextService

contextService: ContextService

element

element: HTMLElement

The DOM element associated with this viewport

Private focusService

focusService: FocusService

Private sessionService

sessionService: SessionService

uiEvent

uiEvent: Event<object> = new Event<{event:UIEvent|MouseEvent|TouchEvent|PointerEvent|WheelEvent, forwardEvent:()=>void}>()

UI events that occur within this view. To handle an event (and prevent it from being forwarded to another layer) call event.stopImmediatePropagation().

viewportChangeEvent

viewportChangeEvent: Event<Viewport> = new Event<Viewport>()

An event that is raised when the viewport has changed

viewportModeChangeEvent

viewportModeChangeEvent: Event<ViewportMode> = new Event<ViewportMode>()

An event that is raised when the viewport mode has changed

Accessors

desiredViewportMode

Protected presentationMode

subviews

viewport

  • get viewport(): object

viewportMode

Methods

Private _processFrameState

Private _updateViewport

  • _updateViewport(viewport: Viewport): void

Private _updateViewportMode

Private _watchEmbeddedViewport

  • _watchEmbeddedViewport(): void

Private getSubviews

getViewport

  • getViewport(): object

publishEmbeddedViewport

  • publishEmbeddedViewport(viewport?: Viewport): void
  • Publish the viewport being used in [[PresentationMode.EMBEDDED]] so that the manager knows what our embedded viewport is

    Parameters

    Returns void

requestPresentationMode

  • requestPresentationMode(mode: ViewportMode): Promise<void>

sendUIEventToSession

  • sendUIEventToSession(uievent: UIEvent, session?: SessionPort): void

Object literals

Private _IDENTITY_SUBVIEW_POSE

_IDENTITY_SUBVIEW_POSE: object

o

o: Quaternion = Quaternion.IDENTITY

p

p: Cartesian3 = Cartesian3.ZERO

r

r: string = this.contextService.user.id

Private _viewport

_viewport: object

height

height: number = 0

width

width: number = 0

x

x: number = 0

y

y: number = 0

Generated using TypeDoc