Giter Club home page Giter Club logo

visualise-videocontext's Introduction

Introduction

This project provides a visualisation of the graph, showing vertices and edges, from a programmatic configuration of VideoContext.

visualise-videocontext is currently receiving maintenance updates but not under active development.

Example

import VideoContext from 'videocontext'
import VideoContextVisualisation from 'visualise-videocontext'

// 1. Set up VideoContext graph
const vc = new VideoContext(document.getElementById('canvas'))
const v1 = vc.video('http://somewebsite.com/some-video.mp4')
v1.start(0)
const eff = vc.effect(VideoContext.DEFINITIONS.MONOCHROME)
v1.connect(eff)
eff.connect(vc.destination)
vc.play()

// 2. Visualise VideoContext graph

const div = document.getElementById('vis')
// eg <div id="vis"></div> with width and height set in css.

const vis = new VideoContextVisualisation(div)

vis.setData(VideoContext.snapshot(vc))
vis.render()

// Update regularly - could also use VideoContext's built-in callbacks to trigger this.
setInterval(() => {
    vis.setData(VideoContext.snapshot(vc))
    // No need to call render() a second time
}, 100)

Development

Do not use yarn! When you run yarn it seems to install dependencies incorrectly. I'm not sure what's causing this, but just use npm, at least for installing dependencies.

However it is totally fine to use yarn in projects that include visualise-videocontext as a dependency.

visualise-videocontext's People

Contributors

bdrobinsonbbc avatar dependabot[bot] avatar ptaylour avatar yakca avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

germain-gg

visualise-videocontext's Issues

[feature request] - Indicate current state of source node.

VideoContext v0.43.0 has introduced a "state" field for each source node in the exportToJSON utility.

The state can be one of the following values: "waiting", "sequenced", "playing", "paused", "ended", "error" and will be changed to reflect the current state of the VideoContext at the point exportToJSON is called.

It might be useful to visually represent what the current state of the node is?

Make it easy to extend how lines are coloured

there's lots of times we'd like lines to be opaque - if they're connect to a processing node with 'opacity' or 'crossfade'. If we're feeling clever we could even partially discolour lines if several nodes are going into a compositing node with COMBINE definition, and only have as fully opaque the line whose input is 'on top'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.