Author Topic: One Object3D or Multi-Object3D ?  (Read 378 times)

Offline nill

  • byte
  • *
  • Posts: 7
    • View Profile
One Object3D or Multi-Object3D ?
« on: December 31, 2016, 12:03:16 pm »
  happy new year!
  here is the question .  I have many text boards to show. 
  1 which is better way to save memory , create a Object3D for each text  or create only one Object3D for all of text?
  2 if i created only one Object3D , how to hide part of this Object3D ? I have tried  get polygon id and using setVertexAlpha(polygonid, alpha) to archive this effect. it seems not work verywell,
    only first of call is work.  (this problem only on android )


« Last Edit: December 31, 2016, 01:33:44 pm by nill »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: One Object3D or Multi-Object3D ?
« Reply #1 on: December 31, 2016, 12:11:33 pm »
I would use several objects. Everything else just adds a lot of complexity without any actual gain. If you are worried about memory usage, you could share meshes and compiled data between these objects and/or create an object pool for these objects.