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

Fix screenshot script on windows #11

Open
Benjythebee opened this issue Oct 8, 2024 · 0 comments
Open

Fix screenshot script on windows #11

Benjythebee opened this issue Oct 8, 2024 · 0 comments

Comments

@Benjythebee
Copy link
Contributor

Edit the take-screenshot script for support on windows:
Change line 19 of take-screenshot to the following condition:

            if [[ "$OSTYPE" == "win32" ]]  ||  [[ "$OSTYPE" == "msys" ]]; then
                if node node_modules/@shopify/screenshot-glb/dist/cli.js -i "$file" -w 512 -h 512 -m "orientation=0 0 -2.4" -o "$png_file"; then
                    echo "Screenshot of $vrm_filename saved as $(basename "$vrm_filename" .vrm).png"
                else
                    echo "Failed to take a screenshot of $vrm_filename"
                fi
            else
                if node ./node_modules/.bin/screenshot-glb -i "$file" -w 512 -h 512 -m "orientation=0 0 -2.4" -o "$png_file"; then
                    echo "Screenshot of $vrm_filename saved as $(basename "$vrm_filename" .vrm).png"
                else
                    echo "Failed to take a screenshot of $vrm_filename"
                fi
            fi

Also note that orientation takes in radians;
in the code above, -2.4 is to make a VRM0 face forward to the right; This might not be desired for a VRM1
image

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

No branches or pull requests

1 participant