Moodle Plugin| 3D viewer GLTF

Moodle Plugin| 3D viewer GLTF

by Bryan Rosq -
Number of replies: 1

Hi , i'm a newbie on moodle i would like to build a plugin where i can have a 3d viewer.

I already have the code for the viewer but i don't know how to add it to my moodle page 

(I have use three.js to build the viewer)

I'll be very grateful if you help me with this.

Average of ratings: -
In reply to Bryan Rosq

Re: Moodle Plugin| 3D viewer GLTF

by Mark Johnson -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Bryan, If your "viewer" is written in Javascript, than the more general question of "How to I add Javascript to my Moodle page?" should apply here. Moodle uses requireJS to load Javascript as AMD modules. The developer documentation should explain how to define your code as an AMD module (if it isn't already), and how to include this in your page.

Moodle 3.8 onwards will support native es6 modules, but I believe the current method will continue to work.