Uncaught ReferenceError: FULLTILT is not defined
See original GitHub issueThe README.md mentions that FullTilt is bundled with gyronorm.js but when running the page (using the default values) I’m getting the error:
"Uncaught ReferenceError: FULLTILT is not defined"
Sorry if I’m missing something obvious. Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Developers - Uncaught ReferenceError: FULLTILT is not defined -
The README.md mentions that FullTilt is bundled with gyronorm.js but when running the page (using the default values) I'm getting the error: "Uncaught...
Read more >Uncaught ReferenceError: $ is not defined? - Stack Overflow
The most common reason behind the error "Uncaught ReferenceError: $ is not defined" is executing the jQuery code before the jQuery library file...
Read more >Got message "Uncaught ReferenceError: $ is not defined"
That error occurs when we try to run CC code on our machine without including a script element to load the jQuery core...
Read more >JavaScript常见的六中错误- pxmt - 博客园
Uncaught ReferenceError 错误的解决方案: 在js开发中,很多人遇到类似问题,都找不到解决方法。Uncaught ReferenceError: $ is not defined,在这里给 ...
Read more >Uncaught referenceerror is not defined | Edureka Community
Why and how does the written code give a result as an Uncaught ReferenceError: $ is not defined ... "text/javascript" src="
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I managed to get it working in Vue.js (which uses Webpack to load modules, and should be similar to React or Angular). It is by no means a pretty solution, but it might get others to where they need to go.
Step 1
Download v0.5.3 of Fulltilt here, since it seems to be the latest version with a license, which allows commercial use.
Step 2
Remove line 17-22 and 1469-1473 from fulltilt.js, i.e.
and
Step 3
Attach this to the end of the file:
export default FULLTILT;
. Then save the file somewhere locally in your project. For me, that wasassets/fulltilt.js
.Step 4
Change line 112 and 116 in lib/gyronorm.js to:
var deviceOrientationPromise = new this.FULLTILT.getDeviceOrientation({ 'type': _orientationBase }).then(function(controller) {
and
var deviceMotionPromise = new this.FULLTILT.getDeviceMotion().then(function(controller) {
Step 5
Import FULLTILT and Gyronorm to your project, e.g. like this:
Step 6
After constructing the Gyronorm object and before initializing it, add Fulltilt to the object like this:
That’s it. You should be able to work with Gyronorm now.
I’m sure there is a smarter way, e.g. by passing Fulltilt to the constructor or, as @dorukeker suggests, to remove the Fulltilt dependency altogether.
I run into the same with webpack following this: https://github.com/dorukeker/gyronorm.js/pull/30
Will use the minified distributable meanwhile: