function drawSimple(entity,worldSpace,circle)
	if not scene.drawingShadow and editingLevel then --and (entity.visible or type(entity.visible)=="nil") then 
		
		shaders.forwardRender:send("wobble",0)
		gfx.push("all")

		if entity.mode=="ramps" and entity.pointIndex<#pathsPanel.points then 
			shaders.forwardRender:send("overlay",1)
			gfx.setColor(1,1,1,pathsPanel.lineHovered==entity.pointIndex and 0.6 or 0.1)
			gfx.setLineWidth(pathsPanel.lineHovered==entity.pointIndex and 4 or 2)
			gfx.line(pathsPanel.points[entity.pointIndex+1].render.x,pathsPanel.points[entity.pointIndex+1].render.y,pathsPanel.points[entity.pointIndex].render.x,pathsPanel.points[entity.pointIndex].render.y)
		end

		gfx.setColor(1,1,1,1)
		gfx.setLineStyle("rough")
		entity.render = entity.render or {}
		if entity.render.ox then 
			entity.render.x,	entity.render.y		=	entity.render.ox,	entity.render.oy
		else 
			local unp = camera.project((entity.selected and multiTool.dragging) and entity.nextPosition or entity.position)
			entity.render.x,	entity.render.y		=	unp.x,unp.y
		end
		local size = (worldSpace and pathsPanel.pointSize/1.5 or pathsPanel.pointSize)*game.resolution^0.7
		local x,y  


		if LOVE and worldSpace then 
			local pos = ((entity.selected and editor.transforming) and entity.nextPosition or entity.position )
			local look = mat4():look_at(mat4(),pos,-zcam.pos,vec3(0,1,0))
			shaders.forwardRender:send("MVP", "column",gfx.camera.vp*(-look*mat4():translate(mat4(),vec3(0))))
			shaders.forwardRender:send("overlay",0)
			x,y=0,0
			if entity.light.enabled then
				size = size/game.resolution 
				local rays = 8
				local a,b
				-- print("drow light")
				gfx.setColor(entity.light.color.r,entity.light.color.g,entity.light.color.b,1)
				gfx.setLineWidth(entity.light.strength*2*math.pow(game.resolution,0.5))
				for i=1,rays,1 do
					a,b = vec2.from_cartesian(size, (i/rays)*2*pi),vec2.from_cartesian(size*1.5+math.pow(entity.light.range,0.5), (i/rays)*2*pi)
					gfx.line(a.x,a.y,b.x,b.y)
				end
			elseif circle then 

			else
				if not entity.img then 
					-- print("overlay",inspect(objects[entity.key].image))
					gfx.setColor(1,1,1,1)
					gfx.draw(getImage("missing"),0,0,0,0.4,0.4,47,80)
				end
			end
		else
			shaders.forwardRender:send("overlay",1) 
			x,y  = entity.render.x,	entity.render.y
		end

			gfx.circle("line",x,y,size,16)
			--if not (entity.selected and multiTool.dragging) then 
			if entity.selected then 
				gfx.circle("fill",x,y,size*1.3,16)
			end
			if entity.hovered then 
				gfx.circle("fill",x,y,size*0.6,10)
				--gfx.circle("line",entity.render.x,entity.render.y,size*1.1,10)
			end
		--end
		

		shaders.forwardRender:send("overlay",0)
		gfx.pop()
	end
end

function drawEntityReloader(entity)
	if entity.isReloading and not imageLoader:isLoading(entity.key) then 
		entity.img  = getImage(entity.key) 
		entity.models={} 
	end
	entity.isReloading=imageLoader:isLoading(entity.key)
	if imageLoader:isLoading(entity.key) then 
		table.insert(room.delayed,{entity=entity.position,draw=function()
			shaders.forwardRender:send("overlay",0.6) 
			gfx.setColor(0,0,0,entity.render.alpha/2)
			gfx.rectangle("line",entity.render.x-30,entity.render.y-30,60,60,8)
			gfx.setColor(1,1,1,1)  
			shaders.forwardRender:send("overlay",0.5) 
			gfx.draw(getImage("reload"),entity.render.x,entity.render.y, time*8 , 0.6, 0.6, 64, 64) 
		end})
	end
end

function drawEntityVisible(entity)
	if entity.visible or entity.visible==nil then return end
	table.insert(room.delayed,{entity=entity.position,draw=function()
		gfx.setColor(0,0,0,entity.render.alpha/2)
		shaders.forwardRender:send("overlay",0.6) 
		gfx.rectangle("line",entity.render.x-32,entity.render.y-30,30,30,2)
		gfx.setColor(1,1,1,entity.render.alpha)  
		shaders.forwardRender:send("overlay",0.5) 
		if LOVE then  allSymbols["hidden"].image:setFilter("linear","linear")end
		gfx.draw(getImage("hidden"),entity.render.x-28,entity.render.y-24, 0 , 0.5, 0.5, 0, 0) 
	end})
end

function drawEntityScripts(entity)
	if not entity.scripts or #entity.scripts==0 then return end
	table.insert(room.delayed,{entity=entity.position,draw=function()
		gfx.setColor(0,0,0,entity.render.alpha/2)
		--for s,script in pairs(entity.scripts) do 
			shaders.forwardRender:send("overlay",0.6) 
			gfx.rectangle("fill",entity.render.x,entity.render.y-30,40,30,2)
			gfx.setColor(1,1,1,entity.render.alpha)  
			shaders.forwardRender:send("overlay",0.5) 
			if LOVE then  allSymbols["script"].image:setFilter("linear","linear")end
			gfx.draw(getImage("script"),entity.render.x,entity.render.y-25, 0 , 0.1, 0.1, 0, 0) 
			gfx.printf(#entity.scripts,entity.render.x+25,entity.render.y-23,20)
		--end
	end})
end
