local data = {}
local size = 1
local scale = 0.05*size
local ox ,oy = -5,7
local height = 280/size
local width = 20/size
local dotx,doty = -4.5,7
local this = {}
local function inlerp(a,b,t)
return (t-a)/(b-a)
end
local a = castle.particles.new({
lifetime = {0.08,0.08},
sizes = {0.5},
colors = {{1,1,1, 1}},
--emitRate = a,
--speed = 0,
-- spread = 0,
--gravity = {0,0},
blueprint = "Dot"
})
castle.repeatAtInterval(0.03,function()
a:setPosition(dotx,doty)
a:emit(1)
end)
local function mix(a,b,t)
local r,g,b = math.mix(a[1],b[1],t),math.mix(a[2],b[2],t),math.mix(a[3],b[3],t)
return {r,g,b}
end
local function newEmitter(r,g,b)
-- if r == 0 and g == 0 and b == 0 then return end
-- print("new")
local emitter = castle.particles.new({
lifetime = {999, 999},
sizes = {scale},
colors = {{r,g,b, 1}},
--emitRate = a,
--speed = 0,
-- spread = 0,
--gravity = {0,0},
-- blueprint = "