There's apparently no good way in general to test whether the scene is 
unchanged. This is a known issue:

https://github.com/mrdoob/three.js/issues/7670

One of the comments on this thread offers another option: only render the 
scene upon user interaction. I'm so accustomed to writing Three.js to be 
ready for animation that I didn't think about this. If we restrict Three.js 
usage in Sage to static scenes then CPU usage drops to nothing.

I'm happy to make this change, but this means no animations in the scenes 
for now.

On Saturday, December 3, 2016 at 1:11:31 PM UTC-8, Volker Braun wrote:
>
> Well if the scene is static, the controls didn't change, and the canvas 
> size didnt't change then your callback in requestAnimationFram should just 
> do nothing instead of repainting the unchanged scene, right?
>
>
>
> On Saturday, December 3, 2016 at 9:46:50 PM UTC+1, Paul Masson wrote:
>>
>>
>>
>> On Friday, December 2, 2016 at 11:47:40 PM UTC-8, tdumont wrote:
>>>
>>>
>>> But why is three.js consuming cpu when the browser shouls have nothing 
>>> to do ? (no interaction). 
>>>
>>
>> There is a rendering loop that runs continuously to call 
>> requestAnimationFram(). 
>> This is a standard technique for JavaScript animations in the browser. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to