画架现在有模板了。
Easel Now Has Stencils

原始链接: https://easel.games/blog/2025-dec-update

## Easel 更新:模版、文本、物理与网络代码 Easel,这门对初学者友好的游戏编程语言,获得了若干关键更新。**模版**是一项新功能,允许开发者将摄像机渲染限制在特定形状内,从而实现场景过渡、战争迷雾和风格化边框等效果。 **文本精灵**现在功能更强大,提供**粗体**、**斜体**文本选项,以及可调节的**字体大小**(使用 em 单位以提高可访问性)和对齐方式。这些更改也提高了文本渲染效率。 **物理引擎**已升级到 Rapier 的新版本,为更大、更复杂的游戏带来了 25% 的性能提升。碰撞体更新现在会自动反映在空间查询中。 最后,Easel 独特的**回滚网络代码**——对于流畅的多人游戏体验至关重要——现在有专门的文档页面详细解释其内部运作机制。 这些更新旨在使 Easel 中的游戏开发更加易于上手和强大。 了解更多信息,请访问 Easel 主页!

相关文章

原文

Easel is a beginner-friendly programming language for online games. Intrigued? Visit our home page to learn more.

Stencils are here! Keep reading to learn about this and other new features in Easel.

Stencils

Stencils are a new feature that let you limit the rendering of a camera to a specific shape.

You'll be able to use stencils to create a variety of cool effects in your games, such as:

  • Scene transitions: Create cool scene transitions by animating a stencil shape that reveals or hides the scene.
  • Fog of war: Limit a player to only seeing what their units can see, by stenciling the camera around each unit. Stencils are additive, so overlapping stencils combine to reveal more area.
  • Stylized borders: Give your minimap a fancy shape by giving its camera a stencil.
  • Search and reveal: Create a spotlight effect by using a circular stencil that follows the mouse pointer

See the Stencils documentation to learn more.

TextSprites

Displaying text in your games just got a lot more powerful! TextSprite has a few new parameters:

  • bold and italic let you style your text even more.
  • fontSize lets you set the size of your text in em units. Use this instead of the radius property if you want your text to match other UI elements. You should use fontSize over the old heightPx parameter where possible, as pixel units do not respect the user's choice of text size, while em units do. Users may have a larger text size than you expect, perhaps because they have low vision or are using a small screen, and using em units helps ensure your text is readable for everyone.
  • align lets you center, left, right align your text.
  • vAlign lets you vertically align your text to the top, center, or bottom of its position. The old anchorTop and anchorBottom parameters have been deprecated in favor of this new parameter.

This required reworking some of the text rendering system, and now it is more efficient! The text is now rendered onto a bounding box that is only just as big as it needs to be, reducing unnecessary computation and improving performance.

Physics engine upgrade

Physics is a great way to make your games deeper, because people intuitively understand the complexity of physical interactions without you needing to explain it to them.

The physics engine has been upgraded to a newer version of Rapier, which should improve performance. Rapier reports an improvement of 25% on various benchmarks. This means you can make even bigger games with Easel!

As part of this, now when new colliders are added, they will automatically show up in any spatial queries like QueryNearest, whereas previously you would need to call ResetSpatialQueryIndex or wait for the next physics step to have them included. You still need to call ResetSpatialQueryIndex if you move existing colliders around and want that to be reflected in your query. And even then, you may want to consider just waiting until the next frame when the physics engine automatically updates the spatial query index by itself.

Rollback netcode

Easel lets you code multiplayer games like everyone is in one shared world, like a singleplayer game. Powering this magic is an approach called rollback netcode that lets players see immediate responses to their inputs, even before those inputs have reached other players. We now have a dedicated page that describes exactly what is special about Easel's rollback netcode implementation. Check it out to learn more about how it works under the hood!

联系我们 contact @ memedata.com