A portal is the 3-D web's hyperlink: a part that names a destination, and takes a visitor there. One mechanism serves every jump. The destination is:
- another place in the same scene, a shortcut;
- another scene of the same world: the island to the labyrinth;
- another world entirely: a Myst linking book, which takes the reader to the age it describes.
Scenes share nothing except their portals (Worlds: scenes), so a portal is the only way between them. This page says what a portal names, what crossing does, what can be seen through it, how ready its destination must be, and who and what may go through. How a window is drawn is on Cameras and views; how crossing is enforced is on Physics: gates.
Words used on this page:
- Arrival
- A named place a scene publishes as somewhere a portal may land a visitor, as a web page publishes named anchors. It says where you stand and which way you face.
- Mouth
- The opening of a portal: the area a visitor crosses, and the surface a window is drawn on.
- Passage
- What crossing a portal's mouth does: the visitor's being moves to the portal's destination.
- Window
- Seeing the destination through the mouth, drawn live as a picture.
Arrivals are published
A scene publishes named arrival places: arrivals.gate, arrivals.throneRoom. A portal names one, as a link names page.html#section. Each arrival gives a place and a facing, the direction you face when you arrive there:
part arrivals part gate, at: (0, 0, 291), facing: (0, 0, -1) // you arrive looking down the corridor
- Across worlds, only published arrivals can be named. A world decides where strangers may enter it.
- A link cannot drop a visitor inside a wall. An arrival is a place the world's designer chose and the world stands behind.
- Within one world, a portal may also name a place that is not published, as a page may link within itself.
Where you land, and which way you face
What crossing does depends on what the portal names:
- A place in the same scene. The portal can name just a place, with no arrival:
to: (40 m, 0, -12 m). Crossing shifts you there and you keep your facing and your motion, as if you had stepped through a doorway. If the portal gives afacing:of its own, you face that way instead. - An arrival, whether in this scene, another scene or another world. You land where the arrival says, facing the way it says. Whatever way you were facing before has no meaning there.
So the author chooses how a portal feels. A shortcut across a garden keeps you moving as you were. A door into another scene or another world puts you where the designer wants you, looking where they want you to look.
Passage and window
A portal has two aspects, either or both:
- The passage: what crossing does. The visitor's being moves to the portal's destination, keeping or taking a facing as above. The crossing itself is an area crossed (Physics: areas), enforced as a gate is (Physics: gates).
- The window: whether the destination can be seen through the mouth, drawn live as a picture from a camera at the far side (Cameras and views).
Four kinds of portal fall out of these:
| Kind | Passage | Window |
|---|---|---|
| A closed door, a linking book | yes | no |
| A painting, a scrying pool | no | yes |
| The looking-glass, an archway | yes | yes |
| Two-way | two portals, a mouth at each end, each naming the other's side | |
A window with no passage is the far-seeing element of Cameras and views, aimed at an arrival rather than a place in the same scene.
Being ready
A portal declares itself, and that is all the browser needs to know to prepare what lies beyond. The content states the requirement, never the mechanism:
arrival: instant: the browser must have the destination built before the visitor can reach the mouth;arrival: mayFade: a short transition is acceptable;- how likely the visitor is to use it, if the designer knows.
The browser decides when to fetch, build and warm the destination, by distance, approach and budget (Loading: preparing and waking). A window needs at least the part of its destination it shows, so a portal with a window asks for that much before its mouth can be seen; whether that follows by itself or is stated is open.
Who and what may pass
Rules on the portal decide:
- who may cross: one holding a key, one at a stage of a quest, a visitor but not a villager;
- what crosses with them: what they hold, a companion, a ball thrown through.
What is not allowed to cross stays behind.
The other rules here stay prose. A gate's when: may read the being that crosses, which is how it keeps a prop or a plain walker out: when: b => b.active && !b.isProp lets through any being with a body of its own that is not a prop (Physics: gates).
Crossing into another world
- Only the visitor, and what the destination world accepts, goes through. The visitor arrives as their own avatar, presented by the destination world as it chooses (Avatars).
- One world can never push its parts into another. What a world gave a visitor while there (a lantern in the hand, a mount) stays behind unless the world grants it as something to carry, and the destination accepts it.
- Leaving is always possible. The browser's reserved actions, leave and portal home among them, are not portals a world declares and cannot be blocked by one (Visitors: three tiers; Outside the content).
How you write it
No spelling is chosen. As an illustration only, the looking-glass as one portal, with the labyrinth as its own scene:
part labyrinth: scene // illustration
part arrivals
part gate, at: (0, 0, 291) // illustration: the corridor's mouth
part throneRoom, at: (...) // illustration
part cottage
field open: bool = false, mutable: true, lives: both
part glass: portal(to: labyrinth.arrivals.gate, // illustration: no spelling chosen
passage: true, window: true,
arrival: instant,
mouth: glassPane(1.0 m, 1.7 m)),
at: (1.5 m, 1.4 m, -6.034 m), rotation: rotation(180 deg) // the pane's center, facing north
derive(glass.active, open)
part shop
part door: portal(to: otherWorld.arrivals.market, // illustration: how a world is named is open
passage: true, window: false,
arrival: mayFade)
part garden
part shortcut: portal(to: (40 m, 0, -12 m), // a place in this scene: you keep your facing
passage: true, window: true,
mouth: archway(1.2 m, 2.2 m)) // illustration
The pane and the gate are one part: the shift from mouth to arrival is worked out by the browser from the two places, so a window and a passage cannot disagree (The looking-glass).
What it means
Crossing changes coordinate system
Between scenes there is no shared space, so a portal into another scene cannot shift you by an offset: it puts you at the arrival, in the arrival's scene, facing the arrival's way. A portal to a place in the same scene is a shift within one space: your place changes, and your facing and motion carry on unless the portal gives a facing.
A window shows the destination as it is there
What is seen through a window is drawn as the destination scene is drawn: its own light, its own sky or none, its own exposure (Cameras: each picture is lit by the place it shows).
How it connects
- Worlds, scenes and regions: what a portal joins.
- Cameras and views: drawing the window.
- Physics: gates and areas: crossing the mouth.
- Loading: preparing the destination.
- Avatars: what arrives in another world.
- Outside the content: the browser's own way home.
- The looking-glass, a worked example.
Open questions
- Spelling: a portal as a thing a part is (
portal(...)), its mouth as a shape or another part, its arrival named by path. - How another world is named: an address, as a web link has, and what a portal shows when that world cannot be reached.
- Two-way portals: two declarations, or one that makes both mouths; one way stated or by absence.
- How "who may pass" is written: a condition on the portal, or a handler that refuses; what a refused visitor meets at the mouth (a wall, a closed door, a word).
- What stays behind: what happens to something held that may not cross (dropped at the mouth, kept by the world for the visitor's return).
- What a destination world accepts: how a world states what it takes in, and how a giving world marks a thing as carryable.
- A window into another world: drawing a stranger's world live inside this one means loading it; whether that is allowed, and under what limits.
- How likely a portal is to be used: its form, and whether it is worth stating.
- Arrival when the place is occupied: two visitors arriving at one arrival at once.
- Scenes, or one space (a design question): whether a place like the labyrinth is its own scene, entered at an arrival, or a place in the island's own space, reached by a shift as the island's looking-glass does today (Worlds). Each portal's behavior is defined either way; which a world should use is open.
- Gates without portals: whether every gate (the corridor that will not end) becomes a portal within one scene.