This code works in JSfiddle: https://jsfiddle.net/estevancarlos/w8yo3mp4/1/
let ScrollAnim = (function() {
console.log('ScrollAnim loaded');
this.init = function() {
console.log('init loaded');
};
this.getScenes = function() {
console.log('getScenes loaded');
};
return this;
})();
ScrollAnim.init();
ScrollAnim.getScenes();
However it does not work within my actual project, http://veve.io/wip2. I get the error:
Uncaught TypeError: Cannot set property 'init' of undefined
I don't know what is causing this differentiation. Suggestions?