question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when attempting to give an entity an image.

See original GitHub issue

Here’s my code:

window.onload = function() {
  var $h = $(window).height();
  var $w = $(window).width();

  var $nw = ($h-$h/10) / 3 * 4
  var $nh = $nw / 4 * 3

  Crafty.init($nw,$nh, document.getElementById('game'));

  Crafty.e('Floor, 2D, Canvas, Color')
    .attr({x: 0, y: 250, w: 250, h: 10})
    .color('green');

  var queen = Crafty.e('2D, Canvas, Image, Fourway')
    .attr({x: 0, y: 0, w: 50, h: 50})
    .image("assets/queen.png", "no-repeat")
    .fourway(200)
};

Here’s the error: 'CanvasRenderingContext2D.webkitImageSmoothingEnabled' is deprecated. Please use 'CanvasRenderingContext2D.imageSmoothingEnabled' instead.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
200sccommented, May 3, 2016

This shouldn’t cause any functional problem. It’s done for older browser compatibility, I believe.

0reactions
mucahocommented, May 4, 2016

Maybe "assets/queen.png" fails to load? Try preloading them with Crafty.load.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catchable Fatal Error: Argument 1 passed to \Entity\Image ...
I've got a similar error message. I solved it by adding <form method="post" {{ form_enctype(form) }}> to my form tag.
Read more >
Liquid error : Show Account/contact Entity Image o...
I'm trying to show account or contact entity image on portals but when I try to run I receive an error message :...
Read more >
Error when I upload an image with entity browser media - Drupal
TypeError: Argument 1 passed to Drupal\lightning_media\MediaHelper::getSourceField() must be an instance of Drupal\media\MediaInterface, null ...
Read more >
Fix common Google Ads Editor errors
This error is caused by attempting to exceed some type of entity limit in Google Ads. For example, ... Contact the Google Ads...
Read more >
Error Message: There are errors below. Hover over each for ...
This error message can occur because of: Layers - Layers make editing images easier, but they have a larger size that prevents uploads....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found