Category Archives: JavaScript
FullScreen with jQuery
The thing is, for security reasons, fullscreen could only be triggered by mouse and keyboard events. Trying it out in console alone would be vain.
Youtube Embedding
Where I stumbled:
- The JavaScript API is a completely different thing than the iframe API
- An outside script is actually needed for the iframe API
Understanding THREE.js
Q: What is a working THREE page composed of?
THREE things:
- Scene: a scene, a stage, to add stuff into
- Camera: somewhere to stand and peer
- Renderer: a 2D surface to cast the 3D calculation onto
window.innerWidth Vs. $(window).innerWidth()
What are the differences:
- window.innerWidth: with scrollbar
- $(window).innerWidth(): wrong usage
- $(window).width(): without scrollbar
- mediaquery: with scrollbar (at least the standard ones)
Take Control of Scroll Event
Take Control of Scroll Event, in order to add tweens:
AngularJS: Using with RequireJS
Uncaught Error: [$injector:modulerr] Failed to instantiate module xx due to: Error: [$injector:nomod] Module 'appname' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Navigate Hash Without Affecting History
Url change triggers statechange; hash change triggers hashchange. But both are stored in back button history. How to exclude hashchange events?
Famo.us Intro
Questions:
1. What is famo.us? What makes it special?
A JavaScript framework which helps you create smooth, complex UIs for any screen. Stress on the smooth part. Famo.us elements are styled with position:absolute and their positions are defined by matrix3d webkit transforms. This is what makes Famo.us performant.