1. three-obj-mtl-loader
Threejs newest obj&mtl loader with npm dev
three-obj-mtl-loader
Package: three-obj-mtl-loader
Created by: cs64188
Last modified: Sat, 21 May 2022 19:11:22 GMT
Version: 1.0.3
License: MIT
Downloads: 20,921
Repository: https://github.com/cs64188/three-obj-mtl-loader

Install

npm install three-obj-mtl-loader
yarn add three-obj-mtl-loader

three-obj-mtl-loader

THREE.OBJLoader repackaged as a node module

install

npm i --save three-obj-mtl-loader

usage

 
import * as THREE from 'three'
import {MTLLoader, OBJLoader} from 'three-obj-mtl-loader'

let scene = new THREE.Scene()

let mtlLoader = new MTLLoader();

let objLoader = new OBJLoader();

mtlLoader.load('./test.mtl', (materials) => {
  materials.preload()
  objLoader.setMaterials(materials)
  objLoader.load('./test.obj', (object) => {
    scene.add(object)
  })
})

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin