GizmoSettings

View source

Mutable 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


constructor()

Properties


lineWidth: number

View source

Line width applied to the canvas context. Defaults to 1.

Default: 1

lineDashOffset: number

View source

Offset applied to the dash pattern. Defaults to 0.

Default: 0