CodingTrain / CodingTrain/Suggestion-Box

p5: Instance Mode, Multiple js-files and Library Design

Aperta
#541 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
570
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello everybody,

Small is beautiful and I like examples that take only one screen to show. But now that my projects grow bigger, I want to split code into different files. One 'class' per file. Daniel Shiffman explains how in this video: [Multiple js Files - p5.js Tutorial.](https://www.youtube.com/watch?v=Yk18ZKvXBj4) Excellent

Also I am interested in 'namespacing' my p5-projects, because I am in the habit of giving all my Box-objects the name 'boxy', which is kind of silly, though it could be worse. I found one tutorial on [Instance Mode (aka "namespacing") - p5.js Tutorial.](https://www.youtube.com/watch?v=Su792jEauZg)

Now I want to combine these 2 approaches and have my one-per-file objects interact with p5 in Instance Mode.

Ultimately I would like to be confident enough to write my own p5-Library. A tiny example of how to set up a multi-file, namespaced p5-library that behaves well with other code would be of great help. I've got things to share!

Thanks to Daniel Shiffman for the very interesting tutorials, that I watch with a smile and with respect.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Review the linked tutorials on multiple JavaScript files and p5.js Instance Mode first. Define a small multi-file, namespaced p5.js library example that can interact safely with other code; done means the example is documented and demonstrates the requested combination clearly.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.