Gltf model texture and scene bin not found - aframe

I searched a lot of solutions online but none helped. I tried putting the gltf model on this website (https://gltf-viewer.donmccurdy.com/) and it is working fine but when I tried using it on glitch the texture and scene.bin file failed to load. https://glitch.com/edit/#!/feline-lifter?path=index.html:21:13
Error im getting:
I kept getting this error and I don't know how to fix it! also this is my html code:

The errors suggest that something is trying to find resources at
https://cdn.glitch.com/textures/*something*.jpg
That something would be the GLFT Loader, which is fed with sinister lies in the .gltf file:
"buffers": [
{
"byteLength": 12440812,
"uri": "scene.bin"
}
],
"images": [
{
"uri": "textures/alpha_baseColor.png"
},
{
"uri": "textures/alpha_metallicRoughness.png"
},
(...)
if you look up the paths to the assets, they are neither in the textures folder nor in ..any folder. They are wherever glitch decides to throw them. So the paths in the .gltf file are not valid when it's being loaded at a glitch hosted website.
Either:
Convert the model to .glb, which consists all resources
Throw the model on github where paths are relative, making the paths valid.
Change the paths using the glitch assets links.

Related

Failed to load config "next/babel" to extend from eslintrc.json

When I'm trying to build the Next.Js app then the below error is coming with a successful build. This error is showing when I deploy the app in Vercel.
error - ESLint: Failed to load config "next/babel" to extend from. Referenced from: /vercel/path0/.eslintrc.json
This is my .eslintrc.json
{
"extends": ["next/babel","next/core-web-vitals"]
}
I've also added .babelrc
{
"presets": ["next/babel"],
"plugins": []
}
I also found a solution when I change the eslintrc.json file like below:
{
"extends": ["next","next/core-web-vitals"]
}
then no error is showing while building the app. But there is another problem showing when I use the above solution and the problem is:
Parsing error: Cannot find module 'next/babel'
This is shown in all the imports with red marks.
I tried to search the solution but did not found any solution for this.
I think, this might have to do with this weird hackfix that is being touted in a bunch of places that tells you to place next/babel in your eslint config file for some reason (e.g. here).
It probably was a hackfix for an old bug in older next.js versions. But as of (at least) summer 2022, it makes little sense to do so, considering that next/babel is a babel preset, not an eslint preset. Instead, in recent next.js versions, just reset your .eslintrc.json:
{
"extends": [
"next"
]
}
With this setup, things don't error out, as of next#12.2.*.
You also might want to take a look next's eslint customization options. For example, some people might be confused why eslint is seemingly not working.
In that case, consider this solution and the next.js docs on eslint.
If you have this problem, but you did not copy+paste your .eslintrc.json from the interwebz, then you might need to describe your situation in more detail.
my problem has been solved by this code. just copy and paste it into the eslintrc.json file.
{
"extends": ["next/babel","next/core-web-vitals"]
}
Or just replace "next" and "next/core-web-vitals" to
"plugin:#next/next/recommended"
https://nextjs.org/docs/basic-features/eslint
I had this issue when working with TurboRepo. The solution for me was to add next as a devDependency in the root of the monorepo.
Same Turborepo issue using pnpm. This solved it for me: https://github.com/vercel/next.js/issues/40687#issuecomment-1275184829
Essentially add this to your settings.json
// .vscode/settings.json
{
"eslint.workingDirectories": [
{ "pattern": "apps/*/" },
{ "pattern": "packages/*/" }
]
}

Firestore extension for image resizing caught in infinite loop

Just want to preface this with, I know the functionality is new, only let out into the wild a week ago! Definitely will be patient with it.
I've just set the Resize Image extension up and the test run (just uploading an image) is causing an infinite loop of uploads and deletes (and error messages), where the newly resized images appear to be attempting to create new images, or something similar. My input for Cloud Storage path for resized images is images and this is leading to this error:
Deleting temporary resized file: 'images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/images/_200x200'
I'm currently seeing an issue where a single image is causing the function to run until it hits:
Error when resizing image { Error: Backend Error
...
code: 503,
errors:
[ { domain: 'global',
reason: 'backendError',
message: 'Backend Error' } ],
response: undefined,
message: 'Backend Error' }
Any ideas for a solution to this? I uninstalled the extension to stop the infinite loop but not sure how to make the extension run smoothly.
The only steps I've taken so far were the setup guide of accepting a few things and changing the path to images.
Where's the best place to report this? Happy to delete this on SO if it's not the right place.
This looks like a bug on the firebase extension.
It's already logged here:github
It occurs when your file name does not have an extension like .jpg or .png. As a work around, you might want to rename any files uploaded to the storage bucket to have an extension

Path Issue with Wordpress + Composer on Heroku

I am a newbie in composer and Heroku cloud and here has a may-be-stupid question about the path in composer.
I am trying to deploy a Wordpress on Heroku, following the code/instruction here: https://github.com/ellefsen/wordpress-heroku-php
In concept, I should use S3 to store any media content. However, my case is quite special: there are two and only two images for my site, now and in future. So I:
removed all S3 related code and configs;
add two images in public/content/uploads/ as: public/content/uploads/2016/08/one.png and public/content/uploads/2016/08/another.png;
adjust the .gitignore accordingly (remove the public/content/uploads);
Modify the composer.json as:
"extra": {
"webroot-dir": "public/wp",
"webroot-package": "wordpress",
"installer-paths": {
"public/content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"public/content/mu-plugins/{$name}/": [
"type:wordpress-muplugin"
],
"public/content/uploads/{$name}/": [
"public/wp/wp-content/uploads/{$name}"
],
"public/content/themes/{$name}/": [
"type:wordpress-theme"
]
}
},
For item "public/content/uploads/{$name}/", I tried:
public/wp/wp-content/uploads/{$name}
wp-content/uploads/{$name}
But in any case, within the WP dashboard, I cannot see any image in the media lib. Could someone please give me a hand? Thanks!
I would not bother with the Media Library in WP as long as you are only dealing with two images. Just put them in your theme directory and reference them directly.
That way you won't have to deal with S3 or Heroku's ephemeral file storage as they would all be committed and included with your repository as part of your project.

Grunt Assemble is resolving relative paths in build files (want to keep relative paths)

This is an interesting question, I've already searched Google so my hopes of reaching someone with an answer are slim.
I'm building a Grunt project, everything is great with my project except for one little thing I just noticed regarding relative paths ( ../../ ) when using the Assemble site generator. I am using a layout file in my project, fyi.
I need to use relative paths to link to files that are two levels lower than the root level of my Grunt project. But when I run my build the output HTML is resolving the relative paths to root.
For example, my HTML code in the dev file...
Hotels
is resolved to the following in the build file...
Hotels
It completely ignores the "../../" when I need that relative path to stay. I eventually plan on dumping this build folder into another project and taking advantage of it's resources that reside two levels lower than this build.
Any help is appreciated. So the gist of my questions... I want to maintain "../../" relative paths in my output HTML files after I run the Assemble task.
Here is the assemble task I've created...
assemble: {
options: {
layoutDir: './templates/layouts',
data: './templates/app/json/**/*.{json,yml}',
flatten: true
},
main: {
options: {
layout: './templates/layouts/default.html',
partials: './templates/app/partials/**/*.html'
},
src: './templates/app/*.html',
dest: './_build/'
}
}

getting json data into assemble templates in grunt

I am using assemble (https://github.com/assemble/assemble) via a grunt plugin to build static pages.
I have been using grunt for a while now so understand how it all works, yet this is my first time using assemble so I looked at this for ref (http://blog.parkji.co.uk/2013/07/06/building-a-static-site-using-grunt-and-assemble.html). Everything seemed to be working fine.
However, I want to introduce JSON data to the mix and have looked at the docs on the assemble site (http://assemble.io/docs/Data.html) yet after I run 'grunt assemble' it doesnt render the json data :(
My gruntfile
assemble: {
options: {
layout: "src/responsive/layouts/default.hbs",
data: 'src/responsive/data/**/*.json',
flatten: true
},
pages: {
files: {
'src/': ['src/responsive/pages/*.hbs']
}
}
},
test json:
{
"name ": "This is a square widget" ,
"modifier ": "widget-square"
}
and folder structure:
- data
-- index.json
- layouts
-- default.hbs
- pages
-- index.hbs
Within pages/index.hbs I am trying to call {{ index.name }} or simply {{ name }} (I have tried both) to no avail.
Im pulling my hair out as grunt is giving no errors (and in fact if I make json not valid grunt complains so it is reading it).
Any help much appreciated before I go crazy....
Thanks,
Adrian
Your JSON here is the issue. You had extra spaces in your keys. Your JSON should be formatted as the following:
{
"name": "This is a square widget",
"modifier": "widget-square"
}

Resources