跳到正文
Skillpedia
通用编程6.4k · #14218

melonjs

它能做什么

它是 melonJS 游戏开发的起点,指向每个主题的详细指南。适用于使用 melonJS 引擎制作浏览器游戏的开发者。

适用场景

  • ✓当开发者开始任何 melonJS 任务,需要知道应先阅读哪份指南时。
  • ✓当开发者在处理 3D 内容,需要在编写代码前了解坐标规则时。
  • ✓当开发者凭记忆编写 melonJS 代码,可能在使用过时的方法时。

技能链接

https://github.com/melonjs/melonJS/blob/master/packages/melonjs/skills/melonjs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/melonjs/melonJS/blob/master/packages/melonjs/skills/melonjs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想用 melonJS 做一个二维平台游戏。我应该阅读哪些指南?”

每周 5 个新技能,1 分钟读完。

工作原理

该技能充当路由。它列出各主题指南,建议在涉及旧代码时阅读较新的迁移指南,并告诉 AI 不要猜测未列出的 API。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

melonJS

Entry point for the melonJS skill collection. melonJS is an open-source HTML5 game engine for indie developers, covering 2D, 2.5D and 3D — perspective and orthogonal cameras, GPU-accelerated tilemap rendering, post-processing effects, custom shaders, 3D meshes, polygon-accurate physics and modern Tiled workflows. It runs on WebGPU, WebGL 2 or Canvas with automatic fallback, and has no runtime dependencies.

How to use this skill

  1. Find the specialised skill below that matches the task and follow it.
  2. If the task involves anything 3D, read melonjs-3d first — melonJS's coordinate conventions are the inverse of OpenGL's, so untutored 3D instincts are backwards.
  3. If you are writing melonJS from prior knowledge rather than from the current docs, read melonjs-20-migration — most published melonJS material predates 20.0 and its bootstrap no longer exists.
  4. If none of them covers the task, use the escape hatch below rather than guessing at an API.

Skill router

Skill Load when…
melonjs-getting-started Bootstrapping a game, new Application, await app.init(), choosing a renderer, preloading assets.
melonjs-20-migration Code based on melonJS 19.x or earlier, or an API that "should exist" but doesn't — video.init, Entity, renderable.shader =.
melonjs-scenes-and-state Stage subclasses, the state manager, transitions, pausing, the update loop, timers, tweens, saved data.
melonjs-renderables Subclassing Renderable, custom draw(), draw order, anchors, floating, post effects on an object.
melonjs-sprites-and-animation Sprite, frame animation, texture atlases (TexturePacker / Aseprite / ShoeBox), tint, flip, pooling.
melonjs-input Keyboard actions, pointer and touch handling, drag, gamepad, virtual controls (fixed or floating sticks and buttons, tap to act).
melonjs-physics Collision, bodies, movement, spatial queries, and the planck / matter adapters.
melonjs-math Vectors and matrices: what mutates, what allocates, and interpolating with lerp, slerp, damp or moveTowards.
melonjs-tilemaps Tiled maps — TMX/TSX loading, spawning entities from objects, collision layers, isometric maps, reading and changing tiles at run time (a tile layer as the game board).
melonjs-audio Sound effects, music, audio sprites, spatial audio, procedural tone and noise.
melonjs-effects-and-shaders Post effects, custom GLSL/WGSL shaders, blend modes, colour grading, screen capture.
melonjs-3d Anything 3D or 2.5D — Camera3d, meshes, instancing, Sprite3d billboards, Light3d, distance fog, glTF scenes.
melonjs-3d-assets Loading glTF/GLB or OBJ models — materials, imported lights, instancing, and what is not supported.
melonjs-camera-and-drawing Camera follow, bounds, shake and fade, coordinate conversion, and immediate-mode shape drawing.
melonjs-ui-and-text HUDs, buttons, menus, drag-and-drop, Text and BitmapText, web fonts, panels.
melonjs-particles-and-trails ParticleEmitter, burst versus stream, referenceSpace, and the Trail renderable.
melonjs-lighting 2D dynamic lighting — Light2d, stage ambient, normal-mapped sprites.
melonjs-deployment Scaffolding a project, building, browser support and transpiling, native and mini-game platforms.
melonjs-loading-assets Resource descriptors, the asset type list, base URLs, cross-origin, progress events, unloading.
melonjs-renderer-backends A feature works on one machine but not another; choosing or pinning a backend; degrading gracefully.
melonjs-display-and-scaling Blurry, soft or cropped output; the design resolution, how the canvas fills its page, and pix
常见问题

这是一个独立的教程吗?

不是。它指向每个 melonJS 主题的更详细指南。

我应该阅读哪份指南来学习 3D?

该技能说明应先阅读 3D 指南,因为其坐标规则与 OpenGL 正好相反。

如果列表中没有我的主题怎么办?

该技能说明应使用它的兜底方式,而不是猜测某个 API。

详情

作者的原始描述

Use this skill FIRST for any melonJS task; it routes to the right specialised skill and lists the companion packages. melonJS is an open-source 2D, 2.5D and 3D HTML5 game engine running on WebGPU, WebGL 2 or Canvas. Covers Application setup, the scene graph, renderables, sprites, tilemaps, physics, audio, particles, shaders, and the 3D tier — perspective cameras, meshes and glTF scenes. Triggers on: melonjs, melonJS, me.game, Application, app.init, app.world, Renderable, Sprite, Stage, state.change, Camera2d, Camera3d, Mesh, tilemap, Tiled, TMX, ParticleEmitter, ShaderEffect, how do I make a g

repo: melonjs/melonJS

热度

GitHub 星标
6.4k
排名
#14218
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能