June 2017
Beginner to intermediate
368 pages
8h 31m
English
We will be relying on three files to render the model. The first is /view.php. This PHP script is loaded by the framework when it's time to display the activity. This script calls on the Page API (via the $PAGE global variable) to, among other things, set the page URL and to load up the necessary JavaScript files:
// The javascript this page requires// The code we are using is neat javascript so load each script one at a time//$PAGE->requires->js('/mod/wavefront/thirdparty/three.js', true);$PAGE->requires->js('/mod/wavefront/thirdparty/Detector.js', true);$PAGE->requires->js('/mod/wavefront/thirdparty/OrbitControls.js', true);$PAGE->requires->js('/mod/wavefront/thirdparty/OBJLoader.js', true);$PAGE->requires->js('/mod/wavefront/thirdparty/MTLLoader.js', ...Read now
Unlock full access