Aframe MTL isn't loaded correctly - aframe

Aframe version 5.0.0
In my scene I have an obj file (a cat) and I've applied an mtl file to it, but the mtl don't works at all, the object remains white, and If I check it with the inspector the object became all black.
This is the code:
<a-scene>
<a-assets>
...
<a-asset-item id="crate-obj" src="#asset('images/cat.obj')"></a-asset-item>
<a-asset-item id="crate-mtl" src="#asset('images/cat.mtl')"></a-asset-item>
...
</a-assets>
...
<a-obj-model src="#crate-obj" mtl="#crate-mtl"></a-obj-model>
...
</a-scene>
I think that the path of my mtl it's correct...
# asset points to the assets folder of my project.
The warning that chrome inspector shows is:
components:obj-model:warn Material component properties are ignored when a .MTL is provided +0ms
I've searched the warning and the problem on the web but I didn't find anything...
Thank you in advance

You have to make sure that the texture map files referenced from the MTL are accesible on the appropriate path (Look for 404 errors in the network panel) Most likely they have to be served from the same directory as
your OBJ and MTL.

Related

CSS not showing up when opening with files

My css only works when I open it with live-server. I didn't realized it until I tried opening the file
of my projects. The JS functionality is there, but my project is just stale, just black and white. I'm using sass and live-sass compiler. And also using a map api leaftlet and open weather api. SO please help,
cannot seems to figure out why my css is not present when I open my project on file or in another browser.
I have seen through your file and I think your issue is your image hasn't been loaded.
You have an image of the starry sky, right? You can only see the black and white page with some icons after the search because your image hasn't been loaded.
As you access the page by opening the file, the image URL in your CSS file is the path relatives to the current CSS file, which means the URL should be ../image/night.jpg.
If you access the page through the live server, that URL is the path relative to your host.
Hope that I understand your problem correctly. I am still learning too :)

No Backend Icons FLUID Powered TYPO3 - wrong path?

after my first steps with FLUID POWERED TYPO3.
The latest versions flux 7.1.2, fluidpages 3.1.2, fluidcontent 4.1.1, fluidcontent_core 1.0.2, vhs 2.1.4
I've got only a small issue ... I don't see my Icons for FLUIDPAGES or FLUX CONTENT ELEMENTS at TYPO3 Backend.
This is the Icon Path for Fluidpages-Images from Screenshot:
typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif
I try it with or without baseURL nothing happens. The Icon is visible, when I paste the path into my Browser:
But my JS-Console says:
http://mvz.local/typo3/typo3conf/ext/mvz_neuhann/Resources/Public/Icons/Page/Standard.gif 404 (Not Found)
Because of the 'typo3/' after my URL. But why? I'm on a local Server, no File Permissons or sth., Clear Cache, delete typo3temp.
Nothing. I can't see my Icons from my provider Extension via fluidpages or flux. It's the same with my FLUX Icons, the Standard-Icon is availible but how is the path at my flux form?
I've tried:
<flux:form id="home05" options="{group: 'xy', icon: '{f:uri.resource(path: \'Public/Icons/Content/myicon.gif\')}'}">
// or
<flux:form id="home05" options="{icon: 'typo3conf/ext/my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
//
<flux:form id="home05" options="{icon: 'EXT:my_extension/Resources/Public/Icons/Content/myicon.gif', group: 'xy'}">
While in the backend, Flux creates a relative path to your Icon. To be precise, it creates a relative path to PATH_site constant. This means in your iframe, the path is plain wrong. This is a common issue with backend images. There's a few ways to solve this:
Create a custom, absolute uri with f:uri.resource and f:uri.image (absolute paths)
Example with proper escaping would be
<flux:form id="fluidpage" options="{icon: '{f:uri.resource(path: \'Icons/Content/myImage.gif\')}'}">
prefix your path with a slash if it's a custom Icon so the path will start at your root
There should also be automatic icon discovery which will find an icon Resources/Public/Icons/Standard.(png|gif) for your page Template Standard.html
If you have further issues, please refer to our bugtracker on GitHub.

Can't load Font Awesome from subdirectory

I have the following file layout:
/website/index.html
/website/font-awesome/css
/website/font-awesome/fonts
/website/Subdirectory/page1.html
The page /website/index.html does not use Font Awesome at all; the files in /website/Subdirectory/ do use it.
If I directly access /website/Subdirectory/page1.html the Font Awesome icons show as a box with UniCode number inside. If I visit /website/index.html first, then visiting any page in the Subdirectory will show the icons as expected.
On page1.html I have <link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css">.
This is locally hosted; i.e. via file://
Update
downloadable font: download failed (font-family: "FontAwesome" style:normal weight:normal stretch:normal src index:2): status=2147500037
source: file:///correct/path/to/website/font-awesome/fonts/fontawesome-webfont.ttf?v=4.2.0
I'm using Firefox on a Mac. According to Finder the font version is 4.2.0.
On Chrome this problem does not exist. Looks like some kind of browser implementation issue. Work arounds appreciated.
It looks like this is a known issue, due to "same origin" security policy, see https://bugzilla.mozilla.org/show_bug.cgi?id=760436
The reason why the site works after loading the higher level page is that the font has been cached already.
Either ensure that the font file is in the same directory as the page that's trying to load it, or a subdirectory of this (not a sibling or ancestor directory); or else relax the security check by setting security.fileuri.strict_origin_policy to false in about:config.
the issue for me was to set the environment variable as follow in my rails app.
config.action_controller.relative_url_root = "/myrailsapp"
see https://github.com/bokmann/font-awesome-rails

jQuery-ui: Differences between local and remote inclusion of stylesheet

When I include a jquery-ui stylesheet for a resizable jquery-ui dialog remotely like so
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/start/jquery-ui.css" />
I get this result:
but when I download the very same file and include it locally like so
<link rel="stylesheet" type="text/css" href="./jquery-ui.css" />
I get this result:
Note the missing resize handle in the lower right corner which seems to be the only difference.
What causes the difference?
Jquery-ui references a bunch of image sprite sheets. When including the reference from ajax.googleapis.com the path to the image resolves properly because google hosts those images on their server and has them in the proper location. However in your local copy of the jquery-ui.css i'm guessing there's a good chance your images are not in the proper location.
I'm using jquery ui in a current project and my folder structure is:
Content
images <--- this is the jquery ui sprite iamges folder
jquery-ui.css
go to /jquery-ui.css and make sure the bg paths are path correctly

Unable to load an image in sub folder present in the working directory- Google maps marker icon

A simple issue but unable to find a solution.
I have some image files that I placed in a subfolder called icons in my working directory in my ASP.NET website. I want to set an image during initialization to the markers on my Google map. But this isn't working. I have tried-
var marker= new google.maps.Marker({icon:'E:\cdeez\Sites\googletest 5\icons\busballon.png', position:pos,map:map});
It gives an error:
Not allowed to load local resource: file:///E:/cdeezSitesgoogletest%205icons%08usballon.png
However there is no problem if I place the image in the working directory. I guess giving the absolute path is not the right way too. So what is the right way in the above case.(Just a reminder- the above code will be in the aspx file).
According to the MarkerOptions docs, the icon should be a URL. However local files (embedded with file:///) tend to be ignored by browsers if the website is served over http - and I think that is what is happening in your case.
I would suggest to try out the following steps:
try using a relative path, e.g icon: "/icons/busballon.png"
try using a http path to your file, e.g. icon: "http://yoursite.com/icons/busballon.png"

Resources