QB64.org Forum

Active Forums => Programs => Topic started by: bplus on February 02, 2022, 03:04:32 pm

Title: p5js
Post by: bplus on February 02, 2022, 03:04:32 pm
Here is really nice set of tools Ashish and Fellippe setup some time ago. p5js is referred to allot and so I thought it would be good to post an updated set that works for QB64 v2+

@Qwerkey I recommend this QB64 Classic for the library.

Title: Re: p5js
Post by: johnno56 on February 02, 2022, 04:29:54 pm
Um... I am assuming that this library would require a p5.js type script... I am guessing, as there does not seem to be any instructions... When I run the program all I get is an 'untitled' white windowed display. Or perhaps I am doing something wrong?
Title: Re: p5js
Post by: bplus on February 02, 2022, 04:37:15 pm
The bas file at the top of the directory is a library of tools. See the examples that include that library and demo how to use the tools. This might be for someone experienced with QB64 and branching out to Java Script? Except there are tools that are handy for use in QB64.

There was a tutorial that uses these tools to teach coding. I think you could find it under Daniel Shiffman.
https://thecodingtrain.com/beginners/p5js/
Title: Re: p5js
Post by: Phlashlite on February 02, 2022, 08:05:12 pm
That's pretty amazing!
Title: Re: p5js
Post by: johnno56 on February 03, 2022, 03:27:28 am
Ah. The coding train... Good teacher... I have tinkered with a bit of p5js... I am not much of a pupil... lol  He certainly makes the lessons fun!
Title: Re: p5js
Post by: Qwerkey on February 03, 2022, 05:58:49 am
Here is really nice set of tools Ashish and Fellippe setup some time ago. p5js is referred to allot and so I thought it would be good to post an updated set that works for QB64 v2+

@Qwerkey I recommend this QB64 Classic for the library.

On my ToDo List
Title: Re: p5js
Post by: FellippeHeitor on February 03, 2022, 03:14:48 pm
Thanks, @bplus. Today I've updated our code repository so the library can also be used with the latest version of QB64: https://github.com/AshishKingdom/p5js.bas
Title: Re: p5js
Post by: bplus on February 03, 2022, 03:19:35 pm
Hi @FellippeHeitor

Yeah I am watching

and reacquainting myself with this project. I looked to it for Dot Product for arrays to do real Perlin but found it missing or under some other name.

Dang this guy teaches by way of Classes, how to do a method inside a Class? eeeh
Title: Re: p5js
Post by: Phlashlite on February 03, 2022, 05:43:33 pm
I like learning the code in a different language.  It forces me to think about how to do it in QB64.  And, I end up learning 2 languages at the same time instead of just cut and pasting what I need or want to use.  It's a win win for me!
Title: Re: p5js
Post by: bplus on February 03, 2022, 06:30:02 pm
I like learning the code in a different language.  It forces me to think about how to do it in QB64.  And, I end up learning 2 languages at the same time instead of just cut and pasting what I need or want to use.  It's a win win for me!

Absolutely! I have learned several Basics, sorry to say never got into FreeBasic because got drawn away to QB64.
Title: Re: p5js
Post by: Qwerkey on April 06, 2022, 11:22:33 am
Hi Fellippe

Yeah I am watching - see video above -
and reacquainting myself with this project. I looked to it for Dot Product for arrays to do real Perlin but found it missing or under some other name.

Dang this guy teaches by way of Classes, how to do a method inside a Class? eeeh

The guy in the video talks about adding/subtracting Position and Velocity vectors.  Those vectors are dimensionally dissimilar and cannot be added/subtracted.  There's pedantry for you!