Repository navigation
Implement align-model attribute - #441
Conversation
6f75835 to
cdb3e4d
Compare
cdb3e4d to
bc546c7
Compare
| StagingMixin, | ||
| ControlsMixin, | ||
| EnvironmentMixin, | ||
| StagingMixin, |
There was a problem hiding this comment.
Looks like StagingMixin is in here twice
There was a problem hiding this comment.
Good catch, will fix!
| // NOTE(cdata): In the case that the generators are invoked with | ||
| // an incorrect texture, the generators will throw when we attempt to | ||
| // dispose of them because the framebuffer has not been created yet but the | ||
| // implementation does not guard for this correctly: |
| modelCenter.multiplyScalar(scale); | ||
|
|
||
| this.model.scale.multiplyScalar(scale); | ||
| this.model.position.copy(roomCenter); |
There was a problem hiding this comment.
this seems redundant due to the following subVectors
| const {exposure} = scene; | ||
| const exposureIsNumber = | ||
| typeof exposure === 'number' && !self.isNaN(exposure); | ||
| this.renderer.toneMappingExposure = exposureIsNumber ? exposure : 1.0; |
There was a problem hiding this comment.
Good catch here too, exposure is scene specific
babe66a to
bebc1b4
Compare
bebc1b4 to
f39af84
Compare
|
🚲 🏚️ ... Sorry I didn't get this into #417 while we were still discussing there. In some ways, at least as I look at the illustration above, it seems as though what the transformation is doing is changing how the scene is composed around the model. I wonder if an attribute of Since this has already been merged, feel free to ignore :) |
|
@smalls thanks for the feedback! At this point the most useful thing is probably to file an issue so that we revisit this before the next major release |
align-modelattributeThis change proposes a new configurable attribute
align-modelthat can change how the model is aligned relative to the scene. Important highlights include:align-modelaccepts valuescenterandorigincenterrefers to the center of the bounding volume of the modeloriginrefers to the origin of the model relative to world spacetransform-originalign-modelandauto-rotatehave been conceptually grouped together as the "staging" feature🛂Note for reviewers: I have spent a lot of time noodling on the names. I do not love any of them. Please don't hesitate to bike shed!
Different values of
align-modelcenter(default)originorigin centercenter origin centerFixes #417
Fixes #440
Includes further mitigations related to #433