threejs   2216

« earlier    

javascript - Threejs: assign different colors to each vertex in a geometry - Stack Overflow
var geometry = new THREE.Geometry();

// Make the simplest shape possible: a triangle.
geometry.vertices.push(
new THREE.Vector3(-10, 10, 0),
new THREE.Vector3(-10, -10, 0),
new THREE.Vector3( 10, -10, 0)
);

// Note that I'm assigning the face to a variable
// I'm not just shoving it into the geometry.
var face = new THREE.Face3(0, 1, 2);

// Assign the colors to the vertices of the face.
face.vertexColors[0] = new THREE.Color(0xff0000); // red
face.vertexColors[1] = new THREE.Color(0x00ff00); // green
face.vertexColors[2] = new THREE.Color(0x0000ff); // blue

// Now the face gets added to the geometry.
geometry.faces.push(face);

// Using this material is important.
var material = new THREE.MeshBasicMaterial({vertexColors: THREE.VertexColors});

var mesh = new THREE.Mesh(geometry, material);
threejs 
2 days ago by adrianoconnor
(429) https://twitter.com/i/web/status/1108249669350670336
: 'just implemented dynamic marker clustering on a 3D globe in Cluster markers are dynamical…
threejs  from twitter_favs
3 days ago by jwtulp
Twitter
just implemented dynamic marker clustering on a 3D globe in Cluster markers are dynamically created canvas…
threejs  from twitter_favs
3 days ago by robhawkes
Twitter
just implemented dynamic marker clustering on a 3D globe in Cluster markers are dynamically created canvas…
threejs  from twitter_favs
3 days ago by ljegou
(429) https://twitter.com/i/web/status/1108112826030346240
just implemented dynamic marker clustering on a 3D globe in Cluster markers are dynamically created canvas…
threejs  from twitter_favs
3 days ago by pbeshai
Twitter
Want to drag objects around your scene with a 🐭 or 📱?

Ch 4.3 of Discover has you covered!

We'll show ho…
threejs  from twitter_favs
4 days ago by robhawkes
Twitter
Hi, I'm looking for a cool/nice/short/fancy name for my particles sim 3D app.
Any ideas? :)
webgl  threejs  from twitter_favs
6 days ago by jwtulp
Twitter
Here's a big list of all the and tips and tricks I've collected over the last year or so, from begi…
threejs  webgl  from twitter_favs
7 days ago by robhawkes
Twitter
Ever wondered how the perspective camera works?🎦

Like, what's the difference between changing the field o…
threejs  from twitter_favs
7 days ago by robhawkes
Twitter
RT : Some ribbon fish (:)) flocking using - shout out to for the brilliant boids demo and…
glsl  threejs  webgl  from twitter_favs
9 days ago by danbri
Codevember 2018
Loops for codevember 2018, with source code and breakdown gifs, made with #webgl and #threejs
codevember  threejs 
21 days ago by kwbr

« earlier    

related tags

3d  animation  art  background  canvas  code  codevember  dataviz  demo  design  dotbigbang  effects  example  fluid  game  gamedev  games  glsl  graphic-design  graphics  indiegamedev  inspiration  interesting  interface  javascript  js  library  lowpoly  newjersey  node  noice  particles  physics-engine  physics  procedural  procgen  programming  react-spring  react  screensaver  simulation  terrain  three.js  three  tunnel  tutorial  tutorials  twitter_favs  umap  voxelart  web  webdev  webgl  wip 

Copy this bookmark:



description:


tags: