mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
* build: remove project json files Including Rojo project files in packages interferes with certain Wally packages that depend on roblox-ts packages * build: create project files for release
30 lines
544 B
Text
30 lines
544 B
Text
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
|
|
local Charm = require(ReplicatedStorage.DevPackages.charm)
|
|
local computed = Charm.computed
|
|
local atom = Charm.atom
|
|
|
|
return {
|
|
ParameterGenerator = function() end,
|
|
Functions = {
|
|
atom = function()
|
|
local state = atom(0)
|
|
|
|
for _ = 1, 500 do
|
|
state(math.random(1, 2))
|
|
end
|
|
end,
|
|
|
|
computed = function()
|
|
local state = atom(0)
|
|
|
|
local _double = computed(function()
|
|
return 2 * state()
|
|
end)
|
|
|
|
for _ = 1, 500 do
|
|
state(math.random(1, 2))
|
|
end
|
|
end,
|
|
},
|
|
}
|