元编程参考文档

应用框架

可用

Glaze 实时应用,以及 Ol'ista Web 服务器与 Web 应用

Methodox Wiki 上的使用指南

17 个类别,共 208 个节点

所属发行版
元编程(教育版)元编程(专业版)
支持等级
第 1 级(拟定)
所属包
网络应用 Glaze 实时 事件应用
网络应用

使用 Ol'ista 提供网页与 Web API 服务,以图实现处理程序,并请求网络服务。

Glaze 实时

主要面向二维图形的实时交互媒体框架:提供绘制循环、精灵、输入映射等,适用于游戏与模拟。

事件应用

提供启动事件与事件图的运行时——事件驱动的文档需要它。

实时应用

实时应用清屏关闭麦克风绘制圆弧绘制圆绘制椭圆绘制渐变A rectangle shaded smoothly from one colour to another, top to bottom or left to right: a sky, a fade, a highlight.绘制图像绘制直线绘制多边形绘制折线A line through several points, joined smoothly: a path traced between two tiles, a trail behind a comet, a graph.绘制四边形绘制矩形绘制圆角矩形A rectangle with rounded corners: a button, a panel, a card.绘制精灵绘制文字绘制平铺图像An image repeated across a rectangle, shifted by an offset: a texture of grain or cloth, a scrolling background.音频输出Where this application's sound comes out.音频输出(如已连接)The audio output if one was attached, and null if this run has been silent.已请求关闭Whether the application has asked to stop.光标可见Whether the application wants a cursor shown.调试中Whether the application draws its own frame-rate readout.期望的背景颜色What Clear paints when it is given no colour of its own.Desired Frame RateThe frame rate the application asks for, in hertz; 0, the default, for as fast as the display allows.期望的窗口大小The size the application wants.期望的窗口标题The window's title.已用时间Milliseconds the last frame took.帧缓冲区The pixels.输入Where the pointer is and which keys are down.在更新循环中Whether a frame is being drawn.是否正在光栅化Whether this window rasterizes, or merely records.请求的光标What cursor the application would like.输出端Where drawing goes: the framebuffer's rasterizer by default, or whatever was composed in.存储Per-run storage a node can keep something in, cleared when a run starts.获取实际窗口大小获取已用时间获取鼠标按键状态获取鼠标位置获取录音设备The recording devices on this machine, by name, for Open Microphone.获取声音电平How loud the sound is now: 0 for silence, 1 for a sine at full scale, over the newest 2048 samples, about 45 ms - what a level meter shows.获取声音频谱How loud each part of the sound is now, from the bass on the left to the treble on the right: bands spaced evenly in pitch from 40 Hz to 16 kHz, each 0 at -60 dB or quieter and 1 at full scale - the bars of a spectrum visualizer.获取声音波形The newest samples of the sound, oldest first, for an oscilloscope to draw: each -1 to 1.获取存储获取窗口大小Get design-time or specified window size.隐藏光标按键是否按下声音是否在播放创建精灵打开麦克风Starts listening to a microphone, so the measuring nodes can hear it: pass what this returns as their Microphone.播放片段Plays a clip from memory - one the audio nodes made, generated rather than recorded.播放音乐Plays a music file, looping by default: WAV, OGG/Vorbis, FLAC or MP3.播放信号Plays a signal, synthesized as it plays, until it is stopped: the same on both sides.播放音效Plays a sound file once: WAV, OGG/Vorbis, FLAC or MP3.播放立体声信号Plays a stereo signal - a panned voice, a stereo reverb or chorus - synthesized as it plays, until it is stopped.呈现Make sure every draw has reached the pixels, then answer them.请求关闭Ask to stop after this frame.设置光标设置帧率Paces the frames at a steady rate, so every frame's delta is the same and motion is smooth: 60 for most games, 120 for a fast one; 0 for as fast as the display allows.设置循环设置总音量The volume of everything at once, on top of each sound's own: a game's volume setting.设置声像设置音高设置音量设置窗口背景设置窗口大小设置窗口标题Set the window's title.显示光标显示调试信息精灵碰撞停止所有声音Stops everything playing, fading it out over some seconds.停止声音Stops a sound, fading it out over some seconds; 0 stops it at once.已初始化Window is created.按键按下A key went down.Key UpA key came back up.Mouse DownA pointer button went down - a click begins, a drag starts.Mouse UpA pointer button came back up - a click ends, a drag drops.启动Divooka procedural program entry, equivalent to "Main" in many programming language.更新Called once per frame.

数据库结果

Ol'ista 网站构建器

Web 应用开发

创建 Web 应用一个还没有端点的新 Web 应用。映射 DELETE用一个函数应答某个路由上的 DELETE 请求。映射回退应答所有没有端点或文件应答的请求——例如 404 页面,或单页应用的首页。映射 GET用一个函数应答某个路由上的 GET 请求:/todos/{id} 会填入名为 Id 的输入。映射分组把另一个应用的端点放到一个前缀(如 /api)之下,与 ASP.NET Core 的路由组相同:先在单独的应用中建好分组的端点(如需密钥,也在那里要求),再映射该分组。映射多种方法用同一个函数应答某个路由上多种方法的请求——HEAD、OPTIONS 或其他任何方法。映射 PATCH用一个函数应答某个路由上的 PATCH 请求。映射 POST用一个函数应答某个路由上的 POST 请求;记录或类类型的输入从 JSON 正文读取,简单输入从正文的字段或表单读取。映射 PUT用一个函数应答某个路由上的 PUT 请求。要求 API 密钥为目前已映射的每个端点要求密钥:没有该标头或密钥不符的请求以 401 应答。运行运行应用,直到程序结束——以提供服务为任务的程序的最后一步。启动在后台启动应用,并立即返回它应答的地址——适用于把提供服务作为其中一步、调用自身、然后停止的程序;运行超过“最长秒数”后会自行停止。停止停止由“启动”启动的应用并释放其端口;停止一个已经停止的应用不会做任何事。启用 CORS允许其他网站的页面在浏览器中调用此应用(CORS):列出允许的来源,或用 * 表示任何来源。启用 OpenAPI根据应用的路由及其处理函数的输入,在一个路径上用 OpenAPI 3 文档描述应用的端点——Swagger UI、Postman 和代码生成器读取的正是它。记录请求日志每个请求向程序的输出打印一行——方法、路径、状态码和耗时。提供静态文件提供一个文件夹中的文件——页面、脚本、图片——访问文件夹本身的地址时提供其 index.html。

端点响应

应用数据库

数据库语句

Web 结果

Web 应用

Glaze 精灵

QuickServe 网页服务

响应

网页文本

运行中的 Web 应用

运行中的服务器

基本应用

仪表板构建器