Skip to content

bigwheel is an mvc framework without the mc ;) majorly focusing on animation

License

Notifications You must be signed in to change notification settings

njam3/bigwheel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

bigwheel is an mvc framework without the mc ;) majorly focusing on animation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%