Show:

File: src/body/World.js

                                /**
                                * This module has now been replaced by `Matter.Composite`.
                                *
                                * All usage should be migrated to the equivalent functions found on `Matter.Composite`.
                                * For example `World.add(world, body)` now becomes `Composite.add(world, body)`.
                                *
                                * The property `world.gravity` has been moved to `engine.gravity`.
                                *
                                * For back-compatibility purposes this module will remain as a direct alias to `Matter.Composite` in the short term during migration.
                                * Eventually this alias module will be marked as deprecated and then later removed in a future release.
                                *
                                * @class World
                                */
                                
                                var World = {};
                                
                                module.exports = World;
                                
                                var Composite = require('./Composite');
                                var Common = require('../core/Common');
                                
                                (function() {
                                
                                    /**
                                     * See above, aliases for back compatibility only
                                     */
                                    World.create = Composite.create;
                                    World.add = Composite.add;
                                    World.remove = Composite.remove;
                                    World.clear = Composite.clear;
                                    World.addComposite = Composite.addComposite;
                                    World.addBody = Composite.addBody;
                                    World.addConstraint = Composite.addConstraint;
                                
                                })();