Log inGet started
World

Fruit Fly

Branchmain
Branchesmain
Commit83f1b94a81

README.md

main

The lab. One room, one specimen, one fly, one bench. This is the world's startup scene, and everything a visitor meets is in it.

What you arrive to

You spawn at the origin facing +z, with the specimen in front of you: the whole male Drosophila central nervous system, 164,587 neurons drawn one point each, suspended above a tiled plinth and captioned with what it is. Between you and it, a painted ring on the floor marks the 12 metre arena the fly keeps to. Three discs of food lie inside the ring. The bench window is open on the left of the screen.

The entities

The build owns the room. scenes/main.scene/build.luau places these, and a rebuild restates them:

EntityWhat it is
groundThe floor. A 400 by 400 box in fruitFly.labFloor, wide enough that its far edge sits within a degree of the horizon where the haze takes it.
sunThe key light, warm, at about 44 degrees of elevation. Look owns its colour, strength and angle.
ambientThe sky fill, cool, so a shadowed face reads blue rather than black. Look owns it too.
skyThe procedural sky. Its ground hemisphere is set to the floor's grey so the seam carries no step.
PlayerSetups / DefaultSocialPlayer / body / CameraRigThe player prototype: a humanoid avatar and an orbital follow camera, copied once per person who joins.
Spawns / DefaultSpawnWhere a copy appears, at the origin, facing the specimen.

The rest was authored live and is saved in scene.json carrying no build attribute, so a rebuild leaves every one of them where it is:

EntityWhat it is
BrainFruitFlyBrain. The connectome, stepped on the GPU every frame, drawn as the point cloud. At (0, 4.2, 16.3), which puts the lowest neuron of the ventral nerve cord above the floor and the optic lobes above the horizon.
PlinthThe drum the specimen stands over, in the floor's own material.
BrainLabelA Text3D caption: the dataset, the neuron and connection counts, and the scale the cloud is drawn at.
brainLampA point light over the specimen.
ArenaRingThe painted 12 metre ring, fruitFly.arenaRing: a flat annulus lying on the floor. 12 metres is the arenaRadius the fly's own component keeps to.
FlyFruitFly. The body, and the loop between it and the network.
Food, Food2, Food3FoodPatch. Discs of food at sweetness 1, 0.5 and 0.25.
LabFruitFlyLab. The bench window, pointed at Brain and Fly.
LookFruitFlyLook. The lighting intent, the depth haze and the vignette, as Fields. This is where the look is changed.

Changing how it looks

Select Look. Its Fields hold the sun's colour, strength and direction, the ambient fill, the shadow softness, fade and distance, the haze's density, colour and planes, and the vignette. Nothing else in the scene writes to the lights or to the post chain, so what those Fields say is what you see.

Related

  • fruitFly.package/README.md — what the package holds and how the pieces fit.
  • fruitFly.package/experiments.guide — the bench manual and the experiments.