Within my Ionic 2 application, I have incorporated three.js along with a PLYLoader extension for three.js (accessible here: https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PLYLoader.js)
Integrating three.js is straightforward by including the following line in my index.html
:
<script src="three.js"> </script>
Within the appropriate TypeScript file:
import * as THREE from '../../three.js';
A similar approach is being attempted with PLYLoader:
<script src="PLYLoader.js"> </script>
Combined with:
import * as PLYLoader from '../../PLYLoader.js';
Despite loading the page, an error persists:
ionViewDidLoad error: __WEBPACK_IMPORTED_MODULE_2__three_js__.PLYLoader is not a constructor
Although Ionic/Angular can locate the file, the TypeScript fails to interpret the JavaScript class correctly. Is there a feasible resolution to this issue?