Log inGet started
Package

Lightbearer.component

Newest version

README.md

Lightbearer

The player slice's runtime component, on the scene's Game entity. It activates the luminaria input map (E/Q turn, F crystal, R reset, Space/Enter begin) and turns the controls into game.core actions. It also:

  • Dresses the body (Core.body()) at runtime as the hooded Lightbearer of design/references/player.png. The skinned humanoid is kept, so Locomotion still animates the legs, and it wears lb_cloak_dark. Under the body's heading entity it adds LB_Cloak (a cone cloak with a tattered hem, mantle, violet rune trim, belt and brass brooch), LB_Hood (follows the Head bone: a hood, a dark void and two glowing eyes) and LB_Staff (follows Hand_R: a wood and brass staff with a caged crystal and the warm LanternLight point light). The cloak trails back with walk speed.
  • Tunes the walk: walkSpeed 3.0 m/s and sprintMultiplier 1.6 on the CharacterController.
  • Device prompt: LB_DevicePrompt puts a turning brass rune ring on the floor under the nearest touchable device, a billboarded Garamond Core.promptFor text and a warm glow. The ring pulses when E, Q or F acts.
  • Carried crystal: while Core.state.carry is set, a crystal of that colour (lb_carry_<mask>) floats above the lantern and casts a light of the same colour.
  • Descent: on descend(from, to) it disables the controller, pulls the body to the seal and sinks it into a column of white light (LB_DescentShaft), then fades to black (lum_lb_fade screen, layer 940). Next it moves the body above Core.spawnPoint(to), calls Core.arrive(to) and floats the body down a light column as the fade lifts. Control is only given back once a floor exists under the spawn.
  • Puts a body that has fallen more than 25 m below its spawn back on the spawn.

Public fields

  • inputMap — the control scheme (game.luminaria).
  • walkSpeed (m/s), sprintMultiplier.
  • lanternIntensity, lanternRadius — the warm lantern light.

Slots (stand-ins for the polish pass)

  • LB_Cloak / LB_Hood — primitive cloak and hood over the builtin humanoid. They stand for a rigged hooded-cloak character mesh from player.png. mesh_gen failed upstream with 402/400 on every try.
  • LB_Staff — a primitive lantern-staff. It stands for a generated staff mesh.
  • materials/lb_* — flat PBR colours with no cloth or brass textures.