Skip to content

Commit

Permalink
chore: update readme for usespriteloader (#1990)
Browse files Browse the repository at this point in the history
* feat: added optional Sprite or Plane geometry for SpriteAnimator

* chore: updated readme about useSpriteLoader capabilities
  • Loading branch information
netgfx authored Jun 11, 2024
1 parent 262fa4e commit 352380b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3354,6 +3354,12 @@ useFont.preload('/fonts/helvetiker_regular.typeface.json')

Loads texture and JSON files with multiple or single animations and parses them into appropriate format. These assets can be used by multiple SpriteAnimator components to save memory and loading times.

Returns: `{spriteTexture:Texture, spriteData:{any[], object}, aspect:Vector3}`

- spriteTexture: The ThreeJS Texture
- spriteData: A collection of the sprite frames, and some meta information (width, height)
- aspect: Information about the aspect ratio of the sprite sheet

```jsx
/** The texture url to load the sprite frames from */
input?: Url | null,
Expand Down

0 comments on commit 352380b

Please sign in to comment.