Greggman
Greggman
I'm using jsdoc to generate the docs. I don't know how to document a function like this. The docs serve two purposes. One they actually document type info which compilers...
repeated from above > the parameters are listed in order. **Ignore the names.** also repeated from above > 3rd parameter is either options, an error function, or an array of...
> I can just add typings for that single overload and ignore the rest. It just means you have to do something like this? const options = new twgl.ProgramOptions(); options.attributeLocations...
Yes, but the point of twgl is *tiny* and the code at the bottom is more tiny than the code at the top I guess if we're simplifying I'd provide...
`drawType` is optional https://github.com/greggman/twgl.js/blob/42291da89afb019d1b5e32cd98686aa07cca063d/src/attributes.js#L204 if it's not specified twgl will use `STATIC_DRAW` https://github.com/greggman/twgl.js/blob/42291da89afb019d1b5e32cd98686aa07cca063d/src/attributes.js#L90 It's copied to the attribute info you linked to but if it's not set it will still...
fad61fdb6467c10fe84cfcd02c83fd9ada1b5043
What errors do you actually expect to catch? The only one twgl actually handles is failure to download image. It doesn't check for any other errors so as it is...
You arguably should not be counting on garbage collection for WebGL. As is says in the MDN article for WeakRef --- # [Avoid where possible](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#avoid_where_possible) Correct use of WeakRef takes...
Just as a test I wrote some code that allocated a 4Meg WebGL texture and watched for it to be garbage collected using `WeakRef`. On Safari it was collected 4...
Also, just for fun, I tried implementing it. I couldn't get Chrome nor Firefox to garbage collect WebGL objects so there's no way to test 😅 But, also, unless there's...