example.js
function paperLoadedInit() {
  console.log('Paper ready!');

  // Set center adjusters based on size of canvas
  $('#hcenter').attr({
    value: 0,
    min: -(robopaint.canvas.width / 2),
    max: robopaint.canvas.width / 2
  });

  $('#vcenter').attr({
    value: 0,
    min: -(robopaint.canvas.height / 2),
    max: robopaint.canvas.height / 2
  });

  $(window).resize();

  // Use mode settings management on all "managed" class items. This
  // saves/loads settings from/into the elements on change/init.
  mode.settings.$manage('.managed');

  // With Paper ready, send a single up to fill values for buffer & pen.
  mode.run('up');
}
function paperLoadedInit() {
  console.log('Paper ready!');

  // Set center adjusters based on size of canvas
  $('#hcenter').attr({
    value: 0,
    min: -(robopaint.canvas.width / 2),
    max: robopaint.canvas.width / 2
  });

  $('#vcenter').attr({
    value: 0,
    min: -(robopaint.canvas.height / 2),
    max: robopaint.canvas.height / 2
  });

  $(window).resize();

  // Use mode settings management on all "managed" class items. This
  // saves/loads settings from/into the elements on change/init.
  mode.settings.$manage('.managed');

  // With Paper ready, send a single up to fill values for buffer & pen.
  mode.run('up');
}
function paperLoadedInit ( ) { console . log ( 'Paper ready!' ) ; // Set center adjusters based on size of canvas $ ( '#hcenter' ) . attr ( { value : 0 , min : - ( robopaint . canvas . width / 2 ) , max : robopaint . canvas . width / 2 } ) ; $ ( '#vcenter' ) . attr ( { value : 0 , min : - ( robopaint . canvas . height / 2 ) , max : robopaint . canvas . height / 2 } ) ; $ ( window ) . resize ( ) ; // Use mode settings management on all "managed" class items. This // saves/loads settings from/into the elements on change/init. mode . settings . $manage ( '.managed' ) ; // With Paper ready, send a single up to fill values for buffer & pen. mode . run ( 'up' ) ; }
Callback that tells us that our Paper.js canvas is ready!
Callback that tells us that our Paper . js canvas is ready!