SelectionBoxMesh
Package: Libraries.Interface.Controls.Scenes.Items.Highlights · Inherits from: Libraries.Language.Object
The SelectionBoxMesh makes the scene editor's selection box: a see-through fill (part 0) and its twelve edges (part 1), each unlit, so the box looks the same in sun or shade, and seen from both sides. The box's colors are set on each part (Model's SetColor with a part number). The edges are made thinner by the item's scale, so they look about the same width whatever the scale. Boxes of the same size and scale share one mesh.
Example Code
use Libraries.Interface.Controls.Scenes.Items.Highlights.SelectionBoxMesh
use Libraries.Game.Graphics.Model
use Libraries.Compute.Vector3
SelectionBoxMesh maker
Vector3 scale
scale:Set(1, 1, 1)
Model box
box:Load(maker:GetBlueprint(2, 1, 3, scale))
Actions
GetBlueprint(number width, number height, number depth, Libraries.Compute.Vector3 itemScale)
This action returns the box's blueprint, made once for each size and scale.
Parameters
widthnumber: The box's width, in the item's own unitsheightnumber: The box's heightdepthnumber: The box's depthitemScaleLibraries.Compute.Vector3: The item's scale, so the edges can be made thinner by it
Returns
Libraries.Game.Graphics.Models.ModelBlueprint: The blueprint: part 0 the fill, part 1 the edges