How do you properly load a GTLF file in A-Frame (Specifically in glitch?) - html

I downloaded a 3d model in .gltf from a website like sketchfab. If I drag the compressed .zip file into my assets folder and get a link that a-frame can use for it, it does not work.

The easiest way to do this is to
1 Extract your zip file.
Extract your zip file by right clicking on it in file explorer and pressing "extract all"
2 Open the new folder
Now that you have extracted your .gltf file, you should automatically be brought either 2 or 3 files. They may be textures scene and scene.bin this video has a great description of the differences in these, and a detailed explanation on this entire process.
3 Highlight all these files and drop them to https://glb-packer.glitch.me/
This website will put them all into out.glb and this is the file you can upload to your assets.
Reference the 3d model as
<a-gltf-model></a-gltf-model>
and add the link from your assets with the src tag.

Related

Saving rmarkdown html files to local drive from shinyapps.io

I have a shiny app which I have published on shinyapps.io.
I am trying to save(download) html files that I create using rmarkdown to a local drive. I can download pdf, jpeg or png formats. but the reason to save html version is to keep the interactive plots that I have created using plotly and ggplot where I can hover my mouse over data and see values.
After a lot of research, I found out a way to save (upload) the html files to my own dropbox using drop_upload function. But it's very inconvenient and not accessible to anyone except me.
So I was wondering if someone could help me with a way to save/download rmarkdown html files to a local drive from shinyapps.io?

Inserting index.html file into Github Repository

I've created a very simple website in a Codecademy exercise that I'd like to upload to the Internet using Github Pages. Because you are unable to export your index.html and main.css files from Codecademy, I copy and pasted them into a word document, with the intent to get them in their proper file formats. However, I have been unable to find a source to convert these plain text files to .html and .css formats. Also, I've created an account on Github and a new repository, but the tutorial doesn't cover how to insert these two files into this repository.
How do I convert code from text in a document to .html and .css file format, and then insert these files into a Github repository? Thanks!
You don't need any special tools to convert plain text files to html or css.
You simply do it yourself as well.
Follow the steps to change .txt files to .html or .css:
Right-click on your index.txt or main.txt
Click on Rename from the list of options shown
Then it will take you to editing the file name
Navigate the cursor and delete txt
Type html in txt's place
Press Enter
Then you might receive a prompt asking if you are sure. Click on Yes/use .html whichever is appropriate for your prompt.
Voila! you have your file extension changed
Follow a similar approach to change the files to css as well
*Please note that my screenshots are from Mac OS and may look different from yours depending on the Operating system you are using
Hosting Webpages on Github:
Github pages website gives you a step by step guide with visual illustrations on how to do it.
If you are looking for a more comprehensive guide, then please refer to this page.
Seems nonsense, but after struggling a lot with Github Pages I have tested (and worked):
duplicate your first html file and rename it as index.html
drag and drop it into the /docs folder
drag and drop the remaining html files to the /docs folder (including the one you
have duplicated, of course with it´s original name)
commit changes
Goto Settings / Github pages and
Go down till “Github Pages”
Clic on the down arrow in [None] and select “main”
Clic on the down arrow in [/root] and select “/docs”
Clic on [Save]
After a few minutes you will see in [Settings] / “Github Pages”
Your site is published at
https://your_account_name.github.io/your_repo_name/

Iframe contents not visible in a chm file

I am compiling one chm file with set of html files. In one html file i am using iframe tag and viewing text file throught 'src' attribute. I am able to see the contents of text file inside iframe when opening that HTML file in a browser. But when viewing that file in a chm file i don't see text file content. It is showing 'This page can’t be displayed' error in iframe.
This is the tag i'm using:
<iframe src="./mytextfile.txt" style="width: 100%; height: 300px;border:none"></iframe>
Is there anything to add to view that file. Please help me.
As you can see - your problem is reproducible (here on a German Windows10 machine).
You must ensure that the text file is either in the same directory as the project (.hhp) file or in a subdirectory of that directory.
You also have to add the *.txt file extension or filename to the [FILES] list in the .hhp file, as this ensures that the text file will be compiled into the .chm file. Best way is to do this by a text editor like shown below:
Save the *.hhp file and compile all content to your *.chm file.
Done!
BTW - here are some hints to another problem may be targeted:
Microsoft introduced some security restrictions many years ago that disable functionality in HTML Help files that are accessed over a network, so what you're seeing is almost certainly by design. There are two possible solutions: move the help file to your local drive, or implement some changes in the Windows registry so that you can view the contents of remote help files.
Microsoft's summary of the problem: http://support.microsoft.com/kb/896054
You may try following workaround that lets you explicitly 'unblock' a CHM help file coming from a network drive or internet download. To do this:
Open Windows Explorer
Find your CHM file
Right click and select Propertie
Click the Unblock button on the General tab
For information on how to make the registry changes, see this page:
http://www.grainge.org/pages/authoring/chm_mspatch/896358.htm
Or more straightforwardly, use the free HHReg utility available from the page below to make the required changes.
http://www.ec-software.com/products_hhreg.html

Use html hyperlinks to index file folders

I am trying to index the file folders on my local computer using a html file. I set hyperlinks to the folders, when click the link, the internet browser (firefox in my case) lists the files contained in the folder. However, is it possible to open the file browser (linux) when click the link, rather than listing the files within the internet browser?
I do not believe this is possible because HTML controls web objects and wouldn't be able to open and search a path in a file browser. For that has to do with the physical computers file system not the internet.
If you need to me explain more just let me know

Link to open PDF from folder

I have some PDF's sitting in a folder on my computer, is there a way to write a link to open them on to a webpage?
The main idea is when the site goes live the link will be used to download the pdfs from the folder, but obviously at a later stage the folder will be a temp folder on my website.
So at the moment i just want to open the pdfs from a link, and the final goal will be to have the links download them.
Can any one help me?
This is the file path to get to the pdf i want to link to.
C:\Users\Shaun\Documents\FormValue\CS1.pdf
How would i create the link?
If you want to have a link to a PDF, you just have to put the relative path to the file in the href attribute of an a tag. So let's say you had a folder called pdfs, with the file boom.pdf inside it, and folder called site sitting beside it, with the file site.html in it. Then all you'd have to do is put this link in the html file:
Link to a pdf
In most (all?) browsers now a days, that will open the PDF in a new tab. To download it you would right-click it and do the Save Link As thing. Just need to get the path in href right.
UPDATE
If you want to use the full path to the file, you need to prefix it with file://. Then you just put it in the href the same as with a regular link, ending up with something like:
Link to a pdf
This should work with your set up, but if the pdf and the html files are stored near each other, relative URLs are still a good option. A little bit of Google work should show you how to write those.
For each PDF just do what I talk about here.
<object height="950" data="sample-report.pdf" type="application/pdf" width="860">
<p>It appears you don't have a PDF plugin for this browser.
No biggie... you can <a href="sample-report.pdf">click here to
download the PDF file.</a>
</p>
</object>
It works with most browsers and it degrades nicely.
It sounds like youre asking if you can put a link on a web site to a PDF sitting on your computer. You can't. The files have to be either on another web site or on your site's server.
If you are using ASP.NET, you can have the link point to a handler that accepts a query string identifying the file, either by file name or a hash of the file. Then the handler can look in the folder for a file that matches the pattern, read the file as a byte array, and then write those bytes to HttpResponse.