Quark
#
Modules #
quark/actionquark/appquark/bubblesquark/bufferquark/checkboxquark/cssquark/ctrquark/defsquark/dialogquark/eventquark/fontquark/fsquark/hashquark/httpquark/indexquark/jsonbquark/keyboardquark/lmdbquark/mediaquark/navquark/netquark/osquark/pathquark/pkgquark/screenquark/statequark/stepperquark/storagequark/testquark/typesquark/uriquark/utilquark/viewquark/windowquark/wsquark/_bufferquark/_commonquark/_decoratorsquark/_eventquark/_extquark/_md5quark/_sha1quark/_sha256quark/_utilquark/_watching
Quark v1.4.0 Documentation
Contents
-
quark/types
- N
- Enum: Repeat
- Enum: FillPositionKind
- Enum: FillSizeKind
- BoxOriginKind
- Enum: Direction
- Enum: ItemsAlign
- Enum: CrossAlign
- Enum: Wrap
- Enum: WrapAlign
- Enum: Align
- Enum: BoxSizing
- Enum: BoxSizeKind
- Enum: LayoutType
- Enum: TextValueKind
- Enum: TextAlign
- Enum: TextDecoration
- Enum: TextOverflow
- Enum: WhiteSpace
- Enum: WordBreak
- Enum: FontWeight
- Enum: FontWidth
- Enum: FontSlant
- TextStyle
- Enum: KeyboardType
- Enum: KeyboardReturnType
- Enum: CursorStyle
- Enum: CascadeColor
- RepeatIn
- DirectionIn
- ItemsAlignIn
- CrossAlignIn
- WrapIn
- WrapAlignIn
- AlignIn
- BoxSizingIn
- LayoutTypeIn
- TextAlignIn
- TextDecorationIn
- TextOverflowIn
- WhiteSpaceIn
- WordBreakIn
- FontWeightIn
- FontWidthIn
- FontSlantIn
- KeyboardTypeIn
- KeyboardReturnTypeIn
- CursorStyleIn
- CascadeColorIn
- Class: Base
-
Class: Vec2
- Vec2
- vec2.x
- vec2.y
- vec2.width
- vec2.height
- vec2.toString()
- vec2.isZero()
- vec2.equal(b)
- vec2.add(b)
- vec2.sub(b)
- vec2.mul(b)
- vec2.div(b)
- vec2.length()
- vec2.lengthSq()
- vec2.dot(b)
- vec2.det(b)
- vec2.normalized()
- vec2.rotate90z()
- vec2.rotate270z()
- vec2.normalline(prev,next)
- vec2.angle()
- vec2.angleInDegrees()
- vec2.angleTo(p)
- vec2.rotate(radians)
- vec2.reverseY()
- vec2.directionEight()
- vec2.mid(b)
- vec2.mid(vec)
- vec2.new(x,y)
- vec2.zero()
- Vec2In
- Class: Vec3
- Vec3In
- Class: Vec4
- Vec4In
- Class: Curve
- CurveIn
- Class: Rect
- RectIn
- Class: Range
- Class: Region
- Class: BorderRadius
- Class: Mat
- MatIn
- Class: Mat4
- Class: Color
- ColorStrIn
- ColorIn
- Class: Shadow
- ShadowIn
- Class: Border
- BorderIn
- Class: FillPosition
- FillPositionKindStr
- FillPositionIn
- Class: FillSize
- FillSizeKindStr
- FillSizeIn
- Class: BoxSize
- BoxSizeKindStr
- BoxSizeIn
- Class: BoxOrigin
- BoxOriginKindStr
- BoxOriginIn
- Class: TextBase
- Class: TextColor
- TextValueKindInStr
- TextColorIn
- Class: FontSize
- FontSizeIn
- LineHeightIn
- LineHeight
- Class: TextShadow
- TextShadowIn
- Class: TextStroke
- TextStrokeIn
- FFID
- Class: FontFamily
- EmptyFFID
- FontFamilyIn
- Class: BoxFilter
- BoxFilterIn
- Class: FillImage
- Class: FillGradientRadial
- Class: FillGradientLinear
- Class: BoxShadow
- BoxShadowIn
- parseBoxFilter(val,msg?)
- parseBoxShadow(val,msg?)
- parseBoxFilterPtr
- parseBoxShadowPtr
- Class: SkeletonData
- SkeletonDataIn
- parseSkeletonData(val,msg?)
- parseSkeletonDataPtr
- Enum: BoundsType
- Class: Bounds
- BoundsIn
- newBounds(type,offsetX,offsetY,radius,pts?)
- bounds(type,radius,pts?)
- circBounds(radius,offsetX?,offsetY?)
- polyBounds(path,offsetX?,offsetY?)
- segBounds(path,offsetX?,offsetY?)
- parseBounds(val,msg?)
- newColor(r,g,b,a)
- newVec2(x,y)
- newVec3(x,y,z)
- newVec4(x,y,z,w)
- newRect(x,y,width,height)
- newRange(x,y,width,height)
- newRegion(x,y,width,height)
- newBorderRadius(p0,p1,p2,p3,p4,p5,p6,p7)
- newMat(...value)
- newMat4(...value)
- newCurve(p1x,p1y,p2x,p2y)
- newShadow(x,y,size,r,g,b,a)
- newBorder(width,r,b,a)
- newFillPosition(kink,value)
- newFillSize(kink,value)
- newBoxOrigin(kink,value)
- newBoxSize(kink,value)
- newTextColor(kink,r,g,b,a)
- newFontSize(kink,value)
- newLineHeight(kink,value)
- newTextShadow(kind,offset_x,offset_y,size,r,g,b,a)
- newTextStroke(kind,width,r,g,b,a)
- newFontFamily(kind,ffid?)
- parseRepeat(val,msg?)
- parseDirection(val,msg?)
- parseItemsAlign(val,msg?)
- parseCrossAlign(val,msg?)
- parseWrap(val,msg?)
- parseWrapAlign(val,msg?)
- parseAlign(val,msg?)
- parseBoxSizing(val,msg?)
- parseLayoutType(val,msg?)
- parseTextAlign(val,msg?)
- parseTextDecoration(val,msg?)
- parseTextOverflow(val,msg?)
- parseWhiteSpace(val,msg?)
- parseWordBreak(val,msg?)
- parseFontWeight(val,msg?)
- parseFontWidth(val,msg?)
- parseFontSlant(val,msg?)
- parseKeyboardType(val,msg?)
- parseKeyboardReturnType(val,msg?)
- parseCursorStyle(val,msg?)
- parseCascadeColor(val,msg?)
- parseVec2(val,msg?)
- parseVec3(val,msg?)
- parseVec4(val,msg?)
- parseCurve(val,msg?)
- parseRect(val,msg?)
- parseRange(val,msg?)
- parseRegion(val,msg?)
- parseBorderRadius(val,msg?)
- parseMat(val,msg?)
- parseMat4(val,msg?)
- parseColor(val,msg?,ref?)
- parseShadow(val,msg?,ref?)
- parseBorder(val,msg?,ref?)
- parseFillPosition(val,msg?)
- parseFillSize(val,msg?)
- parseBoxOrigin(val,msg?)
- parseBoxSize(val,msg?)
- parseTextColor(val,msg?)
- parseFontSize(val,msg?)
- parseLineHeight(val,msg?)
- parseTextShadow(val,msg?)
- parseTextStroke(val,msg?)
- parseFontFamily(val,msg?)
quark/types #
N #
type N = number
Enum: Repeat #
Repeat #
Enum: FillPositionKind #
FillPositionKind #
StartStarting positionCenterCentered positionEndEnding positionValueExplicit ValueRatioPercentage value
Enum: FillSizeKind #
FillSizeKind #
AutoAuto valueValueExplicit ValueRatioPercentage value
BoxOriginKind #
type BoxOriginKind = FillSizeKind
Enum: Direction #
Direction #
Flex Layout direction
NoneRowRowReverseColumnColumnReverseLeftRightTopBottomLeftTopRightTopRightBottomLeftBottom
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
NormalStartCenterEndBothNewStart=BothNew independent line and left alignNewCenterNew independent line and center alignNewEndNew independent line and right alignFloatStartTry not to wrap until the maximum limit and left alignFloatCenterTry not to wrap until the maximum limit and center alignFloatEndTry not to wrap until the maximum limit and right alignBaseline=Normalbox vertical align in textTopbox vertical align in textMiddlebox vertical align in textBottombox vertical align in textLeftTop=StartCenterTopRightTopLeftMiddleCenterMiddleRightMiddleLeftBottomCenterBottomRightBottom
Enum: BoxSizing #
BoxSizing #
The box sizing of the View
ContentBoxThe width and height properties include only the content. Border and padding are not included.PaddingBoxThe width and height properties include the content and padding. Border is not included.BorderBoxThe 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
InheritDefaultValue
Enum: TextAlign #
TextAlign #
InheritinheritDefaultuse default of the applicationLeft左对齐Center居中Right右对齐
Enum: TextDecoration #
TextDecoration #
InheritinheritDefaultuse default of the applicationNone没有Overline上划线LineThrough中划线Underline下划线
Enum: TextOverflow #
TextOverflow #
InheritinheritDefaultuse default of the applicationNormal不做任何处理Clip剪切Ellipsis剪切并显示省略号EllipsisCenter剪切并居中显示省略号
Enum: WhiteSpace #
WhiteSpace #
InheritinheritDefaultuse default of the applicationNormal合并空白序列,使用自动wrapNoWrap合并空白序列,不使用自动wrapPre保留所有空白,不使用自动wrapPreWrap保留所有空白,使用自动wrapPreLine合并空白符序列,但保留换行符,使用自动wrap
Enum: WordBreak #
WordBreak #
InheritinheritDefaultuse default of the applicationNormal保持单词在同一行BreakWord保持单词在同一行,除非单词长度超过一行才截断BreakAll以字为单位行空间不足换行KeepAll所有连续的字符都当成一个单词,除非出现空白符、换行符、标点符
Enum: FontWeight #
FontWeight #
InheritDefaultuse default of the applicationThinUltralightLightRegularNormalalias of RegularMediumSemiboldBoldHeavyBlackExtraBlack
Enum: FontWidth #
FontWidth #
InheritDefaultuse default of the applicationUltraCondensedExtraCondensedCondensedSemiCondensedNormalSemiExpandedExpandedExtraExpandedUltraExpanded
Enum: FontSlant #
FontSlant #
InheritDefaultuse default of the applicationNormalItalicOblique
TextStyle #
type TextStyle = number
Enum: KeyboardType #
KeyboardType #
NormalAsciiNumberUrlNumberPadPhoneNamePhoneEmailDecimalSearchAsciiNumber
Enum: KeyboardReturnType #
KeyboardReturnType #
NormalGoJoinNextRouteSearchSendDoneEmergencyContinue
Enum: CursorStyle #
CursorStyle #
NormalNoneNoneUntilMouseMovesArrowIbeamTextPointingHandPointerClosedHandOpenHandResizeLeftResizeRightResizeLeftRightResizeUpResizeDownResizeUpDownCrosshairDisappearingItemOperationNotAllowedDragLinkDragCopyContextualMenuIbeamForVerticalDefaultDefault 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
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 #
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 #
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 #
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 #
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 #
range.begin #
top-left corner
readonly begin: Vec2
range.end #
bottom-right corner
readonly end: Vec2
Class: Region #
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 #
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 #
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 #
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 #
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 #
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 #
fillsize.value #
readonly value: N
fillsize.kind #
readonly kind: FillSizeKind
FillSizeKindStr #
type FillSizeKindStr = "auto"
FillSizeIn #
type FillSizeIn = N | FillSize | "50%" | FillSizeKindStr
Class: BoxSize #
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 #
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 #
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
kDefaultkCirclekPolygonkLineSegment
Class: Bounds #
Bounds #
Entity 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