Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Commit f0dd535

Browse files
committed
refactor: replace SVG component with useSVG composable for improved SVG handling
- Updated `SVGDemo.vue` to utilize the new `UseSVG` component from `@Tresjs/cientos`, enhancing the way SVGs are loaded and displayed in TresJS scenes. - Modified the component list to reflect the change from `SVG` to `useSVG`, ensuring consistency in documentation and usage. - Removed the outdated `svg.md` guide and created a new `use-svg.md` guide to document the `useSVG` composable, providing comprehensive usage instructions and examples. - Added new demo components in the playground to showcase the capabilities of the `useSVG` composable, improving the developer experience and demonstrating advanced use cases. - Updated the router to include new routes for the `useSVG` functionality, ensuring easy navigation to the new features.
1 parent 66503f9 commit f0dd535

File tree

12 files changed

+955
-320
lines changed

12 files changed

+955
-320
lines changed

docs/.vitepress/theme/components/SVGDemo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { OrbitControls, SVG } from '@tresjs/cientos'
2+
import { OrbitControls, UseSVG } from '@tresjs/cientos'
33
import { TresCanvas } from '@tresjs/core'
44
55
const svgURL = 'https://raw.githubusercontent.com/'
@@ -10,7 +10,7 @@ const svgURL = 'https://raw.githubusercontent.com/'
1010
<TresCanvas clear-color="#333">
1111
<OrbitControls />
1212
<Suspense>
13-
<SVG
13+
<UseSVG
1414
:src="svgURL"
1515
:position="[-0.4, 1, 0]"
1616
:scale="0.01"

docs/component-list/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default [
5757
{ text: 'useFBX', link: '/guide/loaders/use-fbx' },
5858
{ text: 'FBXModel', link: '/guide/loaders/fbx-model' },
5959
{ text: 'useVideoTexture', link: '/guide/loaders/use-video-texture' },
60-
{ text: 'SVG', link: '/guide/loaders/svg' },
60+
{ text: 'useSVG', link: '/guide/loaders/use-svg' },
6161
],
6262
},
6363
{

docs/guide/loaders/svg.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)