Search the Community

Showing results for tags 'pixiv5'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 6 results

  1. please i need help!! //Here is the gradient function function Gradient(x, y, w, h, startColor, endColor){ let p1 = x+100 let p2 = y+50 let p3 = x+w-100 let p4 = y+h-80 let cvs = document.createElement('canvas') cvs.width = window.innerWidth-20 cvs.width = window.innerHeight-20 let ctx = cvs.getContext('2d') let grd = ctx.createLinearGradient(p1, p2, p3, p4) grd.addColorStop(0, startColor) grd.addColorStop(1, endColor) ctx.fillStyle = grd ctx.fillRect(x, y, w, h) return new PIXI.Texture.from(cvs) } //This is the params let x = 240 let y = 100 let h = 200 let w = 200 let a = new PIXI.Graphics() .beginTextureFill(app.Gradient(x, y, w, h, '#ff0000', '#00ff00')) .drawRect(x, y, w, h) .endFill() app.stage.addChild(a) My output is this: a red rectangle???, why?... If i use this code in javascript without pixi.js
  2. Is there a way for PixiJS (or any plugin/script) to return the color value of a sprite if given a point value to check? What I'd like to do is create a collision map, which would be a large sprite with nothing but black and white shapes. This sprite would be on it's own layer underneath a painted background image. a character sprite would move around on a layer above, and any time the edges of it collides with a black part of the collision map, it would hit a wall.
  3. Hi I'm trying to add onscreen buttons to move my sprite around my website. right now my code is as follows //load keyboard class Keyboard { constructor() { this.pressed = {}; } watch(el) { el.addEventListener('keydown', (e) => { this.pressed[e.key] = true; }); el.addEventListener('keyup', (e) => { this.pressed[e.key] = false; }); } app.loader.load((loader, resources) => { // create a new keyboard instance let kb = new Keyboard();; ..... }); ... //Jumping if (characterPosition.vy < 0) { characterPosition.y += characterPosition.vy; } if (!kb.pressed.ArrowUp && touchingGround && characterPosition.jumped) { characterPosition.jumped = false; } if (kb.pressed.ArrowUp && touchingGround && !characterPosition.jumped) { characterPosition.vy = -19; characterPosition.jumped = true; } //Right if (kb.pressed.ArrowRight) { characterPosition.direction = 0; characterPosition.vx = Math.min(8, characterPosition.vx + 2); } if (characterPosition.vx > 0) { characterPosition.vx -= 1; } //Left if (kb.pressed.ArrowLeft) { characterPosition.direction = 1; characterPosition.vx = Math.max(-8, characterPosition.vx - 2); } if (characterPosition.vx < 0) { characterPosition.vx += 1; }
  4. EDITED: This problem is solved. The solution is in this message. Hello, Require.js does not understand '.' (dot) in the module name: "pixi.js". Here in the RequireConfig.ts file: RequireConfig.ts requirejs.config({ baseUrl: "js", paths: { "pixi.js": "" } }); requirejs(["Program"], () => { }); I changed "pixi.js" to "pixijs" in this file: "node_modules\pixi.js\pixi.js.d.ts" here: declare module "pixijs" { export = PIXI; } But now PIXI is undefined in my example: import * as PIXI from "pixijs"; export class Game { public constructor() { const app = new PIXI.Application(); console.log(app); } }
  5. Using pixi.js v5, I'm trying to fill a polygon with about one hundred vertices using Graphics.drawPolygon(), but the polygon is drawn incorrectly. When I reduce the number of vertices to about 50, then the polygon is drawn correctly. Is there any limit (near 100) to the number of vertices that Graphics.drawPolygon() can draw? Thanks.
  6. Hi. I'm not a html5 game developer but Front-end developer trying to draw a line chart with pixi.js. So, my question is not about the html5 game but just about how can I use pixi.js correctly. I was recommended this forum from pixi.js official site. Anyway, the problem is chrome browser stopped after about 2 minutes later ticker started. See this code ( It's a simple code for a line chart. 1. Add a basic PIXI container 2. Draw the first line with 4 dots. 3. Add next line every second using PIXI ticker and Change line x position. It works nicely at the moment But about 2 minutes later, the browser is crashed. I don't know why and how can I fix it. Help me!