Code Monkey home page Code Monkey logo

speckleviewer's Introduction

Please note, this little piece of speckle is no longer maintained. The viewer has been integrated in the admin interface.

This repository is archived, and will not be supported going forward.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080.
npm run dev

# build for production with minification
npm run build

Running the client

After running npm run dev, the client will start on localhost:8080. By default, the client will try to connect to the server on localhost:8080/api. However, this can be overridden using query parameters. For instance, to use the Speckle test server, go to:

localhost:8080?server=https://hestia.speckle.works

speckleviewer's People

Contributors

didimitrie avatar kjetilbk avatar mswaidan avatar radumg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

speckleviewer's Issues

Add version info somewhere

Step 0:

Expected Behaviour

I'm having a problem and want to make sure I'm running the latest version. I should be able to find this info easily.

Actual Behaviour

I can't find that info easily!

Proposed Solution (if any)

Info box showing which npm version this viewer is.

Improve stream controller logics

Step 0:

Expected Behaviour

When I first expand the controllers list item, get-def-io request is sent to sender.

Actual Behaviour

Every time I expand or collapse the controllers list item, the request is sent.

Proposed Solution (if any)

Check if controllers are present. If so, don't send the request. Add a refresh button in case I add new controllers to the definition and want to access them.

Controllers & Disappearing context

Step 0:

Static geometry disappears from controlled streams in the online viewer (ie, non changing objects).

Reproduction Steps & System Config (win, osx, web, etc.)

Create a stream sender in gh, enable slider control, add static and dynamic geometry, go to webviewer, fiddle with the sliders - static geo disappears!

Receiver layer data doesn't update on stream refresh

E.g.: Add an object to a stream via grasshopper component. Refresh stream in viewer.

-receiver.objects[] updates to show added object
-receiver.layers.layer.objectCount remains unaffected

I think this is being caused in store.js, but am not certain.

JS errors in console when viewing stream

Migrated from speckleworks/SpeckleView#14

Step 0:

Expected Behaviour

No errors.

Actual Behaviour

[Error] Failed to load resource: the server responded with a status of 404 () (speckleConfig.js, line 0)
[Error] Did not load script at 'https://hestia.speckle.works/view/static/speckleConfig.js' because non script MIME types are not allowed when 'X-Content-Type: nosniff' is given.
...
[Warning] Error: no login details found — build.js:10:46357 (build.js, line 10)
[Error] Failed to load resource: the server responded with a status of 404 () (build.js.map, line 0)
[Log] {name: "Will", ...} (build.js, line 21) # so I _am_ logged in...
...

Affected Projects

Does this issue propagate to other dependencies or dependants? If so, list them here!

Reproduction Steps & System Config (win, osx, web, etc.)

Open https://hestia.speckle.works/view/?streams=HyUvXQF7X in a browser with Developer Tools/JavaScript Console open

Proposed Solution (if any)

🤷‍♂️

Comment/Conversation View

Step 0:

Add comments back in a conversation view of sorts. Ideally this would be separated from the stream view. When adding comments check:

  • If object is selected, add it to that object
  • If no object is selected, have the ability to select which stream to add it to (but default to the topmost one?)

Of course, camera views should be serialised along with everyhting else.

Ref: current comment model

var commentSchema = mongoose.Schema( {
  // ownership
  owner: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
  // threads
  comments: [ { type: mongoose.Schema.Types.ObjectId, ref: 'Comment' } ],

  // content
  text: { type: String, required: true },

  // parent resource
  resource: { 
    resourceType: { type: String, required: true },
    resourceId: { type: String, required: true }
  },

  // minimal issue-like functionality
  closed: { type: Boolean, default: false },
  assignedTo: [ { type: mongoose.Schema.Types.ObjectId, ref: 'User' } ],
  labels: [ { type: String } ],

  // camera view (can be expanded to hold other scene settings)
  view: { type: Object, default: {} },

  // screenshot
  screenshot: { type: String }

}, { timestamps: true } )

module.exports = mongoose.model( 'Comment', commentSchema )

Add an Option to Remove All Object from Stream

I often want to be able to replace the whole stream with the current selection. What I currently have to do is a) turn on all layers b) select everything in the whole file c) click "remove" in Speckle d) repeat my selection and hit "add". It's workable but tedious. Maybe a simple option in the dropdown to remove all objects from the stream would be a reasonable solution...

Overhaul Viewer Completely

The viewer needs a complete overhaul, ui-wise and functionality wise.

Key features:

  • filter functionality and querying
  • better login flow
  • comments & saved views
  • metadata display of objects, etc.
  • display single objects too, not just streams

Optional nice haves:

  • Integrate defintion controller functionality
  • Screenshots & link sharing functionality
  • Tabular view

...

Should we store viewer state in localStorage?

I'm working on a UI component that lets the user store some settings for the viewer. They're set in the Vuex store so we can grab them to use various components. I'm setting them also in localStorage so that on a browser refresh, a user's settings persist.

A few questions:

  1. Should the viewerSettings object be attached the the user object on the server, so that I can keep my settings between browsers? Seems like maybe overkill / more work for @didimitrie Or, is there some better way to store these?

  2. Should other pieces of the state: which streams are loaded, etc., be cached in localStorage so that on a browser refresh, user doesn't have to go back and add all their streams again?

What do people think?

Implement per-object-colours

Step 0:

It's essential for people doing analysis and wanting to view results online. How to implement, I'm thinking more of convention rather than schema-level enforcement:

If an object has a properties.spkcolor property set to a value we can actually parse and use (ie, hex or rgba?) use that to override any other default colours set for by layers, etc.

This should work for any object type (also points, lines, etc.).

400 on GET objects/[object]

e.g. when URL is http://104.131.39.3:8080/?server=http://104.131.39.3:3000 we get the error GET http://104.131.39.3:3000/api/v1/objects/5a7b1acc6834136c23c73ea0?omit=base64,rawData 400 (Bad Request)

User login & stream lists work as expected

Control of slider increment value from the GH definition.

Step 0:

Expected Behaviour

Not a bug, but a suggestion (as discussed on Speckle forum) - Would be really cool if Speckle web viewer could fetch the increment value for sliders from the GH definition. Eg. snapping to integers, or floating numbers depending what's setup in the GH definition.

Actual Behaviour

Speckle web viewer currently defaults to increments of 0.01
Thanks!!!

Share button

Maybe we could move the share button to the main toolbar? Then it could be used to generate a link with all active streams, server address, any other URL params. Could we use this to share saved views?

One-click jumping to SpeckleViewer / Online Interface from node

It should be possible to easily and directly jump from a node to the web with a mouse click only, e.g.

  • to the administration view that shows all streams for a user
  • to a project view that shows all project streams
  • to a 3D & json view for one specific streams (this stream is directly shown)
  • to a 3D & json view for multiple streams merged together (this streams are directly shown)
  • to a 3D & json view for a specific layer or multiple layers of a stream (this 3D is directly shown)
  • etc.

A login should NOT be necessary - can the APIToken be used for a cloud server authorization and sent in the header or similar workflow to do this?

I am not sure the above is possible currently?
If yes, can someone please list the URLs and URL parameters to use for this?

Object info popup interferes with orbit controls

Expected Behaviour

User left-clicks an object, window pops up with info about object, but that left click doesn't trigger threejs orbit.

Actual Behaviour

User left-clicks an object, window pops up with info about object, but that left click causes camera orbit to begin.

Zoom extents

Hi,

Can you add "zoom extents" function in the viewer?
I can't find objects for some cases, even though they exist in the viewer.
Thank you.

Dongyeop

Links to Model Viewer app in Speckle Docs are broken

The Model Viewer documentation page here https://speckle.works/doc/onlineviewer/ lists a couple of links to example streams in the viewer ;

Another page with same broken links is here :
https://discourse.speckle.works/t/speckle-model-viewer/39

Links are all broken, with 404s.
Swapping app.speckle for s003.speckle also didn't work - can't remember what the latest url is @didimitrie ?

Also, should i have opened this issue on the Org repo instead ?

Remove config file dependency

Right now the viewer looks for the api url in a hard-coded config file. Since the viewer now gets bundled with the speckle server by default, this is no longer needed.

Api url should just be taken from window.location 💯

View clipping

image
The viewer clips the model as seen in this image. I'm not sure what the issue is.

Dongyeop

Filter/Query View

Step 0:

Add a filtering view that will allow users to apply a basic query on the objects in the render. Can potentially be combined with a tabular view, but it also might be an overkill.

Queries should be against any numerical/string custom object property (first level ones to begin with).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.