Skip to content

[BUG]: mcdisplay-webgl shows nothing without a source #2531

Description

@mads-bertelsen

Describe the bug
A simple instrument with just progress_bar and a shape hangs when trying to visualize with mcdisplay-webgl. Generated instrument.json include lots of infinities.

Document steps to reproduce the bug
Steps to reproduce the behavior:

  1. mcdisplay-webgl webgl_bug.instr

Expected behavior
Visualization of the shape included in the instrument.

Screenshots
Image

OS and McStas/McXtrace version (please complete the following information):

  • OS: OS X
  • McCode variant: McStas
  • Version 3.7.7

Add your code / dataset
If applicable:

  • Please provide a zip-archive of instrument plus any local components, datafiles, …
  • Please provide all settings used (e.g. input parameters, mpi parallelisation level, …)
  • Please provide a zip-archive of your dataset

webgl_bug.txt

Additional context
Part of instrument.json that contains infinities.

"boundingbox": {
    "xmin": Infinity,
    "xmax": -Infinity,
    "ymin": Infinity,
    "ymax": -Infinity,
    "zmin": Infinity,
    "zmax": -Infinity,
    "drawcalls": [
      {
        "key": "multiline",
        "args": [
          Infinity,
          Infinity,
          Infinity,
          Infinity,
          -Infinity,
          Infinity,
          -Infinity,
          -Infinity,
          Infinity,
          -Infinity,
          Infinity,
          Infinity,
          Infinity,
          Infinity,
          Infinity
        ]
      },
      {
        "key": "multiline",
        "args": [
          Infinity,
          Infinity,
          -Infinity,
          Infinity,
          -Infinity,
          -Infinity,
          -Infinity,
          -Infinity,
          -Infinity,
          -Infinity,
          Infinity,
          -Infinity,
          Infinity,
          Infinity,
          -Infinity
        ]
      },
      {
        "key": "line",
        "args": [
          Infinity,
          Infinity,
          Infinity,
          Infinity,
          Infinity,
          -Infinity
        ]
      },
      {
        "key": "line",
        "args": [
          -Infinity,
          Infinity,
          Infinity,
          -Infinity,
          Infinity,
          -Infinity
        ]
      },
      {
        "key": "line",
        "args": [
          Infinity,
          -Infinity,
          Infinity,
          Infinity,
          -Infinity,
          -Infinity
        ]
      },
      {
        "key": "line",
        "args": [
          -Infinity,
          -Infinity,
          Infinity,
          -Infinity,
          -Infinity,
          -Infinity
        ]
      }
    ]
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions