Re:Deno v1.8 – support for WebGPU, private modules, Intl, an...
by flohofwoe on Wednesday March 03, 2021 @07:31AM
(#26327511)
Have you seen a Vulkan "Hello Triangle" in comparison? That's a least a thousand lines of code, and that's with taking shortcuts :)
132 lines isn't really that much for a triangle in any 3D API, except 90's style OpenGL 1.x (which was a nice and convenient API, but also very inefficient).
I'm sure there will be plenty of high-level Javascript libraries built on top of WebGPU which will cater to different philosophies and use cases, and those will also allow a Hello Triangle with fewer lines of code (but also will involve compromises at flexibility or performance).
Re:Deno v1.8 – support for WebGPU, private modules, Intl, an...
by skocznymroczny on Wednesday March 03, 2021 @06:48AM
(#26327207)
Does Javascript have enums? I've seen these stringly typed enums often in JS APIs.
I cannot pin it down but there must be a better way, this looks like the server world before the invention of ruby on rails.
Also magical values in string format:
primitiveTopology: 'triangle-list', const swapChainFormat = 'bgra8unorm'; ...