Scrawl.js - demonstration 005

Cloning a Block entity

Extensions: block

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


  1. create a block sprite, styling it as part of the creation process, using scrawl.newBlock()
  2. clone the sprite using Block.clone(), amending the cloned sprite's attributes
  3. display both Block sprites on canvas

Known browser issues: none

Result images:

image of expected test result