@cycle-robot-drivers/screen v1.1.8
@cycle-robot-drivers/screen
Cycle.js drivers and action components for a tablet robot face.
Try the demo at StackBlitz!
Note that this package was tested with Chrome browser (>= 65.0.3325.181) only.
API
FacialExpressionAction(sources)
FacialExpression action component.
Params:
- sources
- goal: a stream of
TabletFaceCommands. - cancel: a stream of
GoalID. - TabletFace: the
TabletFacedriver output.
- goal: a stream of
Return:
- sinks
- state: a reducer stream.
- status: a stream of action status.
- result: a stream of action results.
- TabletFace: a stream for the
TabletFacedriver input.
Speechbubble action component.
Params:
- sources
- goal: a stream of
{type: 'MESSAGE', value: 'Hello world'}or'Hello world'(as "message"), or{type: 'CHOICE', value: ['Hello', 'World']}or['Hello', 'World'](as "multiple choice"). - cancel: a stream of
GoalID - DOM: Cycle.js DOMSource.
- goal: a stream of
Return:
- sinks
- state: a reducer stream.
- status: a stream of action status.
- result: a stream of action results.
result.resultis alwaysnull. - DOM: a stream of virtual DOM objects, i.e, Snabbdom "VNode" objects.
makeTabletFaceDriver(options)
TabletFace driver factory.
Params:
- options possible key includes
- styles {object} A group of optional style parameters
Return:
Driver the TabletFace Cycle.js driver function. It takes a stream of
Commandand returns returnsEventSource:EventSource.events(eventName)takes'load','animationfinish', ordomand returns corresponding event streams respectively.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago