Loading...
Loading...
Use this skill when rendering custom geometry in PixiJS v8. Covers Mesh with MeshGeometry (positions, uvs, indices, topology), MeshSimple for per-frame vertex animation, MeshPlane for subdivided deformation, MeshRope for path-following textures, PerspectiveMesh for 2.5D corners. Triggers on: Mesh, MeshGeometry, MeshSimple, MeshPlane, MeshRope, PerspectiveMesh, positions, uvs, indices, topology, setCorners, constructor options, MeshOptions, MeshPlaneOptions, MeshRopeOptions, SimpleMeshOptions, PerspectivePlaneOptions.
npx skill4agent add pixijs/pixijs-skills pixijs-scene-meshMeshMeshSimpleMeshPlaneMeshRopePerspectiveMeshMeshpixijs-scene-core-conceptsContainerconst texture = await Assets.load("pattern.png");
const geometry = new MeshGeometry({
positions: new Float32Array([0, 0, 100, 0, 100, 100, 0, 100]),
uvs: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
indices: new Uint32Array([0, 1, 2, 0, 2, 3]),
topology: "triangle-list",
});
const mesh = new Mesh({
geometry,
texture,
roundPixels: false,
});
app.stage.addChild(mesh);MeshMeshgeometryMeshSimpleMeshPlaneMeshRopePerspectiveMeshtexture| Variant | Use when | Trade-offs | Reference |
|---|---|---|---|
| Full control, custom geometry, custom shaders | You build the | references/mesh.md |
| Quick textured shapes with per-frame vertex animation | Thin wrapper; auto-updates the vertex buffer | references/mesh-simple.md |
| Subdivided textured rectangle for distortion effects | Fixed topology; | references/mesh-plane.md |
| Texture following a polyline path | Bent at each point; needs many points for smooth curves | references/mesh-rope.md |
| 2D plane with perspective corners | Not true 3D; UV-level perspective correction only | references/mesh-perspective.md |
Spritepixijs-scene-spriteMeshPlaneverticesXverticesYMeshRopewidthtextureScale: 0> 0PerspectiveMeshMeshSimpleMeshMeshGeometrypixijs-custom-renderingPerspectiveMeshMeshGeometrypositionsuvsindicestopologyMeshMeshGeometry'auto'batchMode = 'auto'new MeshGeometry({ topology: 'triangle-strip' })'triangle-list'new MeshGeometry({ shrinkBuffersToFit: true })Mesh.containsPoint(point)MeshGeometrynew Mesh({ geometry, state })StateState.for2d()SimpleMeshSimplePlaneSimpleRopeimport { SimpleRope } from "pixi.js";
const rope = new SimpleRope(texture, points);import { MeshRope } from "pixi.js";
const rope = new MeshRope({ texture, points });SimpleMeshMeshSimpleSimplePlaneMeshPlaneSimpleRopeMeshRopeMeshGeometryconst geom = new MeshGeometry(vertices, uvs, indices);const geom = new MeshGeometry({
positions: vertices,
uvs,
indices,
topology: "triangle-list",
});positionsverticesverticesMeshSimplemesh.addChild(otherMesh);const group = new Container();
group.addChild(mesh, otherMesh);MeshallowChildren = falseContainer