Comments (7)
interesting. is there more than one image layer? I'm not sure that works at the moment (don't believe I've tried it, to be honest)
from nadion.
Nope, just one!
See attached:
[image: Inline image 1]
[image: Inline image 3]
[image: Inline image 5]
[image: Inline image 6]
And yet no display.
On Wed, Dec 18, 2013 at 1:36 PM, josh shepard [email protected]:
interesting. is there more than one image layer? I'm not sure that works
at the moment (don't believe I've tried it, to be honest)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-30867756
.
from nadion.
(can't see those images - just '[image: Inline image1]' etc.)
hmm. have you tried replacing the image in the sample with your image? that will tell us if the image is displayed in code that we know can show an image normally...
the layers are added in the order that they are set in Tiled, and added to Phaser's world group (Nadion.Level.createImageLayer() fcn in level.js)... since the image layer was created we made it past the add to the Phaser world, which means there should be a Phaser.Sprite in the world group. if you set a breakpoint in phaser/src/core/World.js in the update() function you should be able to verify that the image layer Sprite is getting called...
or if you can share it out somewhere I can take a look
from nadion.
Sorry; those images just displayed what I was saying.
Debugging with Chrome, I do see that it's getting called. It's going into Phaser.Sprite.prototype.preUpdate() then Nadion.bg.update:
bg.update = function() {
this.x = this.game.camera.view.x - (this.game.camera.view.x * sx);
this.y = this.game.camera.view.y - (this.game.camera.view.y * sy);
};
Still seeing nothing though. The repo is here:
https://github.com/jroblak/super-2d-game
from nadion.
okay, got it! there's a divide-by-zero when the world doesn't scroll. doh :)
(I guess all my test cases were scrolling worlds)
I'll push a fix shortly.
thanks for the report!
from nadion.
Sure thing! Cool library by the way.
from nadion.
thanks, I'm glad that someone's able to get some use out of it :)
from nadion.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nadion.