Jump to content

Texture reduction


Recommended Posts

@hunts -

It appears you're looking to use pop() as you might expect - to achieve the previous state of a mesh or property. However I don't believe that pop() alone will achieve this in BJS. It's been a while since I've attempted this, but pop() didn't behave as I might have expected - although I haven't attempted to utilize this since prior to babylon.js v2.0. Now that it is clear what you want to achieve, I expect other devs on this forum will explaing either why this is not working as might be traditionally expected, or how you can achieve this without having to dispose and restore or push manually. I wish I could be more help currently, but @Deltakosh, @davrous, or one of the big guns can most likely help us both better understand the usage and/or limitations of using pop() in BJS. I'll be looking forward to the answer as well. But mentioning these user names specificaly in this post should get their attention - so I might expect an answer soon. I could also list a few others who I'm certain know the answer, but I don't like to name names. But you guys know the list.



Link to comment
Share on other sites

Here is an analogy.

The director has three actors in the scene, Jim Mesh, Tony Mesh and Ann Mesh. Jim is wearing a blue suit, Tony a brown suit and Ann a red dress. After watching the first run through the director decides he does not want Jim in the scene any more so crosses him off his list of actors for the scene. At the next run through Jim is not on the list for the scene so he is stopped from entering the scene.

During the second run through the director decides that the red dress does not show up the blood properly after the stabbing, so he crosses the red dress off his list. At the next run through Ann is still on the list so she is allowed on stage but no one has told her not to wear the red dress. Crossing it off the directors list is not sufficient, Ann's costumer needed to have been told as well.

Also remember

actors.pop() means get rid of the last actor on the list, this might not be Jim

costumes.pop() means the last costume on the list in not wanted, (this might not be the red dress though) but the actor wearing it also needs to be told about it so they can change.

red_dress.dispose() means get rid of the red dress entirely, burn it so nobody else may wear it and any changes of mind will require the recreation of the dress from a length of red material.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...