Hello everyone,
This is my first post in this thread, and I want to ask about PIXI.js, ...so I'm working on a project for my game using rpg maker mz, , and I'm currently creating an effect inside the title screen using `PIXI.SimplePlane`, which I learned from PIXI.io, to use `PIXI.simplePlan`, if I want took the image from the file folder, then I used the `new PIXI.Texture.from(`img/system/name.png`)` method, when I tried it, everything went smoothly, but the problem appeared when I deployed my game, when the file from img is encrypted, the file name automatically changes its extension, so the `PIXI.Texture.from` method cannot read my img file because it has changed, but if I use the `new PIXI.Texture.from(ImageManager.loadSystem(`name`)) method , `PIXI.Texture.from` can't read the source, can anyone help to explain the solution to this problem?...and this is the code that I made :
Sorry in advance if my English looks messy, because English is not my main language. thank you very much and have a good day everyone.
This is my first post in this thread, and I want to ask about PIXI.js, ...so I'm working on a project for my game using rpg maker mz, , and I'm currently creating an effect inside the title screen using `PIXI.SimplePlane`, which I learned from PIXI.io, to use `PIXI.simplePlan`, if I want took the image from the file folder, then I used the `new PIXI.Texture.from(`img/system/name.png`)` method, when I tried it, everything went smoothly, but the problem appeared when I deployed my game, when the file from img is encrypted, the file name automatically changes its extension, so the `PIXI.Texture.from` method cannot read my img file because it has changed, but if I use the `new PIXI.Texture.from(ImageManager.loadSystem(`name`)) method , `PIXI.Texture.from` can't read the source, can anyone help to explain the solution to this problem?...and this is the code that I made :
JavaScript:
class Scene_Title extends Scene_Base {
constructor() {
super();
this.frameWait = 0
this.count = 0
}
start() {
super.start();
SceneManager.clearStack();
this.playTitleMusic();
this.startFadeIn(this.fadeSpeed(), false);
}
playTitleMusic() {
AudioManager.playBgm($dataSystem.titleBgm);
AudioManager.stopBgs();
AudioManager.stopMe();
}
create() {
super.create();
this.createBackground();
}
createBackground() {
this._backSprite1 = new PIXI.SimplePlane(
new PIXI.Texture.from(`img/system.BG2.png`),
10,
10
);
this.buffer = this._backSprite1.geometry.getBuffer("aVertexPosition");
this.addChild(this._backSprite1);
}
updateAllMove() {
for (let i = 0; i < this.buffer.data.length; i++) {
this.buffer.data[i] += Math.sin(this.count / 10 + i) * 0.2;
}
this.buffer.update();
this.count++;
}
//Update
update() {
super.update();
this.frameWait++;
if (this.frameWait >= 5) {
this.updateAllMove();
}
}
}
Sorry in advance if my English looks messy, because English is not my main language. thank you very much and have a good day everyone.