The Famous Engine is a free and open source JavaScript rendering engine. What makes the Famous Engine unique is its JavaScript rendering engine and 3D physics engine that gives developers the power and tools to build native quality apps and animations using pure JavaScript. It is designed to allow developers the ability to render to both DOM and WebGL in a unified API.
Out of respect for the tremendous amount of work the extremely generous Famous team have contributed thus far and premised on the assumption that they plan to resume work on the project at some stage in the reasonable future, the guiding principles for this Famous fork are as follows:
- Only critical bugfixes will be included
- Only the Famous engine will be covered
- There will be no API changes
- No new functionality will be added
- Code base to be easily merge-able into the existing famous tree
Thus it will be a stabilization of the latest dev build and nothing more.
You probably don't want mixed mode - the current implementation can cause GPUs to overheat. To disable:
var famous = require("refamous");
famous.core.FamousEngine.compositor.setMixedModeEnabled(false);
(Re)Famous drops the target FPS from 60 down to 15, which is probably sufficient for what you need. To change the FPS rate to 30:
var famous = require("refamous");
famous.core.FamousEngine.renderLoop._FPSCounter.setTargetFPS(30.0);
And to find out the current FPS, MSPF & CPU usage:
var famous = require("refamous");
famous.core.FamousEngine.renderLoop._FPSCounter.logFPSToConsole();
Note that (Re)Famous will start logging warnings to the console if the frame rate drops below 70% of the target FPS or if the render loop's CPU usage goes above 10%.
We have several guides & tutorials on our site to help you get up and running with Famous, such as Hello Famous. Here's a quick boilerplate example.
If you have the Famous Engine included in your project, it is very easy to start getting content rendered to the screen. Below is a short example of how to get HTML content written to the screen.
var FamousEngine = require('famous/core/FamousEngine');
var DOMElement = require('famous/dom-renderables/DOMElement');
FamousEngine.init();
var scene = FamousEngine.createScene();
var node = scene.addChild();
var domEl = new DOMElement(node, {
content: 'Hello World',
properties: {
fontFamily: 'Arial'
}
});
In this example, we use the Famous Engine to kick off the rendering process and create a scene for our application. From here, we can add nodes to our scene and use components to give them the ability to draw. For more, here are some deeper dives on scene graph and components.
If you are looking for an easy way to get a Famous application up and running, check out our seed project. This includes the FamousEngine, index.html file, preloaded CSS with friendly default values, and some boilerplate to get you started.
The Famous Engine is also available on npm.
npm install famous
This will add the Famous Engine to your node_modules folder to be included into your project.
Cloning this repository directly is primarily for those wishing to contribute to our codebase. Check out our contributing instructions to get involved.
Note: cloning only provides the Famo.us folder with all Famo.us code, but it does no application scaffolding. You will additionally need to create your own index.html. Currently we have a dependency on glslify, a browserify transform to compile our glsl shaders.
- If you would like to report a bug, please check the issues section in our contributing instructions.
- Please join us on the "famous-community" slack.
- http://slack.famous.org/signup to sign up
- http://slack.famous.org/ to log in
- For contributors, read more instructions in CONTRIBUTING.md.
- The Famous rendering engine is licensed under the MIT license
- Contact [email protected] for further inquiries.