Skip to content

Commit

Permalink
Merge pull request #172 from Benjythebee/fix/cullingLayer-and-culling…
Browse files Browse the repository at this point in the history
…Distance

awesome!, seems we missed this part to use the default values in case culling distance is not defined, nice work @Benjythebee ! :)
  • Loading branch information
memelotsqui authored Oct 15, 2024
2 parents ac568c3 + d82a084 commit 162085b
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 162085b

Please sign in to comment.