Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 47b50fcd-5…

instantPhoto

The instant camera's photographs, shared by `stations.InstantCamera` and `stations.InstantPrint`.

by◐Deata·posted 2d ago
What it does

instantPhoto

The instant camera's photographs, shared by stations.InstantCamera and stations.InstantPrint.

  • capture(pos, at, up?, fov?) renders the scene once from a lens pose into a 320x320 target, reads it back and returns a JPEG (~15-25 KB). Yields.
  • An image cache on every peer by id (newId, put, has, bytes, texture). send(id) carries an image to the other peers in base64 chunks on icam.img; want(id) asks the room on icam.want and whoever holds it answers, so a late joiner gets every print's image.
  • material(printId, imageId, seed, age) makes the print's own stations.instantPrint material, its clock running from the print's age so it develops the same on every peer; the photo is bound when it arrives.
  • keep / forget / kept remember the prints this player pinned (pose, image) in this world's runtime data on this machine, so their wall prints come back next session.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

strict

arrived(id: string, bytes: string) → void

argtypedescription
idstring
bytesstring

newId( ) → string

A new image id: unique across peers.

has(id: string) → boolean

argtypedescription
idstring

bytes(id: string) → string

argtypedescription
idstring

put(id: string, bytes: string) → void

Keep an image this peer made or restored.

argtypedescription
idstring
bytesstring

texture(id: string) → any

The GPU texture of an image, made on first ask.

argtypedescription
idstring

send(id: string) → void

Send an image to every other peer, in chunks.

argtypedescription
idstring

want(id: string) → void

Ask the room for an image this peer lacks (at most every 3 s per image).

argtypedescription
idstring

capture(pos: { number }, at: { number }, up: { number }?, fov: number?) → string

Render the scene once from `pos` looking at `at` (world points, `up` the lens's up) into the photo target, read it back and return the JPEG. Yields for the frames the render and readback take.

argtypedescription
pos{ number }
at{ number }
up{ number }?
fovnumber?

material(printId: string, imageId: string, seed: number, age: number) → any

The print's own film material (its clock is the print's age), keyed by the print entity. The photo is bound as soon as this peer holds it.

argtypedescription
printIdstring
imageIdstring
seednumber
agenumber

materialReady(printId: string) → boolean

argtypedescription
printIdstring

setAge(printId: string, age: number) → void

Restate a print's age (seconds since it was shot) on its material clock.

argtypedescription
printIdstring
agenumber

dropMaterial(printId: string) → void

argtypedescription
printIdstring

readKept( ) → void

writeKept(t: { [string]: Kept }) → void

argtypedescription
t{ [string]: Kept }

keep(id: string, seed: number, shotAt: number, p: { number }, r: { number }) → void

Remember a print pinned by this player (pose in world space) and its image.

argtypedescription
idstring
seednumber
shotAtnumber
p{ number }
r{ number }

forget(id: string) → void

argtypedescription
idstring

kept( ) → void

The prints this player pinned in earlier sessions, their images loaded into the cache.

qmul(a: Q, b: Q) → Q

argtypedescription
aQ
bQ

qaxis(x: number, y: number, z: number, a: number) → Q

argtypedescription
xnumber
ynumber
znumber
anumber

qbasis(xa: { number }, ya: { number }, za: { number }) → Q

The rotation whose local +X, +Y, +Z are the given (orthonormal) axes.

argtypedescription
xa{ number }
ya{ number }
za{ number }

toWorld(e: any, l: { number }) → void

A point in an entity's frame, in the world.

argtypedescription
eany
l{ number }

dirWorld(e: any, d: { number }) → void

A direction in an entity's frame, in the world.

argtypedescription
eany
d{ number }

localAvatar( ) → any

borrowView( ) → any

Take the player's camera off its controller; returns the Camera, or nil.

returnView( ) → void

Give the player's camera back to the controller it had.

viewBorrowed( ) → boolean

slotPoseOf(camE: any, out: number) → void

argtypedescription
camEany
outnumber

bin(printId: string) → void

argtypedescription
printIdstring
⌬ Types
Kept = { id: string, seed: number, shotAt: number, p: { number }, r: { number } }Q = { x: number, y: number, z: number, w: number }PrintInfo = { id: string, shooter: number, shotAt: number, pinned: boolean, held: boolean, slotOf: string, ejectAt: number }

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.