Share your repls and programming experiences

← Back to all posts
Three.js Particles - Falling Snow
tussiez

Three.js Particles - Falling Snow

I was trying to figure out how exactly I would implement weather into SortaCraft, and I gave up earlier since I thought I needed a complex particle system. However, I found out recently that Three.js already has a pretty simple particle system (THREE.Points), so I decided to use that, and test it here.

How to use

Use your mouse to look around (click and drag, or right click too), and mess with the snow using the controls. Press Update after making changes.

Please allow a few seconds for the textures to load.
Enjoy!
EDIT: Why is this on Trending?!

Voters
LaneMartin
Unclyscam123
LingWu1
BCP
CyberHacker101
CodingGoose
ThatCoolCoder
RolandJLevy
TalinSharma
TsunamiOrSumth
Comments
hotnewtop
CyberHacker101

Awesome job

tussiez
JBloves27

Really cool!

tussiez

@JBYT27 Thanks!

JBloves27
RolandJLevy

Nice job @tussiez! :)

tussiez

@RolandJLevy Thanks!

DSAEvan

Really cool! And the background is 3D! Did you use google maps?

tussiez

@DSAEvan Got a cubemap from OpenGameArt and set a cubetexture for the scene :) Thanks!

Baconman321

How do you make the camera?

tussiez

@Baconman321 camera = new THREE.PerspectiveCamera(fov,aspect,near,far)
fov = field of view, I like 60-70
aspect = aspect ratio, use "width/height" of canvas
near = near plane of camera, usually use .1
far = max render distance of camera, depends (Usually 500-1000) depends on your needs

EDIT:Dunno why it has a newline after new

Baconman321

@tussiez Yeah but you can't move or anything (I used it when I tried out THREEJS).
Oh, I see you use orbital controls...

tussiez

@Baconman321 For controls, I use OrbitControls from
https://threejs.org/examples/jsm/controls/OrbitControls.js (import with: import {OrbitControls} from (the link) and use with controls = new OrbitControls(camera,renderer.domElement)
That's about it

tussiez
tussiez

@Baconman321 Didn't see your comment until after I wrote the othe r one lol

Baconman321

@tussiez Yeah, it's pretty cool. I think threeJS isn't too hard until you go into the math required for some games...

tussiez
FloCal35

Nice, this is awesome. Merry Christmas @tussiez

tussiez

@FloCal35 Thanks, you too!

LaneMartin

This reminds me of the snowstorm craze last year lol

tussiez
LingWu1


Tht is fast and why is there a green image of trees in smack center

tussiez

@LingWu1 It's a 3D demo, click and drag :D - that's a cube!

LingWu1

Yea its cool @tussiez

tussiez
CyberHacker101

also, how did ya make it a 360-degree view?

tussiez
CyberHacker101

Me in canada

tussiez

@CyberHacker101 C a n a d a

[deleted]

Unitys paritcle system but customizable

tussiez
SwaroopBappanad

Cool! (lol I managed to crash my computer in a few seconds)

tussiez