けん@学生

自分が独学で学んだことを発信する

2022-06-01から1ヶ月間の記事一覧

colorTexture.magFilter = THREE.NearestFilter;

three.jsでtexture、normalMap、roughnessMapを貼ってみた

webpackでexrファイルの読み込みは file-loaderにexrと記述するだけ { test: /\.(jpg|png|gif|exr|svg|gltf|glb)$/, use: [ { loader: 'file-loader', options: { outputPath: 'assets/images/', }, }, ], } nomalmapを使う時はEXRLoaderを使う this.exrload…

gltfで出した時のエラー[THREE.Object3D.add: object not an instance of THREE.Object3D.]

THREE.Object3D.add: object not an instance of THREE.Object3D. const loader = new GLTFLoader(); loader.load(glbmodel, (gltf) => { scene.add(gltf); }); 上のコードでエラーが出たので、 調べてみたら const loader = new GLTFLoader(); let example …