ConeScript describes worlds for the 3-D web: what is in them, where it is, what it is made of, how it looks, sounds and moves, and how it answers the people in it. A world arrives as ConeScript, is checked, built on each visitor's machine and on the server, and runs. These pages set out the language as designed so far, part by part, with worked examples.
Start here: the guide
Five short pages that build one thing, a block that grows into a garden lantern, and touch every part of the language on the way. Each page changes the script from the page before. After the guide, the reference below has the full detail of each subject.
- A first world: a block floating above a floor, a matte surface, the sun, and a place to stand. Parts, shapes as recipes, materials, lights.
- Bring it to life: the block becomes steel, turns, brightens when you come near, and hops when clicked. Physical materials, animators, rules and events, fields.
- Grow it into a lantern: a turned post and a lofted roof made from paths, pieces copied and joined into one shape.
- Light it: evening, a lamp inside, glowing glass, and a lantern that fades on as you walk up.
- A place to visit: six lanterns from one design, a sky that follows the time of day, lamps lit at dusk, and a second scene through a hatch.
Introduction
- What ConeScript is: a world, not a program; how this manual is written
Part 1. Fundamentals
- Values and types: numbers with units and ranges, units as types, text, moments and clocks, the day length, colors, positions, curves, enums, options, records, lists, tables
- Expressions and operators: the maths functions, paths and how a name is found
- Blocks: local names, a block's value, value blocks and acting blocks, parts inside
eachandif - Functions: named blocks, closures, functions inside parts
- Control flow: if, match, while, each, bounded running
- Text and structured text: strings, formatting, dialogue
Part 2. Parts and the world tree
- Parts: the unit of organization, names and paths, how a name is found, folders and files
- Fields: own and common, fixed and changing, named numbers, units, where values live
- Designs, copies and spawning:
like, overrides, seeds - Frames: placed, around the camera, by direction, and what a frame decides
- Loading: build, then start; preparing and waking
- Worlds, scenes and regions: separate scenes joined by portals; regions that wake when they might be seen; stand-ins
- Portals: the 3-D web's hyperlinks; published arrivals, passage and window, who may pass
Part 3. Behavior: how values change
- Subscriptions:
derive, the world as a spreadsheet - Events and triggers:
on, handlers, conditions - Actions: what a handler may do to the running world
- Animators: values changing over time, clocks, composition
- Package behaviors: walking, minds, faces
- Visitors and their actions: beings, verbs, speech
- Avatars: what an avatar is made of, and where each piece lives
Part 4. Construction
- Construction pipelines: tools in order, products, distant forms
- Recipes: composing shapes: calls, addressing part of a shape, pieces and the one join, levels, exposed amounts, the normal form
- Sculpting: the shape tools, in four groups: outlines and spines, solids, combining, changing (exact parameters in Appendix: shape tools)
- Sculpting, narrative draft (draft, 20 Oct): the same subject told as one lantern built from nothing to a finished mesh
- Generators and scattering: many parts from rules and seeds
- Open functions: a calculation handed to a tool
- Fitted and grown: clothes on bodies, hair on heads
- Terrain: the land as a part, places on it as points, the features it owns
Part 5. Appearance
- Materials: the material type, glows, the tint, layers and shadows on parts
- Textures and surface patterns
- Lights: lamps, the
worldlayer and others, shadows, the lamp level, whose nearness, sun and moons - Sky and weather: placed by direction, dusk and dawn from the sky, the weather
- Effects: particles
- Sounds
Part 6. The 2D half
- Images: pictures, sources, compositing
- Layouts: the 2D vocabulary
- Overlays, HUDs and speech: what is drawn over the world, and the pointer
Part 7. What the engines take
- Physics: solids, bodies, platforms, seats, areas (one form on a part's line; one mechanism for triggers, zones, portal mouths and waking), gates
- Cameras and views: mirrors, portals, far-seeing
Part 8. The browser and the network
- The vocabulary and packages: what a world may use
- Distribution: client, server, secrets, many visitors
- Outside the content: identity, possession, the person's settings, and where each belongs
Appendix. Reference and examples
- Shape tools: every shape tool's exact call, parameters and defaults; primitives as volumes
- The lanterns
- The balloon ride
- The riddle of the two guards
- The looking-glass
- The land
- A villager
- A boss and its army (illustration)
- A shopkeeper's dialogue (illustration)
- Open questions, gathered from every page