Creates a new World.

== Function ==
{{newin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
world = love.physics.newWorld( xg, yg, sleep )
</source>
=== Arguments ===
{{param|number|xg (0)|The x component of gravity.}}
{{param|number|yg (0)|The y component of gravity.}}
{{param|boolean|sleep (true)|Whether the bodies in this world are allowed to sleep.}}
=== Returns ===
{{param|World|world|A brave new World.}}

== Function ==
{{oldin|[[0.8.0]]|080|type=variant}}
This function creates a new World with the given size, no gravity and sleeping turned on.
=== Synopsis ===
<source lang="lua">
world = love.physics.newWorld( x1, y1, x2, y2 )
</source>
=== Arguments ===
{{param|number|x1|The smallest x position in the world.}}
{{param|number|y1|The smallest y position in the world.}}
{{param|number|x2|The largest x position in the world.}}
{{param|number|y2|The largest y position in the world.}}
=== Returns ===
{{param|World|world|A World object.}}
== Function ==
{{oldin|[[0.8.0]]|080|type=variant}}
=== Synopsis ===
<source lang="lua">
world = love.physics.newWorld( x1, y1, x2, y2, xg, yg, sleep )
</source>
=== Arguments ===
{{param|number|x1|The smallest x position in the world.}}
{{param|number|y1|The smallest y position in the world.}}
{{param|number|x2|The largest x position in the world.}}
{{param|number|y2|The largest y position in the world.}}
{{param|number|xg|The x component of gravity.}}
{{param|number|yg|The y component of gravity.}}
{{param|boolean|sleep (true)|Whether sleep is possible in the world.}}
=== Returns ===
{{param|World|world|A brave new World.}}

== See Also ==
* [[parent::love.physics]]
* [[Constructs::World]]
[[Category:Functions]]
{{#set:Description=Creates a new World.}}
{{#set:Since=000}}
== Other Languages ==
{{i18n|love.physics.newWorld}}