Problem with plot3d and threejs

23 views
Skip to first unread message

Richard Quint

unread,
Dec 21, 2025, 8:25:05 PM (yesterday) Dec 21
to sage-devel
I've just built sage-10.8 on from source on an Intel 13th Gen IntelCoreT i7-1360P running Ubuntu 24.04 and have a question about the threejs viewer for html files. According to the log file threejs-r122.p0.log (attached), threejs-r122.p0 appears to be properly installed but when I try to display a 3d plot the browser opens a blank window.  If I add the option "online=True" the plot displays properly.  In the past (up to 10.7) no option or using "online=False" worked.  How can I get the local version of threejs to work again?
threejs-r122.p0.log

G. M.-S.

unread,
Dec 21, 2025, 8:45:44 PM (yesterday) Dec 21
to sage-...@googlegroups.com

Dima Pasechnik

unread,
Dec 21, 2025, 10:51:40 PM (23 hours ago) Dec 21
to sage-...@googlegroups.com
The first thing to check is that the browser is able to load any local htmt/js files at all. It might be that it's not possible due to some kind of sandboxing, preventing the browser from seeing most of the local file system.

Richard Quint

unread,
Dec 21, 2025, 11:19:04 PM (23 hours ago) Dec 21
to sage-devel
the problem is with the script creating the html files.  In 10.7 when
setting online=False or no option the lines

<script src="SAGE_ROOT/local/share/threejs-sage/r122/three.min.js"></script>
<script>

are written into the html file, while if online=True that line is

<script
src="https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@r122/build/three.min.js"></script>


In 10.8 when setting online=False or no option that line is missing
while when online=True
the same line as in 10.7

<script
src="https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@r122/build/three.min.js"></script>

is written into the script.  After manually inserting

<script src="SAGE_ROOT/local/share/threejs-sage/r122/three.min.js"></script>

the file displays correctly.
Reply all
Reply to author
Forward
0 new messages