Skip to content

Commit

Permalink
Merge pull request #181 from Benjythebee/fix-fallback-culling
Browse files Browse the repository at this point in the history
looks correct! :)
  • Loading branch information
memelotsqui authored Oct 30, 2024
2 parents 88b5b2b + e767b64 commit f762d46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/library/CharacterManifestData.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ class TraitModelsGroup{
name,
iconSvg,
cameraTarget = { distance:3 , height:1 },
cullingDistance,
cullingLayer,
cullingDistance, // can be undefined; if undefined, will use default from manifestData
cullingLayer, // can be undefined; if undefined, will use default from manifestData
collection,
restrictedTraits = [],
restrictedTypes = []
Expand Down Expand Up @@ -676,9 +676,9 @@ class ModelTrait{

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

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

0 comments on commit f762d46

Please sign in to comment.