Skip to content

dynamic-learning/p5-web-editor-dynamiclearning-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

p5-web-editor-dynamiclearning-connect

Class for connecting dynamic learning with p5 web editor sketch

Add this js file for connecting a sketch to dynamic learning to save the state of a simulation.

Code sample

let dl;
function setup() {
  dl = new DL();
  dl.load(initialize)
  // More code
}
const initialize = (data) => {
  if(!data) {
    // Initialize the sketch by default values
  } else {
    // Initialize the sketch by using data object
  }
}
const onSomeEvent = () => {
  dl.save(dataToSaveForTheSketch)
  // More code
}

Refer the example in p5 web editor

About

Class for connecting dynamic learning with p5 web editor sketch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published