소스 검색

docs: update upgrade guide for useTexture composable changes (#1074)

- Modified the usage section to reflect that the `useTexture` composable now returns a reactive state along with a loading state, enhancing clarity for users.
- Updated the import statement to align with the new structure of the TresJS core library.
Alvaro Saburido 1 개월 전
부모
커밋
df8ccf4b7a
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      docs/content/1.getting-started/4.upgrade-guide.md

+ 3 - 3
docs/content/1.getting-started/4.upgrade-guide.md

@@ -194,10 +194,10 @@ import { useTexture } from '@tresjs/core'
 import { useTexture } from '@tresjs/cientos'
 ```
 
-3. **Usage remains the same**:
+3. **Usage updated**:
 ```js
-// ✅ Same usage pattern
-const texture = await useTexture('/textures/brick.jpg')
+// ✅ Composable now returns reactive state with loading state
+const { state: texture, isLoading } = useTexture('/textures/brick.jpg')
 ```
 
 ### Event System Changes