Interface: ModelPanel

Renders a 3d model in the UI.

Properties

Name Type Description
activationenabled boolean No description provided.
actuallayoutheight number No description provided.
actuallayoutwidth number No description provided.
actualuiscale_x number No description provided.
actualuiscale_y number No description provided.
actualxoffset number No description provided.
actualyoffset number No description provided.
antialias boolean Whether this ModelView should use antialiasing.
checked boolean No description provided.
contentheight number No description provided.
contentwidth number No description provided.
cubemap string The cubemap that this ModelPanel should display, excluding the .vtf extension. This path is relative to materials/.
defaultfocus string No description provided.
desiredlayoutheight number No description provided.
desiredlayoutwidth number No description provided.
enabled boolean No description provided.
hittest boolean No description provided.
hittestchildren boolean No description provided.
id string No description provided.
inputnamespace string No description provided.
layoutfile string No description provided.
mouse_rotate boolean Whether the mouse can be dragged over this ModelView to rotate the model.
This property can only be set through XML. To modify it, use the SetMouseRotationAllowed method.
paneltype ModelPanel No description provided.
rememberchildfocus boolean No description provided.
scrolloffset_x number No description provided.
scrolloffset_y number No description provided.
selectionpos_x number No description provided.
selectionpos_y number No description provided.
sequence string Animation sequence name for the model, may be changed later using SetSequence
skin number Index of the skin to use
src string The model that this ModelPanel should display, relative to /
style Style No description provided.
tabindex number No description provided.
visible boolean No description provided.

Functions

AcceptsFocus

ModelPanel.AcceptsFocus(): boolean

No description provided.

AcceptsInput

ModelPanel.AcceptsInput(): boolean

No description provided.

AddClass

ModelPanel.AddClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

AddParticleSystem

ModelPanel.AddParticleSystem(arg0: string, arg1: string, arg2: boolean): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 string No description provided.
arg2 boolean No description provided.

ApplyStyles

ModelPanel.ApplyStyles(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

BAscendantHasClass

ModelPanel.BAscendantHasClass(arg0: string): boolean

No description provided.

Parameter

Name Type Description
arg0 string No description provided.

CanSeeInParentScroll

ModelPanel.CanSeeInParentScroll(): boolean

No description provided.

Children

ModelPanel.Children(): GenericPanel[]

No description provided.

ClearPanelEvent

ModelPanel.ClearPanelEvent(event: string): void

No description provided.

Parameter

Name Type Description
event string No description provided.

ClearPropertyFromCode

ModelPanel.ClearPropertyFromCode(arg0: unknown): void

No description provided.

Parameter

Name Type Description
arg0 unknown No description provided.

CreateChildren

ModelPanel.CreateChildren(elements: string): boolean

No description provided.

Parameter

Name Type Description
elements string No description provided.

CreateCopyOfCSSKeyframes

ModelPanel.CreateCopyOfCSSKeyframes(animation: string): unknown

No description provided.

Parameter

Name Type Description
animation string No description provided.

Data

ModelPanel.Data(...args: any[]): void

No description provided.

Parameter

Name Type Description
...args any[] No description provided.

DeleteAsync

ModelPanel.DeleteAsync(delay: number): void

No description provided.

Parameter

Name Type Description
delay number No description provided.

DeleteKeyframes

ModelPanel.DeleteKeyframes(animation: unknown): void

No description provided.

Parameter

Name Type Description
animation unknown No description provided.

FindChild

ModelPanel.FindChild(id: string): T

Searches this element's direct children and returns a child with the specified id.

Parameter

Name Type Description
id string No description provided.

FindChildInLayoutFile

ModelPanel.FindChildInLayoutFile(id: string): T

No description provided.

Parameter

Name Type Description
id string No description provided.

FindChildrenWithClassTraverse

ModelPanel.FindChildrenWithClassTraverse(classname: string): T[]

No description provided.

Parameter

Name Type Description
classname string No description provided.

FindChildTraverse

ModelPanel.FindChildTraverse(id: string): T

No description provided.

Parameter

Name Type Description
id string No description provided.

GetAttributeInt

ModelPanel.GetAttributeInt(attribute: string, fallback: number): number

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback number No description provided.

GetAttributeString

ModelPanel.GetAttributeString(attribute: string, fallback: string): string

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback string No description provided.

GetAttributeUInt32

ModelPanel.GetAttributeUInt32(attribute: string, fallback: number): number

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback number No description provided.

GetChild

ModelPanel.GetChild(index: number): T

No description provided.

Parameter

Name Type Description
index number No description provided.

GetChildCount

ModelPanel.GetChildCount(): number

No description provided.

GetChildIndex

ModelPanel.GetChildIndex(child: GenericPanel): number

No description provided.

Parameter

Name Type Description
child GenericPanel No description provided.

GetClothSimulationEnabled

ModelPanel.GetClothSimulationEnabled(): boolean

Returns whether cloth simulation is enabled on this model.

GetFirstChild

ModelPanel.GetFirstChild(): T

No description provided.

GetFlexControl

ModelPanel.GetFlexControl(flexController: string): number

Returns the current value associated with a flex controller

Parameter

Name Type Description
flexController string Flex controller name

GetFlexControllers

ModelPanel.GetFlexControllers(): typescript.Record<string, FlexController>

Returns an array of objects describing all available flex controllers for this model The UI must take into account the min/max values specified in these structures

GetLastChild

ModelPanel.GetLastChild(): T

No description provided.

GetLayoutFileDefine

ModelPanel.GetLayoutFileDefine(def: string): unknown

No description provided.

Parameter

Name Type Description
def string No description provided.

GetLOD

ModelPanel.GetLOD(): number

Returns the current LOD for this model

GetParent

ModelPanel.GetParent(): T

No description provided.

GetPoseParamCount

ModelPanel.GetPoseParamCount(): number

Returns the number of pose parameters available for this model

GetPoseParameter

ModelPanel.GetPoseParameter(param: string): number

Get a pose parameter's current value

Parameter

Name Type Description
param string Pose parameter to get, by name

GetPoseParameters

ModelPanel.GetPoseParameters(): typescript.Record<string, PoseParameter>

Returns an array of all pose parameters

GetPositionWithinWindow

ModelPanel.GetPositionWithinWindow(): unknown

No description provided.

GetSequence

ModelPanel.GetSequence(): string

Returns the current animation sequence for this model

GetSequences

ModelPanel.GetSequences(): string[]

Returns an array of all sequences for this model

GetSkin

ModelPanel.GetSkin(): number

Returns the current skin

GetSkinCount

ModelPanel.GetSkinCount(): number

Returns the total number of skins available to this model. Use with SetSkin

HasClass

ModelPanel.HasClass(classname: string): boolean

No description provided.

Parameter

Name Type Description
classname string No description provided.

HasDescendantKeyFocus

ModelPanel.HasDescendantKeyFocus(): boolean

No description provided.

HasHoverStyle

ModelPanel.HasHoverStyle(): boolean

No description provided.

HasKeyFocus

ModelPanel.HasKeyFocus(): boolean

No description provided.

IsDraggable

ModelPanel.IsDraggable(): boolean

No description provided.

IsReadyForDisplay

ModelPanel.IsReadyForDisplay(): boolean

No description provided.

IsSelected

ModelPanel.IsSelected(): boolean

No description provided.

IsSizeValid

ModelPanel.IsSizeValid(): boolean

No description provided.

IsTransparent

ModelPanel.IsTransparent(): boolean

No description provided.

IsValid

ModelPanel.IsValid(): boolean

Check if this panel is still valid

LoadLayout

ModelPanel.LoadLayout(url: string, override: boolean, partial: boolean): boolean

No description provided.

Parameters

Name Type Description
url string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutAsync

ModelPanel.LoadLayoutAsync(url: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
url string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutFromString

ModelPanel.LoadLayoutFromString(layout: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
layout string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutFromStringAsync

ModelPanel.LoadLayoutFromStringAsync(layout: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
layout string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutSnippet

ModelPanel.LoadLayoutSnippet(snippet: string): boolean

No description provided.

Parameter

Name Type Description
snippet string No description provided.

LookAt

ModelPanel.LookAt(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

LookAtModel

ModelPanel.LookAtModel(): void

No description provided.

MoveChildAfter

ModelPanel.MoveChildAfter(arg0: unknown, arg1: unknown): void

No description provided.

Parameters

Name Type Description
arg0 unknown No description provided.
arg1 unknown No description provided.

MoveChildBefore

ModelPanel.MoveChildBefore(arg0: unknown, arg1: unknown): void

No description provided.

Parameters

Name Type Description
arg0 unknown No description provided.
arg1 unknown No description provided.

RegisterForReadyEvents

ModelPanel.RegisterForReadyEvents(enable: boolean): void

Registers this panel to receive ready/unready events.

Parameter

Name Type Description
enable boolean Should this panel receive ready/unready events?

RemoveAndDeleteChildren

ModelPanel.RemoveAndDeleteChildren(): void

No description provided.

RemoveClass

ModelPanel.RemoveClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

ResetPoseParam

ModelPanel.ResetPoseParam(param: number): void

Reset a single pose parameter to its default

Parameter

Name Type Description
param number Pose parameter to reset, must be in range [0,GetPoseParamCount())

ResetPoseParams

ModelPanel.ResetPoseParams(): void

Resets all pose parameters to their default values

ScrollParentToFitWhenFocused

ModelPanel.ScrollParentToFitWhenFocused(): boolean

No description provided.

ScrollParentToMakePanelFit

ModelPanel.ScrollParentToMakePanelFit(arg0: number, arg1: boolean): void

No description provided.

Parameters

Name Type Description
arg0 number No description provided.
arg1 boolean No description provided.

ScrollToBottom

ModelPanel.ScrollToBottom(): void

No description provided.

ScrollToFitRegion

ModelPanel.ScrollToFitRegion(arg0: number, arg1: number, arg2: number, arg3: number, arg4: unknown, arg5: boolean, arg6: boolean): void

No description provided.

Parameters

Name Type Description
arg0 number No description provided.
arg1 number No description provided.
arg2 number No description provided.
arg3 number No description provided.
arg4 unknown No description provided.
arg5 boolean No description provided.
arg6 boolean No description provided.

ScrollToLeftEdge

ModelPanel.ScrollToLeftEdge(): void

No description provided.

ScrollToRightEdge

ModelPanel.ScrollToRightEdge(): void

No description provided.

ScrollToTop

ModelPanel.ScrollToTop(): void

No description provided.

SetAcceptsFocus

ModelPanel.SetAcceptsFocus(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetAttributeInt

ModelPanel.SetAttributeInt(attribute: string, value: number): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value number No description provided.

SetAttributeString

ModelPanel.SetAttributeString(attribute: string, value: string): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value string No description provided.

SetAttributeUInt32

ModelPanel.SetAttributeUInt32(attribute: string, value: number): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value number No description provided.

SetCameraAngles

ModelPanel.SetCameraAngles(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetCameraFOV

ModelPanel.SetCameraFOV(fov: number): void

No description provided.

Parameter

Name Type Description
fov number No description provided.

SetCameraOffset

ModelPanel.SetCameraOffset(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetCameraPosition

ModelPanel.SetCameraPosition(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetClothSimulationEnabled

ModelPanel.SetClothSimulationEnabled(enable: boolean): void

Enable/disable cloth sim on a model, if it supports it

Parameter

Name Type Description
enable boolean True to enable, false to disable

SetDialogVariable

ModelPanel.SetDialogVariable(arg0: string, arg1: string): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 string No description provided.

SetDialogVariableFloat

ModelPanel.SetDialogVariableFloat(arg0: string, arg1: number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 number No description provided.

SetDialogVariableInt

ModelPanel.SetDialogVariableInt(arg0: string, arg1: number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 number No description provided.

SetDialogVariableTime

ModelPanel.SetDialogVariableTime(arg0: string, arg1: string | number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 string | number No description provided.

SetDirectionalLightColor

ModelPanel.SetDirectionalLightColor(light: number, r: number, g: number, b: number): void

Sets the color of a directional light as floats.

Parameters

Name Type Description
light number The ID of the light. (0-4)
r number No description provided.
g number No description provided.
b number No description provided.

SetDirectionalLightDirection

ModelPanel.SetDirectionalLightDirection(light: number, x: number, y: number, z: number): void

Sets the direction of a directional light.

Parameters

Name Type Description
light number The ID of the light. (0-4)
x number No description provided.
y number No description provided.
z number No description provided.

SetDisableFocusOnMouseDown

ModelPanel.SetDisableFocusOnMouseDown(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetDraggable

ModelPanel.SetDraggable(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetFlexControl

ModelPanel.SetFlexControl(flexController: string, value: number): void

Set a flex controller value. Should be within the min/max returned by GetFlexControllers(), but out of range values will still be used to render.

Parameters

Name Type Description
flexController string Flex controller name
value number Value of the flex

SetFocus

ModelPanel.SetFocus(focus: boolean): boolean

No description provided.

Parameter

Name Type Description
focus boolean No description provided.

SetHasClass

ModelPanel.SetHasClass(classname: string, hasclass: boolean): void

No description provided.

Parameters

Name Type Description
classname string No description provided.
hasclass boolean No description provided.

SetInputNamespace

ModelPanel.SetInputNamespace(arg0: string): void

No description provided.

Parameter

Name Type Description
arg0 string No description provided.

SetLightAmbient

ModelPanel.SetLightAmbient(r: number, g: number, b: number): void

No description provided.

Parameters

Name Type Description
r number No description provided.
g number No description provided.
b number No description provided.

SetLOD

ModelPanel.SetLOD(lod: number): void

Set the LOD for this model

Parameter

Name Type Description
lod number LOD level

SetModelBodygroup

ModelPanel.SetModelBodygroup(arg0: number, arg1: number): void

No description provided.

Parameters

Name Type Description
arg0 number No description provided.
arg1 number No description provided.

SetModelColor

ModelPanel.SetModelColor(arg0: unknown): void

No description provided.

Parameter

Name Type Description
arg0 unknown No description provided.

SetModelRotation

ModelPanel.SetModelRotation(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetModelRotationAcceleration

ModelPanel.SetModelRotationAcceleration(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetModelRotationBoundsEnabled

ModelPanel.SetModelRotationBoundsEnabled(x: boolean, y: boolean, z: boolean): void

No description provided.

Parameters

Name Type Description
x boolean No description provided.
y boolean No description provided.
z boolean No description provided.

SetModelRotationBoundsX

ModelPanel.SetModelRotationBoundsX(min: number, max: number): void

No description provided.

Parameters

Name Type Description
min number No description provided.
max number No description provided.

SetModelRotationBoundsY

ModelPanel.SetModelRotationBoundsY(min: number, max: number): void

No description provided.

Parameters

Name Type Description
min number No description provided.
max number No description provided.

SetModelRotationBoundsZ

ModelPanel.SetModelRotationBoundsZ(min: number, max: number): void

No description provided.

Parameters

Name Type Description
min number No description provided.
max number No description provided.

SetModelRotationSpeed

ModelPanel.SetModelRotationSpeed(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetModelRotationSpeedTarget

ModelPanel.SetModelRotationSpeedTarget(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetModelRotationTarget

ModelPanel.SetModelRotationTarget(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetMouseRotationAllowed

ModelPanel.SetMouseRotationAllowed(allow: boolean): void

No description provided.

Parameter

Name Type Description
allow boolean No description provided.

SetMouseXRotationScale

ModelPanel.SetMouseXRotationScale(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetMouseYRotationScale

ModelPanel.SetMouseYRotationScale(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetPanelEvent

ModelPanel.SetPanelEvent(event: string, callback: Func<any[], void>): void

Sets an event trigger for this panel.

Example

latestUpdateImage.SetPanelEvent('onactivate', () => SteamOverlayAPI.OpenURLModal(item.link));

Parameters

Name Type Description
event string No description provided.
callback Func<any[], void> No description provided.

See also

SetParent

ModelPanel.SetParent(parent: GenericPanel): void

No description provided.

Parameter

Name Type Description
parent GenericPanel No description provided.

SetParticleSystemOffsetAngles

ModelPanel.SetParticleSystemOffsetAngles(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetParticleSystemOffsetPosition

ModelPanel.SetParticleSystemOffsetPosition(x: number, y: number, z: number): void

No description provided.

Parameters

Name Type Description
x number No description provided.
y number No description provided.
z number No description provided.

SetPoseParameter

ModelPanel.SetPoseParameter(param: string, value: number): void

Sets a single pose parameter

Parameters

Name Type Description
param string Pose parameter to set, by name
value number Value of the pose parameter

SetReadyForDisplay

ModelPanel.SetReadyForDisplay(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SetScrollParentToFitWhenFocused

ModelPanel.SetScrollParentToFitWhenFocused(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SetSequence

ModelPanel.SetSequence(sequence: string): void

Set the current animation sequence for this model

Parameter

Name Type Description
sequence string Sequence name

SetSkin

ModelPanel.SetSkin(skin: number): void

Sets the current skin

Parameter

Name Type Description
skin number Skin index, must be in range [0, GetSkinCount())

SetTopOfInputContext

ModelPanel.SetTopOfInputContext(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SortChildrenOnAttribute

ModelPanel.SortChildrenOnAttribute(attribute: string, ascending: boolean): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
ascending boolean No description provided.

SwitchClass

ModelPanel.SwitchClass(oldclass: string, newclass: string): void

No description provided.

Parameters

Name Type Description
oldclass string No description provided.
newclass string No description provided.

ToggleClass

ModelPanel.ToggleClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

TriggerClass

ModelPanel.TriggerClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

UpdateCurrentAnimationKeyframes

ModelPanel.UpdateCurrentAnimationKeyframes(animation: unknown): void

No description provided.

Parameter

Name Type Description
animation unknown No description provided.

UpdateFocusInContext

ModelPanel.UpdateFocusInContext(): boolean

No description provided.