Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8152573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:45:08+00:00 2026-06-06T15:45:08+00:00

My problem seems similar to Not able to visualize a loaded data , but

  • 0

My problem seems similar to Not able to visualize a loaded data , but I have no console errors and I have already added the ‘-allow-file-access-from-files’ flag to my Chrome Browser. Here’s my Java coding,

window.onload = function() {

var r = new X.renderer3D();
  r.init();

  pros = new X.mesh();
  pros.file = 'file:///C:/Users/Nathan/Downloads/JB Farmer STL ACII.stl';
  pros.caption = 'Prosthetic';

  r.add(pros);

  r.render();

};

Should I “play around” with with camera position, I know I have to do that in Three.js.
Maybe the model needs normals? I’m not sure if it does or not. I haven’t worked with 3D modeling, besides Three.js.

Update: Ummmm, I’m not sure what is going on with this, but I realized that XTK generated 2 canvases . I looked at the first two Lessons and they have one.
^ Now eliminated the extra canvas, must have copied a piece and that was in there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:45:09+00:00Added an answer on June 6, 2026 at 3:45 pm

    For the moment, the loader of xtk doesn’t seem to be done for local. I mean : it uses an XMLHttpRequest (XHR) to get the file with a GET request. First of all the request must be sent to something that can handle it (a server or localhost emilated by Wamp or equivalent). Then let’s imagine if one broswer, no matter what one, allows XHR on a file at client side by his url, and imagine I’m a pirate and you come on my website. I know Windows well, I know in C:/Windows/System32 there always is a file where I can find your personals data. What do I do ? An XHR ! You’ve been hacked. It’s a story but you see the idea.

    That’s why the only ways allowed by browsers to access local files are HTML5 File API & HTML5 Drag&Drop API (unfortunately…). Actualy a way to go through that limitation is having binary code at the client side (flash, java applet). The client is the only one who can ask to open a file or drop a file, so the browser is sure there won’t be any security failure because of him.

    So you should test it with something like Wamp and access your file with an url like “http://localhost/…/myfile.stl” or the relative url “/…/myfile.stl”, or do the following if you realy want local files.

    A few weeks ago I wrote my own parser for a private format for xtk and from local file, it worked well, I just used HTML5 APIs to read the file and get a String or BinaryArray from it and then wrote a parser that transformed it in a X.mesh. So I think the best would be to extend the X.loader for HTML5 file APIs, or like me to manualy load the file.

    The following jsFiddle from Haehn helps : here !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem seems to be quite simple, but it's not working the intuitive way.
The problem seems very strange. I have a AJAX helper function within a same
My problem seems to be this: heap data allocated by one thread (that later
I have a problem that seems so senseless that I'm sure I'm missing something
I'm facing a problem that seems to have no straighforward solution. I'm using java.util.Map
It seems like a trivial problem, but nothing I've tried will make the background
I know there are similar questions already on SO but none of them seem
We have a BusinessObjects Enterprise XI server which I believe is similar (if not
a similar question was asked in question 494120 , but IMHO was not really
I have looked into this fairly extensively, but have not found quite what I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.