Difference between revisions of "love.physics.newWorld"

m (Forgot to linkify 0.7.0)
Line 1: Line 1:
 
Creates a new World.
 
Creates a new World.
 
This function creates a new World with the given size, no gravity and sleeping turned on.
 
This function creates a new World with the given size, no gravity and sleeping turned on.
== Function ==
 
{{oldin|[[0.7.0]]|type=variant}}
 
=== Synopsis ===
 
<source lang="lua">
 
world = love.physics.newWorld( w, h )
 
</source>
 
=== Arguments ===
 
{{param|number|w|The width of the World.}}
 
{{param|number|h|The height of the World.}}
 
=== Returns ===
 
{{param|World|world|A World object.}}
 
 
== Function ==
 
== Function ==
 
{{newin|[[0.7.0]]|type=variant}}
 
{{newin|[[0.7.0]]|type=variant}}
Line 40: Line 29:
 
=== Returns ===
 
=== Returns ===
 
{{param|World|world|A brave new World.}}
 
{{param|World|world|A brave new World.}}
 +
== Function ==
 +
{{oldin|[[0.7.0]]|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
world = love.physics.newWorld( w, h )
 +
</source>
 +
=== Arguments ===
 +
{{param|number|w|The width of the World.}}
 +
{{param|number|h|The height of the World.}}
 +
=== Returns ===
 +
{{param|World|world|A World object.}}
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 +
* [[Constructs::World]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Creates a new World.
+
{{#set:Description=Creates a new World.}}
}}
+
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newWorld}}
 
{{i18n|love.physics.newWorld}}

Revision as of 17:51, 25 March 2011

Creates a new World. This function creates a new World with the given size, no gravity and sleeping turned on.

Function

Available since LÖVE 0.7.0
This variant is not supported in earlier versions.

Synopsis

world = love.physics.newWorld( x1, y1, x2, y2 )

Arguments

number x1
The smallest x position in the world.
number y1
The smallest y position in the world.
number x2
The largest x position in the world.
number y2
The largest y position in the world.

Returns

World world
A World object.

Function

Synopsis

world = love.physics.newWorld( x1, y1, x2, y2, xg, yg, sleep )

Arguments

number x1
The smallest x position in the world.
number y1
The smallest y position in the world.
number x2
The largest x position in the world.
number y2
The largest y position in the world.
number xg
The x component of gravity.
number yg
The y component of gravity.
boolean sleep (true)
Whether sleep is possible in the world.

Returns

World world
A brave new World.

Function

Removed in LÖVE 0.7.0
This variant is not supported in that and later versions.

Synopsis

world = love.physics.newWorld( w, h )

Arguments

number w
The width of the World.
number h
The height of the World.

Returns

World world
A World object.

See Also


Other Languages