Skip to content
padolsey edited this page Jul 3, 2012 · 1 revision

Using a built version of BonsaiJS:

<div id="movie"></div>

<script src="bonsai.js"></script>
<script>
  bonsai.run(
    document.getElementById('movie'),
    'path/to/my_movie.js',
    {
      // Extra config
      width: 500,
      height: 400
    }
  );
</script>

Available configuration options:

  • width:Number - Width of movie in pixels
  • height:Number - Height of movie in pixels
  • framerate:Number - Framerate of movie (FPS)
  • url:String - URL to be loaded [usually passed as second arg to bonsai.run()]
  • urls:String[] - URLs to be loaded (multiple)
  • plugins:String[] - Plugins to be loaded (multiple)
  • baseUrl:String - Base URL for loading movie URLs and plugins
  • assetBaseUrl:String - Base URL for assets loaded within movies/plugins (defaults to baseUrl)
Clone this wiki locally