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

[Lang] Fix gui docstring #7003

Merged
merged 6 commits into from
Jan 5, 2023
Merged

[Lang] Fix gui docstring #7003

merged 6 commits into from
Jan 5, 2023

Conversation

neozhaoliang
Copy link
Contributor

Close: #6999

@netlify
Copy link

netlify bot commented Dec 29, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 1c5dc65
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63b3d765f6d8360009fa28eb
😎 Deploy Preview https://deploy-preview-7003--docsite-preview.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 settings.

@taichi-gardener
Copy link
Contributor

/rebase

python/taichi/ui/canvas.py Outdated Show resolved Hide resolved
python/taichi/ui/canvas.py Outdated Show resolved Hide resolved
@neozhaoliang neozhaoliang requested a review from ailzhang January 4, 2023 01:51
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

@ailzhang ailzhang merged commit 972121f into taichi-dev:master Jan 5, 2023
@neozhaoliang neozhaoliang deleted the fix-gui-docstring branch January 5, 2023 02:29
feisuzhu pushed a commit to feisuzhu/taichi that referenced this pull request Jan 5, 2023
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@YouJiacheng
Copy link

YouJiacheng commented Jan 5, 2023

According to the shader

layout(binding = 0) uniform UBO {
vec3 color;
int use_per_vertex_color;
float radius;
}
ubo;
layout(location = 1) out vec3 selected_color;
void main() {
gl_PointSize = ubo.radius * 2;
float x = in_position.x * 2.0 - 1.0;
float y = -(in_position.y * 2.0 - 1.0);
gl_Position = vec4(x, y, 0.0, 1.0);
if (ubo.use_per_vertex_color == 0) {
selected_color = ubo.color;
} else {
selected_color = in_color.rgb;
}

I don't think that GGUI supports array/field radius.

@neozhaoliang
Copy link
Contributor Author

@YouJiacheng Thanks for pointing out this. The GUI.circles does support passing a numpy array for the radius, but GGUI.circles doesn't. This is will be fixed in another PR #7065

quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Draw circles/particles with different radii in GGUI
4 participants