Scrawl.js - demonstration 010

Styling a Wheel entity, and its clone

Extensions: wheel

Scenario: create a Wheel sprite and clone it, changing the cloned sprite's attributes


  1. create a Wheel sprite, styling it as part of the creation process, using scrawl.newWheel()
  2. clone the sprite using Wheel.clone(), amending the cloned sprite's attributes - in particular startAngle, endAngle and includeCenter
  3. display both Wheel sprites on canvas

Known browser issues: none

Result images:

image of expected test result