GlassShapes
Real-size display meshes for the exhibits (a window pane, pond and stream surfaces, a tumbler and its water, a wine bottle, a honey jar and its honey, a pillar candle, a round brilliant gem and a rock-crystal point), with UVs in metres ÷ tileSize, baked for every tile size the pa…
GlassShapes
Real-size display meshes for the exhibits (a window pane, pond and stream surfaces, a tumbler and its water, a wine bottle, a honey jar and its honey, a pillar candle, a round brilliant gem and a rock-crystal point), with UVs in metres ÷ tileSize, baked for every tile size the pack uses into meshes/. meshFor(shape, tileSize) names the right one; bakeAll() (tool code) rebakes them.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2GlassShapes: real-size display pieces for Looking Glass's exhibits, whose UVs run metres / tileSize, so a library material shows at its real scale on them (materialLibraryKit's convention: one repeat per UV unit, `tileSize` metres per repeat). Model.model is shared with every player, so the pieces are real mesh assets, baked once per tile size into the package's meshes/ folder, and GlassSurface swaps to the one matching whatever material the library puts on an entity. The method is syntheticsMaterials' SyntheticShapes (Polish and Polymer, MIT). meshes/pane_<mm> a 1.0 x 1.0 m pane 6 mm thick, base at the origin, facing +Z meshes/pond_<mm> a water surface disc 1.5 m across (top face), at the origin meshes/stream_<mm> a water surface 0.5 m wide and 2.4 m long, V running downstream (+Z) meshes/tumbler_<mm> a drinking glass 74 mm across and 110 mm tall, 2 mm wall, open top meshes/fill_<mm> the water in it: a tapered body 80 mm deep inside the tumbler meshes/bottle_<mm> a 750 ml wine bottle, 75 mm across and 300 mm tall (closed body) meshes/jar_<mm> a honey jar 90 mm across and 105 mm tall, 2.5 mm wall, open top meshes/honey_<mm> the honey in it, 78 mm deep meshes/candle_<mm> a pillar candle 80 mm across and 150 mm tall with a melted dish meshes/gem a round brilliant 40 mm across (a large display stone), flat facets meshes/quartzPoint a six-sided rock crystal point 50 mm across and 140 mm tall, flat faces All sizes are in metres on an unscaled entity, origin at the piece's base centre. Runtime-safe except `S.bakeAll()` and `S.bakeMesh()`, which write files (tool code).
emptyGeo( ) → Geo
norm3(x: number, y: number, z: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number |
vert(g: Geo, p: { number }, n: { number }, uv: { number }, t: { number }) → number
| arg | type | description |
|---|---|---|
| g | Geo | |
| p | { number } | |
| n | { number } | |
| uv | { number } | |
| t | { number } |
tri(g: Geo, a: number, b: number, c: number) → void
A triangle wound counter-clockwise as seen from the side its vertex normals face.
| arg | type | description |
|---|---|---|
| g | Geo | |
| a | number | |
| b | number | |
| c | number |
p(k: number, o: number) → number return P
| arg | type | description |
|---|---|---|
| k | number | |
| o | number |
quad(g: Geo, ps: { { number } }, n: { number }, uvs: { { number } }, t: { number }) → void
A flat quad from four corners (a, b, c, d in order round the face), normal n, UVs given per corner, tangent t (the +U direction).
| arg | type | description |
|---|---|---|
| g | Geo | |
| ps | { { number } } | |
| n | { number } | |
| uvs | { { number } } | |
| t | { number } |
box(w: number, h: number, d: number, tile: number) → Geo
A box w x h x d, base centre at the origin; every face's UVs in metres / tile.
| arg | type | description |
|---|---|---|
| w | number | |
| h | number | |
| d | number | |
| tile | number |
disc(r: number, segs: number, tile: number, y: number?) → Geo
A flat top face: a disc of radius r (segs around), planar UVs x / tile, z / tile.
| arg | type | description |
|---|---|---|
| r | number | |
| segs | number | |
| tile | number | |
| y | number? |
rect(w: number, l: number, tile: number) → Geo
A flat rectangle w (x) by l (z) at y, UVs x / tile and z / tile (V runs toward +Z), in cells.
| arg | type | description |
|---|---|---|
| w | number | |
| l | number | |
| tile | number |
lathe(profile: { PPoint }, segs: number, tile: number) → Geo
| arg | type | description |
|---|---|---|
| profile | { PPoint } | |
| segs | number | |
| tile | number |
segNormal(i: number) → void
per segment between points: build quads with normals from the 2D profile tangent, smoothed across points that are not creases
| arg | type | description |
|---|---|---|
| i | number |
pointNormal(i: number, side: number) → void
| arg | type | description |
|---|---|---|
| i | number | |
| side | number |
arc(out: { PPoint }, cr: number, cy: number, rad: number, a0: number, a1: number, n: number) → void
profile helpers: points along a quarter circle
| arg | type | description |
|---|---|---|
| out | { PPoint } | |
| cr | number | |
| cy | number | |
| rad | number | |
| a0 | number | |
| a1 | number | |
| n | number |
tumbler(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
fill(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
rAt(y: number) → number return 0
the water: from the inner base up to 80 mm, 0.4 mm inside the wall
| arg | type | description |
|---|---|---|
| y | number |
bottle(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
jar(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
honey(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
candle(tile: number) → Geo
| arg | type | description |
|---|---|---|
| tile | number |
flatTri(g: Geo, a: { number }, b: { number }, c: { number }, outward: { number }) → void
Flat-faced pieces: every triangle gets its own vertices and face normal.
| arg | type | description |
|---|---|---|
| g | Geo | |
| a | { number } | |
| b | { number } | |
| c | { number } | |
| outward | { number } |
gem( ) → Geo
A round brilliant, girdle diameter 40 mm: table 57%, crown 15% (34.5 degrees), girdle 2%, pavilion 43% (40.8 degrees), 8-fold: table, 8 stars, 8 bezels, 16 upper girdles, 16 lower girdles, 8 pavilion mains to the culet.
at(r: number, ang: number, y: number) → void
| arg | type | description |
|---|---|---|
| r | number | |
| ang | number | |
| y | number |
quartzPoint( ) → Geo
A rock crystal point: six-sided prism 50 mm across flats, terminated by a six-faced pyramid.
pane(tile: number) → void
| arg | type | description |
|---|---|---|
| tile | number |
pond(tile: number) → void
| arg | type | description |
|---|---|---|
| tile | number |
stream(tile: number) → void
| arg | type | description |
|---|---|---|
| tile | number |
nearestMm(tileSize: number) → number
| arg | type | description |
|---|---|---|
| tileSize | number |
meshFor(shape: string, tileSize: number) → string
The identity of the baked mesh for `shape` whose UVs are laid for the tile size closest to `tileSize` metres.
| arg | type | description |
|---|---|---|
| shape | string | |
| tileSize | number |
bakeMesh(name: string, g: Geo) → any
Write one mesh asset into meshes/ (tool code).
| arg | type | description |
|---|---|---|
| name | string | |
| g | Geo |
bakeAll(shapes: { string }?) → void
Bake every shape for every tile size, and the gem and quartz point (tool code). Returns the names written.
| arg | type | description |
|---|---|---|
| shapes | { string }? |
writeMeshTable(path: string) → void
Rewrite this module's MESHES table as literal identities for every shape and tile size (tool code).
| arg | type | description |
|---|---|---|
| path | string |
Geo = { positions: { number }, normals: { number }, uvs: { number }, tangents: { number }, indices: { number } }Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.