Playground
From spike_trap · Compiles in your browser · $0
CtrlShiftS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
asset spike_trap "Spike trap" complexity=3 float// a floor trap: a square stone plate with a grid of dark holes and a warning-red rim of bolts. A bed// of iron spikes hides just under its face; on spring the spikes shoot up, quiver and sink back.// The bed sits below the floor at rest, so the asset floats (its hidden spikes go under y = 0).let stoneC = greystone:2|granite|rockCool|sandstonelet rimC = iron:2|copper|brasslet warnC = tomato:2|marigold// the plate, its rim and the holesbox plate size=(1.3, .1, 1.3) round=.03 bev=2 bands=[.6:stoneC*1.08] color=stoneCbox rim x4 on=plate ring at=(0, .06, .62) size=(1.22, .06, .07) round=.02 color=rimCball bolt x4 on=plate ring ring0=45 at=(.88, .1, 0) r=(.05, .03, .05) color=warnC segs=12 rings=6cyl hole x3 on=plate at=(0, .09, 0) row=(0, 0, .36) h=.02 r=.07 color=inkDark segs=16cyl holeB x2 on=hole at=(0, 0, 0) row=(.72, 0, 0) h=.02 r=.07 color=inkDark segs=16// the spike bed: a hidden block under the plate, nine spikes that rise through the holesbox bed at=(0, -.4, 0) size=(1.0, .06, 1.0) round=.02 color=iron jointcone spike x3 on=bed at=(0, .06, 0) row=(0, 0, .36) h=.44 r=.06 color=steel segs=12cone spikeB x2 on=spike at=(0, 0, 0) row=(.72, 0, 0) h=.44 r=.06 color=steel segs=12// spring: up in a snap, a quiver, then down slowanim spring: bed py keys=[0:0 .08:.42 .14:.37 .2:.41 .26:.39 .7:.39 1:0] hz=.6
Clean: no issues on this seed.
Loading
seed
Shapes— / 45
Triangles— / 4,500
Draw calls— / 3