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

Replace custom anisotropy component with built-in A-Frame feature #332

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 23, 2023

Description

This PR replaces the custom anisotropy component in the 3DStreet project with the built-in anisotropy feature of A-Frame. The custom anisotropy component is no longer needed as A-Frame now supports anisotropy natively. The changes include modifying the index.html file to set the anisotropy at the renderer level, removing the anisotropy.js file from the codebase, and removing any areas where anisotropy was applied in the assets.js file.

Summary of Changes

  • Modified the index.html file to add the anisotropy attribute to the renderer component in the a-scene element, setting its value to 16.
  • Deleted the anisotropy.js file from the src/components/ directory.
  • Modified the assets.js file to remove any instances where the anisotropy component was used.

Please note that this PR is currently blocked and waiting for the next stable release of A-Frame (version 1.5) which includes the necessary changes for the anisotropy feature. Once the new version is released, this PR can be reviewed and merged.

Fixes #315.


To checkout this PR branch, run the following command in your terminal:

git checkout {pull_request.branch_name}

🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 23, 2023
@netlify
Copy link

netlify bot commented Aug 23, 2023

Deploy Preview for 3dstreet-core-builds ready!

Name Link
🔨 Latest commit b7577aa
🔍 Latest deploy log https://app.netlify.com/sites/3dstreet-core-builds/deploys/6569152c25b5ec0007aaf1a4
😎 Deploy Preview https://deploy-preview-332--3dstreet-core-builds.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Aug 23, 2023

GitHub actions yielded the following error.

The command that failed is npm run dist. Here are the relevant lines from the logs:

ERROR in ./src/index.js 22:0-34
Module not found: Error: Can't resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src/components/anisotropy)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.wasm doesn't exist
as directory
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist

webpack 5.76.0 compiled with 1 error in 3665 ms

npm ERR! Linux 5.15.0-1041-azure
npm ERR! argv "/opt/hostedtoolcache/node/12.22.12/x64/bin/node" "/home/runner/work/3dstreet/3dstreet/node_modules/.bin/npm" "run" "dist"
npm ERR! node v12.22.12
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'webpack'.
npm ERR! This is most likely a problem with the 3dstreet package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 3dstreet
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls 3dstreet
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/runner/work/3dstreet/3dstreet/npm-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-08-23T22_49_58_226Z-debug.log

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Aug 23, 2023

The command that failed is npm run dist. Here are the relevant lines from the logs:

ERROR in ./src/index.js 22:0-34
Module not found: Error: Can't resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src/components/anisotropy)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.wasm doesn't exist
as directory
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist

webpack 5.76.0 compiled with 1 error in 3665 ms

npm ERR! Linux 5.15.0-1041-azure
npm ERR! argv "/opt/hostedtoolcache/node/12.22.12/x64/bin/node" "/home/runner/work/3dstreet/3dstreet/node_modules/.bin/npm" "run" "dist"
npm ERR! node v12.22.12
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'webpack'.
npm ERR! This is most likely a problem with the 3dstreet package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 3dstreet
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls 3dstreet
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/runner/work/3dstreet/3dstreet/npm-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-08-23T22_49_58_226Z-debug.log

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

Hi @sweep-ai[bot],

I decided to make the following changes:

File Path Proposed Changes
src/index.js Modify src/index.js with contents:
• Remove the line that requires the anisotropy.js file. This is line 4 in the current version of the file.

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Aug 23, 2023

GitHub actions yielded the following error.

The command that failed is npm run dist. Here are the relevant lines from the logs:

ERROR in ./src/index.js 22:0-34
Module not found: Error: Can't resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src/components/anisotropy)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.wasm doesn't exist
as directory
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist

webpack 5.76.0 compiled with 1 error in 3665 ms

npm ERR! Linux 5.15.0-1041-azure
npm ERR! argv "/opt/hostedtoolcache/node/12.22.12/x64/bin/node" "/home/runner/work/3dstreet/3dstreet/node_modules/.bin/npm" "run" "dist"
npm ERR! node v12.22.12
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'webpack'.
npm ERR! This is most likely a problem with the 3dstreet package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 3dstreet
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls 3dstreet
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/runner/work/3dstreet/3dstreet/npm-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-08-23T22_49_58_226Z-debug.log

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

@sweep-ai
Copy link
Contributor Author

sweep-ai bot commented Aug 23, 2023

The command that failed is npm run dist. Here are the relevant lines from the logs:

ERROR in ./src/index.js 22:0-34
Module not found: Error: Can't resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
resolve './components/anisotropy' in '/home/runner/work/3dstreet/3dstreet/src'
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/runner/work/3dstreet/3dstreet/package.json (relative path: ./src/components/anisotropy)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy.wasm doesn't exist
as directory
/home/runner/work/3dstreet/3dstreet/src/components/anisotropy doesn't exist

webpack 5.76.0 compiled with 1 error in 3665 ms

npm ERR! Linux 5.15.0-1041-azure
npm ERR! argv "/opt/hostedtoolcache/node/12.22.12/x64/bin/node" "/home/runner/work/3dstreet/3dstreet/node_modules/.bin/npm" "run" "dist"
npm ERR! node v12.22.12
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: `webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'webpack'.
npm ERR! This is most likely a problem with the 3dstreet package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 3dstreet
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls 3dstreet
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/runner/work/3dstreet/3dstreet/npm-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-08-23T22_49_58_226Z-debug.log

There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.

Hi @sweep-ai[bot],

I decided to make the following changes:

File Path Proposed Changes
src/index.js Modify src/index.js with contents:
• Remove the line of code that imports the anisotropy.js file. This is the line that reads require('./components/anisotropy');.

@kfarr kfarr changed the title [Blocked] Replace custom anisotropy component with built-in A-Frame feature Replace custom anisotropy component with built-in A-Frame feature Nov 30, 2023
@kfarr kfarr merged commit acf9777 into main Nov 30, 2023
5 of 6 checks passed
@kfarr kfarr deleted the sweep/replace-anisotropy-component branch November 30, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[blocked] use aframe anisotropy instead of 3dstreet custom component
1 participant