Quark #

Modules #

Quark v1.4.0 Documentation

Contents

quark/types #

N #

type N = number

Enum: Repeat #

Repeat #

Enum: FillPositionKind #

FillPositionKind #

  • Start Starting position
  • Center Centered position
  • End Ending position
  • Value Explicit Value
  • Ratio Percentage value

Enum: FillSizeKind #

FillSizeKind #

  • Auto Auto value
  • Value Explicit Value
  • Ratio Percentage value

BoxOriginKind #

type BoxOriginKind = FillSizeKind

Enum: Direction #

Direction #

Flex Layout direction

  • None
  • Row
  • RowReverse
  • Column
  • ColumnReverse
  • Left
  • Right
  • Top
  • Bottom
  • LeftTop
  • RightTop
  • RightBottom
  • LeftBottom

Enum: ItemsAlign #

ItemsAlign #

项目在主轴上的对齐方式

  • Start 左对齐
  • Center 居中
  • End 右对齐
  • SpaceBetween 两端对齐,项目之间的间隔都相等
  • SpaceAround 每个项目两侧的间隔相等。所以,项目之间的间隔比项目与边框的间隔大一倍
  • SpaceEvenly 每个项目两侧的间隔相等,这包括边框的间距
  • CenterCenter 把除两端以外的所有项目尽可能的居中对齐

Enum: CrossAlign #

CrossAlign #

项目在交叉轴内如何对齐

Enum: Wrap #

Wrap #

主轴溢出包裹,开启后当主轴溢出时分裂成多根交叉轴

  • NoWrap 只有一根交叉轴线
  • Wrap 溢出后会有多根交叉轴线
  • WrapReverse 多根交叉轴线反向排列

Enum: WrapAlign #

WrapAlign #

多根交叉轴线的对齐方式。如果项目只有一根交叉轴,该属性不起作用

  • Start 与交叉轴的起点对齐
  • Center 与交叉轴的中点对齐
  • End 与交叉轴的终点对齐
  • SpaceBetween 与交叉轴两端对齐,轴线之间的间隔平均分布
  • SpaceAround 每根轴线两侧的间隔都相等,所以轴线之间的间隔比轴线与边框的间隔大一倍
  • SpaceEvenly 每根轴线两侧的间隔都相等,这包括边框的间距
  • Stretch = 7 轴线占满整个交叉轴,平均分配剩余的交叉轴空间

Enum: Align #

Align #

View align

  • Normal
  • Start
  • Center
  • End
  • Both
  • NewStart = Both New independent line and left align
  • NewCenter New independent line and center align
  • NewEnd New independent line and right align
  • FloatStart Try not to wrap until the maximum limit and left align
  • FloatCenter Try not to wrap until the maximum limit and center align
  • FloatEnd Try not to wrap until the maximum limit and right align
  • Baseline = Normal box vertical align in text
  • Top box vertical align in text
  • Middle box vertical align in text
  • Bottom box vertical align in text
  • LeftTop = Start
  • CenterTop
  • RightTop
  • LeftMiddle
  • CenterMiddle
  • RightMiddle
  • LeftBottom
  • CenterBottom
  • RightBottom

Enum: BoxSizing #

BoxSizing #

The box sizing of the View

  • ContentBox The width and height properties include only the content. Border and padding are not included.
  • PaddingBox The width and height properties include the content and padding. Border is not included.
  • BorderBox The width and height properties include the content, padding, and border.

Enum: BoxSizeKind #

BoxSizeKind #

The width/height value kind for the Box

Enum: LayoutType #

LayoutType #

The layout type of the View

Enum: TextValueKind #

TextValueKind #

Basic type for the Text attributes

  • Inherit
  • Default
  • Value

Enum: TextAlign #

TextAlign #

  • Inherit inherit
  • Default use default of the application
  • Left 左对齐
  • Center 居中
  • Right 右对齐

Enum: TextDecoration #

TextDecoration #

  • Inherit inherit
  • Default use default of the application
  • None 没有
  • Overline 上划线
  • LineThrough 中划线
  • Underline 下划线

Enum: TextOverflow #

TextOverflow #

  • Inherit inherit
  • Default use default of the application
  • Normal 不做任何处理
  • Clip 剪切
  • Ellipsis 剪切并显示省略号
  • EllipsisCenter 剪切并居中显示省略号

Enum: WhiteSpace #

WhiteSpace #

  • Inherit inherit
  • Default use default of the application
  • Normal 合并空白序列,使用自动wrap
  • NoWrap 合并空白序列,不使用自动wrap
  • Pre 保留所有空白,不使用自动wrap
  • PreWrap 保留所有空白,使用自动wrap
  • PreLine 合并空白符序列,但保留换行符,使用自动wrap

Enum: WordBreak #

WordBreak #

  • Inherit inherit
  • Default use default of the application
  • Normal 保持单词在同一行
  • BreakWord 保持单词在同一行,除非单词长度超过一行才截断
  • BreakAll 以字为单位行空间不足换行
  • KeepAll 所有连续的字符都当成一个单词,除非出现空白符、换行符、标点符

Enum: FontWeight #

FontWeight #

  • Inherit
  • Default use default of the application
  • Thin
  • Ultralight
  • Light
  • Regular
  • Normal alias of Regular
  • Medium
  • Semibold
  • Bold
  • Heavy
  • Black
  • ExtraBlack

Enum: FontWidth #

FontWidth #

  • Inherit
  • Default use default of the application
  • UltraCondensed
  • ExtraCondensed
  • Condensed
  • SemiCondensed
  • Normal
  • SemiExpanded
  • Expanded
  • ExtraExpanded
  • UltraExpanded

Enum: FontSlant #

FontSlant #

  • Inherit
  • Default use default of the application
  • Normal
  • Italic
  • Oblique

TextStyle #

type TextStyle = number

Enum: KeyboardType #

KeyboardType #

  • Normal
  • Ascii
  • Number
  • Url
  • NumberPad
  • Phone
  • NamePhone
  • Email
  • Decimal
  • Search
  • AsciiNumber

Enum: KeyboardReturnType #

KeyboardReturnType #

  • Normal
  • Go
  • Join
  • Next
  • Route
  • Search
  • Send
  • Done
  • Emergency
  • Continue

Enum: CursorStyle #

CursorStyle #

  • Normal
  • None
  • NoneUntilMouseMoves
  • Arrow
  • Ibeam
  • Text
  • PointingHand
  • Pointer
  • ClosedHand
  • OpenHand
  • ResizeLeft
  • ResizeRight
  • ResizeLeftRight
  • ResizeUp
  • ResizeDown
  • ResizeUpDown
  • Crosshair
  • DisappearingItem
  • OperationNotAllowed
  • DragLink
  • DragCopy
  • ContextualMenu
  • IbeamForVertical
  • Default Default cursor style

Enum: CascadeColor #

CascadeColor #

Inherit Color from parent view

RepeatIn #

type RepeatIn =
  "repeat"
  | "repeatX"
  | "repeatY"
  | "noRepeat"
  | "mirrorRepeat"
  | "mirrorRepeatX"
  | "mirrorRepeatY"
  | Repeat

DirectionIn #

type DirectionIn = "row" | "rowReverse" | "column" | "columnReverse" | Direction

ItemsAlignIn #

type ItemsAlignIn =
  "start"
  | "center"
  | "end"
  | "spaceBetween"
  | "spaceAround"
  | "spaceEvenly"
  | "centerCenter"
  | ItemsAlign

CrossAlignIn #

type CrossAlignIn = "start" | "center" | "end" | "both" | CrossAlign

WrapIn #

type WrapIn = "noWrap" | "wrap" | "wrapReverse" | Wrap

WrapAlignIn #

type WrapAlignIn =
  "start"
  | "center"
  | "end"
  | "spaceBetween"
  | "spaceAround"
  | "spaceEvenly"
  | "stretch"
  | WrapAlign

AlignIn #

type AlignIn =
  "normal"
  | "start"
  | "center"
  | "end"
  | "both"
  | "newStart"
  | "newCenter"
  | "newEnd"
  | "floatStart"
  | "floatCenter"
  | "floatEnd"
  | "baseline"
  | "top"
  | "middle"
  | "bottom"
  | "leftTop"
  | "centerTop"
  | "rightTop"
  | "leftMiddle"
  | "centerMiddle"
  | "rightMiddle"
  | "leftBottom"
  | "centerBottom"
  | "rightBottom"
  | Align

BoxSizingIn #

type BoxSizingIn = "contentBox" | "paddingBox" | "borderBox" | BoxSizing

LayoutTypeIn #

type LayoutTypeIn = "normal" | "float" | "free" | "text" | "flex" | "flow" | LayoutType

TextAlignIn #

type TextAlignIn = "center" | "inherit" | "left" | "right" | "default" | TextAlign

TextDecorationIn #

type TextDecorationIn =
  "inherit"
  | "default"
  | "none"
  | "overline"
  | "lineThrough"
  | "underline"
  | TextDecoration

TextOverflowIn #

type TextOverflowIn =
  "normal"
  | "inherit"
  | "default"
  | "clip"
  | "ellipsis"
  | "ellipsisCenter"
  | TextOverflow

WhiteSpaceIn #

type WhiteSpaceIn =
  "noWrap"
  | "normal"
  | "inherit"
  | "default"
  | "pre"
  | "preWrap"
  | "preLine"
  | WhiteSpace

WordBreakIn #

type WordBreakIn =
  "normal"
  | "inherit"
  | "default"
  | "breakWord"
  | "breakAll"
  | "keepAll"
  | WordBreak

FontWeightIn #

type FontWeightIn =
  "inherit"
  | "default"
  | "thin"
  | "ultralight"
  | "light"
  | "regular"
  | "medium"
  | "semibold"
  | "bold"
  | "heavy"
  | "black"
  | "extraBlack"
  | FontWeight

FontWidthIn #

type FontWidthIn =
  "normal"
  | "inherit"
  | "default"
  | "ultraCondensed"
  | "extraCondensed"
  | "condensed"
  | "semiCondensed"
  | "semiExpanded"
  | "expanded"
  | "extraExpanded"
  | "ultraExpanded"
  | FontWidth

FontSlantIn #

type FontSlantIn = "normal" | "inherit" | "default" | "italic" | "oblique" | FontSlant

KeyboardTypeIn #

type KeyboardTypeIn =
  "number"
  | "normal"
  | "ascii"
  | "url"
  | "numberPad"
  | "phone"
  | "namePhone"
  | "email"
  | "decimal"
  | "search"
  | "asciiNumber"
  | KeyboardType

KeyboardReturnTypeIn #

type KeyboardReturnTypeIn =
  "normal"
  | "search"
  | "go"
  | "join"
  | "next"
  | "route"
  | "send"
  | "done"
  | "emergency"
  | "continue"
  | KeyboardReturnType

CursorStyleIn #

type CursorStyleIn =
  "normal"
  | "none"
  | "noneUntilMouseMoves"
  | "arrow"
  | "ibeam"
  | "pointingHand"
  | "pointer"
  | "closedHand"
  | "openHand"
  | "resizeLeft"
  | "resizeRight"
  | "resizeLeftRight"
  | "resizeUp"
  | "resizeDown"
  | "resizeUpDown"
  | "crosshair"
  | "disappearingItem"
  | "operationNotAllowed"
  | "dragLink"
  | "dragCopy"
  | "contextualMenu"
  | "ibeamForVertical"
  | CursorStyle

CascadeColorIn #

type CascadeColorIn = "none" | "alpha" | "color" | "both" | CascadeColor

Class: Base #

Base #

Type parameters: T

base.toString() #

toString()

base.toStringStyled(indent?) #

toStringStyled(indent?: number)

Class: Vec2 #

Vec2 #

2D vector

Extends: Base<Vec2>

vec2.x #

x component

readonly x: N

vec2.y #

y component

readonly y: N

vec2.width #

alias of x

readonly width: N

vec2.height #

alias of y

readonly height: N

vec2.toString() #

Get string value

toString(): 

vec2.isZero() #

Check vector is zero

isZero()

vec2.equal(b) #

Check two vectors are equal

equal(b: Vec2): boolean

vec2.add(b) #

Add two vectors

add(b: Vec2): Vec2

vec2.sub(b) #

Subtract two vectors

sub(b: Vec2): Vec2

vec2.mul(b) #

Multiply vector by a scalar

mul(b: N): Vec2

vec2.div(b) #

Divide vector by a scalar

div(b: N): Vec2

vec2.length() #

Get the length of the vector

length(): N

vec2.lengthSq() #

Returns vector length squared

lengthSq(): N

Returns: The length squared

vec2.dot(b) #

Get the dot product of two vectors

dot(b: Vec2): N

vec2.det(b) #

returns scalar outer product

det(b: Vec2)

vec2.normalized() #

Get the normalized vector

normalized(): Vec2

vec2.rotate90z() #

Rotate the vector by 90 degrees clockwise

rotate90z()

vec2.rotate270z() #

Rotate the vector by 270 degrees clockwise (90 degrees counterclockwise)

rotate270z()

vec2.normalline(prev,next) #

Default to use Cartesian coordinate system Returns zero when the previous is on the same side and on the same line as the next. Clockwise direction inward, screen coordinates outward

normalline(prev: Vec2, next: Vec2)

vec2.angle() #

Get the angle of the point in radians

angle(): N

Returns: angle in radians

vec2.angleInDegrees() #

Get the angle of the point in degrees

angleInDegrees(): N

vec2.angleTo(p) #

Get the angle to another point in radians

angleTo(p: Vec2): N

Parameters:

  • p — The other point

Returns: angle in radians

vec2.rotate(radians) #

Rotate the vector by radians

rotate(radians: N): Vec2

Parameters:

  • radians — The angle in radians

Returns: The rotated vector

vec2.reverseY() #

Reverse the y axis of the vector

reverseY(): Vec2

vec2.directionEight() #

Get the 8-direction of the vector

directionEight(): Direction

Returns: Return direction enum

vec2.mid(b) #

Get the midpoint between two vectors

mid(b: Vec2): Vec2

vec2.mid(vec) #

Get the midpoint of multiple vectors

static mid(vec: Vec2[]): Vec2

Parameters:

  • vec — The vectors array

Returns: The midpoint vector

  • @static

vec2.new(x,y) #

static new(x: N, y: N)
  • @static
    Create a new Vec2 instance

vec2.zero() #

static zero()
  • @static
    Create a zero vector

Vec2In #

type Vec2In = "0 0" | "vec2(0,0)" | N | [0,0] | Vec2

Class: Vec3 #

Vec3 #

Extends: Base<Vec3>

vec3.x #

readonly x: N

vec3.y #

readonly y: N

vec3.z #

readonly z: N

Vec3In #

type Vec3In = "0 0 1" | "vec3(0,0,1)" | N | [0,0,1] | Vec3

Class: Vec4 #

Vec4 #

Extends: Base<Vec4>

vec4.x #

readonly x: N

vec4.y #

readonly y: N

vec4.z #

readonly z: N

vec4.w #

readonly w: N

Vec4In #

type Vec4In = "0 0 1 1" | "vec4(0,0,1,1)" | N | [0,0,1,1] | Vec4

Class: Curve #

Curve #

Extends: Base<Curve>

curve.p1 #

readonly p1: Vec2

curve.p2 #

readonly p2: Vec2

curve.p1x #

readonly p1x: N

curve.p1y #

readonly p1y: N

curve.p2x #

readonly p2x: N

curve.p2y #

readonly p2y: N

CurveIn #

type CurveIn =
  "linear"
  | "ease"
  | "easeIn"
  | "easeOut"
  | "easeInOut"
  | "curve(0,0,1,1)"
  | [0,0,1,1]
  | Curve

Class: Rect #

Rect #

Extends: Base<Rect>

rect.begin #

readonly begin: Vec2

rect.size #

readonly size: Vec2

rect.x #

readonly x: N

rect.y #

readonly y: N

rect.width #

readonly width: N

rect.height #

readonly height: N

RectIn #

type RectIn = "rect(0,0,100,100)" | "rect(0,0)" | [0,0,100,100] | Rect

Class: Range #

Range #

Extends: Base<Range>

range.begin #

top-left corner

readonly begin: Vec2

range.end #

bottom-right corner

readonly end: Vec2

Class: Region #

Region #

Extends: Base<Region>

region.begin #

top-left corner

readonly begin: Vec2

region.end #

bottom-right corner

readonly end: Vec2

region.origin #

origin point

readonly origin: Vec2

Class: BorderRadius #

BorderRadius #

Extends: Base<BorderRadius>

borderradius.leftTop #

readonly leftTop: Vec2

borderradius.rightTop #

readonly rightTop: Vec2

borderradius.rightBottom #

readonly rightBottom: Vec2

borderradius.leftBottom #

readonly leftBottom: Vec2

Class: Mat #

Mat #

Extends: Base<Mat>

mat.m0 #

readonly m0: N

mat.m1 #

readonly m1: N

mat.m2 #

readonly m2: N

mat.m3 #

readonly m3: N

mat.m4 #

readonly m4: N

mat.m5 #

readonly m5: N

MatIn #

type MatIn = N | Mat | "mat(0,0,0,0,0,0)"

Class: Mat4 #

Mat4 #

Extends: Base<Mat4>

mat4.m0 #

readonly m0: N

mat4.m1 #

readonly m1: N

mat4.m2 #

readonly m2: N

mat4.m3 #

readonly m3: N

mat4.m4 #

readonly m4: N

mat4.m5 #

readonly m5: N

mat4.m6 #

readonly m6: N

mat4.m7 #

readonly m7: N

mat4.m8 #

readonly m8: N

mat4.m9 #

readonly m9: N

mat4.m10 #

readonly m10: N

mat4.m11 #

readonly m11: N

mat4.m12 #

readonly m12: N

mat4.m13 #

readonly m13: N

mat4.m14 #

readonly m14: N

mat4.m15 #

readonly m15: N

Class: Color #

Color #

Extends: Base<Color>

color.r #

red 0 ~ 255

readonly r: N

color.g #

green 0 ~ 255

readonly g: N

color.b #

blue 0 ~ 255

readonly b: N

color.a #

alpha 0 ~ 255

readonly a: N

color.alpha #

alpha 0.0 ~ 1.0

readonly alpha: N

ColorStrIn #

type ColorStrIn = "#fff" | "rgb(0,0,0)" | "rgba(0,0,0,1)"

ColorIn #

type ColorIn = ColorStrIn | N | Color

Class: Shadow #

Shadow #

Extends: Base<Shadow>

shadow.x #

readonly x: N

shadow.y #

readonly y: N

shadow.size #

readonly size: N

shadow.color #

readonly color: Color

shadow.r #

readonly r: N

shadow.g #

readonly g: N

shadow.b #

readonly b: N

shadow.a #

readonly a: N

ShadowIn #

type ShadowIn = "2 2 2 rgb(100,100,100)" | Shadow

Class: Border #

Border #

Extends: Base<Border>

border.width #

readonly width: N

border.color #

readonly color: Color

border.r #

readonly r: N

border.g #

readonly g: N

border.b #

readonly b: N

border.a #

readonly a: N

BorderIn #

type BorderIn = "1 rgb(100,100,100)" | Border

Class: FillPosition #

FillPosition #

Extends: Base<FillPosition>

fillposition.value #

readonly value: N

fillposition.kind #

readonly kind: FillPositionKind

FillPositionKindStr #

type FillPositionKindStr = "start" | "end" | "center"

FillPositionIn #

type FillPositionIn = N | FillPosition

Class: FillSize #

FillSize #

Extends: Base<FillSize>

fillsize.value #

readonly value: N

fillsize.kind #

readonly kind: FillSizeKind

FillSizeKindStr #

type FillSizeKindStr = "auto"

FillSizeIn #

type FillSizeIn = N | FillSize | "50%" | FillSizeKindStr

Class: BoxSize #

BoxSize #

Extends: Base<BoxSize>

boxsize.value #

readonly value: N

boxsize.kind #

readonly kind: BoxSizeKind

BoxSizeKindStr #

type BoxSizeKindStr = "auto" | "none" | "match"

BoxSizeIn #

type BoxSizeIn = N | BoxSize | "50%" | "100!" | BoxSizeKindStr

Class: BoxOrigin #

BoxOrigin #

Extends: Base<BoxSize>

boxorigin.value #

readonly value: N

boxorigin.kind #

readonly kind: BoxOriginKind

BoxOriginKindStr #

type BoxOriginKindStr = FillSizeKindStr

BoxOriginIn #

type BoxOriginIn = N | BoxOrigin | "50%" | BoxOriginKindStr

Class: TextBase #

TextBase #

Type parameters: Derived, Value Extends: Base<Derived>

textbase.value #

readonly value: Value

textbase.kind #

readonly kind: TextValueKind

Class: TextColor #

TextColor #

Extends: TextBase<TextColor,Color>

textcolor.r #

readonly r: N

textcolor.g #

readonly g: N

textcolor.b #

readonly b: N

textcolor.a #

readonly a: N

TextValueKindInStr #

type TextValueKindInStr = "inherit" | "default"

TextColorIn #

type TextColorIn = TextValueKindInStr | ColorIn | TextColor

Class: FontSize #

FontSize #

Extends: TextBase<FontSize,N>

FontSizeIn #

type FontSizeIn = TextValueKindInStr | N | FontSize

LineHeightIn #

type LineHeightIn = FontSizeIn

LineHeight #

type LineHeight = FontSize

Class: TextShadow #

TextShadow #

Extends: TextBase<TextShadow,Shadow>

textshadow.x #

readonly x: N

textshadow.y #

readonly y: N

textshadow.size #

readonly size: N

textshadow.color #

readonly color: Color

textshadow.r #

readonly r: N

textshadow.g #

readonly g: N

textshadow.b #

readonly b: N

textshadow.a #

readonly a: N

TextShadowIn #

type TextShadowIn = TextValueKindInStr | ShadowIn | TextShadow

Class: TextStroke #

TextStroke #

Extends: TextBase<TextStroke,Border>

textstroke.width #

readonly width: N

textstroke.color #

readonly color: Color

textstroke.r #

readonly r: N

textstroke.g #

readonly g: N

textstroke.b #

readonly b: N

textstroke.a #

readonly a: N

TextStrokeIn #

type TextStrokeIn = TextValueKindInStr | BorderIn | TextStroke

FFID #

type FFID = Uint8Array

Class: FontFamily #

FontFamily #

Extends: TextBase<FontFamily,FFID>

fontfamily.families() #

families(): string

Returns:

EmptyFFID #

const EmptyFFID: FFID

FontFamilyIn #

type FontFamilyIn = TextValueKindInStr | string | FontFamily

Class: BoxFilter #

BoxFilter #

  • @abstract

boxfilter.type #

readonly type: N

boxfilter.next #

next: BoxFilter | null

BoxFilterIn #

type BoxFilterIn = string | string[] | BoxFilter

For example:

image(res/image.png, auto 100%, x=start, y=20%, repeat)

image(res/image.png, auto, repeatX, x=center, y=end)

radial(#ff00ff 0%, #ff0 50%, #00f 100%)

linear(90, #ff00ff 0%, #ff0 50%, #00f 100%)

Class: FillImage #

FillImage #

Extends: BoxFilter

fillimage.src #

readonly src: string

fillimage.width #

readonly width: FillSize

fillimage.height #

readonly height: FillSize

fillimage.x #

readonly x: FillPosition

fillimage.y #

readonly y: FillPosition

fillimage.repeat #

readonly repeat: Repeat

fillimage.constructor(src,init?) #

constructor(src: string, init?: object)

Class: FillGradientRadial #

FillGradientRadial #

Extends: BoxFilter

fillgradientradial.positions #

readonly positions: N[]

fillgradientradial.colors #

colors with premultiplied alpha

readonly colors: Color[]

fillgradientradial.constructor(pos,colors) #

constructor(pos: N[], colors: Color[])

Class: FillGradientLinear #

FillGradientLinear #

Extends: FillGradientRadial

fillgradientlinear.angle #

readonly angle: N

fillgradientlinear.constructor(pos,coloes,angle) #

constructor(pos: N[], coloes: Color[], angle: N)

Class: BoxShadow #

BoxShadow #

Extends: BoxFilter

boxshadow.value #

readonly value: Shadow

boxshadow.constructor(value) #

constructor(value: Shadow)

BoxShadowIn #

type BoxShadowIn = ShadowIn | ShadowIn[] | BoxShadow

For example:

10 10 2 #ff00aa

['10 10 2 #ff00aa']

10 10 2 rgba(255,255,0,1)

parseBoxFilter(val,msg?) #

parseBoxFilter(val: BoxFilterIn, msg?: string): BoxFilter | null

parseBoxShadow(val,msg?) #

parseBoxShadow(val: BoxShadowIn, msg?: string): BoxShadow

parseBoxFilterPtr #

type parseBoxFilterPtr = parseBoxFilter

parseBoxShadowPtr #

type parseBoxShadowPtr = parseBoxShadow

Class: SkeletonData #

SkeletonData #

skeletondata.Make(skelPath,atlasPath?,scale?) #

static Make(skelPath: string, atlasPath?: string, scale?: Float): SkeletonData

skeletondata.Make(skel,atlasPath,scale?) #

static Make(skel: Uint8Array, atlasPath: string, scale?: Float): SkeletonData

skeletondata.Make(skel,atlas,dir,scale?) #

static Make(skel: Uint8Array, atlas: Uint8Array, dir: string, scale?: Float): SkeletonData

skeletondata.hashCode() #

hashCode(): N

SkeletonDataIn #

type SkeletonDataIn = 

For example:

skel(res/alien/image.skel, res/alien/image.atlas, scale=1)

parseSkeletonData(val,msg?) #

parseSkeletonData(val: SkeletonDataIn, msg?: string): SkeletonData | null

parseSkeletonDataPtr #

type parseSkeletonDataPtr = parseSkeletonData

Enum: BoundsType #

BoundsType #

entity bounds type

  • kDefault
  • kCircle
  • kPolygon
  • kLineSegment

Class: Bounds #

Bounds #

Entity bounds

Extends: Base<Bounds>

bounds.type #

readonly type: BoundsType

bounds.offset #

readonly offset: Vec2

bounds.radius #

readonly radius: N

bounds.pts? #

readonly pts?: Path

bounds.halfThickness #

readonly halfThickness: N

bounds.hashCode() #

hashCode(): N

BoundsIn #

type BoundsIn = Bounds

newBounds(type,offsetX,offsetY,radius,pts?) #

new entity bounds

newBounds(type: BoundsType, offsetX: N, offsetY: N, radius: N, pts?: Path): Bounds

bounds(type,radius,pts?) #

alias for newBounds

bounds(type: BoundsType, radius: N, pts?: Path): Bounds

circBounds(radius,offsetX?,offsetY?) #

new circle bounds

circBounds(radius: N, offsetX?: N, offsetY?: N): Bounds

polyBounds(path,offsetX?,offsetY?) #

new polygon bounds

polyBounds(path: Path, offsetX?: N, offsetY?: N): Bounds

segBounds(path,offsetX?,offsetY?) #

new line segment bounds

segBounds(path: Path, offsetX?: N, offsetY?: N): Bounds

parseBounds(val,msg?) #

parseBounds(val: BoundsIn, msg?: string): Bounds

newColor(r,g,b,a) #

newColor(r: N, g: N, b: N, a: N): Color

newVec2(x,y) #

newVec2(x: N, y: N): Vec2

newVec3(x,y,z) #

newVec3(x: N, y: N, z: N): Vec3

newVec4(x,y,z,w) #

newVec4(x: N, y: N, z: N, w: N): Vec4

newRect(x,y,width,height) #

newRect(x: N, y: N, width: N, height: N): Rect

newRange(x,y,width,height) #

newRange(x: N, y: N, width: N, height: N, x1: N, y1: N): Range

newRegion(x,y,width,height) #

newRegion(x: N, y: N, width: N, height: N): Region

newBorderRadius(p0,p1,p2,p3,p4,p5,p6,p7) #

newBorderRadius(p0: N, p1: N, p2: N, p3: N, p4: N, p5: N, p6: N, p7: N): BorderRadius

newMat(...value) #

newMat(value: N[]): Mat

newMat4(...value) #

newMat4(value: N[]): Mat4

newCurve(p1x,p1y,p2x,p2y) #

newCurve(p1x: N, p1y: N, p2x: N, p2y: N): Curve

newShadow(x,y,size,r,g,b,a) #

newShadow(x: N, y: N, size: N, r: N, g: N, b: N, a: N): Shadow

newBorder(width,r,b,a) #

newBorder(width: N, r: N, b: N, a: N, g: N): Border

newFillPosition(kink,value) #

newFillPosition(kink: FillPositionKind, value: N, kind: FillPositionKind): FillPosition

newFillSize(kink,value) #

newFillSize(kink: FillSizeKind, value: N, kind: FillSizeKind): FillSize

newBoxOrigin(kink,value) #

newBoxOrigin(kink: BoxOriginKind, value: N, kind: BoxOriginKind): BoxOrigin

newBoxSize(kink,value) #

newBoxSize(kink: BoxSizeKind, value: N, kind: BoxSizeKind): BoxSize

newTextColor(kink,r,g,b,a) #

newTextColor(kink: TextValueKind, r: N, g: N, b: N, a: N, kind: TextValueKind): TextColor

newFontSize(kink,value) #

newFontSize(kink: TextValueKind, value: N, kind: TextValueKind): FontSize

newLineHeight(kink,value) #

newLineHeight(kink: TextValueKind, value: N): LineHeight

newTextShadow(kind,offset_x,offset_y,size,r,g,b,a) #

newTextShadow(kind: TextValueKind, offset_x: N, offset_y: N, size: N, r: N, g: N, b: N, a: N): TextShadow

newTextStroke(kind,width,r,g,b,a) #

newTextStroke(kind: TextValueKind, width: N, r: N, g: N, b: N, a: N): TextStroke

newFontFamily(kind,ffid?) #

newFontFamily(kind: TextValueKind, ffid?: FFID): FontFamily

parseRepeat(val,msg?) #

parseRepeat(val: RepeatIn, msg?: string): Repeat

parseDirection(val,msg?) #

parseDirection(val: DirectionIn, msg?: string): Direction

parseItemsAlign(val,msg?) #

parseItemsAlign(val: ItemsAlignIn, msg?: string): ItemsAlign

parseCrossAlign(val,msg?) #

parseCrossAlign(val: CrossAlignIn, msg?: string): CrossAlign

parseWrap(val,msg?) #

parseWrap(val: WrapIn, msg?: string): Wrap

parseWrapAlign(val,msg?) #

parseWrapAlign(val: WrapAlignIn, msg?: string): WrapAlign

parseAlign(val,msg?) #

parseAlign(val: AlignIn, msg?: string): Align

parseBoxSizing(val,msg?) #

parseBoxSizing(val: BoxSizingIn, msg?: string): BoxSizing

parseLayoutType(val,msg?) #

parseLayoutType(val: LayoutTypeIn, msg?: string): LayoutType

parseTextAlign(val,msg?) #

parseTextAlign(val: TextAlignIn, msg?: string): TextAlign

parseTextDecoration(val,msg?) #

parseTextDecoration(val: TextDecorationIn, msg?: string): TextDecoration

parseTextOverflow(val,msg?) #

parseTextOverflow(val: TextOverflowIn, msg?: string): TextOverflow

parseWhiteSpace(val,msg?) #

parseWhiteSpace(val: WhiteSpaceIn, msg?: string): WhiteSpace

parseWordBreak(val,msg?) #

parseWordBreak(val: WordBreakIn, msg?: string): WordBreak

parseFontWeight(val,msg?) #

parseFontWeight(val: FontWeightIn, msg?: string): FontWeight

parseFontWidth(val,msg?) #

parseFontWidth(val: FontWidthIn, msg?: string): FontWidth

parseFontSlant(val,msg?) #

parseFontSlant(val: FontSlantIn, msg?: string): FontSlant

parseKeyboardType(val,msg?) #

parseKeyboardType(val: KeyboardTypeIn, msg?: string): KeyboardType

parseKeyboardReturnType(val,msg?) #

parseKeyboardReturnType(val: KeyboardReturnTypeIn, msg?: string): KeyboardReturnType

parseCursorStyle(val,msg?) #

parseCursorStyle(val: CursorStyleIn, msg?: string): CursorStyle

parseCascadeColor(val,msg?) #

parseCascadeColor(val: CascadeColorIn, msg?: string): CascadeColor

parseVec2(val,msg?) #

parseVec2(val: Vec2In, msg?: string): Vec2

parseVec3(val,msg?) #

parseVec3(val: Vec3In, msg?: string): Vec3

parseVec4(val,msg?) #

parseVec4(val: Vec4In, msg?: string): Vec4

parseCurve(val,msg?) #

parseCurve(val: CurveIn, msg?: string): Curve

parseRect(val,msg?) #

parseRect(val: RectIn, msg?: string): Rect

parseRange(val,msg?) #

parseRange(val: RangeIn, msg?: string): Range

parseRegion(val,msg?) #

parseRegion(val: RegionIn, msg?: string): Region

parseBorderRadius(val,msg?) #

parseBorderRadius(val: BorderRadiusIn, msg?: string): BorderRadius

parseMat(val,msg?) #

parseMat(val: MatIn, msg?: string): Mat

parseMat4(val,msg?) #

parseMat4(val: Mat4In, msg?: string): Mat4

parseColor(val,msg?,ref?) #

parseColor(val: ColorIn, msg?: string, ref?: Reference): Color

parseShadow(val,msg?,ref?) #

parseShadow(val: ShadowIn, msg?: string, ref?: Reference): Shadow

parseBorder(val,msg?,ref?) #

parseBorder(val: BorderIn, msg?: string, ref?: Reference): Border

parseFillPosition(val,msg?) #

parseFillPosition(val: FillPositionIn, msg?: string): FillPosition

parseFillSize(val,msg?) #

parseFillSize(val: FillSizeIn, msg?: string): FillSize

parseBoxOrigin(val,msg?) #

parseBoxOrigin(val: BoxOriginIn, msg?: string): BoxOrigin

parseBoxSize(val,msg?) #

parseBoxSize(val: BoxSizeIn, msg?: string): BoxSize

parseTextColor(val,msg?) #

parseTextColor(val: TextColorIn, msg?: string): TextColor

parseFontSize(val,msg?) #

parseFontSize(val: FontSizeIn, msg?: string): FontSize

parseLineHeight(val,msg?) #

parseLineHeight(val: LineHeightIn, msg?: string): LineHeight

parseTextShadow(val,msg?) #

parseTextShadow(val: TextShadowIn, msg?: string): TextShadow

parseTextStroke(val,msg?) #

parseTextStroke(val: TextStrokeIn, msg?: string): TextStroke

parseFontFamily(val,msg?) #

parseFontFamily(val: FontFamilyIn, msg?: string): FontFamily