Author Topic: p5js  (Read 8916 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
p5js
« 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.

* p5js.bas-master.zip (Filesize: 114.66 KB, Downloads: 372)

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: p5js
« Reply #1 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?
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: p5js
« Reply #2 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/

Offline Phlashlite

  • Newbie
  • Posts: 50
    • View Profile
Re: p5js
« Reply #3 on: February 02, 2022, 08:05:12 pm »
That's pretty amazing!

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: p5js
« Reply #4 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!
Logic is the beginning of wisdom.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: p5js
« Reply #5 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

FellippeHeitor

  • Guest
Re: p5js
« Reply #6 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

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: p5js
« Reply #7 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

Offline Phlashlite

  • Newbie
  • Posts: 50
    • View Profile
Re: p5js
« Reply #8 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!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: p5js
« Reply #9 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.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: p5js
« Reply #10 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!