I'm using canvas to display some sprites, and I need to flip one horizontally (so it faces left or right). I can't see any method to do that with drawImage, however.  Here's my relevant code:  this.idleSprite = new Image(); this.idleSprit...
So, I tried creating a little puzzle game, which at the moment looks something like this     The top is the puzzle where you can put pieces that are chosen from a table with 1 row (scrollable) from the bottom of the page  Problem is those are 9 indiv...
I'm having trouble destroying Sprites in Phaser.  I have a JavaScript object, let's call it Block. Block has a sprite property, that gets set like so:  this.sprite = this.game.add.sprite(this.x, this.y, 'blocks', this.color);   At a c...
Although there are many tutorials about how to render sprites, which I already know, I was wondering about how I can animate my sprites in an object oriented way. Let's say I have a Player-class  class Player{     constructor(){         this.text...
I'm trying to use a sprite image for google map marker but it does not display. Here is the code I'm using   function setMarkers(map, markers) {      var google_image = new google.maps.MarkerImage("http://www.mydomain.com/images/bodycss/p...
I have a sprite that animates using a sprite sheet. He is only 16x16, but I want to scale him up to around 64x64 in all its pixel-y goodness!     The results are terrible, of course the browser is anti aliasing it. :/  Thanks!  EDIT:  No css needed,...
I'm using react-three-renderer (npm, github) for building a scene with three.js.  I'm attempting to use <sprite> and <spriteMaterial> to make a label that always faces the camera, much like in stemkoski's example.  However, I&...
How can we position the sprite image as Google map marker. For eg: In css we are positioning the image like   background: url('../images/bodycss/pointer.png') 28px -32px;   Now how can I include the above code to the below google api-v3 funct...
I am doing an experiment and attempting to improve the max particle count before frame-rates start to drop in HTML5 Canvas.   I'm using requestAnimationFrame, I'm using drawImage from a canvas as this seems to be the fastest method for render...
I'm developing an isometric html5 game in canvas (& js). My grid consists of columns (x) and rows (y).   Currently my player can walk through the map, but he jumps from coordinate to coordinate.  I'm trying to get him to walk from tile to...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.