Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: leegee/MooTools-PcmImage
base: 59b76cea45
...
head fork: leegee/MooTools-PcmImage
compare: 49ffff077a
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 15 additions and 10 deletions.
  1. +7 −5 Demo/index.html
  2. +8 −5 Source/PcmImage.js
View
12 Demo/index.html
@@ -63,7 +63,6 @@
</head>
<body>
-
<header>
<h1>PcmImage for MooTools / HTML5</h1>
</header>
@@ -117,7 +116,7 @@
with an <code>img</code> element, which results in
the loss of the dynamic overlay.
</p>
-
+
<!--
<figure>
<figcaption>
@@ -130,7 +129,7 @@
></div>
</figure>
-->
-
+
<figure>
<figcaption>
<p>HTML default, style from class:</p>
@@ -247,11 +246,14 @@
element: document.id('soundtest-gradient'),
uri: 'pluck.wav',
onCanvasLoaded: function(){
- var gradient=this.cctx.createLinearGradient(0,0, this.canvas.width, 0);
+ var gradient=this.cctx.createLinearGradient(
+ 0,0,
+ this.canvas.width, 0
+ );
gradient.addColorStop("0","blue");
gradient.addColorStop("0.5","magenta");
gradient.addColorStop("1.0","red");
- this.options.strokeStyle = gradient;
+ this.options.strokestyle = gradient;
}
} );</code>
</pre>
View
13 Source/PcmImage.js
@@ -101,7 +101,6 @@ var PcmImage = new Class({
this.overlay.fg.r = parseInt( '0x'+c.substr(1,2) );
this.overlay.fg.g = parseInt( '0x'+c.substr(3,2) );
this.overlay.fg.b = parseInt( '0x'+c.substr(5,2) );
- console.log( this.overlay);
}
if (this.options.asimg
@@ -297,11 +296,15 @@ var PcmImage = new Class({
this.overlay.lastX = this.overlay.inc * -1;
this.overlay.thisX = 0;
- this.overlay.inc /= 1.8; // nearly
+ // Why? What's wrong with my maths?
+ this.overlay.inc /= 1.666666666666; // nearly
- //console.log( this.width );
- //console.log( this.buffer.duration * 1000);
- //console.log( this.overlay.inc * this.overlayInterval);
+ /*
+ console.log( 'width '+this.width );
+ console.log( 'duration '+(this.buffer.duration * 1000));
+ console.log( this.overlay.inc +' * '+ this.overlayInterval +' = ');
+ console.log( this.overlayInterval * this.overlay.inc );
+ */
this.renderTimer = this.overlayImg.periodical(
this.overlayInterval,

No commit comments for this range

Something went wrong with that request. Please try again.