Threed-Viewer

Filters ::: filter_threedviewer
Maintained by ETHzETH Zürich
3D viewer filter (.stl format)
Latest release:
43 sites
19 downloads
6 fans
Current versions available: 2

Threed-Viewer Moodle filter

This moodle filter uses a custom Javascript layer (threed-viewer) built on top of Three.js to display an interactive STL viewer.

The filter's work is limited to detecting the presence of .stl in the content and asking the Javascript library to be loaded.

Usage

There are two ways to add an STL viewer to content on moodle.

In the straightforward way, a link to the STL file is added through the content editor. The appearance can be somewhat controlled by passing query parameters:

<a href="http://mymoodle.com/draftfile.php/.../myfile.stl?width=300px&height=300px">myfile.stl</a>

To use the full capabilities of threed-viewer, the users need to use its custom elements to wrap the link to the STL file:

<threed-viewer width=50% height=400px controls help axi-helper toolbar>
    <threed-model scale center><a href="http://mymoodle.com/draftfile.php/.../myfile.stl">myfile.stl</a></threed-model>
</threed-viewer>

License

This filter is distributed under the GNU GPL 3.0+ License. It includes a bundled version of three.js, which is distributed under the MIT License.

Feedback

For feedback and requests, please contact Cyril Picard <cpicard A_T ethz.ch>.


Screenshots

Screenshot #0

Contributors

ETHz
ETH Zürich (Lead maintainer)
Antonia Bonaccorso: Service owner, contact
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Plugins bot
    Sun, 23 Jan 2022, 5:20 AM
    Approval issue created: CONTRIB-8829
  • Róbert Toth
    Mon, 31 Oct 2022, 5:04 PM
    I was unable to make the plugin actually replace the link. I tried both ways (simple A tag and threed-viewer custom element), but to no success. Also, when the plugin is activated and I go to a page activity where some STL model is added, Chrome console shows one error which otherwise (i.e. when the plugin is disabled) is not displayed:

    https://MYSITE/lib/requirejs.php/1667205363/core/first.js line 250:
    Uncaught ReferenceError: regeneratorRuntime is not defined
    at first.js:250:16479
    at first.js:250:16874
    at Object.execCb (require.min.js:1:12861)
    at b.check (require.min.js:1:6615)
    at b.enable (require.min.js:1:9363)
    at Object.enable (require.min.js:1:11918)
    at b. (require.min.js:1:9220)
    at require.min.js:1:814
    at each (require.min.js:1:289)
    at b.enable (require.min.js:1:8720)

    I tried purging all the site caches and double-checked that this error is not shown when the plugin is disabled.
    Any thoughts what might be the problem?
  • Derek Chaplin
    Tue, 28 Nov 2023, 12:41 AM
    I tried installing the latest version (4.3 (2023111300)) of this plugin into my Moodle 4.3+ (Build: 20231116) site and it does not work. When I check the Plugins Overview the Threed-Viewer plugin Availability shows as disabled. I 've unstalled and re-installed it several times but it still doesn't work and always shows as disabled.

    Any help getting this working would be greatly appreciated.
Please login to post comments