2

Please see example here. https://www.madebydaryl.co.uk/lab/webgl-globe-master/globe-search/

I have a globe with 2600 points evenly spread. On chrome it runs fine on IE 11 the frame rate is dire.

I have a solution of merging all the points in to 1 Geometry and it renders fine, awesome. The problem is I need to be able to click on these points, hover over, animate and grow each point individually.

The issue is, the level of interactivity I need just doesn't seem possible with one Geometry.

Can anybody help.

Daryl
  • 195
  • 5
  • 1
    2600 geometries is too many GPU draw calls — you'll want to use another way of managing click events that does not require separate geometries for each point. Use custom shaders or edit the geometry as you click. It's not precisely the same but you could start with [this octree example](https://threejs.org/examples/?q=oct#webgl_octree_raycasting). – Don McCurdy May 22 '18 at 17:33
  • I will definitely try this. Although from the example it looks like it adds an mesh to the scene and the octree. Meaning I would be adding 2600 mesh to the scene and 2600 mesh to the octree. Although it might help with fps. I'll give it a try. – Daryl May 22 '18 at 20:45
  • 1
    If you use a custom shader you can add buffers and attributes to supply data for "hover over", "animate", "point size" etc. So even with all the points in 1 geometry you can still affect individual points. – gman May 23 '18 at 02:06
  • @gman Is there any chance i could pick your brains? Again, I still have a particular problem, probably because I'm not super experienced in web gl / threejs. Lets say I merge everything into 1 geometry, if i wanted to animate those points from 0 to 100 in terms of height. How would i go about editing the geometry for that? Im guessing custom shaders with buffers would be the way, is there any resources or examples that could explain this for me? (i've tried searching and havent quite grasped it yet) – Daryl Jun 21 '18 at 16:37
  • @daryl, you changed the code at that link which makes your question irrelevant to others. Please put the old code and/or a screenshot in the question – gman Jun 23 '18 at 02:29

0 Answers0