Token导航 LogoToken导航

Agent Skill · 待分类

render-textures(渲染纹理)

render-textures 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

render-textures 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 3,294。

总安装 1,073周安装 43GitHub Stars 39,494下载 347核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:render-textures(渲染纹理)
来源仓库:https://github.com/phaserjs/phaser
仓库路径:skills/render-textures
安装命令:
npx skills add https://github.com/phaserjs/phaser --skill render-textures
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/phaserjs/phaser --skill render-textures

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

render-textures 用于处理 GitHub 仓库、Issue、Pull Request 等协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕代码变更进行整理。它可辅助分析仓库状态、代码差异或协作事项,适用于开发流程管理。

通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验用法。安装前建议确认权限范围、维护状态及是否触发联网或文件操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/render-textures

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/phaserjs/phaser --skill render-textures;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

render-textures 怎么安装?

在终端执行 npx skills add https://github.com/phaserjs/phaser --skill render-textures。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

render-textures 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

render-textures 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

render-textures 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

render-textures 用的人多吗?

公开数据是累计安装 1,073 次,近一周安装 43 次,下载 347 次,GitHub 39,494 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

render-textures 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 39,494 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
render-textures

渲染纹理 · 本页

1,07339,494权限未标注未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Render Textures and Dynamic Textures

Drawing game objects to off-screen textures in Phaser 4 -- RenderTexture game object, DynamicTexture for shared textures, the Stamp helper, command-buffer rendering, snapshots, procedural generation, and minimap patterns.

Key source paths: src/gameobjects/rendertexture/, src/textures/DynamicTexture.js, src/gameobjects/stamp/, src/textures/typedefs/StampConfig.js, src/textures/typedefs/CaptureConfig.js Related skills:../sprites-and-images/SKILL.md,../loading-assets/SKILL.md,../cameras/SKILL.md

Quick Start

// In a Scene's create() method:

// 1. RenderTexture -- a visible game object with its own DynamicTexture
const rt = this.add.renderTexture(400, 300, 256, 256);
rt.draw('player', 128, 128);          // draw a texture by key at center
rt.fill(0x222244, 0.5);               // semi-transparent fill
rt.render();                           // flush the command buffer

// 2. DynamicTexture -- a shared texture in the Texture Manager
const dt = this.textures.addDynamicTexture('composite', 512, 512);
dt.stamp('coin', null, 64, 64, { scale: 2, angle: 45 });
dt.render();
this.add.image(400, 300, 'composite'); // any game object can use it

// 3. Stamp game object -- lightweight Image that ignores camera scroll
const hud = this.add.stamp(10, 10, 'heart');

Core Concepts

RenderTexture vs DynamicTexture

Phaser 4 splits texture-drawing into two layers:

RenderTextureDynamicTexture
What it isImage game object + auto-created DynamicTextureTexture in the Texture Manager
Created viathis.add.renderTexture(x, y, w, h)this.textures.addDynamicTexture(key, w, h)
Visible on its ownYes (it extends Image)No (must be assigned to a game object)
Shared across objectsPossible via saveTexture(key)Yes, by key
Cross-scene useNo (belongs to one Scene)Yes (textures are global)
Has position/scale/alphaYes (all Image components)No (it is a Texture, not a GameObject)

When to use which:

  • Use RenderTexture when you need a single visible surface you draw onto (paint canvas, trail effect, composite sprite).
  • Use DynamicTexture when many game objects share the same generated texture, or you need a texture for masks/shaders, or you need cross-scene access.

RenderTexture is a thin proxy. Methods like draw(), stamp(), fill(), clear(), erase(), snapshot() all delegate to its underlying this.texture (a DynamicTexture).

Origin note: RenderTexture extends Image, so its origin defaults to (0.5, 0.5). If you want top-left positioning (common for full-screen or minimap RTs), call rt.setOrigin(0, 0).

The Command Buffer (v4 Architecture)

In Phaser 4, drawing calls (draw, stamp, fill, clear, erase, repeat, capture) do not execute immediately. They push commands into a commandBuffer array. You must call .render() to flush and execute the buffer.

rt.clear();
rt.fill(0x000000);
rt.draw(sprite, 128, 128);
rt.render();  // REQUIRED -- nothing appears without this

For RenderTexture game objects, the renderMode property controls automatic rendering:

ModeBehavior
'render' (default)Draws the texture contents to the frame each tick. You call render() manually when content changes.
'redraw'Calls render() automatically every frame but does NOT display itself. Useful for textures reused by other objects.
'all'Calls render() every frame AND draws itself to the frame.
rt.setRenderMode('all');       // auto-render + display every frame
rt.setRenderMode('all', true); // same, plus preserve the command buffer

Preserve Mode

By default the command buffer clears after render(). Call preserve(true) to keep commands between renders, so the same drawing replays each frame:

rt.preserve(true);
rt.clear();
rt.draw(sprite);
// On every subsequent render(), clear + draw will repeat

Stamp Game Object

Stamp (this.add.stamp(x, y, texture, frame)) is a lightweight Image subclass that ignores camera scroll and transform during rendering. It is used internally by DynamicTexture for drawing operations and is also useful for HUD elements. It extends Image with custom render nodes (DefaultStampNodes).

The stamp() Method vs the Stamp Game Object

These are different things:

  • rt.stamp(key, frame, x, y, config) -- a method on RenderTexture/DynamicTexture that draws a texture frame to the surface with transform options (alpha, tint, angle, scale, origin, blendMode).
  • this.add.stamp(x, y, texture, frame) -- a factory that creates a Stamp game object added to the Scene display list.

Common Patterns

Drawing Sprites and Game Objects

const rt = this.add.renderTexture(0, 0, 800, 600);

// Single game object at an offset
rt.draw(sprite, 100, 100);

// Array of objects
rt.draw([sprite1, sprite2, sprite3]);

// Group or Container (only visible children are drawn)
rt.draw(enemyGroup);
rt.draw(myContainer, 50, 50);  // offset added to children positions

// Entire Scene display list
rt.draw(this.children);

// Texture by string key
rt.draw('explosion', 200, 200);

// Don't forget to flush
rt.render();

The draw() method accepts: renderable game objects, Groups, Containers, Display Lists, other RenderTextures/DynamicTextures, Texture Frames, texture key strings, or arrays of any of these.

Note: alpha and tint parameters on draw() only apply to Texture Frames/strings. Game objects use their own alpha and tint when drawn.

Stamping Textures with Config

The stamp() method draws a texture frame with full transform control. The frame is centered on the x/y position by default (origin 0.5).

rt.stamp('bullet', null, 100, 100, {
    alpha: 0.8,
    tint: 0xff0000,
    angle: 45,          // degrees (takes precedence over rotation)
    scale: 2,           // uniform scale
    scaleX: 1.5,        // overrides scale for X
    scaleY: 0.5,        // overrides scale for Y
    originX: 0,         // top-left origin
    originY: 0,
    blendMode: 0
});
rt.render();

Capture -- Drawing with Overrides (v4)

The capture() method draws a game object with temporary property overrides, restoring originals afterward:

rt.capture(player, {
    x: 64,
    y: 64,
    scale: 0.5,
    alpha: 0.8,
    rotation: Math.PI / 4,
    transform: 'world',    // 'local', 'world', or a TransformMatrix
    camera: someCamera      // optional camera override
});
rt.render();

This is useful for drawing an object at a different position/scale without modifying the object itself.

Filling and Clearing

// Fill entire texture with color
rt.fill(0xff0000);          // solid red
rt.fill(0x000000, 0.5);     // semi-transparent black

// Fill a region
rt.fill(0x00ff00, 1, 10, 10, 100, 50);  // green rect at (10,10) size 100x50

// Clear everything (transparent)
rt.clear();

// Clear a region
rt.clear(10, 10, 100, 50);

rt.render();

Erasing

Erase uses ERASE blend mode to cut holes in the texture:

rt.fill(0xffffff);           // white background
rt.erase(circleSprite, 100, 100);  // punch a hole shaped like the sprite
rt.render();

Repeating / Tiling a Texture

// Fill the entire RenderTexture with a tiled pattern
rt.repeat('grass', null);                        // tile the whole surface
rt.repeat('brick', null, 0, 0, 256, 128);       // tile a specific region
rt.repeat('tile', 'frame2', 0, 0, 512, 512, {
    tileScaleX: 2,
    tileScaleY: 2,
    tilePositionX: 16,
    alpha: 0.8
});
rt.render();

Snapshots (Pixel Capture)

Snapshots read pixel data from the framebuffer. They are expensive and blocking -- use sparingly.

// Full texture snapshot -- callback receives an HTMLImageElement
rt.snapshot(function (image) {
    document.body.appendChild(image);  // or use as texture source
});

// Area snapshot
rt.snapshotArea(0, 0, 128, 128, function (image) {
    // image is 128x128 region from top-left
}, 'image/jpeg', 0.8);

// Single pixel -- callback receives a Phaser.Display.Color
rt.snapshotPixel(64, 64, function (color) {
    console.log(color.r, color.g, color.b, color.a);
});

Using as a Texture Source for Other Objects

const rt = this.add.renderTexture(0, 0, 256, 256);
rt.draw(complexScene);
rt.render();

// Register in the Texture Manager under a key
rt.saveTexture('composited');

// Now any game object can use it
this.add.image(400, 300, 'composited');
this.add.sprite(100, 100, 'composited');

// Updates to the RenderTexture automatically reflect on all users

For DynamicTexture, the key is set at creation time:

const dt = this.textures.addDynamicTexture('terrain', 1024, 1024);
dt.repeat('grass', null);
dt.render();
this.add.image(512, 512, 'terrain');  // already keyed

Procedural Generation

const dt = this.textures.addDynamicTexture('starfield', 800, 600);
dt.fill(0x000011);
for (let i = 0; i < 200; i++) {
    const x = Phaser.Math.Between(0, 800);
    const y = Phaser.Math.Between(0, 600);
    const brightness = Phaser.Math.FloatBetween(0.3, 1);
    dt.stamp('star', null, x, y, { alpha: brightness, scale: Phaser.Math.FloatBetween(0.5, 1.5) });
}
dt.render();
this.add.image(400, 300, 'starfield');

Minimap Pattern

create() {
    // Small RenderTexture as minimap
    this.minimap = this.add.renderTexture(700, 50, 150, 100);
    this.minimap.setScrollFactor(0);  // fixed to camera
    this.minimap.setRenderMode('all'); // auto-render every frame
    this.minimap.preserve(true);
}

// In update or a callback:
this.minimap.clear();
this.minimap.fill(0x111111);
// Draw scaled-down versions of world objects
this.minimap.capture(player, { x: px * 0.1, y: py * 0.1, scale: 0.1 });
// render() is automatic in 'all' mode

Callbacks in the Command Buffer

Insert logic between draw commands that executes during render():

rt.clear();
rt.draw(background);
rt.callback(() => {
    // Runs during render, after background is drawn
    sprite.setTint(0xff0000);
});
rt.draw(sprite);
rt.callback(() => {
    sprite.setTint(0xffffff);  // restore after drawing
});
rt.render();

Resizing

// Resize erases all content and recreates the framebuffer
rt.resize(512, 512);

// Optional: disable force-even rounding
rt.resize(513, 513, false);

Internal Camera

Both RenderTexture and DynamicTexture have a .camera property that controls how game objects are positioned when drawn. Scroll, zoom, and rotate this camera to transform drawn content. Note: stamp() ignores the camera; only draw() and game object rendering respect it.

rt.camera.setScroll(100, 50);
rt.camera.setZoom(2);
rt.draw(sprite);  // sprite drawn with camera transform applied
rt.render();

API Quick Reference

RenderTexture (extends Image)

MethodSignatureDescription
draw(entries, x?, y?, alpha?, tint?)Draw game objects, textures, groups, etc.
capture(entry, config)Draw with temporary property overrides
stamp(key, frame?, x?, y?, config?)Stamp a texture frame with transform
erase(entries, x?, y?)Draw using ERASE blend mode
fill(rgb, alpha?, x?, y?, w?, h?)Fill with color
clear(x?, y?, w?, h?)Clear to transparent
repeat(key, frame?, x?, y?, w?, h?, config?)Tile a texture as fill pattern
render()Flush the command buffer
preserve(bool)Keep command buffer between renders
callback(fn)Insert callback into command buffer
resize(w, h?, forceEven?)Resize (erases content)
saveTexture(key)Register in Texture Manager
setRenderMode(mode, preserve?)Set 'render', 'redraw', or 'all'
snapshot(callback, type?, quality?)Full snapshot to Image
snapshotArea(x, y, w, h, callback, type?, quality?)Area snapshot
snapshotPixel(x, y, callback)Single pixel to Color

DynamicTexture (extends Texture)

Same drawing methods as RenderTexture (draw, stamp, erase, fill, clear, repeat, capture, render, preserve, callback, snapshot, snapshotArea, snapshotPixel), plus:

Method/PropertyDescription
setSize(w, h?, forceEven?)Resize the texture
cameraInternal Camera for draw positioning
commandBufferArray of pending draw commands
drawingContextWebGL DrawingContext with framebuffer
getWebGLTexture()Returns the underlying WebGLTextureWrapper

StampConfig (for stamp() config parameter)

PropertyDefaultDescription
alpha1Alpha value
tint0xffffffTint color (WebGL only)
angle0Degrees (overrides rotation if non-zero)
rotation0Radians
scale1Uniform scale
scaleX / scaleY1Per-axis scale (overrides scale)
originX / originY0.5Origin point
blendMode0Blend mode

CaptureConfig (for capture() config parameter)

PropertyDescription
transform'local', 'world', or a TransformMatrix
cameraCamera override for rendering
x, y, alpha, tint, angle, rotationOverride game object properties temporarily
scale, scaleX, scaleYScale overrides
originX, originY, blendModeAdditional overrides

Factory Methods

this.add.renderTexture(x, y, width?, height?)  // default 32x32
this.add.stamp(x, y, texture, frame?)
this.textures.addDynamicTexture(key, width?, height?, forceEven?)  // default 256x256

Gotchas

  1. Must call render(). In Phaser 4, drawing methods buffer commands. Nothing appears until render() is called (unless using renderMode: 'all' or 'redraw').
  2. Cannot draw to itself. A DynamicTexture/RenderTexture silently skips entries that reference itself.
  3. Command buffer clears after render. Call preserve(true) before drawing if you need the same commands to replay each frame.
  4. stamp() ignores the internal camera. Only game objects drawn via draw() or capture() respect the .camera property. Texture stamps are positioned absolutely.
  5. Default sizes differ. RenderTexture defaults to 32x32. DynamicTexture defaults to 256x256.
  6. forceEven rounds dimensions up. By default, width/height are rounded to even numbers for rendering quality. Pass false as the last argument if you need exact odd dimensions.
  7. Snapshots are expensive. They use readPixels (WebGL) which blocks the GPU pipeline. Avoid per-frame snapshots. snapshotPixel is cheaper than full snapshot.
  8. WebGL1 has no anti-aliasing on framebuffers. Shapes and Graphics drawn to a RenderTexture may have jagged edges. Use pre-rendered sprite textures instead.
  9. resize() erases content. Resizing destroys and recreates the framebuffer.
  10. saveTexture renames, does not copy. Calling saveTexture(key) assigns the DynamicTexture to the Texture Manager under that key. Calling it again with a different key renames it. Destroying the RenderTexture without saving first destroys the texture.
  11. draw() alpha/tint params only affect Texture Frames. When drawing game objects, they use their own alpha and tint values. The alpha and tint parameters on draw() only apply when drawing texture strings or Frame instances.
  12. WebGL context loss. DynamicTexture contents are lost on context loss. Listen for the restorewebgl event to redraw.
  13. Groups/Containers: x, y offset is additive. When drawing a Group or Container with rt.draw(group, x, y), the x/y offset is added to each child's position. Children at (100, 50) drawn with offset (10, 10) appear at (110, 60) in the texture.

Source File Map

FileDescription
src/gameobjects/rendertexture/RenderTexture.jsRenderTexture game object (extends Image, proxies to DynamicTexture)
src/gameobjects/rendertexture/RenderTextureFactory.jsthis.add.renderTexture() factory registration
src/gameobjects/rendertexture/RenderTextureRender.jsWebGL/Canvas render functions for RenderTexture
src/gameobjects/rendertexture/RenderTextureRenderModes.jsEnum: RENDER, REDRAW, ALL
src/textures/DynamicTexture.jsCore DynamicTexture class (command buffer, drawing, snapshots)
src/textures/DynamicTextureCommands.jsCommand constants (CLEAR, FILL, STAMP, DRAW, ERASE, etc.)
src/textures/typedefs/StampConfig.jsStampConfig typedef for stamp()
src/textures/typedefs/CaptureConfig.jsCaptureConfig typedef for capture()
src/gameobjects/stamp/Stamp.jsStamp game object (light Image, ignores camera scroll)
src/gameobjects/stamp/StampFactory.jsthis.add.stamp() factory registration

平台分布

Codex

34.15%
按下载量换算119

Claude

31.14%
按下载量换算108

Cursor

17.59%
按下载量换算61

Gemini CLI

9.23%
按下载量换算32

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills