Announcing Deck.gl v9: WebGPU ready & with TypeScript support

Summary

Announcing Deck.gl v9! Get ready for next-gen geospatial rendering, including TypeScript support & preparation for WebGPU. 

This post may describe functionality for an old version of CARTO. Find out about the latest and cloud-native version here.
Announcing Deck.gl v9: WebGPU ready & with TypeScript support

Deck.gl is the open-source technology that we use at CARTO to drive all of our spatial visualizations. It is trusted by many projects and organizations, with around 150K weekly downloads, and CARTO is one of the largest users and contributors.

Today we're excited to share that after a significant period of development, the community has released deck.gl version 9.0. This release is notable for including TypeScript support and preparation for WebGPU, marking deck.gl as one of the early visualization libraries to adapt to the next generation of web graphics standards.

The path to releasing version 9 was challenging. Deck.gl's adaptation to these technologies showcases the hard work and collaborative spirit of the open-source community that supports it. This update is a big step towards ensuring deck.gl remains a reliable tool for developers for the foreseeable future.

A banner announcing deck.gl v9

Let's dive into the key updates and enhancements that v9 brings to the table and the benefits for its users.

Ready for WebGPU

The webgpu lgo

A key element of this release is WebGPU integration. WebGPU is the next-generation web graphics API, developed as a new standard browser specification from a collaboration of companies such as Google, Microsoft, Intel, Apple, and Mozilla. Published in 2021, it’s now on the road to being officially supported in all major browsers, with Chrome including it by default since April 2023.

deck.gl is built on top of luma.gl, which was rewritten from the ground up to seamlessly support WebGL2 & WebGPU. Adding WebGPU support to deck.gl v9 is significant for several reasons, particularly from a developer's perspective:

  • Performance: WebGPU is designed to take full advantage of modern GPU capabilities, which can lead to significant performance improvements in rendering complex visualizations in terms of responsiveness and fluidity.

  • Future-Proofing: As web standards evolve, adopting the latest technologies ensures that the library remains relevant and can continue to serve its user base effectively. WebGPU represents the future of web graphics, offering a more powerful and efficient way to access GPU resources. By supporting WebGPU, users of deck.gl ensure they stay at the cutting edge, ready for next-generation web applications.

  • Broader Device Support: WebGPU is designed to work across different platforms and devices, including those with varying GPU capabilities. This means that applications built with deck.gl can potentially run more efficiently not just on desktop computers, but also on mobile devices and other platforms where GPU resources were previously underutilized.

  • Community Engagement and Adoption: We expect that this move to WebGPU will attract more open source developers to join the project. This is also part of our commitment to the OpenJS foundation.

With CARTO among the main contributors, deck.gl v9 is probably the first geospatial visualization library to adopt WebGPU. Developers now have access to cutting-edge tools and technologies to create powerful applications that push the boundaries of their geospatial data further than ever before.

Empowering Developers with TypeScript

A banner showing typescript, V and deck.gl logos

The addition of TypeScript support in deck.gl v9 marks a significant enhancement that benefits developers through improved code reliability and development efficiency. Here's why this is impactful:

  • Error Detection: TypeScript's static typing helps identify issues early, reducing bugs and speeding up the development process.

  • Developer Tooling: Enhanced autocompletion and other smart features like IntelliSense in code editors will streamline development, making coding more intuitive and less error-prone.

  • Code Quality: Static typing encourages clearer coding practices, making the library easier to maintain and scale, particularly for complex projects.

  • Alignment with Modern Development: By adopting TypeScript, deck.gl aligns with the broader trend towards statically typed languages in the JavaScript ecosystem, making it more appealing to a wide range of developers.

Overall, TypeScript support in deck.gl v9 significantly elevates the developer experience, making the library more robust, maintainable, and in tune with modern web development trends.

Other improvements

Aside from WebGPU and Typescript support, the thriving deck.gl community is also adding new features to deck.gl v9, such as Widgets and the new Category Filtering in the DataFilterExtension.

Widgets in deck.gl are coming to stay. Classic map UI controls such as zoom, full screen or compass are now available out-of-the-box, reducing app development times for any geospatial application built with deck.gl, More widgets will be coming in the next releases, with the possibility already in deck.gl v9 of creating your own custom widgets.

A gif showing a map with blue and purple lines, and it being explored in 3D

The new category filtering abilities in the DataFilterExtension provide a GPU-powered method to show/hide data from your layers based on categories, offering better performance than retrieving new filtered data.

New CARTO module architecture

The CARTO Module in deck.gl allows you to connect your data in your data warehouse. Utilizing the CARTO Platform, the data gets transferred in tiles allowing for visualizing very large datasets that do not fit in the client memory. It takes care of delivering the data from your dData -warehouse into a deck.gl layer that you can visualize in many different ways.

In the latest release of deck.gl v9, we've introduced a reimagined architecture for the CARTO module. This improvement is not just a step up—it's a leap towards more expressive, flexible, and maintainable codebases.

Gone are the days of juggling all properties within a monolithic CartoLayer object. With TypeScript now enriching deck.gl, we've broken down the CARTO module into intuitive Sources and Layers. This approach not only enhances flexibility and readability but also promotes code reusability.

Adopting a pattern familiar to users of other mapping tools like kepler.gl or CARTO Builder, our Sources in the CARTO module now support direct integration with vector, raster, or Spatial Index datasets from your preferred cloud data warehouse, be it Google BigQuery, Snowflake, AWS Redshift or others.

Moreover, we're excited to unveil a new source type called 'boundaries.' Currently in public preview, this feature enables rapid aggregation of large data volumes within common or custom geographic boundaries—think zip codes and administrative regions. Prepare to build more dynamic, data-rich applications with ease, efficiency, and unprecedented speed.

A screenshot of a map rendered in deck.gl showing boundaries coloured in red and green

Designed for Enterprise Geospatial Applications

For teams building robust and innovative geospatial applications the release of deck.gl v9 represents another improvement to our development stack, combining:

  • CARTO cloud-native connectivity and geospatial expertise, with no ETLs required.
  • All the features in the CARTO platform:some text
  • Our APIs, including out-of-the-box access to geocoding locations or calculating isolines and routes.
  • The CARTO module in deck.gl.
  • deck.gl v9, the first-ever geospatial visualization library to embrace WebGPU.

Developers can quickly leverage all this technology incorporating the latest advancements in geospatial rendering technology into large-scale, high-performance, visually captivating experiences for their users.

Learn more about CARTO and deck.gl v9

To learn more about deck.gl v9 we recommend you take a look at the official deck.gl release notes and documentation.

The OpenJS Foundation has also covered this new version in their blog.

If you want to start building with CARTO and deck.gl v9, we recommend taking a look at the CARTO + deck.gl documentation, where you can also find a beautiful gallery of examples to play around with and learn more.