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:

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

Where you land, and which way you face

What crossing does depends on what the portal names:

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:

Four kinds of portal fall out of these:

KindPassageWindow
A closed door, a linking bookyesno
A painting, a scrying poolnoyes
The looking-glass, an archwayyesyes
Two-waytwo 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:

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:

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

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

Open questions

← Worlds, scenes and regions | Contents | Subscriptions →