RSX Code Reference
    Preparing search index...

    Class SceneWindow

    Displays the scene view camera and various scene controls.

    Hierarchy (View Summary)

    Implements

    Index
    onSceneWindowSettingsDirty: (settings: SceneWindowSettings) => void
    onViewportCameraSettingsDirty: (settings: ViewportCameraSettings) => void
    onViewportCameraTransformChanged: () => void

    Event sent by the viewport renderer when the viewport camera transform changed.

    onViewportContextMenuRequested: (
        scenePickInformation?: ScenePickInformation,
    ) => void

    Event sent by the viewport renderer when a context menu is requested.

    highDefinitionFeatureQualityThreshold: EnumValue<FeatureQuality5, number>

    The feature quality threshold that permits high defintion rendering to be used.

    This is only relevant if a manual feature quality is set.

    selectionLayer: rsx.LayerMask
    toolbarButtonsNames: {
        automaticMouseLock: string;
        coordinateSystem: string;
        focus: string;
        gizmoMode: string;
        gizmoSettings: string;
        gridSettings: string;
        highDefinition: string;
        lockChildTransforms: string;
        pivotMode: string;
        raiseMainCameraWindowOnPlay: string;
        sceneUserActivity: string;
        snappingSettings: string;
        standardDefinition: string;
        standardDefinitionQuality: string;
    }
    toolbarButtonWidth: number
    viewportClearColor: SRGBColor
    windowContentPadding: RectOffset

    The default window content padding to be used for editor windows.

    windowPadding: number

    The default window padding.

    • get containerWindow(): EditorWindow

      Gets the parent editor window this window is docked in. Can be null (for example when window is in the process of dragging and not visible).

      Returns EditorWindow

    • get contentBoundsInPixels(): Immutable<rsx.UIRectPixel>

      Returns the bounds of the contents of the window in pixels, regardless of whether the window is docked or not.

      Returns Immutable<rsx.UIRectPixel>

    • get contentHeight(): number

      Returns the height of the window contents in points.

      Returns number

    • get contentHeightInPixels(): number

      Returns the height of the window contents in pixels.

      Returns number

    • get contentWidth(): number

      Returns the width of the window contents in points.

      Returns number

    • get contentWidthInPixels(): number

      Returns the width of the window contents in pixels.

      Returns number

    • get dpiScale(): number

      Returns the DPI scale factor.

      Returns number

      The DPI scale is in relation to a 1x base resolution of 75 DPI.

    • get height(): number

      Returns the height of the window in points.

      Returns number

    • get heightInPixels(): number

      Sets the height of the window in pixels.

      Returns number

    • set heightInPixels(value: number): void

      Parameters

      • value: number

      Returns void

    • get icon(): Image

      Gets the icon for the window.

      Returns Image

    • set icon(value: Image): void

      Gets the icon for the window.

      Parameters

      Returns void

    • get isActive(): boolean

      Checks whether the window the currently active window in its container. This means the window's tab is active or the window is the only one in its container.

      Returns boolean

    • get isAltPressed(): boolean

      Alt modifier key state.

      Returns boolean

    • get isControlPressed(): boolean

      Control modifier key state.

      Returns boolean

    • get isDestroyed(): boolean

      Determines whether the window has been destroyed or not.

      Returns boolean

    • get isDragSelectionActive(): boolean

      Determines if the drag selection viewport interaction is active.

      Returns boolean

    • get isFocused(): boolean

      Makes the window in or out focus. Surface can only be made in focus if it is active.

      Returns boolean

    • set isFocused(value: boolean): void

      Checks whether the window currently has keyboard focus.

      Parameters

      • value: boolean

      Returns void

    • get isHighDefinitionRenderingEnabled(): boolean

      Determines if the viewport is currently rendering in high dpi mode.

      Returns boolean

    • get isInitialized(): boolean

      Checks has the TypeScript window been initialized.

      Returns boolean

    • get isPointerHovering(): boolean

      Determines is the mouse pointer currently hovering over the editor window.

      Returns boolean

    • get isShiftPressed(): boolean

      Shift modifier key state.

      Returns boolean

    • get left(): number

      Returns the X position of the window in screen coordinates in points.

      Returns number

    • get localShortcutContext(): ShortcutContext

      Specifies the local shortcut context. This context will be automatically disabled whenever the user switches focus from the context.

      Returns ShortcutContext

    • get name(): string

      Gets a unique name for this window. This name will be used for referencing the window by other systems.

      Returns string

    • get overlayLabelContent(): string

      Sets the content of the middle Overlay Label.

      Returns string

    • set overlayLabelContent(value: string): void

      Parameters

      • value: string

      Returns void

    • get position(): Immutable<rsx.UIPoint>

      Determines the position in which the key window is, in screen coordinates.

      Returns Immutable<rsx.UIPoint>

    • get renderWindow(): RenderWindow

      Gets the RenderWindow associated with this EditorWindow.

      Returns RenderWindow

    • get scenePicking(): ScenePicking

      The ScenePicking instance used to interact with scene objects.

      Returns ScenePicking

    • get screenBoundsInPixels(): Immutable<rsx.UIRectPixel>

      Returns the bounds of the window in pixels, relative to its parent container in pixels.

      Returns Immutable<rsx.UIRectPixel>

    • get shortcutContext(): ShortcutContext

      Specifies the global shortcut context. This context will be always enabled as long as the window is active.

      Returns ShortcutContext

    • get shouldHandleInput(): boolean

      Checks if the window should handle input. This can be used by window implementations to check before handling input events.

      Returns boolean

    • get styleSheet(): StyleSheet

      Sets the stylesheet for this window's UI surface.

      Returns StyleSheet

    • set styleSheet(value: StyleSheet): void

      Sets the stylesheet for this window's UI surface.

      Parameters

      Returns void

    • get title(): I18N

      Gets the display name for the window. This is what editor users will see in the window title bar.

      Returns I18N

    • set title(value: I18N): void

      Parameters

      Returns void

    • get toolBar(): UIToolBar

      Returns UIToolBar

    • get top(): number

      Returns the X position of the window in screen coordinates in points.

      Returns number

    • get ui(): UIPanel

      Returns UIPanel

    • get undoRedo(): UndoRedo

      Get the local undo redo of the window.

      Returns UndoRedo

    • get viewportCamera(): ViewportCamera

      Returns the scene camera.

      Returns ViewportCamera

    • get viewSpherePanel(): UIPanel

      Panel handling rendering axes gizmo UI elements.

      Returns UIPanel

    • get width(): number

      Returns the width of the window in points.

      Returns number

    • get widthInPixels(): number

      Sets the width of the window in pixels.

      Returns number

    • set widthInPixels(value: number): void

      Parameters

      • value: number

      Returns void

    • Makes the window active in its container. This means the windows tab is active and the window is visible.

      Returns void

    • Triggered when one of the scene tool buttons is clicked, changing the active scene handle.

      Parameters

      • tool: EnumValueTyped<TransformGizmoMode>

        Clicked scene tool to activate.

      • OptionalforceChange: boolean

        True to force the change, even if the camera is not idle.

      Returns void

    • Closes the window but keeps it on the dock manager. Calling raise will make it visible again.

      Returns void

    • Creates all the necessary components and Scene Objects for the Editor Camera.

      Parameters

      Returns void

    • Returns whether or not the given position (in screen space) is within bounds of the Viewport.

      Parameters

      Returns boolean

    • Orients the camera so it looks along the provided axis.

      Parameters

      Returns void

    • Returns void

    • Returns void

    • Returns void

    • Virtual

      Method to override to implement destruction of custom windows. Called by the engine before the window is destroyed.

      Returns void

    • Returns void

    • Returns void

    • Virtual

      Method to override to implement custom behavior of a window, called by the engine once per frame.

      Returns void

    • Virtual

      Method to override to implement custom behavior of a window, called by the engine once per frame, once all the windows had their onEditorUpdate() method called.

      Returns void

    • Returns void

    • Returns void

    • Virtual

      Method to override to implement initialization of custom windows. Called by the engine after window creation.

      Parameters

      • options: any

      Returns void

    • Returns void

    • Returns void

    • Returns void

    • Returns void

    • Virtual

      Called whenever window visibility changed.

      Parameters

      • isVisible: boolean

      Returns void

      Implementing classes must call super.

    • Virtual

      Triggered whenever the window gains or loses focus.

      Parameters

      • inFocus: boolean

        True if focus was gained, false otherwise.

      Returns void

    • Virtual

      Triggered whenever the window size changes.

      Parameters

      • width: number

        New width of the window in pixels.

      • height: number

        New height of the window in pixels.

      Returns void

    • Brings the editor window to focus. If it is docked, it's dock container will switch to the window's tab or if undocked the floating window will gain focus.

      Returns void

    • Releases all the Editor Camera relevant component references.

      Returns void

    • Defines the window maximum width and height in points.

      Parameters

      • maxWidth: number
      • maxHeight: number

      Returns void

    • Defines the window minimum width and height in points.

      Parameters

      • minWidth: number

        The minimum width of the window in points.

      • minHeight: number

        The minimum height of the window in points.

      Returns void

    • Toggle visibility of the Overlay UI Label placed in the middle of the Viewport.

      Parameters

      • enabled: boolean

        Enable or not the overlay label.

      Returns void

    • Moves the window on the desktop. Coordinates are in screen space using points.

      Parameters

      • x: number
      • y: number

      Returns void

    • Moves the window on the desktop. Coordinates are in screen space using pixels.

      Parameters

      • x: number
      • y: number

      Returns void

    • Resizes the window using a width and height in points.

      Parameters

      • width: number
      • height: number

      Returns void

    • Resizes the window using a width and height in pixels.

      Parameters

      • width: number
      • height: number

      Returns void

    • Parses an array of scene objects and removes elements that are children of elements that are also in the array.

      Parameters

      Returns SceneObject[]

      An array containing the truncated roots without children.

    • Updates the current camera render mode.

      Returns void

    • Checks if the load progress bar or paused state needs to be shown, shows/hides it and updates the progress accordingly.

      Returns void

    onEditorCameraTransformChanged: Event<[]>

    Notifies that the scene camera as been moved.

    onResized: Event<[width: number, height: number]>

    Triggered whenever window size changes.

    onDPIChanged: Event<[]>

    Triggered whenever window's screen dpi changes.

    onMoved: Event<[x: number, y: number]>

    Triggered whenever window position changes.

    onFocusChanged: Event<[isFocused: boolean]>

    Triggered whenever window receives or loses focus.

    onOSDropEnter: Event<[x: number, y: number]>

    Triggered when the user do a OS drag on top of this window.

    onOSDropLeave: Event<[]>

    Triggered when the user leaves the mouse from a OS drop.

    onOSDropCommit: Event<
        [x: number, y: number, dropData: readonly Immutable<OSDropData>[]],
    >

    Triggered when the user actually drops something on top of this window.

    onFocusChangedInternal: Event<[isFocused: boolean]>