Multi-threaded WebAssembly relies on a browser feature called SharedArrayBuffer, which was pulled from browsers after the Spectre and Meltdown security vulnerabilities were revealed. Being able to do this work on a background thread has shown a clear improvement in the performance of Earth in the browser. As such, we're constantly streaming data to the browser, decompressing it and making it ready for rendering to the screen. Think of Earth like a huge 3D video game of the real world. Some browsers offer multi-threading support and others don't. From the Earth perspective, the most significant difference in support for WebAssembly between browsers is support for threading. WebAssembly is still evolving as a standard, and browsers continue to get extended with more features and functionality. This means Earth will be available to more people across the web. Now we're starting to switch to WebAssembly, which lets us take that same code and run it across browsers. Unfortunately, NaCl was a Chrome-only technology that never saw adoption across browsers. In 2017, when we brought Earth to the web, we used Native Client (NaCl) to compile the C++ code and run it in the Chrome browser.Īt the time, NaCl was the only browser technology that allowed us to port our C++ code to the browser and give us the kind of performance Earth needed. Then we were able to port it to Android and iOS as smartphones took hold, retaining most of our C++ codebase using NDK and Objective-C++. We originally wrote most of Google Earth in C++ because it was a desktop application intended for install. Why we chose WebAssembly for Google Earth Consider this beta your inspiration if you too are looking for better cross-browser support for your platform-specific applications. You can experiment with this beta in Chrome and other Chromium-based browsers, including Edge (Canary version) and Opera, as well as Firefox. Keep in mind that this is still a beta of Google Earth and may not be as smooth as you're used to (try out regular Earth for web). We've done just that with Google Earth, available today in preview beta on WebAssembly. WebAssembly (Wasm) is a compile target standardized by the W3C that helps us solve this problem by allowing us to run codebases from languages other than JavaScript on the web. But there are barriers to bringing projects to the web, depending on the technology they were built with and how well that technology is supported by the various browser vendors. In an ideal world, every application that developers build, regardless of technology, would be available in the browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |