npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flowav-core

v0.0.2

Published

Core library for the FlowAV project; a livecoding audiovisual language built ontop of VideoContext and gibberish.js

Downloads

9

Readme

FlowAV-Core

Core library for the FlowAV project. Use this if you'd like to include FlowAV into an existing project.

FlowAV is a live coding programming language built on top of VideoContext and Gibberish. FlowAV gets its name from the Flow-Based Programming paradigm, and while not strictly a FBP, the syntax heavily implies a logical flow of data.

Syntax

The best way to describe FlowAV's syntax is to breakdown a small example.

FlowAV example

$ Video('01')
  : loop
  | Output()
$ Video('02')
  : scale -> 0.5
  : pos -> -0.5 0
  | Output()
$ Video('http://www.example.com/video.mp4')
  : scale -> 0.5
  : pos -> 0.5 0
  | Effect('monochrome')
    | Output()

The snippet of code will do the following:

  • Open the video '/video/01.mp4' and display it fullsize and loop continuously.
  • Open the video '/video/02.mp4'.
    • Scale the video to 50% width and height.
    • Centre the video vertically and position it in the left half of the canvas
  • Open the video from the url 'http://www.example.com/video.mp4'
    • Scale the video to 50% width and height.
    • Centre the video vertically and position it in the right half of the canvas
    • Apply a monochrome filter to the video

The code is split into blocks and follows a tree-like branching structure.

$ and #

Declares the context for the following block. $ for video and # for audio. Currently only the video context is functional.

Node('argument')

What follows after a block declaration is a root node; these are video or image sources for the video context. The current nodes are valid root nodes:

  • Video('path/to/video')
  • Image('path/to/image')

The above code snippet demonstrates that FlowAV expects video files to be placed in a /video folder in the root directory. Doing so allows users to type the file name rather than the whole path. It also demonstrates loading a video from an external URL. While this is currently functional, it is possible this feature is dropped in the future.

Additionally, a third Canvas() node is planned.

: and ->

These are used to define parameters for a node, they follow the syntax : param -> (value) where value is optional. If left blank, the value will implicitly be true; useful for parameters such as loop.

|

Connections to other nodes are notated with a pipe. An arbitrary number of connections can be made, and those connections can have parameters and connections themselves; allowing for complex effects chains.

Getting started

If you'd just like to play around with FlowAV, check out the sister project FlowAV-Live to build an environment or head here to try it in the browser.

If you'd like to contribute to FlowAV-Core or use it in an existing project follow these steps.

  • Clone the repository:

    git clone https://github.com/FlowAV/FlowAV-Core.git

  • Install dependencies:

    npm install

To build the project into a UMD file as /dist/FlowAV.js run:

npm run build

To run a webpack dev server with hot reloading enabled run:

npm run dev

At the moment webpack compiles all the dependencies as part of the build process. This might not be a good idea but honestly I don't have a clue...