I’m stack on new Mesh. Have no idea whats wrong…
https://doctoral-arrangemen.000webhostapp.com/ball/ball.html
var SceneMain = new Phaser.Scene('SceneMain');
SceneMain.preload = function(){
this.load.atlas('texture', 'texture.png', 'texture.json');
}
SceneMain.create = function(){
const vertices = [
-30, 28,
30, 28,
-30, -28,
30, -28
];
const uvs = [
0, 1,
1, 1,
0, 0,
1, 0
];
const indices = [ 0, 2, 1, 2, 3, 1 ];
var mesh = new Phaser.GameObjects.Mesh(this, 400, 400, "texture", "ball", vertices, uvs, indices);
console.log(mesh);
}
No idea.
or
var vertices = [-60, 60, -60, 60, -60, -60, 60, -60];
var uvs = [0.54, 0.25, 0.69, 0.25, 0.54, 0.42, 0.69, 0.42]
var indicies = [1, 0, 3, 0, 2, 3]
mesh = this.add.mesh(400, 400, "texture", "ball", vertices, uvs, indicies);
https://doctoral-arrangemen.000webhostapp.com/ball/ball_2.html
or with no v,u and i.
mesh = this.add.mesh(400, 400, "texture", "ball");
https://doctoral-arrangemen.000webhostapp.com/ball/ball_1.html
https://s8vht.csb.app/
But nothing on the screen.
What’s wrong?