Drag the background!

API: Webpage (r1)

API Uses canvas Graphics libraries AB framework Worlds using this API Starter Worlds
Webpage (r1) No None No 63 Worlds None


This API is for Worlds with no canvas. That is, the World is a web page with regular HTML elements.

This site is mostly about uploading JS (not HTML) to make a World which normally "runs" on a canvas element on a page. This API is different to the other APIs. It allows you make a World with no canvas.

This API has the following features:

  • It gives you a blank page, and you use JS to insert whatever HTML and CSS and data you want on the page.
  • Your World can just document.write HTML and CSS into the body.
  • The API sets a page title.
  • There is no run header, so as not to interfere with your page layout.
  • You reload and close the page like any other tab.
  • Links on the page open in the same window (not in a new window like in the canvas APIs).
  • Includes jQuery 3.3.1.
  • Loads up lots of CSS - all the CSS used on the AB login pages. At the risk of conflict with user CSS. (Later APIs load up minimal CSS.)

  • The style of the blank page is a body with margin 0 and padding 0. You can change it using JS like this:
     
      $('body').css( "margin", "20px" );
      $('body').css( "padding", "20px" );
    

Screenshots:

  • The screenshot does not assume there is a canvas. Instead it takes a screenshot of the HTML.
  • It uses the html2canvas library to build a screenshot of your page using JS.
  • The html2canvas library has some limitations and may not be able to accurately screenshot your page.

Templates



The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Website copyright Ancient Brain. 2018-2021.
Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
If you are interested in writing a programming course, textbook or tutorial videos, Ancient Brain is looking for partners. We will work with you, and integrate your course into the site. This is an opportunity for someone looking to develop a course or textbook to partner with a site to support it and promote it.