Comments (7)
excellent updates recently! noticeably faster on my humble i4210u. looking forward to more
from three.js-pathtracing-renderer.
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.
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.
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.
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.
from three.js-pathtracing-renderer.
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.
from three.js-pathtracing-renderer.
@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)
- muti material not supported
- WebGPU port HOT 3
- More abstractions HOT 9
- Using more information from earlier samples HOT 3
- More samples per frame option HOT 60
- More compatibility with three js APIs HOT 2
- Stop a caustic ray if it crosses a surface HOT 3
- Just wondering how you handled something HOT 14
- Blue noise HOT 8
- GLTF viewer textures HOT 3
- sampler2D array HOT 14
- How to use this pathtracer in Freeciv 3D version? HOT 2
- [question] how to debug glsl in chrome? HOT 2
- GLTF_Model_Viewer didn't get the right result? HOT 6
- How to incorporate it into project? HOT 9
- statistical tool: bootstrapping
- Shadow Catcher HOT 1
- Support for a THREE.ParametricGeometry HOT 1
- GLTF_Viewer is not able to load textures HOT 1
- image stretched for BHV point light source HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js-pathtracing-renderer.