scrawl-canvas
Version:
Version 8.9.4 - 19 Nov 2022
1,523 lines (1,196 loc) • 103 kB
TypeScript
// Type definitions for Scrawl-canvas 8.9.4
// HELPERS
// =====================================
type DefaultInputFunction = (item?: any) => void;
type DefaultOutputFunction = (item?: any) => void;
interface CommonObjectInput {
[index: string]: any;
}
interface CommonHereObjectInput {
x?: string | number;
y?: string | number;
[index: string]: any;
}
type CommonTwoElementArrayInput = [string | number, string | number] | number[];
type StringOrNumberInput = string | number;
// MIXINS
// =====================================
// Anchor mixin
// -------------------------------------
interface AnchorMixinDeltaInputs {}
interface AnchorMixinInputs {
anchor?: AnchorFactoryInputs;
anchorBlurAction?: boolean;
anchorDescription?: string;
anchorDownload?: string;
anchorFocusAction?: boolean;
anchorHref?: string;
anchorHreflang?: string;
anchorPing?: 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;
// delta?: AssetAdvancedFunctionalityMixinDeltaInputs;
easing?: string | DefaultInputFunction;
precision?: number;
returnColorAs?: ReturnColorValues;
}
interface AssetAdvancedFunctionalityMixinFunctions {
update: () => void;
}
// AssetConsumer mixin
// -------------------------------------
interface AssetConsumerMixinDeltaInputs {}
interface AssetConsumerMixinInputs {
asset?: string | AssetInstance,
removeAssetOnKill?: string;
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;
}
// Cascade mixin
// -------------------------------------
interface CascadeMixinDeltaInputs {}
interface CascadeMixinInputs {}
interface CascadeMixinFunctions {
addArtefactClasses: (item?: CommonObjectInput) => any;
getAllArtefactsAt: (item: any) => any;
getArtefactAt: (item: any) => any;
removeArtefactClasses: (item?: CommonObjectInput) => any;
// reverseByDelta: (item?: CommonObjectInput) => any;
setArtefacts: (item?: CommonObjectInput) => any;
updateArtefacts: (item?: CommonObjectInput) => any;
// updateByDelta: (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 {
offsetZ?: number;
pitch?: number;
yaw?: number;
}
interface DomMixinInputs extends PositionMixinInputs, DeltaMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs {
activePadding?: number;
checkForResize?: boolean;
classes?: string;
colorSchemeDarkAction?: DefaultInputFunction;
colorSchemeLightAction?: DefaultInputFunction;
css?: CommonObjectInput;
includeInTabNavigation?: boolean;
noPreferenceDataAction?: DefaultInputFunction;
noPreferenceMotionAction?: DefaultInputFunction;
noPreferenceTransparencyAction?: DefaultInputFunction;
position?: string;
reduceDataAction?: DefaultInputFunction;
reduceMotionAction?: DefaultInputFunction;
reduceTransparencyAction?: DefaultInputFunction;
smoothFont?: boolean;
trackHere?: string;
}
interface DomMixinFunctions extends BaseMixinFunctions, PositionMixinFunctions, DeltaMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions {}
// Entity mixin
// -------------------------------------
type MethodValues = 'draw' | 'fill' | 'drawAndFill' | 'fillAndDraw' | 'drawThenFill' | 'fillThenDraw' | 'clip' | 'clear' | 'none';
type WindingValues = 'nonzero' | 'evenodd';
interface EntityMixinDeltaInputs extends PositionMixinDeltaInputs, PivotMixinDeltaInputs, MimicMixinDeltaInputs, PathMixinDeltaInputs, AnchorMixinDeltaInputs, FilterMixinDeltaInputs, DeltaMixinDeltaInputs, StateFactoryDeltaInputs {}
interface EntityMixinInputs extends PositionMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs, FilterMixinInputs, DeltaMixinInputs, StateFactoryInputs {
flipReverse?: boolean;
flipUpend?: boolean;
lockFillStyleToEntity?: boolean;
lockStrokeStyleToEntity?: boolean;
method?: MethodValues;
onDown?: DefaultInputFunction;
onEnter?: DefaultInputFunction;
onLeave?: DefaultInputFunction;
onUp?: DefaultInputFunction;
scaleOutline?: boolean;
sharedState?: boolean;
winding?: WindingValues;
}
interface EntityMixinFunctions extends BaseMixinFunctions, PositionMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions, 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?: ShapeInstance | 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;
}
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;
}
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 | 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[];
particle?: ParticleInstance;
}
type HitTests = CommonTwoElementArrayInput | CommonHereObjectInput | Array<CommonTwoElementArrayInput | CommonHereObjectInput>
interface PositionMixinFunctions {
checkHit: (tests: HitTests, cell?: CellInstance | string) => 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;
constantPathSpeed?: boolean;
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?: ShapeInstance | string;
endPivot?: ArtefactInstance | string;
endPivotCorner?: PivotCornerValues;
endPivotPin?: 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;
}
// Tween mixin
// -------------------------------------
interface TweenMixinDeltaInputs {
time?: StringOrNumberInput;
}
interface TweenMixinInputs {
action?: DefaultInputFunction;
order?: number;
reverseOnCycleEnd?: boolean;
targets?: TweenTargetInstance | TweenTargetInstance[];
ticker?: 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 | GridInstance | LoomInstance | MeshInstance | NetInstance | PhraseInstance | 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;
}
interface ActionInstance extends ActionFactoryInputs, ActionFactoryFunctions {}
// AnchorInstance factory
// -------------------------------------
interface AnchorFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface AnchorFactoryInputs extends BaseMixinInputs, AnchorFactoryDeltaInputs {
blurAction?: boolean;
clickAction?: () => string;
description?: string;
download?: string;
focusAction?: boolean;
href?: string;
hreflang?: string;
ping?: string;
referrerPolicy?: string;
rel?: string;
target?: string;
type?: string;
}
interface AnchorFactoryFunctions extends BaseMixinFunctions {}
interface AnchorInstance extends AnchorFactoryInputs, AnchorFactoryFunctions {}
// AnimationInstance factory
// -------------------------------------
interface AnimationFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface AnimationFactoryInputs extends BaseMixinInputs, AnimationFactoryDeltaInputs {
order?: number;
fn?: DefaultInputFunction;
onRun?: DefaultInputFunction;
onHalt?: DefaultInputFunction;
onKill?: DefaultInputFunction;
}
interface AnimationFactoryFunctions extends BaseMixinFunctions {
run: () => AnimationInstance;
isRunning: () => boolean;
halt: () => AnimationInstance;
}
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?: ShapeInstance | string;
startControlPivot?: ArtefactInstance | string;
startControlPivotCorner?: PivotCornerValues;
startControlPivotPin?: number;
addEndControlPathHandle?: boolean;
addEndControlPathOffset?: boolean;
addEndControlPivotHandle?: boolean;
addEndControlPivotOffset?: boolean;
endControlLockTo?: LockToValues | [LockToValues, LockToValues];
endControlParticle?: string;
endControlPath?: ShapeInstance | string;
endControlPivot?: ArtefactInstance | string;
endControlPivotCorner?: PivotCornerValues;
endControlPivotPin?: 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;
}
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;
}
interface BlockInstance extends BlockFactoryInputs, BlockFactoryFunctions {}
// CanvasInstance factory
// -------------------------------------
type CanvasPositionValues = 'relative' | 'absolute';
type CanvasFitValues = 'none' | 'contain' | 'cover' | 'fill';
type CanvasCascadeStrings = 'down' | 'up' | 'enter' | 'leave' | 'move';
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;
backgroundColor?: string;
composite?: GlobalCompositeOperationValues;
checkForEntityHover?: boolean;
onEntityHover?: DefaultInputFunction;
onEntityNoHover?: DefaultInputFunction;
}
interface CanvasSaveInputs extends CanvasFactoryInputs, SaveInputs {}
interface CanvasFactoryFunctions extends BaseMixinFunctions, DomMixinFunctions, DisplayShapeMixinFunctions {
setAsCurrentCanvas: () => CanvasInstance;
setBase: (items: CellFactoryInputs) => CanvasInstance;
deltaSetBase: (items: CellFactoryInputs) => CanvasInstance;
buildCell: (items: CellFactoryInputs) => CellInstance;
addCell: (item: CellInstance | string) => CanvasInstance;
removeCell: (item: CellInstance | string) => CanvasInstance;
killCell: (item: CellInstance | string) => CanvasInstance;
clear: () => void;
compile: () => void;
show: () => void;
render: () => void;
clone: (item?: CanvasFactoryInputs) => CanvasInstance;
saveAsPacket: (item?: CanvasSaveInputs | boolean) => string;
set: (item?: CanvasFactoryInputs) => CanvasInstance;
setDelta: (item?: CanvasFactoryDeltaInputs) => CanvasInstance;
simpleStamp: () => void;
}
interface CanvasInstance extends CanvasFactoryInputs, CanvasFactoryFunctions {
base: CellInstance;
here: CommonHereObjectInput;
elementComputedStyles?: CommonObjectInput;
domElement: any;
cascadeEventAction (item: CanvasCascadeStrings | CanvasCascadeStrings[]);
}
// CellInstance factory
// -------------------------------------
interface CellFactoryDeltaInputs extends BaseMixinDeltaInputs, PositionMixinDeltaInputs, DeltaMixinDeltaInputs, PivotMixinDeltaInputs, MimicMixinDeltaInputs, PathMixinDeltaInputs, AnchorMixinDeltaInputs, CascadeMixinDeltaInputs, AssetMixinDeltaInputs, PatternMixinDeltaInputs, FilterMixinDeltaInputs {
alpha?: number;
clearAlpha?: number;
scale?: number;
}
interface CellFactoryInputs extends BaseMixinInputs, PositionMixinInputs, DeltaMixinInputs, PivotMixinInputs, MimicMixinInputs, PathMixinInputs, AnchorMixinInputs, CascadeMixinInputs, AssetMixinInputs, PatternMixinInputs, FilterMixinInputs, CellFactoryDeltaInputs {
backgroundColor?: string;
cleared?: boolean;
compiled?: boolean;
compileOrder?: number;
composite?: GlobalCompositeOperationValues;
delta?: CellFactoryDeltaInputs;
filter?: string;
flipReverse?: boolean;
flipUpend?: boolean;
includeInCascadeEventActions?: boolean;
shown?: boolean;
showOrder?: number;
smoothFont?: boolean;
stashHeight?: StringOrNumberInput;
stashWidth?: StringOrNumberInput;
stashX?: StringOrNumberInput;
stashY?: StringOrNumberInput;
useAsPattern?: boolean;
checkForEntityHover?: boolean;
onEntityHover?: DefaultInputFunction;
onEntityNoHover?: DefaultInputFunction;
}
interface CellFactoryFunctions extends BaseMixinFunctions, PositionMixinFunctions, DeltaMixinFunctions, PivotMixinFunctions, MimicMixinFunctions, PathMixinFunctions, AnchorMixinFunctions, CascadeMixinFunctions, AssetMixinFunctions, PatternMixinFunctions, FilterMixinFunctions {
clear: () => void;
compile: () => void;
render: () => void;
show: () => void;
updateArtefacts: (items: CommonObjectInput) => void;
set: (item?: CellFactoryInputs) => CellInstance;
setDelta: (item?: CellFactoryDeltaInputs) => CellInstance;
}
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;
}
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: () => string;
getCurrentColor: () => string;
getMaximumColor: () => string;
getMinimumColor: () => string;
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;
}
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;
}
interface ConicGradientInstance extends ConicGradientFactoryInputs, ConicGradientFactoryFunctions {}
// CoordinateInstance factory
// -------------------------------------
type CoordinateInstanceFormat = [StringOrNumberInput, StringOrNumberInput]
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;
}
interface CrescentInstance extends CrescentFactoryInputs, CrescentFactoryFunctions {}
// ElementInstance factory
// -------------------------------------
interface ElementFactoryDeltaInputs extends BaseMixinDeltaInputs, DomMixinDeltaInputs {}
interface ElementFactoryInputs extends BaseMixinInputs, DomMixinInputs, 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;
}
interface ElementInstance extends ElementFactoryInputs, ElementFactoryFunctions {
here?: CommonHereObjectInput;
elementComputedStyles?: CommonObjectInput;
domElement: any;
}
// 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;
resetAfterBlur?: number;
rangeX?: number;
rangeY?: number;
rangeZ?: number;
rangeFromX?: number;
rangeFromY?: number;
rangeFromZ?: number;
}
interface EmitterFactoryInputs extends BaseMixinInputs, EntityMixinInputs, EmitterFactoryDeltaInputs {
world?: WorldInstance | string;
artefact?: ArtefactInstance | string;
range?: VectorInstance;
rangeFrom?: VectorInstance;
generateAlongPath?: ShapeBasedInstance | string;
generateInArea?: EntityInstance | string;
generateFromExistingParticles?: boolean;
generateFromExistingParticleHistories?: boolean;
killBeyondCanvas?: boolean;
forces?: Array<ForceInstance | string>;
engine?: ParticleEngines;
showHitRadius?: boolean;
hitRadiusColor?: string;
fillColor?: string;
fillMinimumColor?: string;
fillMaximumColor?: string;
strokeColor?: string;
strokeMinimumColor?: string;
strokeMaximumColor?: string;
width?: number;
height?: number;
preAction?: (item: CellInstance) => void;
stampAction?: (artefact: EntityInstance, particle: ParticleInstance, host: CellInstance) => void;
postAction?: (item: CellInstance) => void;
delta?: EmitterFactoryDeltaInputs;
}
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;
}
interface EmitterInstance extends EmitterFactoryInputs, EmitterFactoryFunctions {
fillColorFactory: ColorInstance;
strokeColorFactor: ColorInstance;
particleStore: ParticleInstance[];
}
// FilterInstance factory
// -------------------------------------
interface FilterFactoryDeltaInputs extends BaseMixinDeltaInputs {
angle?: number;
blueInBlue?: number;
blueInGreen?: number;
blueInRed?: number;
clamp?: 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;
outerRadius?: StringOrNumberInput;
radius?: number;
redInBlue?: number;
redInGreen?: number;
redInRed?: number;
scaleX?: number;
scaleY?: number;
smoothing?: number;
startX?: StringOrNumberInput;
startY?: StringOrNumberInput;
step?: 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;
channelX?: string;
channelY?: string;
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;
operation?: string;
palette?: string | number;
points?: string | number | number[];
postProcessResults?: boolean;
processHorizontal?: boolean;
processVertical?: boolean;
ranges?: any;
red?: number | number[];
redColor?: string;
reference?: string;
seed?: string;
staticSwirls?: any,
transparentEdges?: boolean;
useBluenoise?: boolean;
useMixedChannel?: boolean;
useNaturalGrayscale?: boolean;
weights?: number[];
}
interface FilterSaveInputs extends FilterFactoryInputs, SaveInputs {}
interface FilterFactoryFunctions extends BaseMixinFunctions {
clone: (item?: FilterFactoryInputs) => FilterInstance;
saveAsPacket: (item?: FilterSaveInputs | boolean) => string;
set: (item?: FilterFactoryInputs) => FilterInstance;
setDelta: (item?: FilterFactoryDeltaInputs) => FilterInstance;
}
interface FilterInstance extends FilterFactoryInputs, FilterFactoryFunctions {}
// ForceInstance factory
// -------------------------------------
interface ForceFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface ForceFactoryInputs extends BaseMixinInputs, ForceFactoryDeltaInputs {
action: (particle: ParticleInstance, world: WorldInstance, host: CellInstance) => void;
}
interface ForceFactoryFunctions extends BaseMixinFunctions {}
interface ForceInstance extends ForceFactoryInputs, ForceFactoryFunctions {}
// GradientInstance factory
// -------------------------------------
interface GradientFactoryDeltaInputs extends BaseMixinDeltaInputs, StylesMixinDeltaInputs {}
interface GradientFactoryInputs extends BaseMixinInputs, StylesMixinInputs, GradientFactoryDeltaInputs {
delta?: GradientFactoryDeltaInputs;
}
interface GradientSaveInputs extends GradientFactoryInputs, SaveInputs {}
interface GradientFactoryFunctions extends BaseMixinFunctions, StylesMixinFunctions {
clone: (item?: GradientFactoryInputs) => GradientInstance;
saveAsPacket: (item?: GradientSaveInputs | boolean) => string;
set: (item?: GradientFactoryInputs) => GradientInstance;
setDelta: (item?: GradientFactoryDeltaInputs) => GradientInstance;
}
interface GradientInstance extends GradientFactoryInputs, GradientFactoryFunctions {}
// GridInstance factory
// -------------------------------------
type GridTileTypes = 'color' | 'cellGradient' | 'gridGradient' | 'gridPicture' | 'tilePicture' | string;
type GridTileGutterColors = string | number | AnyGradientInstance | GridTileObject;
interface GridTileObject {
type: GridTileTypes;
source: GridTileGutterColors;
}
interface GridFactoryDeltaInputs extends BaseMixinDeltaInputs, EntityMixinDeltaInputs {
columns?: number;
rows?: number;
columnGutterWidth?: number;
rowGutterWidth?: number;
}
interface GridFactoryInputs extends BaseMixinInputs, EntityMixinInputs, GridFactoryDeltaInputs {
tileSources?: GridTileObject[];
tileFill?: number[];
gutterColor?: GridTileGutterColors;
delta?: GridFactoryDeltaInputs;
}
interface GridSaveInputs extends GridFactoryInputs, SaveInputs {}
interface GridFactoryFunctions extends BaseMixinFunctions, EntityMixinFunctions {
clone: (item?: GridFactoryInputs) => GridInstance;
saveAsPacket: (item?: GridSaveInputs | boolean) => string;
set: (item?: GridFactoryInputs) => GridInstance;
setDelta: (item?: GridFactoryDeltaInputs) => GridInstance;
setAllTilesTo: (index: number) => GridInstance;
setTileFill: (item: number[]) => GridInstance;
setTilesTo: (tiles: number[], val: number) => GridInstance;
setTileSourceTo: (index: number, obj: GridTileObject) => GridInstance;
removeTileSource: (index: number) => GridInstance;
getTileSource: (row: number, col?: number) => number;
getTilesUsingSource: (key: number) => number[];
simpleStamp: (host: CellInstance, items?: GridFactoryInputs) => void;
}
interface GridInstance extends GridFactoryInputs, GridFactoryFunctions {}
// GroupInstance factory
// -------------------------------------
type GroupHosts = CanvasInstance | StackInstance | CellInstance | string;
type GroupArtifactsInput = Array<ArtefactInstance | string>;
type GroupFiltersInput = Array<FilterInstance | string>;
interface GroupFactoryDeltaInputs extends BaseMixinDeltaInputs, FilterMixinDeltaInputs {
regionRadius?: number;
}
interface GroupFactoryInputs extends BaseMixinInputs, FilterMixinInputs, GroupFactoryDeltaInputs {
artefacts?: string[];
delta?: GroupFactoryDeltaInputs;
host?: GroupHosts;
noFilters?: boolean;
order?: number;
stashOutput?: boolean;
stashOutputAsAsset?: boolean;
visibility?: boolean;
checkForEntityHover?: boolean;
onEntityHover?: DefaultInputFunction;
onEntityNoHover?: DefaultInputFunction;
}
interface GroupSaveInputs extends GroupFactoryInputs, SaveInputs {}
interface GroupFactoryFunctions extends BaseMixinFunctions, FilterMixinFunctions {
addArtefactClasses: (item: string) => GroupInstance;
addArtefacts: (...args: GroupArtifactsInput) => GroupInstance;
addFiltersToEntitys: (...args: GroupFiltersInput) => GroupInstance;
clearArtefacts: () => GroupInstance;
clearFiltersFromEntitys: () => GroupInstance;
clone: (item?: GroupFactoryInputs) => GroupInstance;
getAllArtefactsAt: (items: HitTests) => HitOutput[];
getArtefact: (name: string) => ArtefactInstance;
getArtefactAt: (items: HitTests) => HitOutput | boolean;
moveArtefactsIntoGroup: (...args: GroupArtifactsInput) => GroupInstance;
removeArtefactClasses: (item: string) => GroupInstance;
removeArtefacts: (...args: GroupArtifactsInput) => GroupInstance;
removeFiltersFromEntitys: (...args: GroupFiltersInput) => GroupInstance;
reverseByDelta: () => GroupInstance;
saveAsPacket: (item?: GroupSaveInputs | boolean) => string;
set: (item?: GroupFactoryInputs) => GroupInstance;
setArtefacts: (items: CommonObjectInput) => GroupInstance;
sortArtefacts: () => void;
setDelta: (item?: CommonObjectInput) => GroupInstance;
setDeltaValues: (item?: CommonObjectInput) => GroupInstance;
updateArtefacts: (items: CommonObjectInput) => GroupInstance;
updateByDelta: () => GroupInstance;
}
interface GroupInstance extends GroupFactoryInputs, GroupFactoryFunctions {}
// ImageAssetInstance factory
// -------------------------------------
interface ImageAssetFactoryDeltaInputs extends BaseMixinDeltaInputs {}
interface ImageAssetFactoryInputs extends BaseMixinInputs, ImageAssetFactoryDeltaInputs {}
interface ImageAssetFactoryFunctions extends BaseMixinFunctions {}
interface ImageAssetInstance extends ImageAssetFactoryInputs, ImageAssetFactoryFunctions {}
// LineInstance factory
// -------------------------------------
interface LineFactoryDeltaInputs extends BaseMixinDeltaInputs, ShapeCurveMixinDeltaInputs {}
interface LineFactoryInputs extends BaseMixinInputs, ShapeCurveMixinInputs, LineFactoryDeltaInputs {
delta?: LineFactoryDeltaInputs;
}
interface LineSaveInputs extends LineFactoryInputs, SaveInputs {}
interface LineFactoryFunctions extends BaseMixinFunctions, ShapeCurveMixinFunctions {
clone: (item?: LineFactoryInputs) => LineInstance;
saveAsPacket: (item?: LineSaveInputs | boolean) => string;
set: (item?: LineFactoryInputs) => LineInstance;
setDelta: (item?: LineFactoryDeltaInputs) => LineInstance;
simpleStamp: (host: CellInstance, items?: LineFactoryInputs) => void;
}
interface LineInstance extends LineFactoryInputs, LineFactoryFunctions {
length: number;
}
// LineSpiralInstance factory
// -------------------------------------
interface LineSpiralFactoryDeltaInputs extends BaseMixinDeltaInputs, ShapeBasicMixinDeltaInputs {
startRadius?: number;
radiusIncrement?: number;
radiusIncrementAdjust?: number;
startAngle?: number;
angleIncrement?: number;
angleIncrementAdjust?: number;
stepLimit?: number;
}
interface LineSpiralFactoryInputs extends BaseMixinInputs, ShapeBasicMixinInputs, LineSpiralFactoryDeltaInputs {}
interface LineSpiralSaveInputs extends LineSpiralFactoryInputs, SaveInputs {}
interface LineSpiralFactoryFunctions extends BaseMixinFunctions, ShapeBasicMixinFunctions {
clone: (item?: LineSpiralFactoryInputs) => LineSpiralInstance;
saveAsPacket: (item?: LineSpiralSaveInputs | boolean) => string;
set: (item?: LineSpiralFactoryInputs) => LineSpiralInstance;
setDelta: (item?: LineSpiralFactoryDeltaInputs) => LineSpiralInstance;
simpleStamp: (host: CellInstance, items?: LineSpiralFactoryInputs) => void;
}
interface LineSpiralInstance extends LineSpiralFactoryInputs, LineSpiralFactoryFunctions {
length: number;
}
// LoomInstance factory
// -------------------------------------
interface LoomFactoryDeltaInputs extends BaseMixinDeltaInputs, AnchorMixinDeltaInputs, DeltaMixinDeltaInputs, StateFactoryDeltaInputs {
fromPathEnd?: number;
fromPathStart?: number;
interferenceFactor?: number;
interferenceLoops?: number;
toPathEnd?: number;
toPathStart?: number;
}
interface LoomFactoryInputs extends BaseMixinInputs, AnchorMixinInputs, DeltaMixinInputs, StateFactoryInputs, LoomFactoryDeltaInputs {
boundingBoxColor?: string;
constantPathSpeed?: boolean;
delta?: LoomFactoryDeltaInputs;
fromPath?: ShapeBasedInstance | string;
group?: GroupInstance | string;
isHorizontalCopy?: boolean;
loopPathCursors?: boolean;
method?: MethodValues;
noCanvasEngineUpdates?: boole