Skip to content

donkeyclip/motorcortex-tv

Repository files navigation

MotorCortex-Tv

Table of Contents

Demo

Check it out here

Intro / Features

Using MotorCortex-Τv your clip will look like a TV without signal.

This Plugin exposes two incidents:

  • TVNoise
  • ImageGlitch

Getting Started

Installation

$ npm install --save @donkeyclip/motorcortex-tv
# OR
$ yarn add @donkeyclip/motorcortex-tv

Importing and Loading

import { loadPlugin } from "@donkeyclip/motorcortex";
import tvDefinition from "@donkeyclip/motorcortex-tv";
const TV = loadPlugin(tvDefinition);

Creating Incidents

TVNoise

const tvNoise = new TV.TVNoise(
  {
    width: 800,
    height: 600,
    sound: true,
  },
  {
    duration: 6000,
    selector: "#container",
  }
);

TVNoise Attrs

Name Are Values
width width of the canvas num
height height of the canvas num
duration the duration of the effect num
sound iclude noise sound or not bool

imageGlitch

const imageGlitch = new TV.ImageGlitch(
  {
    imgUrl:
      "https://images.hdqwalls.com/wallpapers/minimal-sunset-landscape-4k-w5.jpg",
  },
  {
    selector: "#glitchContainer",
    containerParams: {
      width: "800px",
      height: "600px",
    },
  }
);

ImageGlitch Attrs

Name Are Values
imgUrl the image url to apply the effect on url

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:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

License

MIT License

Sponsored by