api.module
README.md
api
The front door of trophyKit: local Trophy = require("trophyKit.api").
Trophy.spawn(tier, look, opts)spawns a trophy entity.tieris 1, 2, 3 or "gold", "silver", "bronze";lookis one ofTrophy.looks(); opts takeposition,rotation,scale(1 is about 0.55 m tall),spin(default true),spinSpeed(degrees per second),parent,syncedandname. Answers the entity.Trophy.podium(look, opts)spawns a three-step podium (2-1-3) and answers the entity plus the world positions of the three step tops. opts takeposition,rotation,scale,parent,synced,numbersandname.Trophy.celebrate(opts)spawns confetti and sparkles:position,radius,height,count,mode("rain" or "burst"),palette("party", "gold", "silver", "bronze"),synced.Trophy.ceremony(opts)does all three at once and answers{ podium, tops, trophies, celebration }.Trophy.looks(),Trophy.podiumLooks(),Trophy.catalog(tag?),Trophy.tier(t),Trophy.stepTops(podium),Trophy.material(key).Trophy.buildTrophy(parent, look, tier)andTrophy.buildPodium(parent, look, numbers)build the parts as local children of any entity; the components call these.
local Trophy = require("trophyKit.api")
local stage, tops = Trophy.podium("classic", { position = { 0, 0, 0 } })
Trophy.spawn(1, "crystal", { position = tops[1], scale = 2 })