cnr-isti-vclab / nexus

Nexus is a c++/javascript library for creation and visualization of a batched multiresolution mesh
GNU General Public License v3.0
213 stars 86 forks source link

nexus js: Cannot display textured models #125

Closed asmrcek closed 2 years ago

asmrcek commented 2 years ago

Bug description

The newest Nexus js viewer (on the master branch) cannot display textured models. Nothing is shown and the console prints "Texture loading error!" message.

How to reproduce

Pick an arbitrary Nexus model that contains textures and load it in Nexus js viewer (e.g. in the html/threejs.html example).

An example with a small bunny model of mine:

# It's assumed you have NPM installed. If not, you can obtain it by installing Node.js (https://nodejs.org).

# Clone the most recent Nexus repo
git clone https://github.com/cnr-isti-vclab/nexus.git

cd nexus/html/models/

# Clone repo with a small bunny model
git clone https://github.com/asmrcek/test-3d-models.git

cd ../

# Launch the example via simple http server
npx http-server ./ -c-1 -o threejs.html?model=models/test-3d-models/models/door_rabbit/reduced/nxs/door_rabbit.nxs