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

[Do Not Merge] Surgical planning and Office #6

Closed

Conversation

CodeRhymesLife
Copy link
Contributor

Creates a surgical planning application and a virtual replica of my home office

@@ -10,7 +10,7 @@ module.exports = merge(common, {
devServer: {
contentBase: APP_DIR,
// writeToDisk: true,
// host: '192.168.0.180',
host: '0.0.0.0',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to change the host to 0.0.0.0 to make this public. Is there a way to do this when calling webpack-dev-server in package.json?

Copy link
Contributor

Choose a reason for hiding this comment

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

good call - and there is! (webpack-dev-server --host XXXX etc). Interesting issue/thread about its finer points here. We should test this further, I understand Jared had a mixed experience but remote access to the local serve would be a big win.

scene.add(sp);
}

State.eventHandler.addEventListener("xrsessionstarted", (e) =>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Best way I could come up with to get the controllerGrip associated with the controller. It would be nice if there were a single object with both that I could use in the selectstart and selectend callbacks. That would allow me to override those methods on XRInput instead of duplicating the logic below, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Absolutely - let's go over latest State.eventHandler and XRInput hooks which, I think, better reflect the spec's intentions.

import { Vector3 } from "three"
const GLTFHeart = require("./assets/models/heart/heart.glb");

Sandcastle.run(async (scene, controllers) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

An alternative, on-rails version of SandCastle. Probably too far on the "easy of use" side at the expense of flexibility, but just wanted to throw some ideas out there.

Copy link
Contributor

Choose a reason for hiding this comment

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

To restate my sentiment: YES, I'd love to see that component!:). Also a super quick way to XRPackagify sandcastle "model viewers", although does present the question of when a simple gltf XRPackage (a future, separate XRPackage format) would be more appropriate.

{
gltf.scene.traverse( child => {

if ( child.material ) child.material.metalness = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to update the gltf object's metalness so that it would reflect ambient light.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

fascinating, thanks. Curious to hear more about your pipeline and the loader issues you ran into.

// it thinks it is in the directory as the gltf file (i.e. /assets/models/)
// However, in webpack.common.js we put images in /assets/images
// so we need to point the image at the appropriate path
if (uri.includes("ryans-home-office.jpg"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to create a custom manager to resolve the url for the gltf image assets.

Copy link
Contributor

Choose a reason for hiding this comment

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

this is going to be an ongoing problem with all gltf texture maps, let's discuss. Also going to research how it's done in other places.

@michaelybecker
Copy link
Contributor

issues discussed, action points created

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