API: P5 (AB) (r1)

API Uses canvas Graphics libraries AB framework Worlds using this API Starter Worlds
P5 (AB) (r1) Yes P5 Yes 52 Worlds Starter Worlds


This API is for P5 Worlds. It comes with an Ancient Brain framework to make writing Worlds easier. This would require changes to existing P5 worlds. So this is really for writing new P5 Worlds for this platform.

This API has the following features:



Templates


ABWorld

This API defines a global variable "ABWorld" with functionality as follows.
 

 ABWorld;       // instance of class ABWorldClass - basic functionality for this API
  
  
 ABWorld.init ( color );             
  
   // create canvas with some background color	
   // this defines a setup() function and calls P5's createCanvas() function
  
	
 ABWorld.p5canvas;	
	
   // The object returned by P5's createCanvas() function


 ABWorld.canvas;		
	
   // The object corresponding to p5canvas.canvas 
				

Do not define a setup() function

P5 uses global functions setup() and draw().
This API provides AB support. It defines its own setup() function internally to create the canvas.
Hence in your World: Also:

Examples

Examples of Worlds that use this API:


Scare the Fishes!
217 runs ♦ 2 likes
By Enhanced  
Created: 2 Aug 2018
Modified: 17 Sep 2023
Scare the fishes with your mouse ! If you click they will flee even further away. Includes twea...
The Game of Life
746 runs ♦ 0 likes
By Enhanced  
Created: 9 Jul 2018
Modified: 17 Sep 2023
The famous Game of Life. Click on the screen to place the initial cells and then click start ! ...