microsoft / HoloJS

Provides a framework for creating holographic apps using JavaScript and WebGL.
MIT License
1.19k stars 114 forks source link

setInterval causes JavascriptExceptionObject in ThreeJSApp #52

Closed wassx closed 7 years ago

wassx commented 7 years ago

Hi, I tried to run the ThreeJsApp example but when I try to use e.g. setInterval(function() { console.log("test");}, 5); the exception is thrown. This seems to me a very standard functionality but can't get it working in here.

Any suggestions please?

Almost-Done commented 7 years ago

setInterval is not implemented. I'll get in a fix for this shortly.

wassx commented 7 years ago

Thank you very much! Is there an overview where already implemented parts are listed?

Am 29.06.2017 um 05:29 schrieb Cristi Petruta notifications@github.com:

setInterval is not implemented. I'll get in a fix for this shortly.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Almost-Done commented 7 years ago

It's a little more nuanced than that. Timers are not part of the EcmaScript specification; they are a web/html standard: https://www.w3.org/TR/2011/WD-html5-20110525/timers.html

HoloJS is not designed to work with the HTML/DOM model and does not implement most things HTML. For example jquery will not work. However, a sub-set of DOM elements had to be implemented to support WebGL. We can add support for more HTML standards as needed, but there is no intent to implement all of them the way a web browser has to.

Almost-Done commented 7 years ago

I merged a fix for this into master. I did basic testing around set|clear interval and timeouts. Please let me know if you encounter more issues.