I am writing a raytracer as a part of my complete 3d engine. I am planning on using javascript for the scripting language instead of writing my own. The question is how can I use it? Btw the raytracer and the UI are written in C#.
相关问题
- Is there a limit to how many levels you can nest i
- Sorting 3 numbers without branching [closed]
- How to toggle on Order in ReactJS
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
This shows the two-way interaction between Javascript and c#.
-
While it is possible to use JavaScript as scripting for .Net application it is not most popular choice. If you can pick other language - IronPython or LUA.Net may be choices you'll get better support. I listed several links in similar question recently: Write npc scripts to be executed by c# using class with npc methods.
Otherwise JavaScript.Net (part of .Net framework) or other implementations either explicitly .Net or with .Net bindings will work as scripting language.
There are many standalone implementations of JavaScript that you may be able to leverage for this purpose:
Here is a link to the stackoverflow info page on JavaScript which lists at the top many of these implementations: https://stackoverflow.com/tags/javascript/info