Skip to main content

Home > blockly > geras > HighlightConstantProvider

geras.HighlightConstantProvider class

An object that provides constants for rendering highlights on blocks. Some highlights are simple offsets of the parent paths and can be generated programmatically. Others, especially on curves, are just made out of piles of constants and are hard to tweak.

Signature:

export declare class HighlightConstantProvider 

Constructors

ConstructorModifiersDescription
(constructor)(constants)Constructs a new instance of the HighlightConstantProvider class

Properties

PropertyModifiersTypeDescription
constantProviderConstantProvider
INSIDE_CORNERInsideCorner
JAGGED_TEETHJaggedTeeth
NOTCHNotch
OFFSETnumberThe offset between the block's main path and highlight path.
OUTSIDE_CORNEROutsideCorner
PUZZLE_TABPuzzleTab
START_HATStartHat
START_POINTstring

Methods

MethodModifiersDescription
init()Initialize shape objects based on the constants set in the constructor.
makeInsideCorner()protected
makeJaggedTeeth()protected
makeNotch()protected
makeOutsideCorner()protected
makePuzzleTab()protected
makeStartHat()protected