mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Fixed issue with NJ meshes.
This commit is contained in:
parent
928bdfc12a
commit
8e54ac90fd
@ -111,9 +111,9 @@ export abstract class GfxRenderer implements Renderer {
|
||||
|
||||
case Projection.Perspective:
|
||||
if (evt.deltaY < 0) {
|
||||
this.camera.pan(0, 0, -5);
|
||||
this.camera.pan(0, 0, -2);
|
||||
} else {
|
||||
this.camera.pan(0, 0, 5);
|
||||
this.camera.pan(0, 0, 2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ class MeshCreator {
|
||||
|
||||
this.builder.vertex(vertex.position, normal);
|
||||
|
||||
if (index >= 2) {
|
||||
if (i >= 2) {
|
||||
if (i % 2 === (mesh.clockwise_winding ? 1 : 0)) {
|
||||
this.builder.triangle(index - 2, index - 1, index);
|
||||
} else {
|
||||
|
@ -29,7 +29,6 @@ export class WebglRenderer extends GfxRenderer {
|
||||
this.gfx = new WebglGfx(gl);
|
||||
|
||||
gl.enable(gl.DEPTH_TEST);
|
||||
// gl.enable(gl.CULL_FACE);
|
||||
gl.clearColor(0.1, 0.1, 0.1, 1);
|
||||
|
||||
this.shader_programs = [];
|
||||
|
@ -246,24 +246,6 @@ export class ModelStore extends Store {
|
||||
body,
|
||||
);
|
||||
|
||||
// nj_object.children[0].children[0].children[0].clear_children();
|
||||
// nj_object.children[0].children[0].children[1].clear_children();
|
||||
// nj_object.children[0].children[0].children[2].clear_children();
|
||||
// nj_object.children[0].children[0].children[3].clear_children();
|
||||
// nj_object.children[0].children[0].children[4].clear_children();
|
||||
// nj_object.children[0].children[0].children[5].children[0].children[0].clear_children();
|
||||
// nj_object.children[0].children[0].children[5].children[0].children[1].clear_children();
|
||||
// nj_object.children[0].children[0].children[5].children[0].children[2].clear_children();
|
||||
// nj_object.children[0].children[0].children[5].children[0].children[3].children[0].clear_children();
|
||||
// const model = nj_object.children[0].children[0].children[5].children[0].children[3]
|
||||
// .children[0].model!;
|
||||
// model.meshes.splice(0, 1);
|
||||
// model.meshes.splice(1);
|
||||
// console.log(
|
||||
// nj_object.children[0].children[0].children[5].children[0].children[3].children[0]
|
||||
// .model,
|
||||
// );
|
||||
|
||||
this._current_nj_object.val = nj_object;
|
||||
} catch (e) {
|
||||
logger.error(`Couldn't load model for ${character_class.name}.`);
|
||||
|
Loading…
Reference in New Issue
Block a user