I'm attempting to integrate the basic webgl particle example from three.js into the sails.js framework activityOverlord example on the default welcome screen. First, I copy/paste the necessary three JavaScript libraries into the linker/js folder and add them in the grunt file:
<script src="/linker/js/three.min.js"></script>
<script src="/linker/js/Detector.js"></script>
<script src="/linker/js/stats.min.js"></script>
Afterwards, when I include the three.js code example in an .ejs file (like the /static/index.ejs file), the code doesn't work. However, if I add the JavaScript code in the layout.ejs file before </body>, it displays the webgl content beautifully...
<!DOCTYPE html>
<html>
<head>
<title><%- title %></title>
<!-- Rest of the code is omitted for brevity -->
Wondering if anyone has any insights on what I might be doing wrong when trying to embed the three.js JavaScript code inside the ejs view files to run different three.js programs in various views.