FL# API
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
FL# scripts are C# files of a world, compiled by fluxc against this API (using NodeWorld.Flux;, and using Flux; for coroutines), not against UnityEngine. Names follow Unity's where they do the same thing.
Generated from the /// comments of the code, SDK 0.2.0.
Flux
| Type | Kind | Summary |
|---|---|---|
| Coroutine | class | A running coroutine (an IEnumerator driven by the frames of the instance). |
| CustomYieldInstruction | class | A yield instruction written as a property: the coroutine waits while keepWaiting is true. |
| Frame | static class | The frames of the instance: clock, frame count, and "await Frame.Next()". |
| IWebReceiver | interface | What the host tells about a request or a socket (on the scripts' thread). |
| MainThread | static class | The main thread of the world: the thread of the frames and of the events, the only one where the API that touches the world runs. |
| WaitForSeconds | class | Resumes a coroutine after a number of seconds of script time. |
| WaitUntil | class | Resumes the coroutine once the predicate is true (checked at once, then at each frame). |
| WaitWhile | class | Resumes the coroutine once the predicate is false (checked at once, then at each frame). |
| WebRequestData | class | A request for the host: method, absolute address, headers (one line each, values joined), body. |
| WebTransport | class | The host side of System.Net.Http.HttpClient and System.Net.WebSockets.ClientWebSocket: the API of the program's host sets Current before any script runs (NodeWorld.Flux for worlds: every address goes through the netwo… |
NodeWorld.Flux
| Type | Kind | Summary |
|---|---|---|
| Animator | class | An Animator of the world: its parameters, its states and its speed. |
| Asset | class | An asset of the world (sound, material, texture, sprite, mesh): a field set from the scene, or read from a component of the world (audioSource.clip, renderer.sharedMaterial...). |
| AudioClip | class | A sound of the world: a field set from the scene, or the clip of an AudioSource. |
| AudioSource | class | An Audio Source of the world: plays its clip, in 2D or 3D, as Unity's. |
| BatchFields | enum | The arrays of an object batch: which ones the client fills ([Read]) or applies ([Write]). |
| BatchSpace | enum | The space of the positions, rotations and scales of an object batch. |
| Behaviour | class | A component of the world that can be switched on and off. |
| Bone | enum | A bone of a player's avatar (the bones the network shares). |
| Bounds | struct | An axis-aligned box: center and extents (half size). |
| BoxCollider | class | A Box Collider of the world. |
| Button | class | A Button of a canvas of the world. |
| Camera | class | A camera of the world: the player's (Camera.main, to read), or one a script made (Create), which renders into a render texture when the script calls Render. |
| CameraClearFlags | enum | What a camera draws before the scene (Unity's values). |
| Canvas | class | A Canvas of the world: enabled shows or hides it. |
| CanvasGroup | class | A Canvas Group: the transparency and the clicks of a UI object and its children. |
| ClientOnlyAttribute | class | The script runs only on the clients of the players (the game server does not create it). |
| Collider | class | A Collider of the world: a box, a sphere, a mesh or another kind. |
| Collision | struct | A collision of the object with another collider (OnCollisionEnter). |
| Color | struct | A color, as Unity's: red, green, blue and alpha (opacity), 0 to 1 each. |
| Component | class | A component of an object of the world. |
| DataTexture | class | A small texture of floats written by the script (RGBA, point filtering, clamped, no mipmaps, linear): data for shaders, given to them with Shader.SetGlobalTexture. |
| Debug | static class | Writes lines to the log of the game that runs the script (the Unity Console in Play mode, the server's log on a server), each starting with [FL# world id]. |
| Dropdown | class | A dropdown list of a canvas of the world (uGUI or TextMeshPro). |
| FFTWindow | enum | The window AudioSource.GetSpectrumData applies before its FFT, as Unity's. |
| FluxScript | class | Base class of the scripts of a world. |
| ForceMode | enum | How AddForce and AddTorque apply their vector, as Unity's. |
| GameObject | class | An object of the world: a GameObject of the scene, or one the scripts made. |
| GeometryUtility | static class | Planes of a camera's view (its frustum), as Unity's GeometryUtility. |
| Hand | enum | A hand of the player. |
| Image | class | An image of the UI (Image with a sprite, or RawImage with a texture). |
| ImageConversion | static class | Decodes images into textures of the world, as Unity's ImageConversion: a PNG or JPG in bytes (a web response, HttpClient.GetByteArrayAsync) becomes a Texture to give to a material. |
| IndexFormat | enum | The size of the indices of a mesh (Unity's values). |
| Input | static class | The input of the local player, read each frame. |
| InputAxis | enum | The axes of the local player's controls (Input.GetAxis). |
| InputButton | enum | The buttons of the local player's controls (VR controllers, or what the desktop controls map to them). |
| InputField | class | A text field of a canvas of the world (uGUI or TextMeshPro). |
| InstancedMesh | class | Copies of a mesh drawn by the client every frame, without GameObjects (grass, crowds, debris): a matrix per copy in the memory of the world, and optional per-copy material properties (the material's shader must read t… |
| Interaction | static class | What players do with the objects of the world: use them, take them in hand, and the text they see when pointing at them. |
| Key | enum | Keys of the keyboard a world may read (players on a computer). |
| LODGroup | class | A LOD Group of the world. |
| Light | class | A Light of the world. |
| LineRenderer | class | A line drawn between points (also the base of TrailRenderer's colors and widths). |
| Material | class | A material of the world. |
| Mathf | static class | Math on floats, with the names of Unity's Mathf, computed inside the world's module. |
| Matrix4x4 | struct | A 4x4 matrix, mRC = row R, column C, stored column after column (as Unity's). |
| Mesh | class | A mesh: from the scene (a field, MeshFilter.sharedMesh), or made by the script (new Mesh()), on the model of Unity's. |
| MeshCollider | class | A collider shaped by a mesh (a mesh of the scene or one made by a script). |
| MeshFilter | class | The Mesh Filter of a renderer of the world: the mesh it draws. |
| MeshTopology | enum | How the indices of a submesh are joined (Unity's values). |
| MeshUpdateFlags | enum | What a mesh change skips (Unity's values), for SetVertexBufferData, SetIndexBufferData and SetSubMesh. |
| NetReader | class | Reads what a NetWriter wrote, in the same order. |
| NetWriter | class | What a script writes to the network: its synced state (OnSerialize) or the arguments of a network event. |
| NetworkEventTarget | enum | Who receives a network event of a script (FluxScript.SendNetworkEvent). |
| Networking | static class | The network of the room: the owners of objects and the master, synced transforms, objects spawned for the room, and the server's clock. |
| Object | class | An object of the world (GameObject, component, render texture), seen by a script through a handle the host gives. |
| ObjectBatch | class | Many objects of the world handled in one go, a crossing of the boundary per frame instead of one per object and per value. |
| ParentConstraint | class | A parent constraint of the world (Unity's ParentConstraint): the object follows its sources, each with a weight. |
| ParticleSystem | class | A Particle System of the world. |
| ParticleSystemStopBehavior | enum | What ParticleSystem.Stop does with the particles alive. |
| Physics | static class | Rays and overlaps in the world's colliders, on each player's game (the server has no physics). |
| Plane | struct | A plane: the points p with Dot(normal, p) + distance == 0. |
| Player | static class | The local player, as a script sees it: its pose, its avatar's bones, and what a world may do to it (teleport, walking speeds, gravity, velocity, haptics). |
| PlayerData | static class | Values a world keeps for the local player between visits (kept by the client, for this NodeWorld account and this world): a language chosen, a volume... |
| PlayerInfo | struct | A player of the room, as a script sees it (read only). |
| Players | static class | The players of the room. |
| PortalOptions | struct | Where a world portal leads, and where it stands. |
| Portals | static class | The portals of the world, created by the scripts that run on the server (World.isServer). |
| Quaternion | struct | A rotation (unit quaternion, Hamilton product: lhs * rhs rotates by rhs, then by lhs). |
| QueryTriggerInteraction | enum | Whether rays and overlaps hit trigger colliders. |
| Random | static class | Random numbers as Unity's Random: one sequence for the world, which InitState makes the same for every player who uses the same seed (shows played in sync). |
| Ray | struct | A ray: a starting point and a direction of length 1. |
| RaycastHit | struct | What a ray hit (Physics.Raycast). |
| RectTransform | class | The Rect Transform of a UI object: its place and size in its parent rect. |
| ReflectionProbe | class | A Reflection Probe of the world. |
| RenderTexture | class | A texture a camera of the scripts renders into (Create). |
| Renderer | class | A Renderer of the world: it draws a mesh, a line, a trail, particles. |
| Rigidbody | class | A Rigidbody of the world: its physics runs on each player's game. |
| RigidbodyConstraints | enum | What the physics may not move or turn on a rigidbody (Rigidbody.constraints); combine them with the | operator. |
| RigidbodyInterpolation | enum | How a rigidbody is drawn between physics steps (Rigidbody.interpolation). |
| ScrollRect | class | A Scroll Rect of a canvas of the world. |
| Scrollbar | class | A Scrollbar of a canvas of the world. |
| Selectable | class | Base of the UI controls a player clicks. |
| ServerOnlyAttribute | class | The script runs only on the game server (the clients do not create it). |
| Shader | static class | Global shader properties of the world (read by the world's materials, e.g. |
| ShaderAsset | class | A shader of the world (the one of a material: Material.shader), to give to another material of the world. |
| ShadowCastingMode | enum | How a renderer casts shadows (Unity's values). |
| Slider | class | A Slider of a canvas of the world. |
| Space | enum | The axes Translate and Rotate use. |
| SphereCollider | class | A Sphere Collider of the world. |
| Sprite | class | A sprite of the world: a field set from the scene, or the sprite of an Image. |
| SubMeshDescriptor | struct | A submesh as SetSubMesh sets it: a range of the index buffer, its topology, the vertex added to its indices. |
| Text | class | A text of the world: TextMeshPro (3D or UI) or a UI Text. |
| Texture | class | A texture of the world: a field set from the scene, a material's, or one a script loaded (Texture.LoadFromUrl, ImageConversion.LoadImage). |
| Time | static class | Time of the world, set by the host at each frame. |
| Toggle | class | A Toggle of a canvas of the world. |
| TrackingPoint | enum | A tracked point of a player: the head (eyes) and the hands. |
| TrailRenderer | class | A Trail Renderer of the world: its widths and colors are those of LineRenderer. |
| Transform | class | The position, rotation, scale and parent of an object, as Unity's Transform. |
| UiEvent | class | A UI event of a component (click, value change...): the listeners run in the script that added them; a listener that throws stops its script, like a callback. |
| UiEvent<T> | class | A UI event that carries a value (slider position, toggle state, dropdown index, text). |
| Vector2 | struct | A point or a direction in 2D, as Unity's Vector2. |
| Vector3 | struct | A point or a direction in 3D, as Unity's Vector3: x right, y up, z forward. |
| Vector4 | struct | Four values, as Unity's Vector4: a point with w, a plane, shader data. |
| VertexAttribute | enum | A vertex attribute of a mesh (Unity's values). |
| VertexAttributeDescriptor | struct | One attribute of the vertex layout (SetVertexBufferParams): which, in which format, how many values, in which stream (0 to 3). |
| VertexAttributeFormat | enum | The format of a vertex attribute in the vertex buffer (Unity's values). |
| VideoError | enum | Why a video player failed. |
| VideoPlayer | class | A video player of the client (libVLC): web pages of video sites are resolved to their media by the client (yt-dlp). |
| VideoState | enum | Where a video player is. |
| VoiceSettings | struct | How the local player hears another player's voice. |
| Volume | class | A post-processing volume of the render pipeline. |
| World | static class | Where the scripts run, and which world and instance. |
