Ask coding questions

← Back to all posts
WebGL vs Three.js
programmeruser (597)

What are some differences between WebGL and Three.js, and which one should I use?
I can see two potential factors in this:

  • speed: WebGL is probably faster
  • capabilities: WebGL probably has more capabilities
  • ease of use: WebGL is less easy to use than Three.js

@tussiez @xxpertHacker

Answered by notGilbert (121) [earned 5 cycles]
View Answer
Comments
hotnewtop
notGilbert (121)

Threejs is a wrapper (library) for WebGL.

Threejs is made for easy 3d graphics, it handles math, geometry, and shading of the scene.

WebGL is more customizable, but it also requires more engine code. If you want to make your own 3d engine, you'll need to figure out math, geometry, and shading by yourself.

===

I'm a beginner in graphics programming and I don't want to research everything > threejs

I know a bit about graphics programming, but I don't want to write a ton of code > threejs

I know a bit about graphics programming, but I want to learn more and write code > Learn WebGL and make your own graphics engine

I need performance and customizability > WebGL and make your own graphics engine

tussiez (1645)

@notGilbert I recommend learning basic WebGL, so you can write shaders/etc