Class
GizmoSettings
View sourceMutable line-drawing configuration shared by a Gizmo2DPlugin or
Gizmo3DPlugin and the gizmo resource it installs.
Pass an instance as a plugin’s optional settings input to customize gizmo
line rendering. If the input is omitted, the plugin creates an instance
with its default values. The same settings object is stored on the resulting
Gizmo2D or Gizmo3D resource, so changing it changes
subsequent drawing.
Examples
import { Gizmo2DPlugin, GizmoLineCap, GizmoLineStyle, GizmoSettings } from '@wimaengine/gizmo'
class DebugGizmo {}
const settings = new GizmoSettings()
settings.lineWidth = 2
settings.lineCap = GizmoLineCap.Round
settings.lineStyle = GizmoLineStyle.Dashed
const plugin = new Gizmo2DPlugin({ label: DebugGizmo, settings })Constructor
Properties
lineWidth: number
View sourceLine width applied to the canvas context. Defaults to 1.
Default: 1
lineCap: number
View sourceLine-end shape. Defaults to GizmoLineCap.Butt (0).
Default: GizmoLineCap.Butt
lineJoin: number
View sourceLine-join shape. Defaults to GizmoLineJoin.Mitre (1).
Default: GizmoLineJoin.Mitre
lineStyle: number
View sourceLine pattern. Defaults to GizmoLineStyle.Solid (0).
Default: GizmoLineStyle.Solid
lineDashOffset: number
View sourceOffset applied to the dash pattern. Defaults to 0.
Default: 0
