Skip to content

generateDefaultEnvironmentMap() called excessively #344

@jsantell

Description

@jsantell

generateDefaultEnvironmentMap() gets called everytime an attribute changes on a model since the logic does not check whether or not a default environment map has been generated and in currently in use:

https://github.com/GoogleWebComponents/model-viewer/blob/4597fe10e9c4fa3ab44dba5e6ec2ffdc032d0ad7/src/features/environment.js#L61

Practically a negligible cost after the initial generation (not quite sure why), but if PMREM generation was incorporated as a part of this (#338), then it gets pretty costly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions