Welcome, Guest

Author Topic: What is an On-demand view?  (Read 1512 times)

Nick

  • Administrator
  • *****
  • Posts: 475
    • View Profile
What is an On-demand view?
« on: November 04, 2013, 12:01:16 PM »
Due to the asynchronous nature of Coherent UI, JavaScript execution might not be finished by the time you want to draw your next frame.

Take as an example a 2D label in the UI that needs to follow a moving object in the world. Each frame the game sends an event to JavaScript that updates the screen position of the label. Because of the asynchronous execution, this can result in slight, but visible mis-alignments or having the label lag behind the object.

On-demand views introduce a way to prevent that lag at a slightly higher CPU cost than the normal views.
R&D Director @CoherentLabs

Tags: