From bc7fa914a4327a5cdd73fc5d452089a3b0d45c03 Mon Sep 17 00:00:00 2001 From: routersys Date: Mon, 29 Jun 2026 19:48:19 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=9F=E8=A1=8C=E3=82=A8=E3=83=B3=E3=82=B8?= =?UTF-8?q?=E3=83=B3=E6=8C=87=E5=AE=9A=E3=81=A8=E8=87=AA=E5=8B=95=E9=AB=98?= =?UTF-8?q?=E9=80=9F=E5=8C=96=E3=82=92=E5=85=A8=E8=A8=80=E8=AA=9E=E3=83=89?= =?UTF-8?q?=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AB=E8=BF=BD?= =?UTF-8?q?=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/docs/LuaScript.ar-sa.txt | 52 ++++++++++++++++++++++++++++ LuaScript/docs/LuaScript.en-us.txt | 55 ++++++++++++++++++++++++++++++ LuaScript/docs/LuaScript.es-es.txt | 55 ++++++++++++++++++++++++++++++ LuaScript/docs/LuaScript.id-id.txt | 54 +++++++++++++++++++++++++++++ LuaScript/docs/LuaScript.ja-jp.txt | 50 +++++++++++++++++++++++++++ LuaScript/docs/LuaScript.ko-kr.txt | 50 +++++++++++++++++++++++++++ LuaScript/docs/LuaScript.zh-cn.txt | 49 ++++++++++++++++++++++++++ LuaScript/docs/LuaScript.zh-tw.txt | 49 ++++++++++++++++++++++++++ 8 files changed, 414 insertions(+) diff --git a/LuaScript/docs/LuaScript.ar-sa.txt b/LuaScript/docs/LuaScript.ar-sa.txt index 5480391..91c6e7a 100644 --- a/LuaScript/docs/LuaScript.ar-sa.txt +++ b/LuaScript/docs/LuaScript.ar-sa.txt @@ -24,6 +24,58 @@ حذف هذه الاستدعاءات عند عدم الحاجة يسرّع المعالجة. +- محركات التنفيذ والتسريع التلقائي - + + النصوص التي تحتوي على معالجة بكسل (حلقة getpixel/setpixel متداخلة) + يُحلَّل تركيبها وتُوجَّه تلقائياً إلى محرك أسرع. + أما النصوص العادية (الإحداثيات، الدوران، الشفافية، إلخ) فتظل تعمل على + MoonSharp كما في السابق دون أي تغيير في السلوك. + + ○ التوجيه التلقائي (عند عدم وجود توجيه) + · تخطيط بكسل مكتفٍ بنفسه (انظر الشروط أدناه) + → نواة CPU (سريعة ودقيقة) + · عمليات البكسل الأخرى → Native (LuaJIT، فقط عند نشره) + · بلا عمليات بكسل → MoonSharp + + ○ توجيهات المحرك (تعليق في السطر الأول من النص) + --!cpu : نواة CPU. تُترجَم وقت التشغيل إلى شجرة تعابير + وتُنفَّذ بالتوازي على كل أنوية CPU (مطابقة تماماً لـ MoonSharp). + --!gpu : نواة GPU. تُنفَّذ كمظلِّل بكسل Direct2D، + وتلغي نقل GPU→CPU لأقصى سرعة. + قد تختلف النتائج اختلافاً طفيفاً بسبب دقة float32 (اختياري). + --!native : LuaJIT (عملية منفصلة). سريع ومطابق لـ MoonSharp. + يتطلب نشر مجلد native. + --!moonsharp : يفرض محرك MoonSharp التقليدي. + ※ إذا كان التوجيه غير متاح/غير مدعوم، يرجع تلقائياً إلى محرك أدنى + (لا يتلف الإخراج أبداً). + + ○ التركيب المؤهَّل للنواة السريعة (تخطيط بكسل خالص) + فقط الحلقة المتداخلة بالشكل التالي تتحول إلى نواة. + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + · يجوز في الجسم استخدام العمليات الحسابية و math.* والمقارنات + وصيغة العتبة "cond and value1 or value2" ومتغيرات local فقط. + · يجوز الإشارة فقط إلى البكسل الجاري معالجته (getpixel(x, y)) + وقيم مثل obj/scene/time. + · أي استخدام لأخذ عينات الجوار (التمويه، إلخ) أو الكتابة إلى + إحداثيات أخرى أو getpixeldata أو getobject أو عمليات + الجداول/السلاسل أو جُمَل if لا يتحول إلى نواة ويُنفَّذ تلقائياً + على المحرك التقليدي. + + مثال (يجعل شكلاً أبيض أحمر): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - المعاملات - يحتوي لوح التأثيرات على 4 أشرطة تتبع (تدعم الرسوم المتحركة) على النحو التالي. diff --git a/LuaScript/docs/LuaScript.en-us.txt b/LuaScript/docs/LuaScript.en-us.txt index ed2d546..b135bc5 100644 --- a/LuaScript/docs/LuaScript.en-us.txt +++ b/LuaScript/docs/LuaScript.en-us.txt @@ -24,6 +24,61 @@ Omitting these calls when unnecessary will speed up processing. +- Execution Engines and Automatic Acceleration - + + Scripts that contain pixel processing (a nested getpixel/setpixel loop) + are analyzed and automatically routed to a faster engine. + Ordinary scripts (coordinate, rotation, opacity changes, etc.) keep + running on MoonSharp as before, with no change in behavior. + + o Automatic routing (when no directive is present) + - A self-contained per-pixel map (see conditions below) + -> CPU kernel (fast, exact) + - Other pixel operations -> Native (LuaJIT, only when deployed) + - No pixel operations -> MoonSharp + + o Engine directives (a comment on the first line of the script) + --!cpu : CPU kernel. Compiled at runtime to an expression + tree and run in parallel on all CPU cores + (bit-identical to MoonSharp). + --!gpu : GPU kernel. Run as a Direct2D pixel shader, + eliminating the GPU->CPU transfer for top speed. + Results may differ slightly due to float32 + precision (opt-in). + --!native : LuaJIT (separate process). Fast and identical to + MoonSharp. Requires the native folder deployed. + --!moonsharp : Forces the classic MoonSharp engine. + * If a directive is unavailable or unsupported, it automatically + falls back to a lower engine (the output is never broken). + + o Syntax eligible for the fast kernel (a pure per-pixel map) + Only a nested loop of the following form becomes a kernel. + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + - The body may use only arithmetic, math.*, comparisons, the + threshold idiom "cond and value1 or value2", and local + variables. + - It may reference only the current pixel being processed + (getpixel(x, y)) and values such as obj/scene/time. + - Anything using neighbor sampling (blur, etc.), writes to other + coordinates, getpixeldata, getobject, table/string operations, + or if statements is not turned into a kernel and automatically + runs on the classic engine. + + Example (turns a white figure red): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - Parameters - The effect panel has 4 trackbars (animation-enabled) as follows. diff --git a/LuaScript/docs/LuaScript.es-es.txt b/LuaScript/docs/LuaScript.es-es.txt index 524674d..e7e38f9 100644 --- a/LuaScript/docs/LuaScript.es-es.txt +++ b/LuaScript/docs/LuaScript.es-es.txt @@ -24,6 +24,61 @@ primer acceso. Omitir estas llamadas cuando no sean necesarias acelera el procesamiento. +- Motores de ejecución y aceleración automática - + + Los scripts que contienen procesamiento de píxeles (un bucle anidado + getpixel/setpixel) se analizan y se enrutan automáticamente a un motor + más rápido. Los scripts normales (coordenadas, rotación, opacidad, etc.) + siguen ejecutándose en MoonSharp como antes, sin cambios de comportamiento. + + o Enrutamiento automático (cuando no hay directiva) + - Un mapeo por píxel autocontenido (ver condiciones abajo) + -> núcleo CPU (rápido, exacto) + - Otras operaciones de píxeles -> Nativo (LuaJIT, solo si está + desplegado) + - Sin operaciones de píxeles -> MoonSharp + + o Directivas de motor (un comentario en la primera línea del script) + --!cpu : Núcleo CPU. Compilado en tiempo de ejecución a un + árbol de expresiones y ejecutado en paralelo en + todos los núcleos de la CPU (idéntico a MoonSharp). + --!gpu : Núcleo GPU. Ejecutado como un sombreador de píxeles + de Direct2D, eliminando la transferencia GPU->CPU + para máxima velocidad. Los resultados pueden diferir + levemente por la precisión float32 (opcional). + --!native : LuaJIT (proceso aparte). Rápido e idéntico a + MoonSharp. Requiere la carpeta native desplegada. + --!moonsharp : Fuerza el motor clásico MoonSharp. + * Si una directiva no está disponible o no es compatible, recurre + automáticamente a un motor inferior (la salida nunca se rompe). + + o Sintaxis apta para el núcleo rápido (un mapeo por píxel puro) + Solo un bucle anidado con la forma siguiente se convierte en núcleo. + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + - El cuerpo solo puede usar aritmética, math.*, comparaciones, el + modismo de umbral "cond and valor1 or valor2" y variables local. + - Solo puede referenciar el píxel actual en proceso + (getpixel(x, y)) y valores como obj/scene/time. + - Todo lo que use muestreo de vecinos (desenfoque, etc.), + escrituras en otras coordenadas, getpixeldata, getobject, + operaciones de tabla/cadena o sentencias if no se convierte en + núcleo y se ejecuta automáticamente en el motor clásico. + + Ejemplo (vuelve roja una figura blanca): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - Parámetros - El panel de efectos tiene los siguientes 4 controles deslizantes (con soporte de animación). diff --git a/LuaScript/docs/LuaScript.id-id.txt b/LuaScript/docs/LuaScript.id-id.txt index 36d1451..ac3c4f9 100644 --- a/LuaScript/docs/LuaScript.id-id.txt +++ b/LuaScript/docs/LuaScript.id-id.txt @@ -24,6 +24,60 @@ Menghilangkan panggilan ini saat tidak diperlukan akan mempercepat pemrosesan. +- Mesin Eksekusi dan Akselerasi Otomatis - + + Skrip yang berisi pemrosesan piksel (loop bersarang getpixel/setpixel) + dianalisis sintaksnya dan secara otomatis dialihkan ke mesin yang lebih + cepat. Skrip biasa (koordinat, rotasi, opasitas, dll.) tetap berjalan di + MoonSharp seperti sebelumnya, tanpa perubahan perilaku. + + o Pengalihan otomatis (saat tidak ada direktif) + - Pemetaan per-piksel mandiri (lihat syarat di bawah) + -> kernel CPU (cepat, tepat) + - Operasi piksel lainnya -> Native (LuaJIT, hanya jika di-deploy) + - Tanpa operasi piksel -> MoonSharp + + o Direktif mesin (komentar pada baris pertama skrip) + --!cpu : Kernel CPU. Dikompilasi saat runtime menjadi pohon + ekspresi dan dijalankan paralel di semua inti CPU + (identik dengan MoonSharp). + --!gpu : Kernel GPU. Dijalankan sebagai pixel shader Direct2D, + menghilangkan transfer GPU->CPU untuk kecepatan + tertinggi. Hasil dapat sedikit berbeda karena + presisi float32 (opsional/opt-in). + --!native : LuaJIT (proses terpisah). Cepat dan identik dengan + MoonSharp. Memerlukan folder native yang di-deploy. + --!moonsharp : Memaksa mesin MoonSharp klasik. + * Jika direktif tidak tersedia/tidak didukung, secara otomatis + jatuh ke mesin yang lebih rendah (output tidak pernah rusak). + + o Sintaks yang memenuhi syarat kernel cepat (pemetaan per-piksel murni) + Hanya loop bersarang dengan bentuk berikut yang menjadi kernel. + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + - Badan hanya boleh memakai aritmetika, math.*, perbandingan, + idiom ambang "cond and nilai1 or nilai2", dan variabel local. + - Hanya boleh mereferensikan piksel yang sedang diproses + (getpixel(x, y)) dan nilai seperti obj/scene/time. + - Apa pun yang memakai sampling tetangga (blur, dll.), penulisan + ke koordinat lain, getpixeldata, getobject, operasi + tabel/string, atau pernyataan if tidak diubah menjadi kernel dan + otomatis berjalan di mesin klasik. + + Contoh (membuat figur putih menjadi merah): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - Parameter - Panel efek memiliki 4 trackbar berikut (mendukung animasi). diff --git a/LuaScript/docs/LuaScript.ja-jp.txt b/LuaScript/docs/LuaScript.ja-jp.txt index 76ecd0e..b75e3d2 100644 --- a/LuaScript/docs/LuaScript.ja-jp.txt +++ b/LuaScript/docs/LuaScript.ja-jp.txt @@ -24,6 +24,56 @@ 発生します。不要な場合は呼び出しを省略することで処理を高速化できます。 +- 実行エンジンと自動高速化 - + + ピクセル処理(getpixel/setpixel の二重ループ)を含むスクリプトは、 + 構文を解析して自動的に高速なエンジンへ振り分けられます。 + 座標・回転・不透明度などの通常スクリプトは従来どおり MoonSharp で + 実行され、挙動は一切変わりません。 + + ○自動振り分け(ディレクティブ無しのとき) + ・自ピクセル完結のピクセル写像(下記条件) → CPU カーネル(高速・厳密) + ・上記以外のピクセル操作 → ネイティブ(LuaJIT, 配備時のみ) + ・ピクセル操作なし → MoonSharp + + ○エンジン指定ディレクティブ(スクリプト先頭行のコメント) + --!cpu : CPU カーネル。式ツリーへ実行時コンパイルして + 全 CPU コアで並列実行します(MoonSharp と完全一致)。 + --!gpu : GPU カーネル。Direct2D ピクセルシェーダとして実行し、 + GPU→CPU 転送を排して最速です。float32 精度のため + 結果はごく僅かに異なり得ます(オプトイン)。 + --!native : LuaJIT(別プロセス)。高速かつ MoonSharp と一致。 + native フォルダの配備が必要です。 + --!moonsharp : 従来の MoonSharp を強制します。 + ※ 指定が利用不可/非対応の場合は、自動的に下位エンジンへ + フォールバックします(出力が壊れることはありません)。 + + ○高速カーネルが成立する構文(純粋ピクセル写像) + 次の形の二重ループのみがカーネル化されます。 + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + ・本体で使えるのは四則演算・math.*・比較・しきい値の + 「条件 and 値1 or 値2」・local 変数のみです。 + ・参照できるのは処理中の自ピクセル(getpixel(x, y))と + obj/scene/time 等の値だけです。 + ・近傍参照(ぼかし等)、別座標への書き込み、getpixeldata、 + getobject、テーブル/文字列操作、if 文などを含む場合は + カーネル化されず、自動的に従来エンジンで実行されます。 + + 例(白い図形が赤くなる): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - パラメータ - エフェクトパネルには以下の 4 つのトラックバー(アニメーション対応)があります。 diff --git a/LuaScript/docs/LuaScript.ko-kr.txt b/LuaScript/docs/LuaScript.ko-kr.txt index fe519aa..f920f5d 100644 --- a/LuaScript/docs/LuaScript.ko-kr.txt +++ b/LuaScript/docs/LuaScript.ko-kr.txt @@ -24,6 +24,56 @@ 발생합니다. 필요 없는 경우 호출을 생략하면 처리를 빠르게 할 수 있습니다. +- 실행 엔진과 자동 가속 - + + 픽셀 처리(getpixel/setpixel 이중 루프)를 포함하는 스크립트는 + 구문을 분석하여 자동으로 더 빠른 엔진으로 분배됩니다. + 좌표・회전・불투명도 등 일반 스크립트는 기존과 동일하게 MoonSharp으로 + 실행되며 동작은 전혀 바뀌지 않습니다. + + ○ 자동 분배(디렉티브가 없을 때) + · 자기 픽셀로 완결되는 픽셀 매핑(아래 조건) → CPU 커널(고속・엄밀) + · 위 이외의 픽셀 조작 → 네이티브(LuaJIT, 배치된 경우에만) + · 픽셀 조작 없음 → MoonSharp + + ○ 엔진 지정 디렉티브(스크립트 첫 줄의 주석) + --!cpu : CPU 커널. 식 트리로 런타임 컴파일하여 + 모든 CPU 코어에서 병렬 실행합니다(MoonSharp과 완전 일치). + --!gpu : GPU 커널. Direct2D 픽셀 셰이더로 실행하여 + GPU→CPU 전송을 없애 가장 빠릅니다. + float32 정밀도이므로 결과가 아주 약간 다를 수 있습니다(옵트인). + --!native : LuaJIT(별도 프로세스). 고속이며 MoonSharp과 일치. + native 폴더의 배치가 필요합니다. + --!moonsharp : 기존의 MoonSharp을 강제합니다. + ※ 지정이 사용 불가/미지원인 경우 자동으로 하위 엔진으로 + 폴백합니다(출력이 깨지지 않습니다). + + ○ 고속 커널이 성립하는 구문(순수 픽셀 매핑) + 다음 형태의 이중 루프만 커널화됩니다. + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + · 본문에서 사용할 수 있는 것은 사칙연산・math.*・비교・임계값 + 「조건 and 값1 or 값2」・local 변수뿐입니다. + · 참조할 수 있는 것은 처리 중인 자기 픽셀(getpixel(x, y))과 + obj/scene/time 등의 값뿐입니다. + · 이웃 참조(블러 등), 다른 좌표로의 쓰기, getpixeldata, + getobject, 테이블/문자열 조작, if 문 등을 포함하는 경우에는 + 커널화되지 않고 자동으로 기존 엔진에서 실행됩니다. + + 예(흰색 도형이 빨갛게 됨): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - 파라미터 - 이펙트 패널에는 다음 4개의 트랙바(애니메이션 지원)가 있습니다. diff --git a/LuaScript/docs/LuaScript.zh-cn.txt b/LuaScript/docs/LuaScript.zh-cn.txt index f0e158a..1c58120 100644 --- a/LuaScript/docs/LuaScript.zh-cn.txt +++ b/LuaScript/docs/LuaScript.zh-cn.txt @@ -24,6 +24,55 @@ 不需要时省略调用可加快处理速度。 +- 执行引擎与自动加速 - + + 包含像素处理(getpixel/setpixel 双重循环)的脚本会被解析语法, + 并自动分配到更快的引擎。 + 坐标、旋转、不透明度等普通脚本仍照旧由 MoonSharp 执行,行为不变。 + + ○ 自动分配(未指定指令时) + · 自像素完结的像素映射(见下方条件)→ CPU 内核(高速、精确) + · 上述以外的像素操作 → 原生(LuaJIT,仅在已部署时) + · 无像素操作 → MoonSharp + + ○ 引擎指定指令(脚本首行的注释) + --!cpu :CPU 内核。运行时编译为表达式树, + 在所有 CPU 核心上并行执行(与 MoonSharp 完全一致)。 + --!gpu :GPU 内核。作为 Direct2D 像素着色器执行, + 消除 GPU→CPU 传输,速度最快。 + 因 float32 精度,结果可能有极小差异(需主动选用)。 + --!native :LuaJIT(独立进程)。高速且与 MoonSharp 一致。 + 需要部署 native 文件夹。 + --!moonsharp :强制使用传统的 MoonSharp。 + ※ 指令不可用/不支持时,会自动回退到较低的引擎 + (输出不会损坏)。 + + ○ 可成为高速内核的语法(纯像素映射) + 只有以下形式的双重循环才会被内核化。 + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + · 主体中仅可使用四则运算、math.*、比较、阈值写法 + “条件 and 值1 or 值2”以及 local 变量。 + · 仅可引用正在处理的自像素(getpixel(x, y)) + 以及 obj/scene/time 等值。 + · 含有邻域参照(模糊等)、写入其他坐标、getpixeldata、 + getobject、表/字符串操作、if 语句等的脚本不会被内核化, + 会自动由传统引擎执行。 + + 示例(让白色图形变红): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - 参数 - 特效面板包含以下 4 个轨道条(支持动画)。 diff --git a/LuaScript/docs/LuaScript.zh-tw.txt b/LuaScript/docs/LuaScript.zh-tw.txt index bdb7179..a7bec3b 100644 --- a/LuaScript/docs/LuaScript.zh-tw.txt +++ b/LuaScript/docs/LuaScript.zh-tw.txt @@ -24,6 +24,55 @@ 不需要時省略呼叫可加快處理速度。 +- 執行引擎與自動加速 - + + 包含像素處理(getpixel/setpixel 雙重迴圈)的腳本會被解析語法, + 並自動分配到更快的引擎。 + 座標、旋轉、不透明度等一般腳本仍照舊由 MoonSharp 執行,行為不變。 + + ○ 自動分配(未指定指令時) + · 自像素完結的像素映射(見下方條件)→ CPU 核心(高速、精確) + · 上述以外的像素操作 → 原生(LuaJIT,僅在已部署時) + · 無像素操作 → MoonSharp + + ○ 引擎指定指令(腳本首行的註解) + --!cpu :CPU 核心。執行時編譯為運算式樹, + 在所有 CPU 核心上並行執行(與 MoonSharp 完全一致)。 + --!gpu :GPU 核心。作為 Direct2D 像素著色器執行, + 排除 GPU→CPU 傳輸,速度最快。 + 因 float32 精度,結果可能有極小差異(需主動選用)。 + --!native :LuaJIT(獨立程序)。高速且與 MoonSharp 一致。 + 需要部署 native 資料夾。 + --!moonsharp :強制使用傳統的 MoonSharp。 + ※ 指令不可用/不支援時,會自動回退到較低的引擎 + (輸出不會損壞)。 + + ○ 可成為高速核心的語法(純像素映射) + 只有以下形式的雙重迴圈才會被核心化。 + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r2, g2, b2 [, a2]) + end + end + · 主體中僅可使用四則運算、math.*、比較、閾值寫法 + 「條件 and 值1 or 值2」以及 local 變數。 + · 僅可參照正在處理的自像素(getpixel(x, y)) + 以及 obj/scene/time 等值。 + · 含有鄰域參照(模糊等)、寫入其他座標、getpixeldata、 + getobject、表/字串操作、if 陳述式等的腳本不會被核心化, + 會自動由傳統引擎執行。 + + 範例(讓白色圖形變紅): + --!gpu + for y = 0, obj.h - 1 do + for x = 0, obj.w - 1 do + local r, g, b, a = obj.getpixel(x, y) + obj.setpixel(x, y, r, g / 2, b / 2, a) + end + end + + - 參數 - 特效面板包含以下 4 個軌道條(支援動畫)。