Loading...
Loading...
PixiJS 2D rendering and game development including sprites, animations, interactions, and WebGL/Canvas rendering. Use when building PixiJS applications, creating 2D games, or implementing interactive graphics.
npx skill4agent add projectious-work/aibox pixijs-gamedevApplicationawait app.init({ width, height, background })Application.resize()resizeTo: windowantialias: trueresolution: window.devicePixelRatioAssets.load('path/to/image.png')Sprite.from(texture)new Sprite(texture)anchor.set(0.5)SpritesheetAssetsTexture.EMPTYContainersortableChildren: truezIndexParticleContainerapp.ticker.add((ticker) => { ... })ticker.deltaTimegsap.to(sprite, { x: 200, duration: 1 })AnimatedSpriteanimatedSprite.play().stop().gotoAndPlay(frame)animationSpeedeventMode = 'static'.on('pointerdown', handler)hitAreapointerdownglobalpointermovepointerupapp.stagecursor = 'pointer'new Graphics()rect()circle()moveTo()lineTo()graphics.rect(0, 0, 100, 50).fill(0xff0000).stroke(0x000000)GraphicsContextapp.renderer.generateTexture()displayObject.filters = [new BlurFilter(4)]BlurFilterColorMatrixFilterDisplacementFilterAlphaFilterAssets.add({ alias, src })Assets.load(alias)Assets.addBundle('game', { bg: 'bg.png', hero: 'hero.png' })await Assets.loadBundle('game')ParticleContainerdestroy()app.ticker.FPSblendModereferences/api-cheatsheet.mdapp.ticker.add()eventModeresizeTo: windowapp.screen.width/height