Socket
Socket
Sign inDemoInstall

videocontext

Package Overview
Dependencies
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videocontext - npm Package Compare versions

Comparing version 0.52.9 to 0.52.10

2

CHANGELOG.md

@@ -0,1 +1,3 @@

#### 0.52.10 (2018-11-06)
#### 0.52.9 (2018-11-05)

@@ -2,0 +4,0 @@

12

package.json
{
"name": "videocontext",
"version": "0.52.9",
"version": "0.52.10",
"description": "A WebGL & HTML5 graph based video composition library",

@@ -10,3 +10,3 @@ "repository": {

"license": "Apache-2.0",
"main": "dist/videocontext.js",
"browser": "dist/videocontext.js",
"keywords": [

@@ -68,2 +68,3 @@ "video",

"puppeteer": "^1.4.0",
"raw-loader": "^0.5.1",
"sinon": "^4.2.1",

@@ -76,3 +77,8 @@ "webgl-mock": "^0.1.7",

"dist"
]
],
"jest": {
"moduleNameMapper": {
"\\.(frag|vert)$": "<rootDir>/__mocks__/glsl.js"
}
}
}

@@ -7,3 +7,3 @@ # VideoContext

It consist of two main components. A graph based, shader accelerated processing pipeline, and a media playback sequencing time-line.
It consists of two main components. A graph based, shader accelerated processing pipeline, and a media playback sequencing time-line.

@@ -32,3 +32,3 @@

optimum definition
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width
https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
-->

@@ -133,3 +133,3 @@ <canvas id="canvas" width="1280" height="720" style="width: 852px; height: 480px"></canvas>

The vertex and shader code is GLSL code which gets compiled to produce the shader program. The input descriptio ntells the VideoContext how many ports there are to connect to and the name of the image associated with the port within the shader code. Inputs are always render-able textures (i.e images, videos, canvases). The property descriptions tell the VideoContext what controls to attached to the EffectNode and the name, type, and default value of the control within the shader code.
The vertex and shader code is GLSL code which gets compiled to produce the shader program. The input description tells the VideoContext how many ports there are to connect to and the name of the image associated with the port within the shader code. Inputs are always render-able textures (i.e images, videos, canvases). The property descriptions tell the VideoContext what controls to attached to the EffectNode and the name, type, and default value of the control within the shader code.

@@ -143,25 +143,25 @@ The following is a an example of a simple shader description used to describe a monochrome effect. It has one input (the image to be processed) and two modifiable properties to control the color RGB mix for the processing result.

description: "Change images to a single chroma (e.g can be used to make a black & white filter). Input color mix and output color mix can be adjusted.",
vertexShader : "\
attribute vec2 a_position;\
attribute vec2 a_texCoord;\
varying vec2 v_texCoord;\
void main() {\
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);\
v_texCoord = a_texCoord;\
}",
fragmentShader : "\
precision mediump float;\
uniform sampler2D u_image;\
uniform vec3 inputMix;\
uniform vec3 outputMix;\
varying vec2 v_texCoord;\
varying float v_mix;\
void main(){\
vec4 color = texture2D(u_image, v_texCoord);\
float mono = color[0]*inputMix[0] + color[1]*inputMix[1] + color[2]*inputMix[2];\
color[0] = mono * outputMix[0];\
color[1] = mono * outputMix[1];\
color[2] = mono * outputMix[2];\
gl_FragColor = color;\
}",
vertexShader : `
attribute vec2 a_position;
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
void main() {
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);
v_texCoord = a_texCoord;
}`,
fragmentShader : `
precision mediump float;
uniform sampler2D u_image;
uniform vec3 inputMix;
uniform vec3 outputMix;
varying vec2 v_texCoord;
varying float v_mix;
void main(){
vec4 color = texture2D(u_image, v_texCoord);
float mono = color[0]*inputMix[0] + color[1]*inputMix[1] + color[2]*inputMix[2];
color[0] = mono * outputMix[0];
color[1] = mono * outputMix[1];
color[2] = mono * outputMix[2];
gl_FragColor = color;
}`,
properties:{

@@ -216,30 +216,30 @@ "inputMix":{type:"uniform", value:[0.4,0.6,0.2]},

description: "A cross-fade effect. Typically used as a transistion.",
vertexShader : "\
attribute vec2 a_position;\
attribute vec2 a_texCoord;\
varying vec2 v_texCoord;\
void main() {\
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);\
v_texCoord = a_texCoord;\
}",
fragmentShader : "\
precision mediump float;\
uniform sampler2D u_image_a;\
uniform sampler2D u_image_b;\
uniform float mix;\
varying vec2 v_texCoord;\
varying float v_mix;\
void main(){\
vec4 color_a = texture2D(u_image_a, v_texCoord);\
vec4 color_b = texture2D(u_image_b, v_texCoord);\
color_a[0] *= mix;\
color_a[1] *= mix;\
color_a[2] *= mix;\
color_a[3] *= mix;\
color_b[0] *= (1.0 - mix);\
color_b[1] *= (1.0 - mix);\
color_b[2] *= (1.0 - mix);\
color_b[3] *= (1.0 - mix);\
gl_FragColor = color_a + color_b;\
}",
vertexShader : `
attribute vec2 a_position;
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
void main() {
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);
v_texCoord = a_texCoord;
}`,
fragmentShader : `
precision mediump float;
uniform sampler2D u_image_a;
uniform sampler2D u_image_b;
uniform float mix;
varying vec2 v_texCoord;
varying float v_mix;
void main(){
vec4 color_a = texture2D(u_image_a, v_texCoord);
vec4 color_b = texture2D(u_image_b, v_texCoord);
color_a[0] *= mix;
color_a[1] *= mix;
color_a[2] *= mix;
color_a[3] *= mix;
color_b[0] *= (1.0 - mix);
color_b[1] *= (1.0 - mix);
color_b[2] *= (1.0 - mix);
color_b[3] *= (1.0 - mix);
gl_FragColor = color_a + color_b;
}`,
properties:{

@@ -321,19 +321,19 @@ "mix":{type:"uniform", value:0.0}

description: "A basic effect which renders the input to the output, Typically used as a combine node for layering up media with alpha transparency.",
vertexShader : "\
attribute vec2 a_position;\
attribute vec2 a_texCoord;\
varying vec2 v_texCoord;\
void main() {\
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);\
v_texCoord = a_texCoord;\
}",
fragmentShader : "\
precision mediump float;\
uniform sampler2D u_image;\
varying vec2 v_texCoord;\
varying float v_mix;\
void main(){\
vec4 color = texture2D(u_image, v_texCoord);\
gl_FragColor = color;\
}",
vertexShader : `
attribute vec2 a_position;
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
void main() {
gl_Position = vec4(vec2(2.0,2.0)*a_position-vec2(1.0, 1.0), 0.0, 1.0);
v_texCoord = a_texCoord;
}`,
fragmentShader : `
precision mediump float;
uniform sampler2D u_image;
varying vec2 v_texCoord;
varying float v_mix;
void main(){
vec4 color = texture2D(u_image, v_texCoord);
gl_FragColor = color;
}`,
properties:{

@@ -431,3 +431,3 @@ },

these scripts build and commit the docs, the changelog, update the `package.json` verson number
these scripts build and commit the docs, the changelog, update the `package.json` version number
and push to the current branch with tags.

@@ -434,0 +434,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc