Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material: Fix emissiveIntensity not persisting. #27769

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

connorgmeehan
Copy link
Contributor

Related issue: N/A

Description

If a Material with an emissiveIntensity of 0 is serialized, the previous truthy check does not persist this field. It will get reset to the default of 1 when loaded by the ObjectLoader.
Solution: Be explicit and add !== undefined (same as specularIntensity).

If a Material with an `emissiveIntensity` of 0 is serialized, the previous truthy check does not persist this field.  It will get reset to the default of 1 when loaded by the `ObjectLoader`.

Solution: Be explicit and add `!== undefined` (same as specularIntensity).
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
676.4 kB (168.3 kB) 676.4 kB (168.3 kB) +9 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
457.3 kB (111 kB) 457.3 kB (111 kB) +9 B

@Mugen87 Mugen87 changed the title Fixes emissiveIntensity not persisting. Material: Fix emissiveIntensity not persisting. Feb 19, 2024
@Mugen87 Mugen87 added this to the r162 milestone Feb 19, 2024
@Mugen87 Mugen87 merged commit b82170a into mrdoob:dev Feb 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants