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

add VRM support #21

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/Publish_to_Github_Pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
echo $SIZE
if [[ $SIZE -gt 1573741824 ]]; then echo 'dist folder exceeds limit of 1.5GB! Aborting'; exit 1; fi

- name: Deploy to Khronos repo
continue-on-error: true # If no changes are commited this action fails
uses: JamesIves/github-pages-deploy-action@4.1.0
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
branch: main
folder: app_web/dist/
token: ${{ secrets.BUILD_GITHUB_PAGES }}
repository-name: KhronosGroup/glTF-Compressor-Release
target-folder: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./app_web/dist
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
2 changes: 1 addition & 1 deletion app_web/src/logic/uimodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ const getInputObservables = (inputElement, app) => {
// Partition files into a .gltf or .glb and additional files like buffers and textures
observables.droppedGltf = droppedFiles.pipe(
map(files => ({
mainFile: files.find(([path]) => path.endsWith(".glb") || path.endsWith(".gltf")),
mainFile: files.find(([path]) => path.endsWith(".glb") || path.endsWith(".gltf") || path.endsWith(".vrm")),
additionalFiles: files.filter(file => !file[0].endsWith(".glb") && !file[0].endsWith(".gltf"))
})),
filter(files => files.mainFile !== undefined),
Expand Down
2 changes: 1 addition & 1 deletion source/gltf/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function clamp(number, min, max) {
}

function getIsGlb(filename) {
return getExtension(filename) == "glb";
return getExtension(filename) == "glb" || getExtension(filename) == "vrm";
}

function getIsGltf(filename) {
Expand Down