Skip to content

Commit

Permalink
fix culling distance and culling layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjythebee committed Oct 15, 2024
1 parent 3c547ae commit d82a084
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/library/CharacterManifestData.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,11 @@ class ModelTrait{
this.thumbnail = thumbnail;
this.fullThumbnail = fullThumbnail || traitGroup.manifestData.getThumbnailsDirectory() + thumbnail;

this.cullHiddenMeshes = cullingDistance;
this.cullingLayer = cullingLayer;
this.cullHiddenMeshes = cullingDistance|| [0,0];
// Prioritize cullingLayer from trait, then from traitGroup, then default
this.cullingLayer = cullingLayer ?? traitGroup.manifestData.defaultCullingLayer ?? 0;
// Prioritize cullingDistance from trait, then from traitGroup, then default
this.cullingDistance = cullingDistance || traitGroup.manifestData.defaultCullingDistance || [0,0];
this.type = type;

this.targetTextureCollection = textureCollection ? traitGroup.manifestData.getTextureGroup(textureCollection) : null;
Expand Down

0 comments on commit d82a084

Please sign in to comment.