Three.js Crash Course For Beginners | Create This Awesome 3D Website!

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • BLACK FRIDAY SALE 40% OFF ALL COURSES 🔥🔥🔥
    developedbyed....
    USE COUPON: BF40
    Today we are going to learn how to use Three.js, which is a library on top of webgl that allows you to create immersive 3D Websites with just a few lines of code. This is a beginner tutorial on how to learn Three.js starting from absolute scratch. This will be a potential series where we dive deeper into Three.js but also learning how to model with blender.
    🛴 Follow me on:
    Twitter: / developedbyed
    Instagram: / developedbyed
    Github: github.com/dev...
    #coding

КОМЕНТАРІ • 334

  • @developedbyed
    @developedbyed  Рік тому +154

    Definitely keen on making a series out of this, hopefully progressing into making full blown 3D Websites. Let me know if you are interested 🔥🔥
    Black Friday sale is still on so make sure you get it before Christmas 🚀

    • @Web-Dev-Codi
      @Web-Dev-Codi Рік тому +2

      Absolutely

    • @md.asifal-mahmud5952
      @md.asifal-mahmud5952 Рік тому +1

      Make it free

    • @sh.roy.855
      @sh.roy.855 Рік тому +1

      It would be extremely beneficial in learning Three JS, Ed. Thank you for making this video.

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

      Such a massive YES!!!, youtube series or a course, doesn't matter .. CAN"T WAIT! I have been looking for this for so long...

    • @HarpreetSingh-jd3tu
      @HarpreetSingh-jd3tu Рік тому

      Yeah I will purchase your course if you made something focused on 3d

  • @Lobott
    @Lobott 9 місяців тому +5

    man you're my new favourite youtuber, never heard someone swearing and sneezing during a code tutorial, it makes it so real

  • @LeeMandM
    @LeeMandM Рік тому +145

    Thank you so much, it was great to follow along with the tutorial.
    I will point out some things that happened to me in hopes it could help someone :)
    1. I don't know why but for me, the PointLight didn't work at the values (0xffffff, 1, 100), I couldn't see the sphere at all everything was black. I had to put the intensity at 70 instead: new THREE.PointLight(0xffffff, 70, 100, 1.7);
    2. In the "mouse animation colorrr" you can simply do r: rgb[0], as you mentioned, the problem is when working with graphics libraries like THREE.js and animation libraries like GSAP, the function expects normalized values for colors [0-1]. If you don't multiply by 255 and just use Math.round((e.pageX / sizes.width)) you can use them directly, no need for that extra variable newColor.

    • @neverpresent
      @neverpresent Рік тому +12

      life saver, thanks a lot!

    • @u.tassinari2916
      @u.tassinari2916 Рік тому +4

      same for me, this issue have to be explained, if someone knows... (thank you @LeeMandM)

    • @smydo1164
      @smydo1164 Рік тому +3

      You can replace 0xffffff to 0xFFFFFF its just the maj who disturb the js

    • @honeypot11
      @honeypot11 11 місяців тому

      it helped me thank u!

    • @07sunny10
      @07sunny10 11 місяців тому

      Helpful. I had the same situation. Thanks

  • @voidemon490
    @voidemon490 Рік тому +2

    Hey I just learnt that you can pass the color directly if the values are between 0 and 1 which is what THREE.Color does it converts the rgb values to a value between 0 and 1.
    Code:
    const rgb = {
    r: Math.round(e.clientX / dimensions.width),
    g: Math.round(e.clientY / dimensions.height),
    b: 0.6,
    };
    gsap.to(mesh.material.color, rgb);

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

      I discovered this as well from their docs, but just to note, it works better if you remove the Math.round :)

  • @luismariovaldezlopez7065
    @luismariovaldezlopez7065 Місяць тому +8

    If the sphere is not showing, you should set THREE.PointLight(, 100, 100);
    Looks like they updated something after the video was made.

    • @sehrishkhan8865
      @sehrishkhan8865 29 днів тому

      Thank you 🥺

    • @MCbedrockYT
      @MCbedrockYT 26 днів тому

      thanks so much bro couldn't work out why it was working

    • @GuessWho189
      @GuessWho189 22 дні тому

      Thanks man how did that work?

  • @aceflash0r
    @aceflash0r Рік тому +6

    This was amazing. Easy to follow, easy to understand the concepts. I started learning THREEJS and this video was a godsend to start. 100% would watch more, from basics to more advanced stuff. Great content as always.

  • @sanicspeed1672
    @sanicspeed1672 6 місяців тому +2

    The reason why its black for you is because the light isnt strong enough. Use a higher value for the second parameter in your light, use a basic material or use a directional light

    • @zarghamaijaz5933
      @zarghamaijaz5933 3 місяці тому

      Thank you so much bro. It worked for me. I used 100.
      But I have a question. How come the value "1" worked for Ed but not for me?

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

      bro saved me so much time 🙏

  • @mykeleze
    @mykeleze Рік тому +44

    I have already liked the video before watching because I know you won't disappoint and you didn't.

    • @kolavithonduraski5031
      @kolavithonduraski5031 Рік тому +3

      i was disappointed... it was only around 40min. long.... we need more of this good stuff 😄😄😄

    • @mykeleze
      @mykeleze Рік тому +2

      @@kolavithonduraski5031 🤣🤣🤣... Yeah

  • @lucid2232
    @lucid2232 Рік тому +3

    thank you! been looking for threejs tutorial and yours come with the perfect timing. this tutorial is the best one I've seen so far

  • @NNNedlog
    @NNNedlog 6 місяців тому

    I'm really grateful for this tutorial. The way you explain is so easy to follow along. Because of your tailwind tutorial, it's my go-to for styling, and in a few months time, I'll be back to say the same thing on three.js.
    Thanks for all you do

  • @justiceasuelimen
    @justiceasuelimen Рік тому +5

    Great job 👍, but I didn't understand how you created vite project at the beginning. I don't know the framework whether it's vanilla or react. Thanks 😊.

  • @waltermelo1033
    @waltermelo1033 10 місяців тому +5

    I'm getting a problem here since yesterday. if someone is not seeing the green ball at all. increase the intensity of the pointlight at the second parameter (I used 100 and works well. don't know why)

  • @ryokogreg
    @ryokogreg Рік тому +7

    it would be awesome to have a Tuto that show what we need to instal ( like vanilla Js , node JS.... ) for the very beginer , thank you

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

    Please do more of ThreeJS videos. Thank You in advance.

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

    Thank you so much for this tutorial. I really enjoyed you style of teaching. You are very clear easy to follow along and you don't hide code or techniques. You are indeed one of the best teachers on here. Please continue to make more videos. I am new to three js. If you knnow how to do the water reflection rendering please consider making videos on the subject.

  • @sayakraha12
    @sayakraha12 Рік тому +35

    Just awesome explanation. Not unlike other youtubers who write a predetermined code on their console, you do errors and explain them nicely. Best webdev youtuber rn.

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

    Why not for the third rgb colour not make ‘let b = x + y; if(b > 2) {b/=2} and assign b as third value this way when both red and green will be 255 blue will be 255 when you adjust red and green blue will be automatically adjusted for the third dimension you will definitely will have more colours but I don’t think you’ll have blue I will experiment with this, thank you for great video

  • @rxrider1451
    @rxrider1451 Рік тому +4

    I understand what you're saying about the context of units being arbitrary at 12:25...
    But in reality, I believe those units are in pixels (px) by default.
    Please correct me if I'm wrong👍.

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

    List style of get the fuck out caught me completly off guard. Cracked me up!

  • @em-arko
    @em-arko 2 місяці тому

    13:31 here we go we have our ball showing up on the screen 💀🍒

  • @jake221
    @jake221 Рік тому +7

    I think more blender and three JS Tutorials would be kindly appreciated 😊

  • @numaanjaved
    @numaanjaved 7 місяців тому +9

    the sphere is not visible, i tried all combinations of what is shown here, black screen is visible but no sphere and no camera, but they are apparently present in scene, checked by console log,
    EDIT: the issue is of meshStandardMaterial, it is not working correctly but meshBasicMaterial is working ..

    • @f2pbtw826
      @f2pbtw826 4 місяці тому +2

      Basic material doesn't need light. But standard material needs light to show up, ,,, so that's must be causing the error , try adjusting the light

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

      And also check the proper index value for material

  • @dbiswas
    @dbiswas 3 місяці тому

    I am looking for a framework that can help animate a character based on the real time data feed like IoT or a sound or input text. Is this possible to do using three.js ? Or do I need to use some other animation engine? Can you suggest? Thanks so much in advance

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

    To sit in front of a white square in the middle of the night
    A recipe for a serious headache

  • @tom-cz2jx
    @tom-cz2jx 7 місяців тому +1

    I followed up to 15 min and could not get the sphere to show up. I debugged a bit with chatGPT which added ambient lighting. But the sphere just looks like a 2d circle ...

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

    I am an avid watcher of this channel. But no amount of love in the world is going to have me watch 45 minutes on how to make a ball 😅

  • @codenamemoe9337
    @codenamemoe9337 2 місяці тому +1

    If your ball is not easing in on refresh, remember to import gsap from 'gsap' 🤦‍♂

  • @rachitadashore7024
    @rachitadashore7024 Рік тому +2

    Hey can anyone help me out i am not able to achieve the last task. The sphere only changes into one color and doesn't change its color also I've been getting "rgb is unknown" on console... Can anybody help out?

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

      i'm facing the same issue, it is due to maybe AddEventListener('mousedown'), i am getting false on variable or flag mouseDown,

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

    Wonderful Tutorial again!, please more threejs content with blender

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

    import * as three from 'three';
    //scene
    const scene = new three.Scene();
    //create our sphere
    const geometry =new three.SphereGeometry(3,64,64);
    const material = new three.MeshStandardMaterial({
    color:"#00ff83",
    })
    //mesh is combination of geometery and material
    const mesh = new three.Mesh(geometry,material);
    scene.add(mesh)
    //Lights
    const light = new three.PointLight(0xffffff,1,100)
    light.position.set(0,10,10)
    scene.add(light)
    //camera
    /*
    1. parameter - field of view -> how much this camera can see
    dont go for more than 45 because it will start adding distortion after that
    2. aspect ratio of camera
    */
    const camera=new three.PerspectiveCamera(45, 800 / 600,0.1,100)
    //not more than 100 and less than 0.1
    camera.position.z=20
    scene.add(camera)
    //scene and camera are added but they are at the same position so what we are gonna do is
    //move it back by
    //renderer
    const canvas = document.querySelector(".webgl");
    const renderer = new three.WebGLRenderer({canvas})
    //now define how big canvas is and where to render this thing out
    renderer.setSize(800,600)
    renderer.render(scene,camera)
    why no output for this code

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

    hey ed, glad you're doing good bud, keep going!

  • @ankitjain-1
    @ankitjain-1 Рік тому +2

    @32:14, you should to put `transform: translate(-50%, -50%) to position it correct, whether you're giving it `top: 75%` or `top: 25%`.

    • @rdawo6408
      @rdawo6408 10 місяців тому

      I think I will try this 😂

  • @FushigiMigi
    @FushigiMigi 8 місяців тому +2

    Start completely from scratch, yet packages, files, githuh,etc. were already created in the file explorer before you started. Good job.

    • @rikawrites7104
      @rikawrites7104 8 місяців тому

      heyyy i was figuring out how to use vite here, do u know how to do it ? coz everytime i create a project with it , it asks to select a framework like react etc , but he doesnt seem to use any

    • @muhammadhafizuddin2965
      @muhammadhafizuddin2965 7 місяців тому

      Select vanilla, vanilla means without framework. ​@@rikawrites7104

  • @Rantalytics
    @Rantalytics Рік тому +2

    Thank you so much! would you mind dropping a codepen for this? I can't tell if i have a bug in my code, or i simply ran the vite app wrong. Really love your stuff! thank you brotha

  • @NNNedlog
    @NNNedlog Рік тому +3

    As soon as I saw this on my feed, I clicked faster than I've ever done. ThreeJS is something I've always wanted to learn

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

    If the camera doesn't see an object, does that mean the object is not rendered?

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

    Thanks Ed for this amazing tutorial. Is there a way to add a moon texture on the sphere?

  • @shinchannohara9511
    @shinchannohara9511 Рік тому +2

    Hey loved your background and your smily face at the beginning🌸🌸❣❣

  • @hvok01
    @hvok01 Рік тому +4

    Great crash course! would you like to do some sort of series about how canvas works and maybe webgl? because i think it's kind hard to find this kind of resources, would be very helpful

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

    An extremely helpfull tutorial. thanks!

  • @navjeevanalone4430
    @navjeevanalone4430 6 місяців тому

    It was really hilarious when i waited for 15 mins just to see black screen on browser🤣🤣🤣

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

    Is there a way to turn a sphere like this into a button, that when clicked zooms in and takes you to a different concept page

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

    where is the github repo link to this video?

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

    I can't watch 20min+ study video in one go but, in this i don't know where time go, and this is my first video on threejs its awesome thank you🍨

  • @Soulcode-k
    @Soulcode-k 3 дні тому

    So well explained, it felt like i i was solving a problem, what a great way of teaching.❤️❤️❤️🥰

  • @kodlamavetasarım
    @kodlamavetasarım Місяць тому

    another solution for the timeline 41 can be that
    window.addEventListener('mousemove', (e) => {
    if(mousedown){
    rgb = [Math.round((e.pageX / sizes.width)*255)/255,
    Math.round((e.pageY / sizes.height)*255)/255,
    150/255,
    ]
    // update colors
    gsap.to(mesh.material.color, {
    r: rgb[0],
    g: rgb[1],
    b: rgb[2],
    duration: 0.2 // transition time
    });
    }
    })
    great video btw thnx for your effort

  • @xyzromesh
    @xyzromesh Місяць тому

    Tnx for tut.. I'm working already long time with blender.. make's the programing more understandable!

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

    Please do more and our we can embed it into an exiting website...THANK YOOOOOOU

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

    pls more video on three jss

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

    14:11 my sphere or square doesn't show up. i can actually see it in the black square but it's not green, more like a gray similar to black which makes it really hard to even notice that is there. why?

  • @PoojaGera-l2r
    @PoojaGera-l2r Рік тому +3

    Wow, this video was absolutely amazing! I loved the attention to detail and the clear explanations provided throughout. The best part for me was watching as things got broken and then fixes were suggested to get them working properly again. This approach really helps to tackle frequent issues head-on and learn how to debug them effectively. The ability to render things out exactly how we want on the canvas is crucial, and this video showed just how to do that. Thank you for sharing such a fantastic tutorial!

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

    Could you make a tutorial on spline js?? It looks really cool and feels like blender but much easier than blender.

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

    Make more videos on there.js or lunch a course of it

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

    32:30 - bless you brother :D

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

    I'm working now with three.js and this is an amazing new video from u coming

  • @MontySori
    @MontySori 11 місяців тому

    Vite (French word for "quick", pronounced /vit/, like "veet") 🤨

  • @clydeeisenbeis8625
    @clydeeisenbeis8625 11 місяців тому +1

    npm run dev -> results in -> npm ERR! Missing script: "dev"

    • @daniell7998
      @daniell7998 7 місяців тому

      I had this problem as well. The problem is that the current directory by default is the wrong folder. If you look inside your project folder, you'll see that there is another nested folder. That is the correct folder. In the terminal, set your current directory with the command "cd path/to/your/ProjectName/ProjectName"

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

    17:42: "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/css". Strict MIME type checking is enforced for module scripts per HTML spec." - I've been battling with getting the browser to find/import files more with this tutorial than I have spent on the actual 3D rendering aspect of it!

  • @ezwtwrziehag1736
    @ezwtwrziehag1736 10 місяців тому

    you basically copy paste some code u prepared. better read the docs and dont waste time on this

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

    Need more please like the car one

  • @GAURAVSHARMA-ty8nm
    @GAURAVSHARMA-ty8nm 9 місяців тому

    hey thanks for the tutorial , very much beginner friendly and could be consider for starting out in journey of learning 3js , wonderfully explained the procedure , functions thanks for this , although encountered bit troubleshooting specially at the pointLight and that's all , and again thanks for this brother

  • @mariko-chan162
    @mariko-chan162 8 місяців тому

    Really enjoyed doing this super quick tutorial to dip my toes into three.js. I did feel some type of way whenever you didn't use a semicolon at the end of a line though. I know, I know, JS doesn't care about terminators but my pettiness couldn't handle it lol

  • @ManojChauhan-kl3dh
    @ManojChauhan-kl3dh Рік тому

    the effect discribed In this video " ua-cam.com/video/PIgQzkddVFg/v-deo.html "an annotation mark is added in gltf model in threejs,I have tried it by myselt but didn't get proper result .if you would try and make tutorial from very start to end or step by step for it , it woud be great full and thanx in advance

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

    So neatly explained, I thought it's very difficult to create 3D objects but now I understand it's not that hard. Thank you for the good explanation!!

  • @GAURAVSHARMA-ty8nm
    @GAURAVSHARMA-ty8nm 9 місяців тому

    hey thanks for the tutorial , very much beginner friendly and could be consider for starting out in journey of learning 3js , wonderfully explained the procedure , functions thanks for this , although encountered bit troubleshooting specially at the pointLight and that's all , and again thanks for this brother

  • @vishalyadav630
    @vishalyadav630 11 місяців тому

    Facing error" uncaught reference error: require is not defined at Orbit controls.js" while importing orbit controls in js file ..my browser screen get blanked. Pls guide.

  • @paulrmoss
    @paulrmoss 6 місяців тому

    Mmm, so the z position of the camera. I assume the camera is pointing a direction by default, and that default direction is down. And the z is adjusting the height of a downward facing camera

  • @rdawo6408
    @rdawo6408 10 місяців тому

    .... it's so much easier now that I understand js object oriented 😭😭😭😭😭... Basics go all the way

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

    Hi! I’m pretty new in this industry and I want to ask u What is the process of selling a website. I mean you’ve created for a client, but how we can actually sell it? What happends with files?

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

    "because it's winter time bidge" lmao
    12:25 ‐ I'm pretty sure it's always in meters, but centimeters is just a decimal of the meter (...techhhnically)

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

    I'm 40 seconds in, haven't learned a thing, but subbed for charisma alone.

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

    great video! Unfortunately, the PointLight is not working for me, I have just black canvas no matter what

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

      yeah me too, have u found a way to fix it yet?

    • @itb426_vardhanikajagtap5
      @itb426_vardhanikajagtap5 Рік тому +4

      try to increase the intensity of pointlight like I did and it worked for me "const light = new THREE.PointLight(0xffffff, 150, 100)" I change it to 150 instead of 1

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

      @@itb426_vardhanikajagtap5 thanks man it worked! really appreciate it

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

      @@itb426_vardhanikajagtap5 This worked for me! Thank you

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

      try using pointLightHelper
      light.position.set(0, 0, 20);
      const sphereSize = 1;
      const pointLightHelper = new THREE.PointLightHelper( light, sphereSize );
      scene.add( pointLightHelper );

  • @tryingtobeproductive
    @tryingtobeproductive Рік тому +2

    Your casual attitute and ease of approach makes this the perfect tutorial. I usually cant connect with tutorials but this was perfect. Well done.

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

    Awsome Tutorial, Can I get the repo link for this?

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

    What VS Code theme is that?

  • @1T_pressly
    @1T_pressly Місяць тому

    When I try to resize it, it keeps going white what should I do?

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

    Thank you so much 👍🏻❤️

  • @PraveenSC-qn5mp
    @PraveenSC-qn5mp 6 місяців тому

    Can u try wave plotter example like ECG, Resp etc..

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

    Love the simplicity 👏 I actually created some UA-cam videos about Bruno Simon's portfolio project. Willing to help you with the full 3D website series if you need any help there :)

  • @CopperNic1972
    @CopperNic1972 10 місяців тому

    I know this is from a bit ago but what theme are you using and what icons extension are you using? I like :D

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

    Bro casually doing 3d stuffs just like anything.PS:He teaches it too!!!!!!

  • @Kakao-Felix
    @Kakao-Felix Рік тому

    completely from scratch :D i doent even know what program you have open in the beginning

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

    well worth 43.50 min for my first Three.js video!
    btw, wanna see the little puppy face too next time :) it's cute!

  • @vishalyadav630
    @vishalyadav630 11 місяців тому

    Hello, whenever I try to import three js. I see browser blank white screen. How to solve this issue?

  • @godie076
    @godie076 11 місяців тому

    using mesh standar material and the point light does not show anything in the canvas,, anyone with this same issue?

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

    The part where he says "we can just do a list style of get the fuck out" is my mood right now. 31:17

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

    my browser is only randomly showing the 3d scene. Sometimes it does, sometimes not. What can I do?

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

    From a learning perspective, I love the approach in your video!
    Unfortunately, I got stuck very early and couldn't proceed. At the terminal command "npm run dev" I get an error that the script is missing. Maybe there's something prior to your installation that needs to be fixed?

    • @SamirPatnaik
      @SamirPatnaik Рік тому +3

      Inside your package.json file, under "scripts", you need to add the "dev" key and it's value command ( for example: "dev": "vite dev", ). The value depends on your build system

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

      @@SamirPatnaik That worked! Thank you so much 👍

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

      @@SamirPatnaik I have the same issue but I have "dev": "vite", in my scripts and still missing script error

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

      @@alfieable RESOLVED by typing npm install in terminal. Installs some packages and then npm run dev will work. Like this comment if it helped so more people see it!

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

    I tried importing the threejs object but I was getting an err talking about my graphics card

  • @Tyler-jd3ex
    @Tyler-jd3ex Рік тому

    List style of GTFO 😂😂 Exactly what I need to hear in the midst of this all.

  • @M.JawadAmin
    @M.JawadAmin 3 місяці тому

    Can anyone share the code please? It will be very helpful. Thanx

  • @Will-qs4qz
    @Will-qs4qz Рік тому

    I'm not able to put the shadow/light, I can't understand the reason, it appears on the console, but it's not being applied to the sphere.

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

    plese i have an array of camera has already been imported from blender with each having a parent property which points to where the camera should look at and its position, but i dont know how to move between those views(camera) smoothly with gsap. please any help, ive been stuck here

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

    please make more of this

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

    I am not able to setup the files , can anyone help me out?? please mention step by step how to setup in vite

  • @NikolayPavlov-s3o
    @NikolayPavlov-s3o 6 місяців тому

    "list style of get the fuck out" caught me off guard lol

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

    for some reason the extra html "nav/title" makes it unresponsive on mobile devices

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

    Great video! No need to curse though, lol... (I do too though sometimes)

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

    please next one make it responsive on mobile devices because right now it is not

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

      i got you it is super easy

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

      You need to create a duplicate of this code
      let mouseDown = false
      let rgb = []
      window.addEventListener('mousedown', () => ( mouseDown = true))
      window.addEventListener('mouseup', () => (mouseDown = false))
      window.addEventListener('mousemove', (e) => {
      if(mouseDown){
      rgb = [
      Math.round((e.pageX / sizes.width ) * 255),
      Math.round((e.pageY / sizes.height ) * 255),
      150,
      ]
      console.log(rgb)
      // Lets animate
      let newColor = new THREE.Color(`rgb(${rgb.join(",")})`)
      gsap.to(mesh.material.color, {
      r: newColor.r,
      g: newColor.g,
      b: newColor.b,
      })
      }
      })
      and paste it under it. Next commetn is the code you paste it

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

      This is the code you paste:
      let touchStart = false
      let rgb1 = []
      window.addEventListener('touchstart', () => ( touchStart = true))
      window.addEventListener('touchend', () => (touchStart = false))
      window.addEventListener('touchstart', (e) => {
      if(touchStart){
      rgb1 = [
      Math.round((e.pageX / sizes.width ) * 255),
      Math.round((e.pageY / sizes.height ) * 255),
      150,
      ]
      console.log(rgb)
      // Lets animate
      let newColor1 = new THREE.Color(`rgb(${rgb1.join(",")})`)
      gsap.to(mesh.material.color, {
      r: newColor1.r,
      g: newColor1.g,
      b: newColor1.b,
      })
      }
      })

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

      All you basically do is replace mousedown with touchstart, mouseup with touchend,. You need to create another rgb array and change the code because of this changes. If you just paste it below that one should work just fine.

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

      @@davidkunavar1961 thanks but i mean the page responsiveness as in it should look goon on mobile too
      rn it does but the html messes it up
      thanks tho

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

    The rgb values in mesh.material.color range from 0 to 1 where 0 is 0 and 1 is 255. So using rbg array directly will work if u jst keep the division and don't multiply it by 255. If anyone has difficulty visualising it, i suggest to go console log mesh.material.color object. The reason three.Color works is because it also convers to rgb values ranging between 0 n 1.