View
Clientside view helpers for world-space model previews, preview camera control, and temporary entity hiding.
Overview
The view library centralizes world-space preview behavior under `lia.view`. It can start and stop a preview session for a panel owner, spawn and manage a clientside model, rotate that model, expose the active preview entity, and temporarily hide players or entities while the preview is active.
lia.view.shouldHidePlayer(player)View Source
Purpose
Checks whether a player should be skipped while the active preview is hiding selected players.
Realm
Parameters
Player player The player being considered for drawing.
Returns
boolean True when the player is part of the active preview's hidden player set.
lia.view.close(owner)View Source
Purpose
Stops a preview session, removes its clientside model, restores hidden entities, and unregisters preview hooks.
Realm
Parameters
Panel owner The panel or owner object that started the preview session.
lia.view.begin(owner, config)View Source
Purpose
Starts a world-space preview session for an owner and configures temporary draw suppression for the supplied entities.
Realm
Parameters
Panel owner The panel or owner object that controls the preview lifecycle.
table config Preview configuration such as hidden entities, camera offsets, preview position, and context data.
lia.view.setModel(owner, modelPath, options)View Source
Purpose
Creates or replaces the clientside preview model for an owner and applies the supplied appearance options.
Realm
Parameters
Panel owner The panel or owner object that owns the preview session.
string modelPath The model path to preview.
table options Appearance and context options such as skin, bodygroups, angle, position, and hidden entities.
lia.view.getEntity(owner)View Source
Purpose
Returns the current clientside preview entity for an owner.
Realm
Parameters
Panel owner The panel or owner object that owns the preview session.
Returns
Entity|nil The active clientside preview model, or nil when no preview is active.
lia.view.rotate(owner, deltaYaw)View Source
Purpose
Rotates the current preview entity around its yaw axis.
Realm
Parameters
Panel owner The panel or owner object that owns the preview session.
number deltaYaw The yaw delta to apply in degrees.