diff --git a/examples/drawing.html b/examples/drawing.html index c6ccec4..0c02ab1 100644 --- a/examples/drawing.html +++ b/examples/drawing.html @@ -60,13 +60,17 @@

Start drawing!

touch = this.touches[i]; - this.lineCap = 'round'; - this.lineJoin = 'round'; - this.fillStyle = this.strokeStyle = COLOURS[ i % COLOURS.length ]; - this.lineWidth = radius; - - // Draw using chained methods - this.beginPath() + this + // Setup multiple properties using a hash + .set({ + lineCap: 'round', + lineJoin: 'round', + lineWidth: radius + }) + // ...or set one by passing the property name followed by the value + .set( 'fillStyle', this.strokeStyle = COLOURS[ i % COLOURS.length ] ) + // Chain function calls together + .beginPath() .moveTo( touch.ox, touch.oy ) .lineTo( touch.x, touch.y ) .stroke(); diff --git a/examples/three.html b/examples/three.html index 810715a..03781fe 100644 --- a/examples/three.html +++ b/examples/three.html @@ -21,7 +21,7 @@

Using a THREE.js renderer context with sketch.js

View on Github - +