Log inGet started
Package

art.module

README.md

productionKit.art

The 3D art for productionKit's twelve building kinds (farm, lumber mill, mine, sawmill, smelter, bakery, market, house, warehouse, barracks, power plant, research lab), each in a rustic timber look and a sci-fi industrial look, with moving parts that run only while the building works: windmill sails, water wheels, saw blades, drill heads, a spinning fusion ring, radar dishes, robot arms, conveyors, cranes, flickering forge and oven fires, glowing cores and chimney smoke or steam that rises, grows and fades.

It draws through buildPlaceKit's renderer: Art.install() hooks buildPlaceKit.art.parts and .material, so the piece kind productionKit.<kind> (the static body) is drawn by BuildPiece like any build piece, and productionKit.<kind>#<group> draws a moving group. Roles named pk.* are this module's own materials (golden wheat, grow lights, awning cloth, bricks, clay tiles, reactor glow).

Called by productionKit's building component and host: Art.spawn(entity, kind, look, opts) returns a handle (opts.static = false when BuildPiece already drew the body, opts.size for a kind with no art of its own, which gets a generic workshop), Art.tick(handle, dt, t, working) animates it, Art.despawn(handle) removes it, and Art.roofHeight(kind) says where a display floats. Art.parts(kind, look, group) and Art.partCounts(look) return the plain part data. A look other than rustic or scifi is drawn with the shapes of its buildPlaceKit style's flavor and that style's materials.