I am attempting to incorporate Dat-GUI into my meteor project by adding the dat-GUI source in the client/lib folder. Below is my code snippet:
Template.EditorControllbar.rendered = function () {
var controllBar = document.getElementById('controllbar'),
gui, folder, controller;
// Create GUI
gui = new dat.GUI({autoPlace:false});
controllBar.appendChild(gui.domElement);
// Create folders
var renderFolder = gui.addFolder('Render'),
meshFolder = gui.addFolder('Mesh'),
lightFolder = gui.addFolder('Light'),
exportFolder = gui.addFolder('Export');
};
Upon running the server, I encounter the following error:
Exception from Deps afterFlush function function: ReferenceError: dat is not defined
at Object.Template.EditorControllbar.rendered (http://localhost:3000/client/views/toons/toon_edit/editor_controllbar/editor_controllbar.js?5613eb3f7dfe2c5aed33925dfe2970dcc11a04b4:33:15)
at http://localhost:3000/packages/ui.js?9419ac08328918a04e7a49464a988d45f851e1b0:439:23
at _assign.flush (http://localhost:3000/packages/deps.js?4a82362ae66e863a1c1a8b0a5fec6f665e2038d1:348:13) debug.js:4
Interestingly, the same code functions correctly on Codepen: http://codepen.io/praneybehl/pen/DabKv
If anyone has insight on how to successfully load Dat-GUI with Meteor, your assistance would be greatly appreciated.
Many thanks, Praney