Simple question I think. For the next major release of Pixi, v5, which WebGL version will be implemented?
Thanks!
Simple question I think. For the next major release of Pixi, v5, which WebGL version will be implemented?
Thanks!
Simple question. How to cleanup? I want to do this well as I want to destroy every sprite and texture without exiting the window. I then want to create a load more textures and sprites, but some of the textures will be ones that were previously destroyed, so I want to avoid the 'Resource already exists' problem.
I have created loads of sprites, and since I need to access them quickly I have them in a quick lookup, so I clean these up by going through each one and using the function destroy.
However, I also want to clean up all the textures.They are in PIXI.utils.TextureCache I think. How do I clean these up?
Is there any other references to these textures that need cleaning?
Are there any other issue I might encounter?
Hi everyone
Is there a tool to generate a live preview of the Matrix PIXI.
I'm talking about being able to preview live the transformation of a sprite, and get the code.
I find it very long and hard to do a lot of rending testing each faith to search the good behavior.
It would be really great if someone could make a small live generation tool. (HTML)
i made a sample on PS To help understand my need.
I hope this overview helps to understand.
Ideally, it be something similar to this awesome tools by Karl Matt (bigtimebuddy)
https://pixijs.github.io/pixi-text-style/#
I would be very happy if a similar tool would exist.
thank
Hi, i successfully made simple code that creates sprite and adds it to root stage. But i keep getting errors in console:
QuoteError: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.
Error: WebGL: texImage2D: Conversion requires pixel reformatting.
Error: WebGL: drawElements: This operation requires zeroing texture data. This is slow.
What do they mean, and how to fix them ?
Hi,
I am working on the various screens now...
How would I change the red, green, blue tint values of a Pixi sprite?
Thanks!
JeZxLee
Hi,
PIXI.settings.SCALE_MODE = 1; // Does not work on Google Android devices?
How I turn off Pixi sprite smoothing on Android?
Thanks!
JeZxLee
Here ya go
Source and Notes @ https://github.com/dakom/sodium-typescript-playground
Demo @ https://dakom.github.io/sodium-typescript-playground/
Explanation is in the readme and notes and some code comments... basically it's a demo for using sodiumFRP with PIXI to do functional reactive programming stuff.
It's highly related to this post and this post
Feedback welcome!
Hi,
Working on the staff screen now...
How would I get current (x, y) screen coordinates of a Pixi text?
Thanks!
JeZxLee
Hi,
On Google Android smartphones/tablets the screen turns off?
Any way to avoid that?
Thanks!
JeZxLee
Hi, friends
I am working on the game where I have more than 10 thousand objects in 9 different layers on the scene.
Thank God that I can easily cache it, to do that I split each layer up into small pieces, I called them chunks.
So, I cached each chunk using cacheAsBitmap = true and everything was great, until I changed the scene.
Of course, I recached the chunk:
let chunk:PIXI.Container = this.chunkGrid[chunkPosition.x][chunkPosition.y]; if (chunk.cacheAsBitmap) { chunk.cacheAsBitmap = false; } if(chunk.width > 0 && chunk.height > 0) { chunk.cacheAsBitmap = true; }
But after I do it, chunk position is changing (See the screenshot).
I have no idea why and how could I deal with it
I'll be appreciate for any help
Best regards,
Denis
Hello guys,
I'm stuck with shaders. May be you can help me. The objective to make waterfall with shader. As for now I have this frag shader:
precision mediump float;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform vec4 filterArea;
uniform vec2 dimensions;
uniform float speed;
uniform float time;
#pragma glslify: noise = require("glsl-noise/simplex/3d")
vec2 cartToIso(vec2 pos) {
vec2 res = pos;
res.x = pos.x - pos.y;
res.y = (pos.x + pos.y) / 2.0;
return res;
}
void main() {
vec2 pixelCoord = vTextureCoord * filterArea.xy;
vec2 coord = pixelCoord / dimensions;
vec2 iso = cartToIso(pixelCoord);
float x = pixelCoord.x * 0.1;
float y = dimensions.y / pixelCoord.y + (speed * time * 10.0);
float z = time;
vec3 vector = vec3(x, y, z);
vec3 noise = vec3(noise(vector));
gl_FragColor = vec4(noise, 1.0);
}
It gives me nice waterfall result (video in attach). But the target is to make it isometric (in reality dimetric). Look at pic in the attach. Is there a way to make this?
I'll be appreciate for any help.
Here's a helper function I made to create each shader plugin with just a simple function call like this:
createShaderPlugin(name, vertShader, fragShader, uniformDefaults);
Then you can create each sprite that you want to be drawn with your custom shader like this:
var sprite = createShaderPluginSprite(name, size, uniforms);
Update: I started a GitHub repo for it here if you want to check it out.
I also made this little CodePen to demonstrate the usage with some comments.
The encapsulated code is based on the plugin example and on the worldTransform/vertices calculations that I boosted from PIXI.Sprite. I have tried to optimize and condense for the use case where the Sprite doesn't have any Texture to be filtered and tried to make it easy to use and behave expectedly... But please let me know if you find improvements/mishaps or have questions about it
I create a container and I add some sprites on this container, then it is very bad.
This is my main code:
Ground.prototype.createCGround = function (count, x, y) {
var front = PIXI.Sprite.fromFrame('Tile_10.png'),
blank = PIXI.Sprite.fromFrame('Tile_13.png');
var container = new PIXI.Container();
container.addChild(front);
container.addChild(blank);
front.position.set(0, 0);
var count = count || 1;
for (var i = 0; i < count; i++) {
var span = PIXI.Sprite.fromFrame('Tile_11.png');
container.addChild(span);
span.position.set(front.width + i * span.width, 0);
}
blank.position.set(front.width + i * span.width, 0);
container.position.set(x, y);
container.isUes = false;
return container;
}
It have some black lines in the border !!!!!!!
And the black lines are random , not all !!!!
Who can help me !
I'm very need help!!!
Thank you!
When trying to move an object with high speed across the scene, I've noticed that the movement is not really smooth - there are some small
but really annoying glitches. I've tried both manual moving and moving with TweenLite, the glitches persist in both cases.
I'm using Pixi.js 4.5.3
This is how I create the Render, maybe something wrong with it:
let canvas = <HTMLCanvasElement>document.getElementById("canvas"); this.renderer = PIXI.autoDetectRenderer(1500, 1200, { // ScenesManager.renderer = new PIXI.CanvasRenderer(800, 600, { view: canvas, antialias: false, roundPixels: false, }); this.renderer.backgroundColor = 0x000000; document.body.appendChild(this.renderer.view);
And this is my tween:
let wall:PIXI.Sprite = PIXI.Sprite.fromFrame("1.png"); this.addChild(wall); wall.position = new PIXI.Point(4*64, 2*64); TweenLite.to(wall.position, 15, { x: 99*64, y: 2*64, ease: Linear.easeNone});
And I also made the demo (see the attachment)
I would really appreciate any help or ideas on what can cause such microlags, cause I've spent many hours trying to sort this out.
The number of objects on scene doesn’t really matter, there are lags even on small test scene with just 1 moving object.
Any thoughts on what's happening?
Hey,
I want to create a scratch card effect, as there are in games with luck and all where you scratch on some image and in the scratched area you can see the image below it.
I think this can be done by manipulating pixels somehow, but i am not experienced with pixi and don,t know how to do it exactly.
It will be a great help if you point out a way or tutorial to do it, or give a basic code snippet here to help me figure this mechanism out.
Regards.
Hi,
The engine I am working on is about finished.
Please help test by visiting this official webpage:
http://16bitsoft.com/files/PixiAudio5JS/index.html
(complete source code is downloadable on title screen)
Demo *should* work on the following:
- Windows 10/8.x/7 Edge, Firefox, Chrome, & Opera
- Linux Firefox & Chrome
- Android Firefox & Chrome
Bugs:
(1) Browser resize(smaller)?
(2) No audio on Google Chrome browser on Android?
(3) Google Android devices turn off?
Thanks!
JeZxLee
Hi,
How would I change the game's framerate from within JavaScript?
Game will have 3 different speeds(game modes)
Thanks!
JeZxLee
hi.
i wanna draw part of ellipse by PIXI.Graphic like Under image
do you have good idea?
thx
hi..
i'm wondering to draw dom on canvas by pixi
please give me some idea ..
thx..
Hi,
I am starting the playing game screen on Monday...
I have an interesting issue now with porting the SDL2/C++ logic core to PixiJSv4/JS:
I need to read individual pixel colors in PNG sprites for both the maps and the ghost return home A.I.
Look below to understand...
Is there a method in PixiJSv4 to read individual pixel colors in PNG sprites?
Let me know, thanks!
JeZxLee