8000 Wrap the unsupported library with a try/catch block by janarosmonaliev · Pull Request #2 · janarosmonaliev/github-globe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Wrap the unsupported library with a try/catch block #2

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

Merged
merged 1 commit into from
Aug 27, 2021
Merged

Conversation

janarosmonaliev
Copy link
Owner

The project was updated to support the latest versions of ThreeJS

The cause of a problem was in an external library called three-glow-mesh. It is used to create the glowing effect around the globe and currently does not support latest version of ThreeJS. To my knowledge, the latest version of ThreeJS it supports is r125.

Resolved #1

Solution

I simply wrapped the lines that use three-glow-mesh with a try/catch block. Newer versions of ThreeJS will not display the glow effect.

try {
    var glowMesh = createGlowMesh(new SphereGeometry(100, 75, 75), options);
    Globe.add(glowMesh);
  } 
catch (err) {
    console.log("Your threeJS version does not support three-glow-mesh");
  }

Issues to follow/track for any new updates

@janarosmonaliev janarosmonaliev merged commit 10e2fe1 into main Aug 27, 2021
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.

After clone you code to my local computer, and npm run build the main.js is different from yours
1 participant
0