videocontext
Advanced tools
Comparing version 0.7.0 to 0.8.0
{ | ||
"name": "videocontext", | ||
"version": "0.5.0", | ||
"version": "0.7.0", | ||
"description": "A WebGL & HTML5 graph based video composition library", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
{ | ||
"name": "videocontext", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "A WebGL & HTML5 graph based video composition library", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -37,3 +37,3 @@ #VideoContext | ||
var crossFade = videoCtx.createTransitionNode(VideoContext.DEFINITIONS.CROSSFADE); | ||
crossFade.transition(2,4,1.0, "mix"); | ||
crossFade.transition(2,4,0.0,1.0, "mix"); | ||
@@ -310,5 +310,5 @@ videoNode2.connect(crossFade); | ||
//Setup the transition. This will change the "mix" property of the cross-fade node from whatever it's | ||
//current value is (0.0) to 1.0 at time=8 over a period of 2 seconds. | ||
crossfadeEffect.transition(8.0, 10.0, 1.0, "mix"); | ||
//Setup the transition. This will change the "mix" property of the cross-fade node from 0.0 to 1.0. | ||
//Transision mix value from 0.0 to 1.0 at time=8 over a period of 2 seconds to time=10. | ||
crossfadeEffect.transition(8.0, 10.0, 0.0, 1.0, "mix"); | ||
@@ -315,0 +315,0 @@ |
@@ -44,7 +44,8 @@ //Matthew Shotton, R&D User Experience,© BBC 2015 | ||
* @param {number} endTime - The time at which the transition should be completed by (relative to currentTime of video context). | ||
* @param {number} currentValue - The value to start the transition at. | ||
* @param {number} targetValue - The value to transition to by endTime. | ||
* @param {String} propertyName - The name of the property to clear transitions on, if undefined clear all transitions on the node. | ||
* @param {String} propertyName - The name of the property to clear transitions on, if undefined default to "mix". | ||
*/ | ||
transition(startTime, endTime, targetValue, propertyName="mix"){ | ||
let transition = {start:startTime + this._currentTime, end:endTime + this._currentTime, target:targetValue, property:propertyName}; | ||
transition(startTime, endTime, currentValue, targetValue, propertyName="mix"){ | ||
let transition = {start:startTime + this._currentTime, end:endTime + this._currentTime, current:currentValue, target:targetValue, property:propertyName}; | ||
if (!this._doesTransitionFitOnTimeline(transition))return false; | ||
@@ -70,3 +71,3 @@ this._insertTransitionInTimeline(transition); | ||
for (let propertyName in this._transitions){ | ||
let value = this._initialPropertyValues[propertyName]; | ||
let value = this[propertyName]; //this._initialPropertyValues[propertyName]; | ||
let transitionActive = false; | ||
@@ -82,6 +83,6 @@ | ||
if (currentTime > transition.start && currentTime < transition.end){ | ||
let difference = transition.target - value; | ||
let difference = transition.target - transition.current; | ||
let progress = (this._currentTime - transition.start)/(transition.end - transition.start); | ||
transitionActive = true; | ||
this[propertyName] = value + (difference * progress); | ||
this[propertyName] = transition.current + (difference * progress); | ||
break; | ||
@@ -88,0 +89,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8680148
192338