local Width, Height = ...

local function Update(self)
	local c = self:GetChild("Noise")
	local x = math.random()
	local y = math.random()
	c:customtexturerect(0+x,0+y,2+x,2+y)
end

return Def.ActorFrame{
	Name = "NoiseContainer",
	InitCommand = cmd(SetUpdateFunction,Update),
	LoadActor("noise")..{
		Name="Noise",
		OnCommand=function(self)
			if Height then
				self:zoomto(Width,Height)
			else
				self:FullScreen()
			end
			self:texturewrapping(true):SetTextureFiltering(false)
		end
	}
}
