Re: Extending Object

2016-04-23 Thread Allen Wirfs-Brock
On Apr 23, 2016 6:15 PM, /#!/JoePea wrote: > > Are the following examples the same? No. Consider the value of (new Foo).assign For the two alternatives ___ es-discuss mailing list es-discuss@mozilla.org

RE: Extending Object

2016-04-23 Thread Oriol Bugzilla
They are no necessary the same: ```js var _Object = window.Object, Object = function() {}; class Foo1 { constructor() {} } class Foo2 extends Object { constructor() { super(); } } _Object.getPrototypeOf(Foo1.prototype); // _Object.prototype _Object.getPrototypeOf(Foo2.prototype); //

Extending Object

2016-04-23 Thread /#!/JoePea
Are the following examples the same? Is there any reason to extend Object manually? ```js class Foo { constructor() {} } new Foo ``` ```js class Foo extends Object { constructor() { super() } // super() is required. } new Foo ``` ___ es-discuss

Re: Promises, async functions, and requestAnimationFrame, together.

2016-04-23 Thread /#!/JoePea
Just to show a little more detail, here's a screenshot that shows that the logic of the while-loop version of my animation loop fires inside each animation frame. I've zoomed out and we can see there's nothing fired between the frames:

Re: Promises, async functions, and requestAnimationFrame, together.

2016-04-23 Thread /#!/JoePea
Alright, I did an experiment, and I'm really surprised at the results! Apparently, the logic (what would be drawSomething() in my previous example) is fired within the frame!! So, let me show you my original method for starting an animation loop. I'm working on a 3D project at http://infamous.io.

Re: Promises, async functions, and requestAnimationFrame, together.

2016-04-23 Thread Boris Zbarsky
On 4/23/16 4:09 AM, Salvador de la Puente González wrote: AFAIK, that should execute `drawSomething()` once per frame. Given a frame is each time the animatinFrame() promise resolves. What's not obvious to me is whether it will execute it before the actual paint for the frame (i.e. before or

Re: Promises, async functions, and requestAnimationFrame, together.

2016-04-23 Thread Salvador de la Puente González
AFAIK, that should execute `drawSomething()` once per frame. Given a frame is each time the animatinFrame() promise resolves. On Sat, Apr 23, 2016 at 1:38 AM, /#!/JoePea wrote: > Is it possible? > > I thought maybe something like this: > > ```js > function animationFrame() { >