colib-js:用于打字稿和javascript的逻辑排序库

  • e8_100202
    了解作者
  • 215.6KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 04:24
    上传日期
科利布 打字稿的下一代补间和定时逻辑排序。 用法 乍看上去 Colib是一个高度模块化的系统,用于构建复杂的动画/定时事件序列并支持协程。 globalScheduler ( ) . push ( waitForTime ( 3 ) , changeByOffset ( balloon , { y : 100 } , 0.5 , smooth ( ) ) , parallel ( changeFrom ( balloon , { alpha : 0 } , 0.3 , smooth ( ) ) , changeFrom ( balloon , { scale : 0 } , 0.5 , inBack ( ) ) ) , coroutine ( popBalloon ) ) ; function * popBalloon ( ) { yield w
colib-js-master.zip
内容介绍
# Colib API > [Home](../index.md) > API ## Index ### Enumerations - [ColorFormat](enums/colorformat.md) - [ColorLerpMode](enums/colorlerpmode.md) - [CommandOperation](enums/commandoperation.md) ### Classes - [CommandQueue](classes/commandqueue.md) - [CommandQueueGroup](classes/commandqueuegroup.md) - [CommandScheduler](classes/commandscheduler.md) - [Ref](classes/ref.md) ### Interfaces - [ColorHSL](interfaces/colorhsl.md) - [ColorHSV](interfaces/colorhsv.md) - [ColorParseResult](interfaces/colorparseresult.md) - [ColorRGB](interfaces/colorrgb.md) - [CommandState](interfaces/commandstate.md) - [WeightedEaseConfig](interfaces/weightedeaseconfig.md) ### Type aliases - [ColorType](#colortype) - [Command](#command) - [CommandAct](#commandact) - [CommandCondition](#commandcondition) - [CommandCoroutine](#commandcoroutine) - [CommandFactory](#commandfactory) - [CommandInterval](#commandinterval) - [CommandIterator](#commanditerator) - [Ease](#ease) ### Functions - [averageComposite](#averagecomposite) - [cancelGlobalCommands](#cancelglobalcommands) - [ceilStep](#ceilstep) - [chainComposite](#chaincomposite) - [changeFrom](#changefrom) - [changeFromColor](#changefromcolor) - [changeFromNum](#changefromnum) - [changeFromOffset](#changefromoffset) - [changeFromOffsetNum](#changefromoffsetnum) - [changeTo](#changeto) - [changeToColor](#changetocolor) - [changeToNum](#changetonum) - [changeToOffset](#changetooffset) - [changeToOffsetNum](#changetooffsetnum) - [chooseRandom](#chooserandom) - [consumeTime](#consumetime) - [coroutine](#coroutine) - [defer](#defer) - [dilateTime](#dilatetime) - [elastic](#elastic) - [flip](#flip) - [floorStep](#floorstep) - [globalQueueGroup](#globalqueuegroup) - [globalScheduler](#globalscheduler) - [hermite](#hermite) - [inBack](#inback) - [inBounce](#inbounce) - [inCirc](#incirc) - [inCubic](#incubic) - [inElastic](#inelastic) - [inExpo](#inexpo) - [inHermite](#inhermite) - [inOutBack](#inoutback) - [inOutBounce](#inoutbounce) - [inOutCirc](#inoutcirc) - [inOutCubic](#inoutcubic) - [inOutEase](#inoutease) - [inOutElastic](#inoutelastic) - [inOutExpo](#inoutexpo) - [inOutHermite](#inouthermite) - [inOutPolynomial](#inoutpolynomial) - [inOutQuad](#inoutquad) - [inOutQuart](#inoutquart) - [inOutQuint](#inoutquint) - [inOutSin](#inoutsin) - [inPolynomial](#inpolynomial) - [inQuad](#inquad) - [inQuart](#inquart) - [inQuint](#inquint) - [inSin](#insin) - [interruptable](#interruptable) - [interval](#interval) - [isColorHSL](#iscolorhsl) - [isColorHSV](#iscolorhsv) - [isColorRGB](#iscolorrgb) - [linear](#linear) - [mapParallel](#mapparallel) - [mapSequential](#mapsequential) - [none](#none) - [outBack](#outback) - [outBounce](#outbounce) - [outCirc](#outcirc) - [outCubic](#outcubic) - [outElastic](#outelastic) - [outExpo](#outexpo) - [outHermite](#outhermite) - [outPolynomial](#outpolynomial) - [outQuad](#outquad) - [outQuart](#outquart) - [outQuint](#outquint) - [outSin](#outsin) - [parallel](#parallel) - [repeat](#repeat) - [repeatForever](#repeatforever) - [roundStep](#roundstep) - [scaleBy](#scaleby) - [scaleByNum](#scalebynum) - [scaleFrom](#scalefrom) - [scaleFromNum](#scalefromnum) - [sequence](#sequence) - [sequentialComposite](#sequentialcomposite) - [smooth](#smooth) - [waitForFrames](#waitforframes) - [waitForTime](#waitfortime) - [weightedComposite](#weightedcomposite) --- ## Type aliases <a id="colortype" rel='nofollow' onclick='return false;'></a> ### ColorType **Ƭ ColorType**: _`string` \| `number` \| [ColorRGB](interfaces/colorrgb.md) \| [ColorHSL](interfaces/colorhsl.md) \| [ColorHSV](interfaces/colorhsv.md)_ _Defined in color/color-types.ts:34_ Composite type of all supported color formats. --- <a id="command" rel='nofollow' onclick='return false;'></a> ### Command **Ƭ Command**: _`function`_ _Defined in commands/common.ts:22_ The base building block for all commands. This is what the CommandQueue and CommandScheduler update. Commands typically capture state, and are only safe to be invoked by a single queue/scheduler at once. Inside options, deltaTime is the time to update the command by. The command should modify deltaTime, subtracting the time it has consumed. The command sets the completed flag to true when it has completed, or false otherwise. Once the delegate has completed, the next call should restart it. If the operation is set to fast forward, the command should try to immediately complete. #### Type declaration ▸(deltaTime: _`number`_, operation: _[CommandOperation](enums/commandoperation.md)_): [CommandState](interfaces/commandstate.md) \| `void` **Parameters:** | Name | Type | | --------- | --------------------------------------------- | | deltaTime | `number` | | operation | [CommandOperation](enums/commandoperation.md) | **Returns:** [CommandState](interfaces/commandstate.md) \| `void` --- <a id="commandact" rel='nofollow' onclick='return false;'></a> ### CommandAct **Ƭ CommandAct**: _`function`_ _Defined in commands/common.ts:27_ A one shot command. It doesn't take up any time, and completes immediately. #### Type declaration ▸(): `void` **Returns:** `void` --- <a id="commandcondition" rel='nofollow' onclick='return false;'></a> ### CommandCondition **Ƭ CommandCondition**: _`function`_ _Defined in commands/common.ts:32_ A condition returns true or false, which can change the flow control for some commands. #### Type declaration ▸(): `boolean` **Returns:** `boolean` --- <a id="commandcoroutine" rel='nofollow' onclick='return false;'></a> ### CommandCoroutine **Ƭ CommandCoroutine**: _`function`_ _Defined in commands/common.ts:57_ A coroutine command uses generators to produce a sequence of commands over time. ```typescript function* aCoroutine(): CommandIterator { yield wait(5); console.log('Now this is called'); yield interval(t => console.log(t), 10); console.log('This is also called'); } ``` #### Type declaration ▸(): [CommandIterator](#commanditerator) **Returns:** [CommandIterator](#commanditerator) --- <a id="commandfactory" rel='nofollow' onclick='return false;'></a> ### CommandFactory **Ƭ CommandFactory**: _`function`_ _Defined in commands/common.ts:42_ A command factory creates a command. #### Type declaration ▸(): [Command](#command) **Returns:** [Command](#command) --- <a id="commandinterval" rel='nofollow' onclick='return false;'></a> ### CommandInterval **Ƭ CommandInterval**: _`function`_ _Defined in commands/common.ts:37_ A interval command is executed over a period of time. The value t is normalized from 0 to 1. #### Type declaration ▸(t: _`number`_): `void` **Parameters:** | Name | Type | | ---- | -------- | | t | `number` | **Returns:** `void` --- <a id="commanditerator" rel='nofollow' onclick='return false;'></a> ### CommandIterator **Ƭ CommandIterator**: _`IterableIterator`<[Command](#command) \| `undefined`>_ _Defined in commands/common.ts:44_ --- <a id="ease" rel='nofollow' onclick='return false;'></a> ### Ease **Ƭ Ease**: _`function`_ _Defined in ease.ts:7_ An easing function takes an input value t where an uneased t ranges from 0 <= t <= 1 . Some easing functions, (such as BackEase returns values outside the range 0 <= t <= 1). For a given valid easing function, f(t), f(0) = 0 and f(1) = 1. #### Type declaration ▸(t: _`number`_): `number` **Parameters:** | Name | Type | | ---- | -------- | | t | `number` | **Returns:** `number` --- ## Functions <a id="averagecomposite" rel='nofollow' onclick='return false;'></a> ### averageComposite ▸ **averageComposite**(...eases: _[Ease](#ease)[]_): [Ease](#ease) _Defined in ease.ts:61_ Averages the output from several easing functions. **Parameters:** | Name | Type | Description | | ------------ | --------------- | -------------------------------------- | | `Rest` eases | [Ease](#ease)[] | The list of eases to average together. | **Returns:** [Ease](#ease) --- <a id="cancelglobalcommands" rel='nofollow' onclick='return false;'></a> ### cancelGlobalCommands ▸ **cancelGlobalCommands**(): `void` _Defined in global.ts:53_ Cancels all commands currently running on the `globalScheduler` and `globalQueueGroup`. **Returns:** `void` --- <a id="ceilstep" rel='nofollow' onclick='return false;'></a> ### ceilStep ▸ **ceilStep**
评论
    相关推荐