Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bigwheel

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigwheel

bigwheel is an mvc framework that focuses on animation

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by3400%
Maintainers
1
Weekly downloads
 
Created
Source

#bigwheel ##class: bigwheel~bigwheel Members

###new bigwheel~bigwheel(settingsFunc) When instantiating bigwheel you must pass in a setup function.

In this function you may do any preparation that must be done for your application such as creating a global Canvas element or something else.

The setup function must either return a settings object for bigwheel or this function must receive a callback which you will call with the settings object. Furthermore you can pass back a promise from this settings function which will receive the settings object.

The following documents what can be passed in the settings object:

{
	///// REQUIRED /////

	// routes defines all the routes for your website it can also define a 
	// 404 section which will be opened if the route is incorrect
 routes: {

		'/': someSection,
		'/someOther': someOtherSection,
		'404': sectionFourOhFour
 },
 
 ///// OPTIONAL /////
 initSection: preSection, // this could be a section that is run always
 						 // before routes are even evaluated. This is
 						 // usefulf for site preloaders or landing pages
 						 // such as age verification (something the user
 						 // must see)

	autoResize: true, // by default this value is true. When this value is
					  // true a resize listener is added to the window
					  // whenever the window changes size it's width and
					  // height is passed to all instantiated sections
	postHash: '#!', // this string is appended before the route. 
					// by default it's value is '#!'
}

Params

  • settingsFunc function - This settings function will be used to initialize bigwheel.

Scope: inner class of bigwheel
###bigwheel.init() init must be called to start the framework. This was done to allow for a developer to have full control of when bigwheel starts doing it's thing.

###bigwheel.go(to) go can be called to go to another section.

Params

  • to String - This is the route you want to go to.

Example

framework.go( '/landing' );

###bigwheel.resize(w, h) Resize can be called at any time. The values passed in for width and height will be passed to the currently instantiated sections.

If autoResize was not passed in or it was true then resize will automatically be called when the window of the browser resizes.

Params

  • w Number - width value you'd like to pass to the sections
  • h Number - height value you'd like to pass to the sections

Keywords

FAQs

Package last updated on 06 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc