![]() Get the feedback you need with Autodesk Viewer’s annotation and drawing tools for easy online collaboration. If you want to try it yourself, you can provide your own ACCESS_TOKEN and MODEL_URN values, and serve this HTML page using any static server. Autodesk Viewer supports most 2D and 3D files, including DWG, STEP, DWF, RVT and Solidworks, and works with over 80 file types on any device. Here's a simple webpage with 3 instances of the viewer all displaying the same model: ![]() Viewers created with this method can be used as usual, and under-the-hood they will try and share as much of their resources as possible. * viewerClass Specific viewer class to instantiate (`3D` by default).ĬreateViewer(container, config, viewerClass) ![]() * container HTML container to host the viewer. ![]() * Creates a special instance of the viewer that can share resources with other instances. The MultiViewerFactory class implements a createViewer method with the following signature: /** These instances share many of their resources, including the resources of models that you load in them. In the Viewer SDK there's a small, inconspicuous class called that can create "special instances" of the viewer. Moreover, loading the same model URN in different viewers would trigger the same HTTP requests to the Model Derivative service, unnecessarily wasting the bandwidth. Loading the same model into multiple viewers would therefore result in duplicate memory allocation. The problem is, each instance of the viewer allocates its own set of browser and GPU resources for each model (e.g., textures, geometry buffers, or property databases). This approach would certainly work but it is not very efficient, and it could start causing issues when it comes to very large and complex designs. Of course, we could just create separate instances of 3D or 3D, and load the same model URN in each one of them. Displaying the same model in multiple viewer instances may not be a very common use case but if you ever find yourself implementing such feature (for example, to provide different camera angles of the same design), here's a little optimization to consider.
0 Comments
Leave a Reply. |