Repository navigation
Conversation
cdata
left a comment
There was a problem hiding this comment.
This is looking good so far, but let's have some discussion about the API changes!
| } | ||
|
|
||
| getCameraTarget(): Vector3 { | ||
| return this[$controls].getTarget(); |
| [$updateCameraTarget]() { | ||
| let target = deserializeVector3(this.cameraTarget); | ||
|
|
||
| if (target == null) { // this happens in the default 'auto' case |
There was a problem hiding this comment.
Let's deserialize to 'auto' in this case. The code will be more self-explanatory, and it will line up with what we do for deserializing sphericals.
There was a problem hiding this comment.
Relatedly, it seems likely that I would want to be able to set 'auto' per-axis of the vector. For example, maybe I want the target to be automatically selected for me along the y axis, while panning the camera along the x axis.
There was a problem hiding this comment.
Yeah, I was on the fence about that already. Sounds good.
| return this[$loaded]; | ||
| } | ||
|
|
||
| get loadedTime() { |
There was a problem hiding this comment.
No need to make this public, is there?
| // Controls when interaction is allowed (always, or only when focused) | ||
| interactionPolicy?: InteractionPolicy; | ||
| // The approximate size of the model (m) | ||
| modelSize?: number; |
There was a problem hiding this comment.
Can you offer more context for this new configuration parameter?
There was a problem hiding this comment.
Nevermind, that's not needed. I can just reuse maximumRadius.
| interactWith(canvas); | ||
|
|
||
| await timePasses(DEFAULT_INTERACTION_PROMPT_THRESHOLD + 100); | ||
| await timePasses(element.interactionPromptThreshold + 100); |
* Add slot documentation, fix typo * Change "theautoplay" to "the autoplay" typo in animation.html * Add beginning of documentation for slots with overriding-slots.html * Add new slot documentation to index.html * Bump mixin-deep from 1.3.1 to 1.3.2 (#726) Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2) Signed-off-by: dependabot[bot] <[email protected]> * Camera target control (#733) * partly there * camera-target working * fixed shadow * cleanup * made target interpolate * fixed tests * added target test * updating CI test rules * fixed comparison * added loadedTime * re-enabled skipped test * removed extra wait * addressing feedback * adding auto * looks like 584 is still flakey afterall * another deflake attempt * added camera-target doc * updated three to r108 (#744) * updated three to r108 * reverting model change * Update fidelity test goldens * Optimize images & rename to "Customizing UI" Crush & convert example images to JPG's Rename "Overriding Slots" to "Customizing UI"
Camera target control (google#733) * partly there * camera-target working * fixed shadow * cleanup * made target interpolate * fixed tests * added target test * updating CI test rules * fixed comparison * added loadedTime * re-enabled skipped test * removed extra wait * addressing feedback * adding auto * looks like 584 is still flakey afterall * another deflake attempt * added camera-target doc
* Add slot documentation, fix typo * Change "theautoplay" to "the autoplay" typo in animation.html * Add beginning of documentation for slots with overriding-slots.html * Add new slot documentation to index.html * Bump mixin-deep from 1.3.1 to 1.3.2 (google#726) Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2) Signed-off-by: dependabot[bot] <[email protected]> * Camera target control (google#733) * partly there * camera-target working * fixed shadow * cleanup * made target interpolate * fixed tests * added target test * updating CI test rules * fixed comparison * added loadedTime * re-enabled skipped test * removed extra wait * addressing feedback * adding auto * looks like 584 is still flakey afterall * another deflake attempt * added camera-target doc * updated three to r108 (google#744) * updated three to r108 * reverting model change * Update fidelity test goldens * Optimize images & rename to "Customizing UI" Crush & convert example images to JPG's Rename "Overriding Slots" to "Customizing UI"
Fixes #453
Fixes #603
Fixes #679
In the process of removing align-model I was able to simplify our logic considerably, including cleaning up how the static shadow is placed, since I was having trouble following its logic as I was debugging. The target is interpolated along with the other camera parameters, so this should allow us to do a smooth transition that includes zooming, position and rotation, and once combined with #729, without going through the model.
I only removed a function from staging.ts, but it seems it wasn't formatted before? Because everything got reflowed. I'm assuming it's correct now...
#679 turned out to be mostly not a bug, but we noticed that it did show an incorrect shadow for large models. The refactor of StaticShadow here should fix this.