@donkeyclip/motorcortex-typewriting
v4.1.0
Published
typewriting plugin for MotorCortex
Downloads
15
Readme
MotorCortex-TypeWriting
Table of Contents
- MotorCortex-TypeWriting
- Intro / Features
- Getting Started
- Creating Incidents
- Adding Incidents in your clip
- Contributing
- License
- Sponsored by
Demo
Intro / Features
MotorCortex-TypeWriting, adds the type-writing effect to your clips.
This Plugin exposes one incidents:
- TypeWriting
Getting Started
Installation
$ npm install @donkeyclip/motorcortex-typewriting
# OR
$ yarn add @donkeyclip/motorcortex-typewriting
Importing and loading
import { loadPlugin } from "@donkeyclip/motorcortex";
import TypeWritingDefinition from "@donkeyclip/motorcortex-typewriting";
const TypeWriting = loadPlugin(TypeWritingDefinition);
Creating Incidents
TypeWriting
const typewrite = new TypeWriting.TypeWriting(
{
css: `color:#37ff00;font-size:20px;font-weight:bold`,
showCursor: true,
cursorCss: "color:#37ff00;font-size:20px;font-weight:bold;",
blinkDelay: 3000,
blinkhiatus: 2000,
text: `Wake up, Neo...`,
},
{ selector: ".container" }
);
const typewriteOne = new TypeWriting.TypeWriting(
{
css: `color:#37ff00;font-size:20px;font-weight:bold`,
showCursor: true,
cursorCss: "color:#37ff00;font-size:20px;font-weight:bold;",
blinkDelay: 3000,
blinkhiatus: 2000,
text: `The Matrix has you...`,
},
{ selector: ".container" }
);
TypeWriting Attrs
| Name | Description | Default | Type | | ----------- | :-------------------------------------------------------- | :------ | ------: | | css | The CSS for the text | "" | string | | cursorCss | The CSS for the cursor | "" | string | | showCursor | Show or hide cursor | false | boolean | | blinkDelay | Blink cursor duration in milliseconds before start typing | 0 | number | | blinkhiatus | Blink cursor duration in milliseconds after end of typing | 0 | number | | text | The text to be typed | "" | string |
Adding Incidents in your clip
clipName.addIncident(incidentName,startTime);
Contributing
In general, we follow the "fork-and-pull" Git workflow, so if you want to submit patches and additions you should follow the next steps:
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes