Viewer 3.0.0 - Apple
Please note that the major version of Viewer 3 has increased from version 2 to version 3. The term Viewer 2 in our documentation refers to an older, completely different implementation. If you are unsure whether you are using Viewer 3, you can check the browser console, which clearly indicates if Viewer Version 3 is being used, or contact us for assistance.
In this major release the main focus was to separate the viewport and the session APIs into separated packages. It is therefore now possible to call the Viewer API in three ways:
- @shapediver/viewer: In the default way, the viewport and session APIs are both loaded. This still works as it used to in previous versions.
- @shapediver/viewer.session: By just calling the session API, you can create a headless version of the viewer. This can either be useful for applications in a node.js environment or if you want to use your own visualization.
- @shapediver/viewer.viewport: By just calling the viewport API, you can create a hydra version of the viewer. This means that you only get the visualization options of the viewer API, but not the connection to the ShapeDiver servers. This might be useful, if you want to visualize external geometry only.
Camera
There has been a general restructuring of the camera controls. This restructuring allows to now have a free orthographic camera (ORTHOGRAPHIC_CAMERA_DIRECTION.CUSTOM) which also allows rotation and all the properties that were previously only reserved for the perspective cameras.
- implemented new object controls
- usage of pointer events instead of mouse/touch events
Session
- new events for parameter updates
- file parameters that were not uploaded, but that are needed for export requests are now uploaded
- activate busy mode during export requests that included outputs
General
- the CSS styling of almost all viewer properties is now provided in CSS classes
- usage of pointer events instead of mouse/touch events
- made mime-type check case insensitive
Documentation
- new example page for all viewer examples
- improved documentation for file upload behavior
Attribute Visualization
sdTFdata is not loaded anymore by default. This change was necessary as this type of data can get quite large and can therefore drastically impact the loading performance. You can enablesdTFloading either:- At initialization by setting the
loadSdtfin the createSession properties totrue - At runtime by setting the property
loadSdtfin the SessionApi totrue. In this case you can listen to the eventSESSION_SDTF_DELAYED_LOADEDfor when the data has been loaded.
- At initialization by setting the
Bug Fixes
- improved checks for document for node.js environments
- post-processing issues on iOS with low FOV