From ff40ab7264e07a0db84a655c66651ea706e99f76 Mon Sep 17 00:00:00 2001 From: Daan Vanden Bosch Date: Sat, 13 Jul 2019 13:43:18 +0200 Subject: [PATCH] Using alpha test instead of transparency in npc models. --- src/rendering/entities.ts | 3 +-- src/stores/ModelViewerStore.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rendering/entities.ts b/src/rendering/entities.ts index f57d416f..4f20d47b 100644 --- a/src/rendering/entities.ts +++ b/src/rendering/entities.ts @@ -40,7 +40,6 @@ function create_mesh( const materials: Material[] = [ new MeshBasicMaterial({ color, - transparent: true, }), ]; @@ -50,8 +49,8 @@ function create_mesh( new MeshLambertMaterial({ skinning: true, map: tex, - transparent: true, side: DoubleSide, + alphaTest: 0.5, }) ) ); diff --git a/src/stores/ModelViewerStore.ts b/src/stores/ModelViewerStore.ts index dea99abc..d889f1c9 100644 --- a/src/stores/ModelViewerStore.ts +++ b/src/stores/ModelViewerStore.ts @@ -301,8 +301,8 @@ class ModelViewerStore { new MeshLambertMaterial({ skinning: true, map: tex, - transparent: true, side: DoubleSide, + alphaTest: 0.5, }) ) ); @@ -312,6 +312,7 @@ class ModelViewerStore { new MeshLambertMaterial({ color: 0xff00ff, side: DoubleSide, + alphaTest: 0.5, }) ); }