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 create a sprite with text. I'm not using TextGeometry for performance reasons.  var fontsize = 18; var borderThickness = 4; var canvas = document.createElement('canvas'); var context = canvas.getContext('2d'); co...
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...
Hey guys so I have a sprite sheet with multiple sprites that I want to use to animate a website using canvas.  However the problem I am having is I don't know how to go about reading in only the frames that I need.  Example:  1 1 1 2 2 2 2 2 3 3...
Can you point me to a good Javascript sprite animation library using the HTML Canvas tag?  A few Google searches only turned up some non-canvas projects.  I am looking for something clean and simple.  Thanks....
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&...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.