@@ -10,8 +10,8 @@ models in web projects, while being bundler-agnostic (Vite, Rollup, Webpack, esb
1010## project overview
1111
1212This plugin scans all model files in the project source, deconstructs the glTF JSON representation, and places
13- generated type files next to them. It uses [ three.js] ( https://github.com/mrdoob/three.js/ ) to parse the glTF files,
14- including modifications like path resolutions etc.
13+ generated type files next to them. It creates [ three.js] ( https://github.com/mrdoob/three.js/ ) types and uses
14+ it internally to parse the glTF files, including modifications like path resolutions etc.
1515
1616With this plugin you get:
1717
@@ -47,10 +47,9 @@ With this plugin you get:
4747 - [ React] ( https://react.dev/ )
4848 - [ Svelte] ( https://svelte.dev/ )
4949 - [ Vue3] ( https://vuejs.org/ )
50+ - [ Angular] ( https://angular.dev/ )
5051 - ...
5152
52- It will run when your dev server starts and also when you build your project.
53-
5453## Sponsoring
5554
5655If you like this plugin and want to support us, we would be very happy to see you as a sponsor on GitHub ❤️<br >
@@ -61,26 +60,30 @@ Thanks a lot for the support <3
6160## Developer Documentation
6261
6362For development-related information, including setup instructions for contributors, please refer to the
64- [ Developer README] ( ./README. dev.md ) .
63+ Developer README [ ` README-dev.md ` ] ( ./README- dev.md ) .
6564
6665## Getting Started
6766
6867### Installation
6968
70- 1 . Install with your package manager (we use pnpm and recommend it):<br >
69+ 1 . Install with your package manager (we use pnpm and recommend it):
70+
7171 ``` bash
72- # choose only one
72+ # choose your package manager
7373 pnpm add -D @todde.tv/gltf-type-toolkit
7474 npm install --save-dev @todde.tv/gltf-type-toolkit
7575 yarn add --dev @todde.tv/gltf-type-toolkit
7676 bun add --dev @todde.tv/gltf-type-toolkit
7777 ```
78+
78792 . Extend your ` .gitignore ` file to exclude generated files:
80+
7981 ``` sh
8082 # Generated glTF model files
8183 * .gltf.d.ts
8284 * .gltf.js
8385 ```
86+
84873 . Add the plugin to your build tool, for example with [ Vite] ( https://vitejs.dev/ ) :
8588
8689 ``` ts
@@ -106,15 +109,24 @@ For development-related information, including setup instructions for contributo
106109
107110### usage example with explanations
108111
112+ The plugin will run on:
113+
114+ - on dependency installation
115+ - on dev server start
116+ - on project build
117+
109118Here's an example of how to use the plugin. You can customize this example to suit your needs, such as saving models
110119to different folders, changing paths, or adjusting how the model is handled after import.
111120
1121211 . Install the plugin (See [ Installation] ( #installation ) above).
122+
1131232 . Add a model to your project, here in the project source under ` @/assets/models ` . We copy the following in it:
124+
114125 1 . ` MyModel.gltf ` The glTF JSON representation that describes the model.
115126 2 . ` MyModel.bin ` The binary file of the model, compressed with the [ Draco Compression] ( https://github.com/google/draco ) .
116127 3 . ` MyModel-texture1.png ` A texture that the model uses.
117128 4 . ` MyModel-texture2.png ` A second texture that the model uses.
129+
1181303 . Start your dev to generate all files. With our example model we get:
119131
120132 ``` diff
@@ -260,8 +272,8 @@ Project founder & head of project:
260272
261273Honorable mentions to people that helped this project:
262274
263- - [ Andreas Fehn] ( https://github.com/fehnomenal ) as contributor who helped incredible with the project and the magic
264- behind the core. Thank you <3
275+ - [ Andreas Fehn] ( https://github.com/fehnomenal ) as contributor who helped incredible with the project. Thank you mate,
276+ you rock <3
265277
266278Respectable mentions to projects that helped this project:
267279
0 commit comments