simularium / simularium-viewer

NPM package to view Simularium trajectories in 3D
Apache License 2.0
2 stars 0 forks source link

address `VisData does not contain firstFrameTime, defaulting to 0` error log #377

Open meganrm opened 4 months ago

meganrm commented 4 months ago

Description

when I call goToTime from the binding simulator I get an error VisData does not contain firstFrameTime, defaulting to 0

Expected Behavior

no error log. I'm not sure when/how firstFrameTime gets set or why it's not set in this case, but there is a comment with this function that indicates this was not a finished feature

some possible fixes:

  1. maybe something needs to be changed with the implementation of the binding affinity app to set firstFrameTime that I'm not doing.
  2. Just remove the log? do we need to tell the users this is happening?

Reproduction

in the education app, change the input concentration using the slider

Environment

Any additional information about your environment. E.g. OS version, python version, browser etc.

meganrm commented 4 months ago

here's the comment: // Instead of requesting from the backend the time passed into this // function, we request (time - firstFrameTime) because the backend // currently assumes the first frame of every trajectory is at time 0. // // TODO: Long term, we should decide on a better way to deal with this // assumption: remove assumption from backend, perform this normalization // in simulariumio, or something else? One way might be to require making // firstFrameTime a part of TrajectoryFileInfo.