scrawl-canvas
Version:
Responsive, interactive and more accessible HTML5 canvas elements. Scrawl-canvas is a JavaScript library designed to make using the HTML5 canvas element easier, and more fun
1,529 lines (1,237 loc) • 115 kB
TypeScript
// Type definitions for Scrawl-canvas 8.15.0
// HELPERS
// =====================================
type DefaultInputFunction = (item?: any) => void;
type DefaultOutputFunction = (item?: any) => void;
type DefaultStringOutputFunction = (item?: any) => string;
interface CommonObjectInput {
[index: string]: any;
}
type StringOrNumberInput = string | number;
type Percentage = `${number}%`;
type PercentOrNumberInput = Percentage | number;
interface CommonHereObjectInput {
x?: number;
y?: number;
[index: string]: any;
}
type CommonTwoElementArrayInput = [StringOrNumberInput, StringOrNumberInput] | number[];
type CascadeFunction = (item: string | string[], event?: MouseEvent | PointerEvent) => string | string[];
type OnCascadeFunction = (event?: MouseEvent | PointerEvent) => void;
// MIXINS
// =====================================
// Anchor mixin
// -------------------------------------
interface AnchorMixinDeltaInputs {}
interface AnchorMixinInputs {
anchor?: AnchorFactoryInputs;
anchorBlurAction?: boolean;
anchorClickAction?: DefaultOutputFunction;
anchorDescription?: string;
anchorDownload?: string;
anchorFocusAction?: boolean;
anchorHref?: string;
anchorHreflang?: string;
anchorPing?: string;
anchorName?: string;
anchorReferrerPolicy?: string;
anchorRel?: string;
anchorTarget?: string;
anchorType?: string;
}
interface AnchorMixinFunctions {
clickAnchor?: () => void;
}
// Asset mixin
// -------------------------------------
interface AssetMixinDeltaInputs {}
interface AssetMixinInputs {}
interface AssetMixinFunctions {}
// AssetAdvancedFunctionality mixin
// -------------------------------------
interface AssetAdvancedFunctionalityMixinDeltaInputs {
paletteEnd?: number;
paletteStart?: number;
}
interface AssetAdvancedFunctionalityMixinInputs {
choke?: number;
colors?: StyleColorsArray[];
colorSpace?: ColorSpacesValues;
cyclePalette?: boolean;
easing?: string | DefaultInputFunction;
precision?: number;
returnColorAs?: ReturnColorValues;
}
interface AssetAdvancedFunctionalityMixinFunctions {
update: () => void;
}
// AssetConsumer mixin
// -------------------------------------
interface AssetConsumerMixinDeltaInputs {}
interface AssetConsumerMixinInputs {
asset?: string | AssetInstance,
removeAssetOnKill?: string | boolean;
imageSource?: string;
spriteForward?: boolean;
spriteFrameDuration?: number;
spriteSource?: string;
spriteTrack?: string;
spriteWillLoop?: boolean;
videoSource?: string;
video_autoPlay?: boolean;
video_controller?: any;
video_controls?: any;
video_crossOrigin?: any;
video_currentTime?: any;
video_defaultMuted?: any;
video_defaultPlaybackRate?: any;
video_disableRemotePlayback?: any;
video_loop?: boolean;
video_mediaGroup?: any;
video_muted?: boolean;
video_playbackRate?: any;
video_src?: any;
video_srcObject?: any;
video_volume?: any;
}
interface AssetConsumerMixinFunctions {
videoAddTextTrack: (kind: any, label: any, language: any) => any | void;
videoCaptureStream: () => any | void;
videoCanPlayType: (item: string) => boolean;
videoFastSeek: (item: number) => any | void;
videoLoad: () => any | void;
videoPause: () => any | void;
videoPlay: () => any | void;
videoSetMediaKeys: () => any | void;
videoSetSinkId: () => any | void;
playSprite: (speed?: number, loop?: boolean, track?: string, forward?: boolean, frame?: number) => void;
haltSprite: (speed?: number, loop?: boolean, track?: string, forward?: boolean, frame?: number) => void;
}
// Base mixin
// -------------------------------------
interface BaseMixinDeltaInputs {}
interface BaseMixinInputs {
name?: string,
}
interface BaseMixinFunctions {
actionPacket: (item: string) => any;
get: (item: string) => any;
importPacket: (item: string | string[]) => any;
kill: (item?: any) => void;
}
interface BaseInstance {
type: string;
lib: string;
isArtefact: boolean;
isAsset: boolean;
}
// Button mixin
// -------------------------------------
interface ButtonMixinDeltaInputs {}
interface ButtonMixinInputs {
button?: ButtonFactoryInputs;
buttonAutofocus?: boolean;
buttonBlurAction?: boolean;
buttonClickAction?: DefaultOutputFunction;
buttonDescription?: string;
buttonDisabled?: boolean;
buttonElementName?: string;
buttonElementType?: string;
buttonElementValue?: string;
buttonFocusAction?: boolean;
buttonForm?: string;
buttonFormAction?: string;
buttonFormEnctype?: string;
buttonFormMethod?: string;
buttonFormNoValidate?: boolean;
buttonFormTarget?: string;
buttonName?: string;
buttonPopoverTarget?: string;
buttonPopoverTargetAction?: string;
}
interface ButtonMixinFunctions {
clickButton?: () => void;
}
// Cascade mixin
// -------------------------------------
interface CascadeMixinDeltaInputs {}
interface CascadeMixinInputs {}
interface CascadeMixinFunctions {
addArtefactClasses: (item?: CommonObjectInput) => any;
getAllArtefactsAt: (item: any) => any;
getArtefactAt: (item: any) => any;
removeArtefactClasses: (item?: CommonObjectInput) => any;
setArtefacts: (item?: CommonObjectInput) => any;
updateArtefacts: (item?: CommonObjectInput) => any;
}
// Delta mixin
// -------------------------------------
interface DeltaMixinDeltaInputs {}
interface DeltaMixinInputs {
checkDeltaConstraints?: boolean;
deltaConstraints?: CommonObjectInput;
noDeltaUpdates?: boolean;
performDeltaChecks?: boolean;
}
interface DeltaMixinFunctions {
reverseByDelta: () => ArtefactInstance;
setDeltaValues: (item?: CommonObjectInput) => ArtefactInstance;
updateByDelta: () => ArtefactInstance;
}
// DisplayShape mixin
// -------------------------------------
interface DisplayShapeMixinDeltaInputs {}
interface DisplayShapeMixinInputs {
actionBannerShape?: DefaultInputFunction,
actionLandscapeShape?: DefaultInputFunction,
actionLargerArea?: DefaultInputFunction,
actionLargestArea?: DefaultInputFunction,
actionPortraitShape?: DefaultInputFunction,
actionRectangleShape?: DefaultInputFunction,
actionRegularArea?: DefaultInputFunction,
actionSkyscraperShape?: DefaultInputFunction,
actionSmallerArea?: DefaultInputFunction,
actionSmallestArea?: DefaultInputFunction,
breakToBanner?: number;
breakToLandscape?: number;
breakToLarger?: number;
breakToLargest?: number;
breakToPortrait?: number;
breakToSkyscraper?: number;
breakToSmaller?: number;
breakToSmallest?: number;
}
interface DisplayShapeMixinFunctions {
setActionBannerShape: (item?: DefaultInputFunction) => ArtefactInstance;
setActionLandscapeShape: (item?: DefaultInputFunction) => ArtefactInstance;
setActionLargerArea: (item?: DefaultInputFunction) => ArtefactInstance;
setActionLargestArea: (item?: DefaultInputFunction) => ArtefactInstance;
setActionPortraitShape: (item?: DefaultInputFunction) => ArtefactInstance;
setActionRectangleShape: (item?: DefaultInputFunction) => ArtefactInstance;
setActionRegularArea: (item?: DefaultInputFunction) => ArtefactInstance;
setActionSkyscraperShape: (item?: DefaultInputFunction) => ArtefactInstance;
setActionSmallerArea: (item?: DefaultInputFunction) => ArtefactInstance;
setActionSmallestArea: (item?: DefaultInputFunction) => ArtefactInstance;
setDisplayShapeBreakpoints: (item?: CommonObjectInput) => ArtefactInstance;
updateDisplay: () => void;
updateDisplayArea: () => void;
updateDisplayShape: () => void;
}
// Dom mixin
// -------------------------------------
interface DomMixinDeltaInputs extends PositionMixinDeltaInputs, DeltaMixinDeltaInputs, PivotMixinDeltaInputs, MimicMixinDeltaInputs, PathMixinDeltaInputs, AnchorMixinDeltaInputs, ButtonMixinDeltaInputs {
offsetZ?: number;
pitch?: number;
yaw?: number;
}
interface DomMixinInputs extends PositionMixinInputs, DeltaMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs, ButtonMixinInputs {
activePadding?: number;
checkForResize?: boolean;
classes?: string;
colorSchemeDarkAction?: DefaultInputFunction;
colorSchemeLightAction?: DefaultInputFunction;
css?: CommonObjectInput;
includeInTabNavigation?: boolean;
moreContrastAction?: DefaultInputFunction;
noPreferenceDataAction?: DefaultInputFunction;
noPreferenceMotionAction?: DefaultInputFunction;
noPreferenceTransparencyAction?: DefaultInputFunction;
otherContrastAction?: DefaultInputFunction;
position?: string;
reduceDataAction?: DefaultInputFunction;
reduceMotionAction?: DefaultInputFunction;
reduceTransparencyAction?: DefaultInputFunction;
trackHere?: string;
}
interface DomMixinFunctions extends BaseMixinFunctions, PositionMixinFunctions, DeltaMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions, ButtonMixinFunctions {
addClasses: (item: string) => void;
apply: () => void;
removeClasses: (item: string) => void;
setColorSchemeDarkAction: DefaultInputFunction;
setColorSchemeLightAction: DefaultInputFunction;
setMoreContrastAction: DefaultInputFunction;
setNoPreferenceDataAction: DefaultInputFunction;
setNoPreferenceMotionAction: DefaultInputFunction;
setNoPreferenceTransparencyAction: DefaultInputFunction;
setOtherContrastAction: DefaultInputFunction;
setReduceDataAction: DefaultInputFunction;
setReduceMotionAction: DefaultInputFunction;
setReduceTransparencyAction: DefaultInputFunction;
}
// Entity mixin
// -------------------------------------
type MethodValues = 'draw' | 'fill' | 'drawAndFill' | 'fillAndDraw' | 'drawThenFill' | 'fillThenDraw' | 'clip' | 'clear' | 'none' | string;
type WindingValues = 'nonzero' | 'evenodd';
interface EntityMixinDeltaInputs extends PositionMixinDeltaInputs, PivotMixinDeltaInputs, MimicMixinDeltaInputs, PathMixinDeltaInputs, AnchorMixinDeltaInputs, ButtonMixinDeltaInputs, FilterMixinDeltaInputs, DeltaMixinDeltaInputs, StateFactoryDeltaInputs {}
interface EntityMixinInputs extends PositionMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs, ButtonMixinInputs, FilterMixinInputs, DeltaMixinInputs, StateFactoryInputs {
flipReverse?: boolean;
flipUpend?: boolean;
lockFillStyleToEntity?: boolean;
lockStrokeStyleToEntity?: boolean;
method?: MethodValues;
onDown?: OnCascadeFunction;
onEnter?: OnCascadeFunction;
onLeave?: OnCascadeFunction;
onUp?: OnCascadeFunction;
onOtherInteraction?: OnCascadeFunction;
scaleOutline?: boolean;
scaleShadow?: boolean;
sharedState?: boolean;
winding?: WindingValues;
}
interface EntityMixinFunctions extends BaseMixinFunctions, PositionMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions, ButtonMixinFunctions, FilterMixinFunctions, DeltaMixinFunctions, StateFactoryFunctions {}
// Filter mixin
// -------------------------------------
interface FilterMixinDeltaInputs {}
interface FilterMixinInputs {
filters?: FilterInstance | string | Array<FilterInstance | string>;
isStencil?: boolean;
memoizeFilterOutput?: boolean;
}
interface FilterMixinFunctions {
addFilters?: (...items: Array<FilterInstance | string>) => EntityInstance;
removeFilters?: (...items: Array<FilterInstance | string>) => EntityInstance;
clearFilters?: () => EntityInstance;
}
// Mimic mixin
// -------------------------------------
interface MimicMixinDeltaInputs {}
interface MimicMixinInputs {
addOwnDimensionsToMimic?: boolean;
addOwnHandleToMimic?: boolean;
addOwnOffsetToMimic?: boolean;
addOwnRotationToMimic?: boolean;
addOwnScaleToMimic?: boolean;
addOwnStartToMimic?: boolean;
mimic?: ArtefactInstance | string;
useMimicDimensions?: boolean;
useMimicFlip?: boolean;
useMimicHandle?: boolean;
useMimicOffset?: boolean;
useMimicRotation?: boolean;
useMimicScale?: boolean;
useMimicStart?: boolean;
}
interface MimicMixinFunctions {}
// Path mixin
// -------------------------------------
interface PathMixinDeltaInputs {
pathPosition?: number;
}
interface PathMixinInputs {
addPathHandle?: boolean;
addPathOffset?: boolean;
addPathRotation?: boolean;
constantSpeedAlongPath?: boolean;
path?: ShapeBasedInstance | string;
}
interface PathMixinFunctions {}
// Pattern mixin
// -------------------------------------
interface PatternMatrix {
a?: number;
b?: number;
c?: number;
d?: number;
e?: number;
f?: number;
}
interface PatternMixinDeltaInputs {
matrixA?: number;
matrixB?: number;
matrixC?: number;
matrixD?: number;
matrixE?: number;
matrixF?: number;
stretchX?: number;
skewY?: number;
skewX?: number;
stretchY?: number;
shiftX?: number;
shiftY?: number;
}
interface PatternMixinInputs {
repeat?: string;
patternMatrix?: PatternMatrix;
}
interface PatternMixinFunctions {}
// Pivot mixin
// -------------------------------------
type PivotCornerValues = 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft';
interface PivotMixinDeltaInputs {}
interface PivotMixinInputs {
addPivotHandle?: boolean;
addPivotOffset?: boolean;
addPivotRotation?: boolean;
pivot?: ArtefactInstance | string;
pivotCorner?: PivotCornerValues;
pivotPin?: number;
pivotIndex?: number;
}
interface PivotMixinFunctions {}
// Position mixin
// -------------------------------------
type LockToValues = 'start' | 'pivot' | 'path' | 'mimic' | 'particle' | 'mouse';
type PurgeValues = 'pivot' | 'mimic' | 'path' | 'filter' | 'all' | string[];
interface PositionMixinDeltaInputs {
dimensions?: CommonTwoElementArrayInput;
handle?: CommonTwoElementArrayInput;
handleX?: StringOrNumberInput;
handleY?: StringOrNumberInput;
height?: StringOrNumberInput;
offset?: CommonTwoElementArrayInput;
offsetX?: StringOrNumberInput;
offsetY?: StringOrNumberInput;
roll?: number;
scale?: number;
start?: CommonTwoElementArrayInput;
startX?: StringOrNumberInput;
startY?: StringOrNumberInput;
width?: StringOrNumberInput;
}
interface PositionMixinInputs {
bringToFrontOnDrag?: boolean;
group?: GroupInstance | CellInstance | string;
ignoreDragForX?: boolean;
ignoreDragForY?: boolean;
lockTo?: LockToValues | [LockToValues, LockToValues];
lockXTo?: LockToValues;
lockYTo?: LockToValues;
noCanvasEngineUpdates?: boolean;
noFilters?: boolean;
noPathUpdates?: boolean;
noPositionDependencies?: boolean;
noUserInteraction?: boolean;
order?: number;
calculateOrder?: number;
stampOrder?: number;
particle?: ParticleInstance | string;
purge?: PurgeValues;
visibility?: boolean;
}
interface HitOutput {
artefact: ArtefactInstance;
x: number;
y: number;
tiles?: number[];
index?: number;
particle?: ParticleInstance;
}
type HitTests = CommonTwoElementArrayInput | CommonHereObjectInput | Array<CommonTwoElementArrayInput | CommonHereObjectInput>
interface PositionMixinFunctions {
checkHit?: (tests: HitTests) => HitOutput | boolean;
dropArtefact?: () => ArtefactInstance;
pickupArtefact?: (items: CommonTwoElementArrayInput | CommonHereObjectInput) => ArtefactInstance;
purgeArtefact?: (item: string | string[]) => void;
}
// ShapeBasic mixin
// -------------------------------------
interface PathPositionObject {
x: number;
y: number;
angle: number;
}
interface ShapeBasicMixinDeltaInputs extends EntityMixinDeltaInputs {}
interface ShapeBasicMixinInputs extends EntityMixinInputs {
boundingBoxColor?: string;
minimumBoundingBoxDimensions?: number;
pathDefinition?: string;
precision?: number;
showBoundingBox?: boolean;
useAsPath?: boolean;
}
interface ShapeBasicMixinFunctions extends EntityMixinFunctions {
getPathPositionData: (pos: number, constantSpeed?: boolean) => PathPositionObject;
getBoundingBox: () => number[]
}
// ShapeCurve mixin
// -------------------------------------
interface ShapeCurveMixinDeltaInputs extends ShapeBasicMixinDeltaInputs {
end?: CommonTwoElementArrayInput;
endPathPosition?: number;
endX?: StringOrNumberInput;
endY?: StringOrNumberInput;
}
interface ShapeCurveMixinInputs extends ShapeBasicMixinInputs {
addEndPathHandle?: boolean;
addEndPathOffset?: boolean;
addEndPivotHandle?: boolean;
addEndPivotOffset?: boolean;
endLockTo?: LockToValues | [LockToValues, LockToValues];
endParticle?: string;
endPath?: ShapeBasedInstance | string;
endPivot?: ArtefactInstance | string;
endPivotCorner?: PivotCornerValues;
endPivotIndex?: number;
endPivotPin?: number;
pivotIndex?: number;
useStartAsControlPoint?: boolean;
}
interface ShapeCurveMixinFunctions extends ShapeBasicMixinFunctions {}
// Styles mixin
// -------------------------------------
type StyleColorsArray = [number, string]
interface StylesMixinDeltaInputs {
end?: CommonTwoElementArrayInput;
endX?: StringOrNumberInput;
endY?: StringOrNumberInput;
paletteEnd?: number;
paletteStart?: number;
start?: CommonTwoElementArrayInput;
startX?: StringOrNumberInput;
startY?: StringOrNumberInput;
animateByDelta?: boolean;
}
interface StylesMixinInputs {
colors?: StyleColorsArray[];
colorSpace?: ColorSpacesValues;
cyclePalette?: boolean;
easing?: string | DefaultInputFunction;
palette?: CommonObjectInput;
precision?: number;
returnColorAs?: ReturnColorValues;
}
interface StylesMixinFunctions {
removeColor?: (index: number) => AnyGradientInstance;
updateByDelta?: () => StylesInstance;
updateColor?: (index: number, color: string) => AnyGradientInstance;
}
// Text mixin
// -------------------------------------
interface TextMixinDeltaInputs {}
interface TextMixinInputs {
accessibleText?: string;
accessibleTextOrder?: number;
accessibleTextPlaceholder?: string;
accessibleTextRole?: string;
textIsAccessible?: boolean;
}
interface TextMixinFunctions {
getAccessibleText: () => string;
convertTextEntityCharacters: (item: string) => string;
}
// Tween mixin
// -------------------------------------
interface TweenMixinDeltaInputs {
time?: StringOrNumberInput;
}
interface TweenMixinInputs {
action?: DefaultInputFunction;
order?: number;
reverseOnCycleEnd?: boolean;
targets?: TweenTargetInstance | TweenTargetInstance[];
ticker?: TickerInstance | string;
}
interface TweenMixinFunctions {
addToTargets: (item: any | any[]) => TweenAnimationInstance;
addToTicker: (item: string) => TweenAnimationInstance;
checkForTarget: (item: string) => TweenTargetInstance[];
removeFromTargets: (item: any | any[]) => TweenAnimationInstance;
removeFromTicker: (item?: string) => TweenAnimationInstance;
setTargets: (item: any | any[]) => TweenAnimationInstance;
}
// ADDITIONAL HELPERS
// =====================================
type ControlsShapeInstance = BezierInstance | LineInstance | QuadraticInstance;
type ShapeBasedInstance = ControlsShapeInstance | CogInstance | LineSpiralInstance | OvalInstance | PolygonInstance | PolylineInstance | RectangleInstance | ShapeInstance | SpiralInstance | StarInstance | TetragonInstance;
type EntityInstance = ShapeBasedInstance | BlockInstance | CrescentInstance | EmitterInstance | EnhancedLabelInstance | GridInstance | LabelInstance | LoomInstance | MeshInstance | NetInstance | PictureInstance | TracerInstance | WheelInstance;
type ArtefactInstance = EntityInstance | StackInstance | CanvasInstance | ElementInstance | UnstackedElementInstance;
type TargetInstance = StackInstance | CanvasInstance | CellInstance;
type AnyGradientInstance = GradientInstance | RadialGradientInstance | ConicGradientInstance;
type StylesInstance = AnyGradientInstance | CellInstance | PatternInstance | ColorInstance;
type TweenAnimationInstance = TweenInstance | ActionInstance;
type AssetInstance = ImageAssetInstance | SpriteAssetInstance | VideoAssetInstance | NoiseAssetInstance | ReactionDiffusionAssetInstance | RawAssetInstance | CellInstance;
type TweenTargetInstance = AnyGradientInstance | ArtefactInstance | FilterInstance | WorldInstance |AssetInstance | string;
interface SaveInputs {
includeDefaults?: boolean | string[];
}
// FACTORIES
// =====================================
// ActionInstance factory
// -------------------------------------
interface ActionFactoryDeltaInputs extends BaseMixinDeltaInputs, TweenMixinDeltaInputs {}
interface ActionFactoryInputs extends BaseMixinInputs, TweenMixinInputs, ActionFactoryDeltaInputs {
delta?: ActionFactoryDeltaInputs;
revert?: DefaultInputFunction;
}
interface ActionSaveInputs extends ActionFactoryInputs, SaveInputs {}
interface ActionFactoryFunctions extends BaseMixinFunctions, TweenMixinFunctions {
clone: (item?: ActionFactoryInputs) => ActionInstance;
complete: () => void;
halt: () => void;
isRunning: () => void;
reset: () => void;
resume: () => void;
reverse: () => void;
run: () => void;
saveAsPacket: (item?: ActionSaveInputs | boolean) => string;
set: (item?: ActionFactoryInputs) => ActionInstance;
setDelta: (item?: ActionFactoryDeltaInputs) => ActionInstance;
}
export interface ActionInstance extends ActionFactoryInputs, ActionFactoryFunctions {}
// AnchorInstance factory
// -------------------------------------
interface AnchorFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface AnchorFactoryInputs extends BaseMixinInputs, AnchorFactoryDeltaInputs {
blurAction?: boolean;
clickAction?: DefaultOutputFunction;
description?: string;
download?: string;
focusAction?: boolean;
href?: string;
hreflang?: string;
ping?: string;
referrerPolicy?: string;
rel?: string;
tabOrder?: number;
target?: string;
type?: string;
}
interface AnchorFactoryFunctions extends BaseMixinFunctions {}
export interface AnchorInstance extends AnchorFactoryInputs, AnchorFactoryFunctions {}
// AnimationInstance factory
// -------------------------------------
interface AnimationFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface AnimationFactoryInputs extends BaseMixinInputs, AnimationFactoryDeltaInputs {
order?: number;
maxFrameRate?: number;
fn?: DefaultInputFunction;
onRun?: DefaultInputFunction;
onHalt?: DefaultInputFunction;
onKill?: DefaultInputFunction;
}
interface AnimationFactoryFunctions extends BaseMixinFunctions {
run: () => AnimationInstance;
isRunning: () => boolean;
halt: () => AnimationInstance;
}
export interface AnimationInstance extends AnimationFactoryInputs, AnimationFactoryFunctions {}
// BezierInstance factory
// -------------------------------------
interface BezierFactoryDeltaInputs extends BaseMixinDeltaInputs, ShapeCurveMixinDeltaInputs {
startControl?: CommonTwoElementArrayInput;
startControlPathPosition?: number;
startControlX?: StringOrNumberInput;
startControlY?: StringOrNumberInput;
endControl?: CommonTwoElementArrayInput;
endControlPathPosition?: number;
endControlX?: StringOrNumberInput;
endControlY?: StringOrNumberInput;
}
interface BezierFactoryInputs extends BaseMixinInputs, ShapeCurveMixinInputs, BezierFactoryDeltaInputs {
addStartControlPathHandle?: boolean;
addStartControlPathOffset?: boolean;
addStartControlPivotHandle?: boolean;
addStartControlPivotOffset?: boolean;
startControlLockTo?: LockToValues | [LockToValues, LockToValues];
startControlParticle?: string;
startControlPath?: ShapeBasedInstance | string;
startControlPivot?: ArtefactInstance | string;
startControlPivotCorner?: PivotCornerValues;
startControlPivotPin?: number;
startControlPivotIndex?: number;
addEndControlPathHandle?: boolean;
addEndControlPathOffset?: boolean;
addEndControlPivotHandle?: boolean;
addEndControlPivotOffset?: boolean;
endControlLockTo?: LockToValues | [LockToValues, LockToValues];
endControlParticle?: string;
endControlPath?: ShapeBasedInstance | string;
endControlPivot?: ArtefactInstance | string;
endControlPivotCorner?: PivotCornerValues;
endControlPivotPin?: number;
endControlPivotIndex?: number;
delta?: BezierFactoryDeltaInputs;
}
interface BezierSaveInputs extends BezierFactoryInputs, SaveInputs {}
interface BezierFactoryFunctions extends BaseMixinFunctions, ShapeCurveMixinFunctions {
clone: (item?: BezierFactoryInputs) => BezierInstance;
saveAsPacket: (item?: BezierSaveInputs | boolean) => string;
set: (item?: BezierFactoryInputs) => BezierInstance;
setDelta: (item?: BezierFactoryDeltaInputs) => BezierInstance;
simpleStamp: (host: CellInstance, items?: BezierFactoryInputs) => void;
}
export interface BezierInstance extends BezierFactoryInputs, BezierFactoryFunctions {
length: number;
}
// BlockInstance factory
// -------------------------------------
interface BlockFactoryDeltaInputs extends BaseMixinDeltaInputs, EntityMixinDeltaInputs {}
interface BlockFactoryInputs extends BaseMixinInputs, EntityMixinInputs, BlockFactoryDeltaInputs {
delta?: BlockFactoryDeltaInputs;
}
interface BlockSaveInputs extends BlockFactoryInputs, SaveInputs {}
interface BlockFactoryFunctions extends BaseMixinFunctions, EntityMixinFunctions {
clone: (item?: BlockFactoryInputs) => BlockInstance;
saveAsPacket: (item?: BlockSaveInputs | boolean) => string;
set: (item?: BlockFactoryInputs) => BlockInstance;
setDelta: (item?: BlockFactoryDeltaInputs) => BlockInstance;
simpleStamp: (host: CellInstance, items?: BlockFactoryInputs) => void;
}
export interface BlockInstance extends BlockFactoryInputs, BlockFactoryFunctions {}
// ButtonInstance factory
// -------------------------------------
interface ButtonFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface ButtonFactoryInputs extends BaseMixinInputs, ButtonFactoryDeltaInputs {
autofocus?: boolean;
blurAction?: boolean;
clickAction?: DefaultOutputFunction;
description?: string;
disabled?: boolean;
elementName?: string;
elementType?: string;
elementValue?: string;
focusAction?: boolean;
form?: string;
formAction?: string;
formEnctype?: string;
formMethod?: string;
formNoValidate?: boolean;
formTarget?: string;
popoverTarget?: string;
popoverTargetAction?: string;
tabOrder?: number;
}
interface ButtonFactoryFunctions extends BaseMixinFunctions {}
export interface ButtonInstance extends ButtonFactoryInputs, ButtonFactoryFunctions {}
// CanvasInstance factory
// -------------------------------------
type CanvasPositionValues = 'relative' | 'absolute';
type CanvasFitValues = 'none' | 'contain' | 'cover' | 'fill';
type CanvasCascadeStrings = 'down' | 'up' | 'enter' | 'leave' | 'move' | 'otherInteraction';
type CanvasColorSpaceValues = 'srgb' | 'display-p3';
interface CanvasFactoryDeltaInputs extends BaseMixinDeltaInputs, DomMixinDeltaInputs, DisplayShapeMixinDeltaInputs {
alpha?: number;
}
interface CanvasFactoryInputs extends BaseMixinInputs, DomMixinInputs, DisplayShapeMixinInputs, CanvasFactoryDeltaInputs {
position?: CanvasPositionValues;
fit?: CanvasFitValues;
baseMatchesCanvasDimensions?: boolean;
delta?: CanvasFactoryDeltaInputs;
renderOnResize?: boolean;
ignoreCanvasCssDimensions?: boolean;
title?: string;
label?: string;
description?: string;
role?: string;
navigationAriaLive?: string;
canvasColorSpace?: CanvasColorSpaceValues;
backgroundColor?: string;
composite?: GlobalCompositeOperationValues;
checkForEntityHover?: boolean;
onEntityHover?: DefaultInputFunction;
onEntityNoHover?: DefaultInputFunction;
}
interface CanvasSaveInputs extends CanvasFactoryInputs, SaveInputs {}
interface CanvasFactoryFunctions extends BaseMixinFunctions, DomMixinFunctions, DisplayShapeMixinFunctions {
addCell: (item: CellInstance | string) => CanvasInstance;
buildCell: (items: CellFactoryInputs) => CellInstance;
checkHover: () => void;
clear: () => void;
clone: (item?: CanvasFactoryInputs) => CanvasInstance;
compile: () => void;
deltaSetBase: (items: CellFactoryInputs) => CanvasInstance;
getBase: () => CellInstance;
getBaseHere: () => CommonHereObjectInput;
killCell: (item: CellInstance | string) => CanvasInstance;
removeCell: (item: CellInstance | string) => CanvasInstance;
render: () => void;
reset: () => void;
saveAsPacket: (item?: CanvasSaveInputs | boolean) => string;
set: (item?: CanvasFactoryInputs) => CanvasInstance;
setAsCurrentCanvas: () => CanvasInstance;
setBase: (items: CellFactoryInputs) => CanvasInstance;
setDelta: (item?: CanvasFactoryDeltaInputs) => CanvasInstance;
show: () => void;
simpleStamp: () => void;
}
export interface CanvasInstance extends CanvasFactoryInputs, CanvasFactoryFunctions {
base: CellInstance;
here: CommonHereObjectInput;
elementComputedStyles?: CommonObjectInput;
domElement: any;
cascadeEventAction?: CascadeFunction;
}
// CellInstance factory
// -------------------------------------
interface CellFactoryDeltaInputs extends BaseMixinDeltaInputs, PositionMixinDeltaInputs, DeltaMixinDeltaInputs, PivotMixinDeltaInputs, MimicMixinDeltaInputs, PathMixinDeltaInputs, AnchorMixinDeltaInputs, ButtonMixinDeltaInputs, CascadeMixinDeltaInputs, AssetMixinDeltaInputs, PatternMixinDeltaInputs, FilterMixinDeltaInputs {
alpha?: number;
clearAlpha?: number;
scale?: number;
}
interface CellFactoryInputs extends BaseMixinInputs, PositionMixinInputs, DeltaMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs, ButtonMixinInputs, CascadeMixinInputs, AssetMixinInputs, PatternMixinInputs, FilterMixinInputs, CellFactoryDeltaInputs {
backgroundColor?: string;
cleared?: boolean;
compiled?: boolean;
compileOrder?: number;
composite?: GlobalCompositeOperationValues;
delta?: CellFactoryDeltaInputs;
filter?: string;
flipReverse?: boolean;
flipUpend?: boolean;
willReadFrequently?: boolean;
includeInCascadeEventActions?: boolean;
setRelativeDimensionsUsingBase?: boolean;
shown?: boolean;
showOrder?: number;
stashHeight?: StringOrNumberInput;
stashWidth?: StringOrNumberInput;
stashX?: StringOrNumberInput;
stashY?: StringOrNumberInput;
checkForEntityHover?: boolean;
onEntityHover?: DefaultInputFunction;
onEntityNoHover?: DefaultInputFunction;
canvasColorSpace?: CanvasColorSpaceValues;
}
interface CellSaveInputs extends CellFactoryInputs, SaveInputs {}
interface CellSplitShiftArguments {
px: StringOrNumberInput;
vertical?: boolean;
cycle?: boolean;
}
interface CellPixelStateObject {
indexR: number;
indexG: number;
indexB: number;
indexA: number;
red: number;
green: number;
blue: number;
alpha: number;
row: number;
col: number;
distance: number;
angle: number;
}
interface CellImageDataObject {
width: number;
height: number;
data: number[];
colorSpace?: string;
}
interface EnhancedCellImageDataObject {
iData: CellImageDataObject;
pixelState: CellPixelStateObject[]
}
interface CellFactoryFunctions extends BaseMixinFunctions, PositionMixinFunctions, DeltaMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions, ButtonMixinFunctions, CascadeMixinFunctions, AssetMixinFunctions, PatternMixinFunctions, FilterMixinFunctions {
clear: () => void;
compile: () => void;
render: () => void;
set: (item?: CellFactoryInputs) => CellInstance;
setDelta: (item?: CellFactoryDeltaInputs) => CellInstance;
show: () => void;
updateArtefacts: (items: CommonObjectInput) => void;
updateHere: () => void;
splitShift: (item: CellSplitShiftArguments) => void;
getCellData: (opaque?: boolean) => EnhancedCellImageDataObject;
paintCellData: (item: EnhancedCellImageDataObject) => void;
}
export interface CellInstance extends CellFactoryInputs, CellFactoryFunctions {
engine: any;
element: any;
here: CommonHereObjectInput;
}
// CogInstance factory
// -------------------------------------
type CogCurves = 'line' | 'quadratic' | 'bezier';
interface CogFactoryDeltaInputs extends BaseMixinDeltaInputs, ShapeBasicMixinDeltaInputs {
outerRadius?: StringOrNumberInput;
innerRadius?: StringOrNumberInput;
outerControlsDistance?: StringOrNumberInput;
innerControlsDistance?: StringOrNumberInput;
outerControlsOffset?: StringOrNumberInput
innerControlsOffset?: StringOrNumberInput
points?: number;
twist?: number;
}
interface CogFactoryInputs extends BaseMixinInputs, ShapeBasicMixinInputs, CogFactoryDeltaInputs {
curve?: CogCurves;
delta?: CogFactoryDeltaInputs;
}
interface CogSaveInputs extends CogFactoryInputs, SaveInputs {}
interface CogFactoryFunctions extends BaseMixinFunctions, ShapeBasicMixinFunctions {
clone: (item?: CogFactoryInputs) => CogInstance;
saveAsPacket: (item?: CogSaveInputs | boolean) => string;
set: (item?: CogFactoryInputs) => CogInstance;
setDelta: (item?: CogFactoryDeltaInputs) => CogInstance;
simpleStamp: (host: CellInstance, items?: CogFactoryInputs) => void;
}
export interface CogInstance extends CogFactoryInputs, CogFactoryFunctions {
length: number;
}
// ColorInstance factory
// -------------------------------------
type ColorSpacesValues = 'RGB' | 'HSL' | 'HWB' | 'XYZ' | 'LAB' | 'LCH' | 'OKLAB' | 'OKLCH';
type ReturnColorValues = 'RGB' | 'HSL' | 'HWB' | 'LAB' | 'LCH' | 'OKLAB' | 'OKLCH';
interface ColorFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface ColorFactoryInputs extends BaseMixinInputs, ColorFactoryDeltaInputs {
easing?: string | DefaultInputFunction;
easingFunction?: string | DefaultInputFunction;
colorSpace?: ColorSpacesValues;
returnColorAs?: ReturnColorValues;
color?: string;
minimumColor?: string;
maximumColor?: string;
}
interface ColorSaveInputs extends ColorFactoryInputs, SaveInputs {}
interface ColorFactoryFunctions extends BaseMixinFunctions {
clone: (item?: ColorFactoryInputs) => ColorInstance;
convertRGBtoHex: (red: number, green: number, blue: number) => string;
extractRGBfromColor: (item: string) => number[];
generateRandomColor: DefaultStringOutputFunction;
getCurrentColor: DefaultStringOutputFunction;
getMaximumColor: DefaultStringOutputFunction;
getMinimumColor: DefaultStringOutputFunction;
getRangeColor: (item: number, internalGradientBuild?: boolean) => string;
saveAsPacket: (item?: ColorSaveInputs | boolean) => string;
set: (item?: ColorFactoryInputs) => ColorInstance;
setColor: (item: string) => ColorInstance;
setColorSpace: (item: ColorSpacesValues) => ColorInstance;
setDelta: (item?: ColorFactoryDeltaInputs) => ColorInstance;
setEasing: (item: string | DefaultInputFunction) => ColorInstance;
setEasingFunction: (item: string | DefaultInputFunction) => ColorInstance;
setMaximumColor: (item: string) => ColorInstance;
setMinimumColor: (item: string) => ColorInstance;
setReturnColorAs: (item: ReturnColorValues) => ColorInstance;
}
export interface ColorInstance extends ColorFactoryInputs, ColorFactoryFunctions {}
// ConicGradientInstance factory
// -------------------------------------
interface ConicGradientFactoryDeltaInputs extends BaseMixinDeltaInputs, StylesMixinDeltaInputs {
angle?: number;
}
interface ConicGradientFactoryInputs extends BaseMixinInputs, StylesMixinInputs, ConicGradientFactoryDeltaInputs {
delta?: ConicGradientFactoryDeltaInputs;
}
interface ConicGradientSaveInputs extends ConicGradientFactoryInputs, SaveInputs {}
interface ConicGradientFactoryFunctions extends BaseMixinFunctions, StylesMixinFunctions {
clone: (item?: ConicGradientFactoryInputs) => ConicGradientInstance;
saveAsPacket: (item?: ConicGradientSaveInputs | boolean) => string;
set: (item?: ConicGradientFactoryInputs) => ConicGradientInstance;
setDelta: (item?: ConicGradientFactoryDeltaInputs) => ConicGradientInstance;
}
export interface ConicGradientInstance extends ConicGradientFactoryInputs, ConicGradientFactoryFunctions {}
// CoordinateInstance factory
// -------------------------------------
type CoordinateInstanceFormat = [StringOrNumberInput, StringOrNumberInput]
export interface CoordinateInstance extends CoordinateInstanceFormat {
add: (item: CoordinateInstance | number[]) => CoordinateInstance;
divide: (item: CoordinateInstance | number[]) => CoordinateInstance;
getDotProduct: (coord: CoordinateInstance) => CoordinateInstance;
getMagnitude: () => number;
multiply: (item: CoordinateInstance | number[]) => CoordinateInstance;
reverse: () => CoordinateInstance;
rotate: (angle: number) => CoordinateInstance;
scalarDivide: (item: number) => CoordinateInstance;
scalarMultiply: (item: number) => CoordinateInstance;
set: (items: QuaternionInstance | VectorInstance | CoordinateInstance | number[] | number | CommonHereObjectInput, y?: number) => CoordinateInstance;
setFromArray: (item: CoordinateInstance | number[]) => CoordinateInstance;
setFromVector: (item: VectorInstance | CommonHereObjectInput) => CoordinateInstance;
subtract: (item: CoordinateInstance | number[]) => CoordinateInstance;
vectorAdd: (item: VectorInstance | CommonHereObjectInput) => CoordinateInstance;
vectorSubtract: (item: VectorInstance | CommonHereObjectInput) => CoordinateInstance;
zero: () => CoordinateInstance;
}
// CrescentInstance factory
// -------------------------------------
interface CrescentFactoryDeltaInputs extends BaseMixinDeltaInputs, EntityMixinDeltaInputs {
outerRadius?: number;
innerRadius?: number;
displacement?: number;
}
interface CrescentFactoryInputs extends BaseMixinInputs, EntityMixinInputs, CrescentFactoryDeltaInputs {
displayIntersect?: boolean;
}
interface CrescentSaveInputs extends CrescentFactoryInputs, SaveInputs {}
interface CrescentFactoryFunctions extends BaseMixinFunctions, EntityMixinFunctions {
clone: (item?: CrescentFactoryInputs) => CrescentInstance;
saveAsPacket: (item?: CrescentSaveInputs | boolean) => string;
set: (item?: CrescentFactoryInputs) => CrescentInstance;
setDelta: (item?: CrescentFactoryDeltaInputs) => CrescentInstance;
simpleStamp: (host: CellInstance, items?: CrescentFactoryInputs) => void;
}
export interface CrescentInstance extends CrescentFactoryInputs, CrescentFactoryFunctions {}
// ElementInstance factory
// -------------------------------------
interface ElementFactoryDeltaInputs extends BaseMixinDeltaInputs, DomMixinDeltaInputs {}
interface ElementFactoryInputs extends BaseMixinInputs, DomMixinInputs, ElementFactoryDeltaInputs {
delta?: ElementFactoryDeltaInputs;
text?: string;
content?: string;
}
interface ElementSaveInputs extends ElementFactoryInputs, SaveInputs {}
interface ElementFactoryFunctions extends BaseMixinFunctions, DomMixinFunctions {
addCanvas: (items?: CanvasFactoryInputs) => CanvasInstance;
clone: (item?: ElementFactoryInputs) => ElementInstance;
saveAsPacket: (item?: ElementSaveInputs | boolean) => string;
set: (item?: ElementFactoryInputs) => ElementInstance;
setDelta: (item?: ElementFactoryDeltaInputs) => ElementInstance;
}
export interface ElementInstance extends ElementFactoryInputs, ElementFactoryFunctions {
here?: CommonHereObjectInput;
elementComputedStyles?: CommonObjectInput;
domElement: HTMLElement;
}
// EmitterInstance factory
// -------------------------------------
interface EmitterFactoryDeltaInputs extends BaseMixinDeltaInputs, EntityMixinDeltaInputs {
generationRate?: number;
particleCount?: number;
limitDirectionToAngleMultiples?: number;
generationChoke?: number;
killAfterTime?: number;
killAfterTimeVariation?: number;
killRadius?: number;
killRadiusVariation?: number;
historyLength?: number;
mass?: number;
massVariation?: number;
hitRadius?: number;
minimumVelocityX?: number;
minimumVelocityY?: number;
minimumVelocityZ?: number;
resetAfterBlur?: number;
rangeX?: number;
rangeY?: number;
rangeZ?: number;
rangeFromX?: number;
rangeFromY?: number;
rangeFromZ?: number;
}
interface EmitterFactoryInputs extends BaseMixinInputs, EntityMixinInputs, EmitterFactoryDeltaInputs {
artefact?: ArtefactInstance | string;
delta?: EmitterFactoryDeltaInputs;
engine?: ParticleEngines;
fillColor?: string;
fillMaximumColor?: string;
fillMinimumColor?: string;
forces?: Array<ForceInstance | string>;
generateAlongPath?: ShapeBasedInstance | string;
generateFromExistingParticleHistories?: boolean;
generateFromExistingParticles?: boolean;
generateInArea?: EntityInstance | string;
height?: number;
hitRadiusColor?: string;
killBeyondCanvas?: boolean;
minimumVelocity?: VectorInstance;
postAction?: (item: CellInstance) => void;
preAction?: (item: CellInstance) => void;
range?: VectorInstance;
rangeFrom?: VectorInstance;
showHitRadius?: boolean;
stampAction?: (artefact: EntityInstance, particle: ParticleInstance, host: CellInstance) => void;
strokeColor?: string;
strokeMaximumColor?: string;
strokeMinimumColor?: string;
width?: number;
world?: WorldInstance | string;
}
interface EmitterSaveInputs extends EmitterFactoryInputs, SaveInputs {}
interface EmitterFactoryFunctions extends BaseMixinFunctions, EntityMixinFunctions {
clone: (item?: EmitterFactoryInputs) => EmitterInstance;
saveAsPacket: (item?: EmitterSaveInputs | boolean) => string;
set: (item?: EmitterFactoryInputs) => EmitterInstance;
setDelta: (item?: EmitterFactoryDeltaInputs) => EmitterInstance;
simpleStamp: (host: CellInstance, items?: EmitterFactoryInputs) => void;
}
export interface EmitterInstance extends EmitterFactoryInputs, EmitterFactoryFunctions {
fillColorFactory: ColorInstance;
strokeColorFactor: ColorInstance;
particleStore: ParticleInstance[];
}
// EnhancedLabelInstance factory
// -------------------------------------
type TextLineJustifyValues = 'start' | 'end' | 'left' | 'right' | 'center' | 'space-between' | 'space-around';
type TextUnitFlowValues = 'row' | 'row-reverse' | 'column' | 'column-reverse';
type EnhancedLabelTextUnitHandleXValues = 'start' | 'end' | 'left' | 'right' | 'center' | PercentOrNumberInput;
type EnhancedLabelTextUnitHandleYValues = 'top' | 'hanging' | 'center' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom' | PercentOrNumberInput;
interface EnhancedLabelFactoryDeltaInputs extends BaseMixinDeltaInputs, DeltaMixinDeltaInputs, FilterMixinDeltaInputs, TextMixinDeltaInputs, TextStyleFactoryDeltaInputs, StateFactoryDeltaInputs {
alignment?: number;
guidelineWidth?: number;
handleX?: StringOrNumberInput;
handleY?: StringOrNumberInput;
height?: StringOrNumberInput;
lineAdjustment?: number;
lineSpacing?: number;
offsetX?: StringOrNumberInput;
offsetY?: StringOrNumberInput;
pathPosition?: number;
roll?: number;
scale?: number;
startX?: StringOrNumberInput;
startY?: StringOrNumberInput;
width?: StringOrNumberInput;
}
interface EnhancedLabelFactoryInputs extends BaseMixinInputs, DeltaMixinInputs, FilterMixinInputs, TextMixinInputs, TextStyleFactoryInputs, StateFactoryInputs, EnhancedLabelFactoryDeltaInputs {
alignTextUnitsToPath?: boolean;
breakTextOnSpaces?: boolean;
breakWordsOnHyphens?: boolean;
cacheOutput?: boolean;
calculateOrder?: number;
checkHitUseTemplate?: boolean;
constantSpeedAlongPath?: boolean;
delta?: EnhancedLabelFactoryDeltaInputs;
dimensions?: CommonTwoElementArrayInput;
flipReverse?: boolean;
flipUpend?: boolean;
group?: GroupInstance | string;
guidelineDash?: number[];
guidelineStyle?: string;
handle?: CommonTwoElementArrayInput;
hyphenString?: string;
justifyLine?: TextLineJustifyValues;
layoutTemplate?: ArtefactInstance | string;
lockFillStyleToEntity?: boolean;
lockStrokeStyleToEntity?: boolean;
method?: 'fill' | 'draw' | 'fillAndDraw' | 'drawAndFill';
offset?: CommonTwoElementArrayInput;
order?: number;
showGuidelines?: boolean;
stampOrder?: number;
start?: CommonTwoElementArrayInput;
text?: string;
textHandle?: [EnhancedLabelTextUnitHandleXValues, EnhancedLabelTextUnitHandleYValues];
textHandleX?: EnhancedLabelTextUnitHandleXValues;
textHandleY?: EnhancedLabelTextUnitHandleYValues;
textOffset?: [PercentOrNumberInput, PercentOrNumberInput];
textOffsetX?: PercentOrNumberInput;
textOffsetY?: PercentOrNumberInput;
textUnitFlow?: TextUnitFlowValues;
truncateString?: string;
useLayoutTemplateAsPath?: boolean;
visibility?: boolean;
}
interface EnhancedLabelSaveInputs extends EnhancedLabelFactoryInputs, SaveInputs {}
interface EnhancedLabelFactoryFunctions extends BaseMixinFunctions, DeltaMixinFunctions, FilterMixinFunctions, TextMixinFunctions, TextStyleFactoryFunctions, StateFactoryFunctions {
applyTextUnitUpdates: () => void;
checkHit: (tests: HitTests) => HitOutput | boolean;
clone: (item?: EnhancedLabelFactoryInputs) => EnhancedLabelInstance;
convertTextEntityCharacters: (item: string) => string;
getAccessibleText: () => string;
recalculateFont: () => void;
saveAsPacket: (item?: EnhancedLabelSaveInputs | boolean) => string;
set: (item?: EnhancedLabelFactoryInputs) => EnhancedLabelInstance;
setDelta: (item?: EnhancedLabelFactoryDeltaInputs) => EnhancedLabelInstance;
setTextUnit: (index: number, items: CommonObjectInput) => void;
setAllTextUnits: (items: CommonObjectInput) => void;
simpleStamp: (host: CellInstance, items?: CommonObjectInput) => void;
}
export interface EnhancedLabelInstance extends EnhancedLabelFactoryInputs, EnhancedLabelFactoryFunctions {}
// FilterInstance factory
// -------------------------------------
interface FilterFactoryDeltaInputs extends BaseMixinDeltaInputs {
angle?: number;
blueInBlue?: number;
blueInGreen?: number;
blueInRed?: number;
copyHeight?: StringOrNumberInput;
copyWidth?: StringOrNumberInput;
copyX?: StringOrNumberInput;
copyY?: StringOrNumberInput;
greenInBlue?: number;
greenInGreen?: number;
greenInRed?: number;
gutterHeight?: number;
gutterWidth?: number;
height?: StringOrNumberInput;
highAlpha?: number;
highBlue?: number;
highGreen?: number;
highRed?: number;
innerRadius?: number;
level?: number;
lowAlpha?: number;
lowBlue?: number;
lowGreen?: number;
lowRed?: number;
minimumColorDistance?: number;
noWrap?: boolean;
offsetAlphaMax?: number;
offsetAlphaMin?: number;
offsetAlphaX?: number;
offsetAlphaY?: number;
offsetBlueMax?: number;
offsetBlueMin?: number;
offsetBlueX?: number;
offsetBlueY?: number;
offsetGreenMax?: number;
offsetGreenMin?: number;
offsetGreenX?: number;
offsetGreenY?: number;
offsetMax?: number;
offsetMin?: number;
offsetRedMax?: number;
offsetRedMin?: number;
offsetRedX?: number;
offsetRedY?: number;
offsetX?: StringOrNumberInput;
offsetY?: StringOrNumberInput;
opacity?: number;
opaqueAt?: number;
passes?: number;
passesHorizontal?: number;
passesVertical?: number;
outerRadius?: StringOrNumberInput;
radius?: number;
radiusHorizontal?: number;
radiusVertical?: number;
redInBlue?: number;
redInGreen?: number;
redInRed?: number;
scaleX?: number;
scaleY?: number;
smoothing?: number;
startX?: StringOrNumberInput;
startY?: StringOrNumberInput;
step?: number;
stepHorizontal?: number;
stepVertical?: number;
strength?: number;
tileHeight?: StringOrNumberInput;
tileRadius?: number;
tileWidth?: StringOrNumberInput;
tolerance?: number;
transparentAt?: number;
width?: StringOrNumberInput;
}
interface FilterFactoryInputs extends BaseMixinInputs, FilterFactoryDeltaInputs {
actions?: CommonObjectInput[];
alpha?: number | number[];
areaAlphaLevels?: number[],
asset?: string;
blend?: string;
blue?: number | number[];
blueColor?: string;
channelA?: number;
channelB?: number;
channelL?: number;
channelX?: string;
channelY?: string;
clamp?: string | number;
compose?: string;
concurrent?: boolean;
delta?: FilterFactoryDeltaInputs;
easing?: string;
excludeAlpha?: boolean;
excludeBlue?: boolean;
excludeGreen?: boolean;
excludeRed?: boolean;
excludeTransparentPixels?: boolean;
gradient?: string | GradientInstance;
green?: number | number[];
greenColor?: string;
highColor?: string;
includeAlpha?: boolean;
includeBlue?: boolean;
includeGreen?: boolean;
includeRed?: boolean;
keepOnlyChangedAreas?: boolean;
lineIn?: string;
lineMix?: string;
lineOut?: string;
lowColor?: string;
method?: string;
noiseType?: 'random' | 'ordered' | 'bluenoise';
operation?: string;
palette?: StringOrNumberInput;
points?: StringOrNumberI