Create

This function creates and returns a new point light.

Syntax

Parameters

Returns

Returns a new point light.

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:SetRotation(35,0,0)
camera:Move(0,0,-8)

--Create a model
local model = Model:Box()
model:SetColor(0.0,1.0,0.0)
model:SetScale(10,1,10)

light = PointLight:Create()
light:SetPosition(0,1,0)
light:SetRange(1)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

Time:Update()
world:Update()
world:Render()
context:Sync()

end