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

Multi-format support #1205

Merged
merged 36 commits into from
Nov 23, 2024
Merged

Conversation

pablo-mayrgundter
Copy link
Member

@pablo-mayrgundter pablo-mayrgundter commented Jun 1, 2024

Demos:

Loader Changes

  • Move loading logic out of CadView into src/loader/Loader.js
  • Most hardcoding of .ifc is removed
  • Temp UUID Urls now have type suffix when possible
  • Combined loader alg:
    1. Check for uploaded file
    2. Dereference paths or GH Urls as needed e.g. for proxy
    3. Content sniff for loader type (for multi-format support)
    4. Download model to OPFS if available
    5. Parse with format-specific loader
    6. Convert to IFC-like object model, to support basic picking and nav support
    7. Add to scene

Misc

  • Alert, AlertDialog, SnackBar: refactored to surface custom error messages better
  • navigate helper: avoid passing around when they can be imported
  • window.{add,remove}EventListener('beforeunload', handleBeforeUnload) -> imported helper
  • safePathSplit helper instead of path.split('/')
  • eslint: allow warn and error logging

@pablo-mayrgundter pablo-mayrgundter added the enhancement New feature or request label Jun 1, 2024
@pablo-mayrgundter pablo-mayrgundter self-assigned this Jun 1, 2024
Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit d4dccc3
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/6741c461cea4470008131580
😎 Deploy Preview https://deploy-preview-1205--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 17 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

Copy link

netlify bot commented Aug 9, 2024

Deploy Preview for bldrs-share-prod ready!

Name Link
🔨 Latest commit d4dccc3
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share-prod/deploys/6741c4619b7e13000845508f
😎 Deploy Preview https://deploy-preview-1205--bldrs-share-prod.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.

public/models Outdated Show resolved Hide resolved
public/lsd.pdb Outdated Show resolved Hide resolved
@@ -58,7 +58,11 @@ export default class IfcIsolator {
*/
async setModel(ifcModel) {
this.ifcModel = ifcModel
this.visualElementsIds = [...new Set(ifcModel.geometry.attributes.expressID.array)]
if (ifcModel.geometry && ifcModel.geometry.attributes) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Review carefully

@pablo-mayrgundter pablo-mayrgundter marked this pull request as ready for review November 20, 2024 23:01
const item = await viewer.castRayToIfcScene()
if (!item) {
return
function canvasDoubleClickHandler(event) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Review carefully

@@ -12,7 +12,7 @@ export async function getFinalUrl(url, accessToken) {
switch (u.host.toLowerCase()) {
case 'github.com':
if (!accessToken) {
const proxyUrl = new URL(process.env.RAW_GIT_PROXY_URL_NEW)
const proxyUrl = new URL(process.env.RAW_GIT_PROXY_URL)
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks wrong.. no accessToken should use the new /model base on proxy url i think

}
} catch (error) {
// expected if file not found - lets see if we have a temporary file
} else {
Copy link
Member Author

Choose a reason for hiding this comment

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

Nick, this was the fallthru we fixed together. pls double-check i got the edit right

Copy link
Member Author

Choose a reason for hiding this comment

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

Please review carefully

@pablo-mayrgundter pablo-mayrgundter merged commit 69888d8 into bldrs-ai:main Nov 23, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant