Opened 4 years ago

Closed 19 months ago

#24601 closed defect (fixed)

3D plot missing axis labels and tick numbers with viewer='threejs' and displayed in chrome.

Reported by: andy Owned by:
Priority: minor Milestone: sage-9.1
Component: graphics Keywords: threejs plot3d
Cc: egourgoulhon Merged in:
Authors: Joshua Campbell Reviewers: Paul Masson
Report Upstream: N/A Work issues:
Branch: 78f5b0d (Commits, GitHub, GitLab) Commit: 78f5b0d9066bc0ff429adc5325b47b31e67cccdc
Dependencies: Stopgaps:

Status badges

Description

This one liner:

line([(0,0,0),(1,1,1)]).show(viewer="threejs")

does not display correctly in Chrome Version 63.0.3239.132 (Official Build) Built on Ubuntu , running on Ubuntu 17.10 (64-bit) or the same version in Windows. Sage 8.0 and 8.2beta3 produce the same HTML, other than the location of the threejs code. Both don't display in Chrome.

It displays fine in firefox 58 under Ubuntu 17.10.

My javascript skills are pretty limited. I did step through the code in both browsers. I didn't see any obvious differences

I'll attach screen shots.

Attachments (4)

firefox-threejs-display.png (32.1 KB) - added by andy 4 years ago.
Firefox display
chrome-threejs-display.png (10.0 KB) - added by andy 4 years ago.
Chrome display
tmp_2E60EC.html (9.9 KB) - added by andy 4 years ago.
Generated HTML for plot
graphic.html (16.8 KB) - added by gh-jcamp0x2a 19 months ago.
Example HTML plot after the changes

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by andy

Firefox display

Changed 4 years ago by andy

Chrome display

Changed 4 years ago by andy

Generated HTML for plot

comment:1 Changed 4 years ago by egourgoulhon

  • Cc egourgoulhon added

comment:2 Changed 2 years ago by paulmasson

Is this still a problem or has it gone away? Sounds like a browser issue.

comment:3 Changed 2 years ago by andy

Paul, it is still an issue under Ubuntu 19.04 with 9.0beta3

With Chrome 76.0.3809.100. Viewers threejs and tachyon do NOT display numbers and ticks. Viewers canvas3d, jmol and wavefront work.

Under Firfox 70.0, only viewer threejs does not display tics and numbers.

comment:4 Changed 19 months ago by gh-jcamp0x2a

  • Authors set to Joshua Campbell
  • Branch set to u/gh-jcamp0x2a/24601
  • Commit set to 78f5b0d9066bc0ff429adc5325b47b31e67cccdc
  • Status changed from new to needs_review

Hello. I was able to replicate this bug on my Ubuntu machine in Chrome, and I've pushed a fix for review.

The z-component was left undefined when setting the text sprites' scales. I'm not sure why this bug didn't also appear in Firefox or on Windows. Particulars of the javascript engines with each browser/platform I suppose.

Best regards!

Changed 19 months ago by gh-jcamp0x2a

Example HTML plot after the changes

comment:5 Changed 19 months ago by paulmasson

  • Reviewers set to Paul Masson
  • Status changed from needs_review to positive_review

Your modification is in line with Three.js examples, so positive review. Curious that it worked on most machines without this. Nice catch!

comment:6 Changed 19 months ago by mkoeppe

  • Milestone set to sage-9.1

comment:7 Changed 19 months ago by vbraun

  • Branch changed from u/gh-jcamp0x2a/24601 to 78f5b0d9066bc0ff429adc5325b47b31e67cccdc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.