Load and display a glTF (.gltf) file using Threejs.

この記事は約2分で読めます。
スポンサーリンク

Things I want to do

I want to easily load 3D files that are split into glTF (.gltf) files, .bin files, and texture files, as recommended by Threejs and Microsoft, into Threejs.

The following page explains how to save in Blender.

スポンサーリンク

Environment

Threejs: r150

Chrome: 111.0.5563.65

スポンサーリンク

Loading and displaying

Loading and displaying can be done using the same code as for .glb files.

loadObjects(scene,"./dice.glb");

Change the file specified above to the specified .gltf file.

The .bin file and texture files that are created simultaneously when saving the .gltf file do not need to be specified in the source code.

When you save a .gltf file in Blender, the .bin file and texture files are saved in the same folder. All saved files need to be uploaded to the server.

In particular, be careful not to overlook the texture files, as they are saved in the same folder as the original .blend file.

スポンサーリンク

Related pages

A summary of how to load and display 3D objects created in Blender using Threejs.

コメント

タイトルとURLをコピーしました