Working with Three.js Particle Systems - They're AWESOME!

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 107

  • @DesignCourse
    @DesignCourse  3 роки тому +49

    Enjoying the Three.js content? Subscribe up for more!

    • @moizkhalid2714
      @moizkhalid2714 3 роки тому

      Love your Three.js content

    • @Giovanni00831
      @Giovanni00831 3 роки тому +1

      can I ask, I don't find the cross.png there is a link?

    • @chaseray3592
      @chaseray3592 3 роки тому

      A tip : watch movies on Kaldrostream. Me and my gf have been using them for watching all kinds of movies during the lockdown.

    • @mosessamuel6918
      @mosessamuel6918 3 роки тому

      @Chase Ray Yea, I have been watching on KaldroStream for since november myself :)

    • @tasya_nabila
      @tasya_nabila 3 роки тому

      I can't run the npm i and npm run dev. I kept getting error 😭

  • @Asuuri
    @Asuuri 3 роки тому +15

    The three.js Series is so amazing😍👍🏻

  • @romankonecny7106
    @romankonecny7106 Рік тому +1

    And it all comes back down to a donut, the holy grail of frontend programming

  • @guillermomedel1575
    @guillermomedel1575 3 роки тому +3

    32 minute video. Yet it takes me 2 hours to finish since I stare if into the particles. Good stuff

  • @dooza
    @dooza 2 роки тому

    How perfect that I discovered this video! I was literally thinking of making a particle donut as a background for my website.

  • @michaelvaughan2888
    @michaelvaughan2888 Рік тому

    seriously the best tutorial on particles, and trust me, I watched a lot of them because I was having a tough time getting mine to work how I wanted, this tutorial is top knotch!

  • @alexanderbarrera9906
    @alexanderbarrera9906 3 роки тому +1

    This is exactly what I was looking for to prettify a little solar system in my portfolio. Thank you good sir!

  • @Giovanni00831
    @Giovanni00831 3 роки тому

    I need more! I'm studying that at the university but now finally I'm learning something!

  • @Frankslaboratory
    @Frankslaboratory 3 роки тому +3

    I love particle systems, looking forward to see what you do with it, will watch later today

    • @stanleychukwu7424
      @stanleychukwu7424 3 роки тому

      frankieeeee is here, big fan of yours man!!! subscribed to your channel and learning alot, actually learning tons from you! you rock Frank!!!

  • @thelud400
    @thelud400 3 роки тому +2

    It would be so cool to mix particles and some noise/random movements

  • @parthapratimchoudhury1332
    @parthapratimchoudhury1332 3 роки тому

    Please provide more three js content.your contents are amazing

  • @pavan4917
    @pavan4917 3 роки тому

    Thank you Sir. I have never seen like this videos onThree.js.👌🏻

  • @rukkiecodes
    @rukkiecodes 3 роки тому +1

    Can't wait for the next one

  • @Ryskorrel
    @Ryskorrel 2 роки тому +2

    18:28 not necessarily 60 times a second. It is more dependant on your screen refresh rate.
    This is why a lot of libraries include a wrapper for this which provides a delta time since the last repaint.

    • @jituraiyan
      @jituraiyan Рік тому

      It'll depend on the device capacity... So, if your device has higher capacity then higher FPS wouldn't be a problem. On the other hand for low config device, the fps will be lower automatically... Also for updating staff, he uses clock so that the animation don't go faster/slower depending on the device's fps capacity.

  • @먐먐-m1g
    @먐먐-m1g 2 роки тому +1

    I managed to make a animating text!! Thank you! 😆

  • @ranzen2269
    @ranzen2269 3 роки тому

    Thank you a lot, I'm learning this library thanks to you, maybe later I''mma doing my own tutorial to the Spanish community

  • @neomarkdigitalsolutions1646
    @neomarkdigitalsolutions1646 2 роки тому

    Wow - I learned a ton, thank you so much for sharing!

  • @mariaprincesss3111
    @mariaprincesss3111 3 роки тому

    Thank you! This is very helpful. Looking forward for more Three.js tutorials! :)

  • @lundfoci
    @lundfoci 3 роки тому

    Thank you! This is an awesome and easy to follow tutorial. Learned a lot from it.

  • @orsbert
    @orsbert 2 роки тому

    The keyboard sounds are satisfying

  • @seanastro5549
    @seanastro5549 3 роки тому

    Some very nice effects, thanks ! Would love to see some text exploding into particles or vice versa.

  • @LeftClickMage
    @LeftClickMage 2 місяці тому

    Using elapsed time makes the particles move faster the more time that passes.

  • @MarcioMarquesdeSouza
    @MarcioMarquesdeSouza 2 роки тому

    Extremely useful and well done. Thanks a lot!!!!!

  • @amrikmalhans
    @amrikmalhans 3 роки тому

    Please keep this going

  • @timr86868
    @timr86868 3 роки тому +6

    There's a logic error with the code that rotates the particle system. ElapsedTime continually grows as the program runs, so if you leave it running for a few minutes, even a small mouse movement makes the system rotate ridiculously fast.
    I solved this by changing stuff around to use clock.getDelta() instead of clock.getElapsedTime()
    particlesMesh.rotation.y -= (((mouseY + 100) * 0.0002) * deltaTime)
    Not the exact same effect, but it doesn't change over time. If anyone has a better solution, please do let me know.

    • @shrutigupta445
      @shrutigupta445 3 роки тому

      Appreciate this!

    • @quintonnistico9347
      @quintonnistico9347 3 роки тому

      I saw your comment thanks. Can you paste the code snippet exactly how you put it? I tried replacing "elapsedTime" with "deltaTime" as well as replacing "clock.getElapsedTime()" with "clock.getDelta" but it doesn't rotate passively at all.

    • @timr86868
      @timr86868 3 роки тому +1

      @@quintonnistico9347 you also need to change the line that changes the rotation to use a += or -= instead of an = since we're now using delta time (which should stay roughly the same each frame) you have to add it to the previous value (hence += or -= depending on whether you want it to rotate left or right)

    • @nishitsarvaiya1474
      @nishitsarvaiya1474 3 роки тому +3

      @Tim Wolf Hi Tim. Thanks for providing us this solution.
      I added some modifications of my own to make 2 things =>
      1. Run the initial rotation only once in the beginning.
      2. Be able to move the particles in all the 4 directions in the same speed.
      Code =>
      let mouseX = 0,
      mouseY = 0, flag = 0;
      function moveParticles(e) {
      mouseX = e.clientX / canvas.width * 20 - 10;
      mouseY = e.clientY / canvas.height * 20 - 10;
      flag = 1;
      }
      const tick = () => {
      const deltaTime = clock.getDelta();
      if(flag == 0) {
      particlesField.rotation.y += deltaTime * 0.05;
      }
      particlesField.rotation.x -= mouseY * deltaTime * 0.008;
      particlesField.rotation.y -= mouseX * deltaTime * 0.008;
      renderer.render(scene, camera);
      window.requestAnimationFrame(tick);
      };
      Here is my Codepen link you can check it out if you want. codepen.io/nishit-sarvaiya/full/gORPjwR

    • @omadden234
      @omadden234 3 роки тому +1

      @@nishitsarvaiya1474 this worked for me! thanks!

  • @theshredguitarist25
    @theshredguitarist25 3 роки тому +2

    How do we replace the cross.png with a different png?

  • @benjamingaboury897
    @benjamingaboury897 3 роки тому

    So interesting! I love ThreeJs 😍👍🏻

  • @rukkiecodes
    @rukkiecodes 3 роки тому

    About time. I waited so long for this.
    Keep it coming 😏😏😏😏

  • @xNoraDestiny
    @xNoraDestiny 2 роки тому

    Great job ! Can you do a tutorial to explain how to interact with particules on an image ?

  • @Rhidayah
    @Rhidayah Рік тому

    Blender Guru,, proud of your donut

  • @khadimhusen
    @khadimhusen 3 роки тому +3

    Please use bigger font so we can see it.

    • @CanDooper
      @CanDooper 3 роки тому +1

      Agree, VS code seems a bit blurry in this vid so hard to read

  • @stanleychukwu7424
    @stanleychukwu7424 3 роки тому

    you're a great teacher!!!! thank you!!!

  • @SpriteTheDude
    @SpriteTheDude Рік тому

    great tutorial, thanks !

  • @ayanali6740
    @ayanali6740 3 роки тому

    make a series on react-three-fiber

  • @mariaklimenko6090
    @mariaklimenko6090 2 роки тому

    love your chanel, thank you!!!!!😍

  • @cdey3886
    @cdey3886 3 роки тому

    niceeeee that would look great on my website

  • @arkondigital1496
    @arkondigital1496 2 роки тому

    11:43 I can feel your pain bro

  • @ronolds6505
    @ronolds6505 5 місяців тому

    I downloaded using npm and when I opened the HTML file no torus was on the screen. So, I downloaded the ZIP file and the same thing happened. Not sure what I'm missing. ??

  • @jasonkarjadi4034
    @jasonkarjadi4034 3 роки тому

    I wonder if there will be a course for custom shaders

  • @quintonnistico9347
    @quintonnistico9347 3 роки тому +1

    I ran into a strange issue! When I do: if (mouseX > 0) {
    particlesMesh.rotation.x = mouseY * (elapsedTime * 0.00004)
    particlesMesh.rotation.y = mouseX * (elapsedTime * 0.00004)
    }
    What happens is the mouse rotation of particlesmesh speeds up over time. It starts really slow, but as time goes on it gets faster and faster. Any ideas?

    • @timr86868
      @timr86868 3 роки тому

      Check out my comment above.

  • @mayursmahajan
    @mayursmahajan 3 роки тому

    how can I make this movements for the particlsesMesh more smoother
    BTW absolutely Love your content! Lots of Love from India

  • @GH4L
    @GH4L 3 роки тому +2

    by any chance does/can anyone send me a link of the cross.png file he used for this project? i can't find any good quality ones online. the one i am currently using is a little blurry/opaque. would greatly appreciate it

    • @unrecited
      @unrecited 3 роки тому

      so yours actually loaded???? I dont get it smh

  • @theman7050
    @theman7050 2 роки тому

    Would using instancedBufferGeometry have further improved performance here?

  • @loveuketoo
    @loveuketoo 3 роки тому

    Thanks for the tutorial, one quick question:
    I've used the particles for a background for a scrolling web-page. How do I prevent the page from being able to scroll upwards for eternity?
    Have tried a conditional on the mousewheel, but it makes the scrollbar get stuck at the top.

  • @igoreksazonov
    @igoreksazonov 3 роки тому +1

    threejs api changing every month and dont have a stable one, so the code worked a year ago not currently working =(((

    •  3 роки тому

      You can download the version you want then put it in your main files, this should help you bro , even if the code you used deprecated, your projects is gonna survive, but of course new versions can mean more security and new methods

  • @tunahanergul9945
    @tunahanergul9945 9 місяців тому

    how can I add a background image to an 3d object

  • @andrealiu5106
    @andrealiu5106 2 роки тому

    Is there an advantage to adding GSAP CDN and code in html vs the js file?

  • @activegaming6639
    @activegaming6639 3 роки тому

    i get this when i type cd code
    -
    -
    -
    -
    cd : Cannot find path 'C:\Users\Oscar\code' because it does not exist.
    At line:1 char:1
    + cd code
    + ~~~~~~~
    + CategoryInfo : ObjectNotFound: (C:\Users\Oscar\code:String) [Set-Location], ItemN
    otFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

  • @vitusstockholm4984
    @vitusstockholm4984 2 роки тому +1

    would be great if smbd could share cross.png file,

  • @lennartv.1529
    @lennartv.1529 3 роки тому

    The CSS/HTML part at the end isnt working for me. Only the line is visible. I cant figure out why...

    • @lennartv.1529
      @lennartv.1529 3 роки тому

      Does it still work with the newer gsap version?

  • @juncando
    @juncando 3 роки тому

    Fantastic :)

  • @kiranwicksteed3972
    @kiranwicksteed3972 3 роки тому

    Great Tut. What if I have an existing project and want to use this on one of my existing pages. Is this possible?

    • @kiranwicksteed3972
      @kiranwicksteed3972 3 роки тому

      Manually imported dependencies if anyone else is wondering

  • @matthewstorey3320
    @matthewstorey3320 3 роки тому

    does anyone have a github with the full version of this? Ive been over mine a few times and it still doesnt work, mainly when adding the if statement for the animation.

  • @sakhile_nkomo
    @sakhile_nkomo 2 роки тому

    "Obviously that doesn't do shit" SUBSCRIBED

  • @pranaykrmajee1432
    @pranaykrmajee1432 3 роки тому +1

    where is the cross.png ? :")

  • @ozioma
    @ozioma 2 роки тому

    too cool

  • @thunderstack5365
    @thunderstack5365 3 роки тому

    Wow cool can we use our own images

  • @safdarawn902
    @safdarawn902 3 роки тому +1

    which theme for vs code are you using please bro if anybody knows reply me thanks in advancde :D

  • @P8860
    @P8860 3 роки тому

    Do you recommend using shaders or GSAP for animation?

    • @DesignCourse
      @DesignCourse  3 роки тому +1

      I recommend using both, depending on the objective. So, it all depends on what the goal is!

  • @joelmik8945
    @joelmik8945 3 роки тому

    anyone else got the same problem where you can't add a map of the texture to the PointsMaterial?

    • @FranciscoJavierRincon
      @FranciscoJavierRincon 3 роки тому

      yes, i resolve it writing all in one line: const cross = new THREE.TextureLoader().load('./sound-waves.png');

  • @neildrabinski3330
    @neildrabinski3330 Рік тому

    +1 for the Akron shirt #akronthefup

  • @edenmyson6401
    @edenmyson6401 3 роки тому

    Hey, could someone explain to me why at 12:07 using " - 0.5" places the points on the center of the screen?
    I really like all the topics of your videos, but I find there is sometimes little or no explainations

    • @catalin1122
      @catalin1122 3 роки тому

      Math.random() gives you a float value between 0.0 and 1.0. He substracts 0.5 to have a value in the -0.5 to 0.5 range because the origin is in the middle of the torus.

    • @edenmyson6401
      @edenmyson6401 3 роки тому

      @@catalin1122 thanks a lot! Love the escape the fate pic heh

    • @catalin1122
      @catalin1122 3 роки тому

      @@edenmyson6401 you're welcome. Love your synthwave pic as well!

  • @vxcode9536
    @vxcode9536 2 роки тому

    Make three js 3D slide show cloth image

  • @besooab8810
    @besooab8810 2 роки тому

    Can we have the source code ?

  • @matthewjames-rodriguez8982
    @matthewjames-rodriguez8982 3 роки тому

    mobile responsive?

  • @bkalkuz
    @bkalkuz 3 роки тому +4

    excuse me to being so honest but;
    can't you put screens close to each other which you are reading the code from and you are following your code to? your looks between reading screen and coding screen feels me disturb. like you are explaining something but deeply do not know about what or how it is and just reading to tell anothers... not natural.

    • @unrecited
      @unrecited 3 роки тому

      lmao - does it really matter? There are very few folks on UA-cam coding from the top of their head, and if they are, it DEFINITELY doesn't go over as smooth as this does. You calling that out really didn't make him look bad one bit - it just makes you look like the clown shoe of a prick you are. All the main UA-cam creators ALL print their project tutorial code or pull it up on screen and use it for reference during the tutorials, and the ones who dont, have like hour long videos of them thinking which is cool two depending on what type of content your looking for. This video wasn't made based on what 'disturbs' you so dont watch it if that's the case - excuse me for being so honest.

    • @bkalkuz
      @bkalkuz 3 роки тому

      ​@@unrecited is it your professionality or doing this as a hobby to been so useless like this?

  • @vampirejs758
    @vampirejs758 3 роки тому

    Hairy Gary

  • @flelfwastaken
    @flelfwastaken 3 роки тому +2

    You can make your life easier if you do the posArray like this :
    const posArray = new Float32Array(5000 * 3).fill().map(() => THREE.MathUtils.randFloatSpread(10))

  • @TheRealJuggaloJoel
    @TheRealJuggaloJoel 3 роки тому

    wont change anything. No color, no picture. I even made tiny png with alpha backs. Nothing.
    h1,
    p {
    flex-basis: 0;
    flex-grow: 1;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    breaks the code.
    Anyone know why? I've watched through a few times now.

    • @ranzen2269
      @ranzen2269 3 роки тому +1

      idk If you've already resolved it, but your problem it's in this line: const cross = loader.load('/cross.png'), you forgot a point -> const cross = loader.load('./cross.png'). And h1,p{} looks good to me.