paysage icon indicating copy to clipboard operation
paysage copied to clipboard

Use "client" and "mediatype" value in Code Objects to selectively show and/or choose how to render code

Open juliendorra opened this issue 9 years ago • 1 comments

add an optional client value to the Code Object: "client": "creatureprogrammer" for creatures programmed with Code Créatures workshop dedicated page Or "client": "programmer" for the generic objects created from the generic programmer

And a mediatype (mime) value : "mediatype": "text/processing" or "mediatype": "text/javascript"

This is useful because:

  • the client (the code editor page for example) can decide to edit only the code objects it created itself, if it doesn't know how to handle the rest.
  • the renderer (playground page) can make informed choices on how to render things. Example: d3js code doesn't need a canvas and could be rendered without using one.

juliendorra avatar Nov 30 '15 13:11 juliendorra

client and mediatype are now send from programmer (standard) and creature programmer and stored server side. But they are not actually used neither by the creature programmer (where it could be useful to sort creatures and standard processing script) nor the renderer (where it could be useful to render differently say d3js, processing pde script and p5js scripts)

juliendorra avatar Dec 14 '15 15:12 juliendorra