Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
How does getStartTime() work?

pete
Registered User
Quote
2012-02-12 11:46:29

Hi

I'm trying to get the time in milliseconds of my scene by using getStartTime(). This is what I tried:

engine.OnAnimate = function()
{
console.log(scene.getStartTime());
}

console.log is used to print the time in the console (like in Firebug). My problem is that it prints "0" for every frame. I was expecting to see the elapsed time in milliseconds since the start of the scene. Please explain it to me. An example of how to use getStartTime() would be great.

Thanks!


niko
Moderator
Quote
2012-02-13 19:30:56

(Sorry for the late answer)
I think the start time usually gets only set once, and never changes afterwards anymore. The first time doAnimate() of the scene is called, the Start time gets set to CL3D.CLTimer.getTime(), in order for objects to animated according to the first time the scene was shown on the display. Maybe somehow doAnimate does not get called for your scene somehow?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact