A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: fix sprite default size and add missing pivot property
esengine260b2478060e
diff --git a/docs/astro/src/content/docs/guides/sprite.mdx b/docs/astro/src/content/docs/guides/sprite.mdxindex 38f474885..fad1c94f2 100644--- a/docs/astro/src/content/docs/guides/sprite.mdx+++ b/docs/astro/src/content/docs/guides/sprite.mdx@@ -13,12 +13,13 @@ The `Sprite` component is the primary way to display 2D graphics. Add it to an e|----------|------|---------|-------------|| `texture` | number | `INVALID_TEXTURE` | Texture handle. No texture = solid color || `color` | Color | `{r:1, g:1, b:1, a:1}` | Tint color RGBA (0–1) |-| `size` | Vec2 | `{x: 32, y: 32}` | Width and height in pixels |+| `size` | Vec2 | `{x: 100, y: 100}` | Width and height in pixels || `uvOffset` | Vec2 | `{x: 0, y: 0}` | Texture coordinate offset || `uvScale` | Vec2 | `{x: 1, y: 1}` | Texture coordinate scale || `layer` | number | `0` | Render order (higher = on top) || `flipX` | boolean | `false` | Flip horizontally || `flipY` | boolean | `false` | Flip vertically |+| `pivot` | Vec2 | `{x: 0.5, y: 0.5}` | Pivot point for rotation and scaling || `material` | number | `0` | Material ID || `enabled` | boolean | `true` | Whether this sprite is rendered |