Giter VIP home page Giter VIP logo

Comments (7)

dafhi avatar dafhi commented on May 18, 2024 2

excellent updates recently! noticeably faster on my humble i4210u. looking forward to more

from three.js-pathtracing-renderer.

dafhi avatar dafhi commented on May 18, 2024 1

googled "Live Server" and "application not found"

comments mentioned that a browser window is opened. I deleted IE a while back and never clicked "make default browser" in Firefox

everything's working now :D

from three.js-pathtracing-renderer.

erichlof avatar erichlof commented on May 18, 2024

Hi @dafhi

Yes since the demos all require http get requests - nothing will work unless you have a simple server running in the background, serving up the various files. Images such as textures that the demos need and files such as the shaders (external .glsl files) cannot be loaded from your hard drive directly as this is a violation of CORS policy, which prevents cross-origin resource sharing. If this safety feature was not in place, .html web pages could access private files on your hard drive if those .html files contained malicious JavaScript code.

The easiest way to get my (and other web-based) projects going is to use Microsoft's free Visual Studio Code editor. After it's installed, get the Live web server extension (available inside the editor), then restart the Code editor. When the editor opens up, click Open File... then navigate to my gh-pages folder that you unzipped to your hard drive after the GitHub download. Open up a random .html demo file (CornellBox.html for example) from the menu on the left side of your editor, and then right click on the code and click Open with Live server. It will automatically open up your default browser and hopefully every demo should work. The great thing is that if you want to make changes to my fragment shaders (the heart of every demo), even if you make a one character change while the Live server is running, it will automatically re-compile the shader and you can instantly see your changes (assuming that the new code is syntactically correct). This fast iteration turnaround is one of the reasons I chose a web-based project instead of C++ and OpenGL for instance.

The reason why my project works on GitHub is that if you offer up your project as an open source project, GitHub agrees to serve it up for free. So it's like getting free web hosting for your website (or my demos that are technically like little individual .html websites), as long as you keep the code visible to the public. I have no problem doing this as I was offering source code and finished games for free back in 1999 before open source was a 'thing'! :-D

Let me know if you need any further help getting everything going.

from three.js-pathtracing-renderer.

dafhi avatar dafhi commented on May 18, 2024

after selecting 'open w live server'

msg box
http://127.0.0.1:5500/arctic_circle.html
application not found

from three.js-pathtracing-renderer.

erichlof avatar erichlof commented on May 18, 2024

mmm that's odd, I've never received that message before. Here's a screenshot of my editor. Make sure you have the latest version of Live Server extension installed (5.6.1 is the current version at the moment). It should appear in the list of extensions on left-hand side of editor.

editor

from three.js-pathtracing-renderer.

erichlof avatar erichlof commented on May 18, 2024

here's one more screenshot showing the file view. The editor needs to see the whole gh-pages folder at once, so you have to click Open Folder... (not File as you would normally do) and select the entire gh-pages folder that is unzipped on your hard drive. Once you see that all the files show up in the file explorer column, then left click ArcticCircle.html for instance (like in my 1st screenshot), then right click and select open with Live Server. On the bottom right corner, it should have the port number (5500 for instance) if the server started up successfully.

editor2

from three.js-pathtracing-renderer.

erichlof avatar erichlof commented on May 18, 2024

@dafhi
Yay! Glad everything is working now! Yes it should work with any modern browser such as Chrome, Firefox and even Microsoft Edge (provided that you install the Edge Dev channel version that mirrors the WebGL 2.0 support of Chrome - my project demos all require WebGL 2.0 support).

Thanks!

from three.js-pathtracing-renderer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.