How to call tml3dRenderer from external .js file
- June 20, 2022
- 1 reply
- 2672 views
Hello everyone, I've downloaded a sample Hololens project with PDF reader included (via external library pdf.js) and it works fine both in Hololens and preview.
Other than the external library there's also some code in Home.js that initialize and handles the reader variable, I want to move this code to an external file too for legibility purpose.
The problem occurs when code try to execute a line where 'tml3dRenderer' is in use:
"PDFreader.js:181 Uncaught (in promise) ReferenceError: tml3dRenderer is not defined "
there's a particular way to refer interal components (like tml3dRenderer is) from external files that I'm missing?
Once external .js is appendend to HTML document.head shouldn't it be recalled like the code is wrote directly in Home.js?
I'm relatively new to angular/web js development and after some google searches I can't find anything useful,
p.s. can't retrieve where I've downloaded the project so I've attached here a copy

