When I run the example code, the Javascript error will raise, and cannot render the figure:
from pythreejs import *
from IPython.display import display
import ipywidgets
# Reduce repo churn for examples with embedded state:
from pythreejs._example_helper import use_example_model_ids
use_example_model_ids()
ball = Mesh(geometry=SphereGeometry(),
material=MeshLambertMaterial(color='red'))
key_light = DirectionalLight(color='white', position=[3, 5, 1], intensity=0.5)
c = PerspectiveCamera(position=[0, 5, 5], up=[0, 1, 0], children=[key_light])
scene = Scene(children=[ball, c, AmbientLight(color='#777777')], background=None)
renderer = Renderer(camera=c,
scene=scene,
alpha=True,
clearOpacity=0,
controls=[OrbitControls(controlling=c)])
display(renderer)
The following is the raised error:
[Open Browser Console for more detailed log - Double click to close this message]
Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated
TypeError: Cannot read properties of undefined (reading 'then')
at http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.ba1735fea70611ab4bc1.js?v=ba1735fea70611ab4bc1:1:32057
at async Promise.all (index 20)
at async f._make_model (http://localhost:8888/static/lab/4416.0944956f5de66ec0a0b0.js?v=0944956f5de66ec0a0b0:1:9684)
When I run the example code, the Javascript error will raise, and cannot render the figure:
The following is the raised error:
The following is the conda environment: