Skip to content

fcastrovilli/3dtesting

Repository files navigation

Sveltekit + Threlte studies

Setup the project

Clone the repository

git clone https://github.com/fcastrovilli/3dtesting.git

Install Dependencies

cd ./3dtesting
npm install

Run the app

npm run dev

Convert GLTF/GLB 3D files

Place your models in src/static/models and run the following command to generate usable Svelte components (outputs will be found in src/lib/components/models).

npm run model-pipeline:run

Using GLTF/GLB you can export the following:

  • Meshes
  • Materials (Principled BSDF) and Shadeless (Unlit)
  • Textures
  • Cameras
  • Punctual lights (point, spot, and directional)
  • Animation (keyframe, shape key, and skinning)

Important

Sometimes your textures will not be exported correctly. Make sure to follow the export reccomandations provided in this video. If you want to try your fresh export, you can use this online viewer.