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

feat(scene): textures for backgrounds and planes #2348

Merged
merged 1 commit into from
Dec 11, 2023
Merged

feat(scene): textures for backgrounds and planes #2348

merged 1 commit into from
Dec 11, 2023

Conversation

haweston
Copy link
Contributor

@haweston haweston commented Dec 6, 2023

Overview

  1. Add texture selection support for backgrounds and planes
  2. Fix camera loading too far out when a ground plane is in use
textures.mov

Verifying Changes

  1. in stories/componens/scene-composer update the mockAssetBrowserCallBack to point at an image file you have locally instead of the models it defaults too
  2. try and select a texture

Scene Composer

For scene-composer package changes specifically, you can preview the component in the published storybook artifact. To do this, wait for the Publish Storybook action to complete below.

  • Click on the workflow details
  • Select the Summary item on the left
  • Download the zip file

To run the storybook build locally, you need a local static web server:

npm install -g httpserver
cd <Extracted Zip Directory>
httpserver

Then open the website http://localhost:8080 to run the doc site.

Legal

This project is available under the Apache 2.0 License.

showAssetBrowserCallback((s3BucketArn, contentLocation) => {
let textureUri: string;
if (s3BucketArn === null) {
// This should be used for local testing only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit-pick: Suggest updating the name to reflect the intent. ex: instead of textureUri make it localTestTextureUri.

const mockAssetBrowserCallback: ShowAssetBrowserCallback = useCallback(
(cb: AssetBrowserResultCallback) => {
actionRecorderShowAssetBrowserCallback(cb);
if (source == 'local') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit-pick: We should try to use deeply equals (===).

@mumanity mumanity merged commit 0b2104a into main Dec 11, 2023
10 checks passed
@mumanity mumanity deleted the textures branch December 11, 2023 18:52
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.

2 participants