jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
934 stars 185 forks source link

Texture Loader has no method load #408

Open DerBambus opened 2 months ago

DerBambus commented 2 months ago

Hi there, I'm trying to load in a custom texture for a project. When using the texture loader, I followed a regular 3js tutorial, leading me to the following code:

        texture = p3s.TextureLoader().load("temp.png")

which gives me the following error message: AttributeError: 'TextureLoader' object has no attribute 'load'

I have tried calling different loaders, and also in different constellations, but I can't seem to get it to work.

chuston-zvelo commented 1 month ago

Same here.

Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:38:13) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.24.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pythreejs as THREE

In [2]: THREE.TextureLoader().load("world.200408.3x5400x2700.png")
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 1
----> 1 THREE.TextureLoader().load("world.200408.3x5400x2700.png")

AttributeError: 'TextureLoader' object has no attribute 'load'

In [3]: THREE.version_info
Out[3]: (2, 4, 2, 'final')