-
-
Notifications
You must be signed in to change notification settings - Fork 40
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: edges #390
feat: edges #390
Conversation
…to feature/add-edges-to-cientos
…to feature/add-edges-to-cientos
Run & review this pull request in StackBlitz Codeflow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi man, I'm glad you're back :), and thanks for this one
Did you know you can now open PRs directly to TresJs (you should be now part of the team)
Regarding the PR I didn't see any major changes, just little details, as always let me know
src/core/abstractions/Edges.vue
Outdated
v-bind="$attrs" | ||
> | ||
<template v-if="hasChildren"> | ||
<slot /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, here is better to use default slots (others component uses too)
for example
the TresLineBasicMaterial will act as fallback if any other slot has passed
Official docs here in case you want to check more about it: https://vuejs.org/guide/components/slots.html#fallback-content
So we can delete lines (23 and 25)
| Prop | Description | Default | | ||
| :---------------- | :--------------------------------------------------- | ------------------------- | | ||
| **color** | `THREE.Color` — Color of the edges. <br> More informations : [TresColor](https://docs.tresjs.org/api/instances-arguments-and-props.html#colors) — [THREE.Color](https://threejs.org/docs/#api/en/math/Color) | `#ff0000` | | ||
| **threshold** | `number` — An edge is only rendered if the angle (in degrees) between the face normals of the adjoining faces exceeds this value | `1` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would add one more column with the LineSegments as a general (properly indicated in the description) or all the linesSegment props individually (better to be explicit, trust me we target several non-advance users)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for knowledge which props support LineSegments? I couldn't find any :o
The ThreeJs Docs sends me to Line (but this doesn't have any specific props, I was spectic line width or line-width but couldn't find any)
Hey @damienmontastier , Are you still working on this? |
Hey @andretchen0 ! |
That'd be great! |
✅ Deploy Preview for cientos-tresjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
hey @andretchen0 ! I just put a last modified version! ✌️ Previously @JaimeTorrealba had given me feedback regarding documentation here . I think there would be the possibility of improving Also, on the demo, I commented some code here, there's currently a bug with events pointer Tresjs/tres#801, so the code isn't functional at the moment. |
Great!
There's at least one open PR for
We'll have to check that in the future, but it's not up to The events issue should be fixed with this PR. I'm not sure when it'll be merged though; it's part of a longer term project to bring portals to Tres core and I'm currently on the road and just working on smaller projects. |
The
|
Thanks @andretchen0 for your feedback! I'm going to modify Line2 locally tomorrow! And I'll let you know! Is this PR good for you? And so there will be an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few comments.
Excited to have this one!
It looks good! Docs demo is on-brand, too! I made a few review comments. Nothing major.
If you want to implement one and there's an advantage over the PR here, I don't think anyone would say no. Though my personal preference at the moment would be to make one, good Just FYI though, if you were comparing to Drei, their I called the Cientos' version Since THREE doesn't have Maybe @alvarosabu wants to weigh in here. |
Ok that's understandable! I'm talking about a case where the user didn't want to use LineSegments (for which line-width doesn't exist, it's a fixed size). Instead, he wanted to use Line2, which embeds line-width modification. That's why I was talking about |
Hey @andretchen0 ! I've just pushed the last modifications you asked for in the review. |
Looks good! |
Ah, gotcha. Line width would be a useful addition, so if it wouldn't be too much work to use But I won't block the PR either way. It's good for me. Approved. |
Hey @andretchen0 ! Yes, I think it will be simpler to create a Perfect! Can't wait for the next release! |
This component provides an abstraction of EdgesGeometry from Three.js,
<Edges>
is specifically designed for rendering visible edges of objects in a scene graph. This enhances the visual quality by highlighting contours and providing a stylized appearance which contributes to the artistic aspect of 3D visualizations.<Edges>
a custom materialLocal Playground —
pnpm run playground
Local Documentation —
pnpm run docs:dev