question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JavaScript rendering target

See original GitHub issue

More a question than an Issue - do we have opinions on the rendering target (and template for it) of JavaScript implementations?

I saw a few solutions in here that appear to render text into the browser on a simple HTML page (example https://github.com/coding-horror/basic-computer-games/blob/main/73 Reverse/javascript/reverse.js#L8 ).

Conversely the language selection process (https://discourse.codinghorror.com/t/updating-101-basic-computer-games-for-2021/7927/34) included the determination if a language is “scripting appropriate” by “running on the command line”, which is true for JS, if you run it against #!/usr/bin/env node.

So I am thinking either a) don’t render it into the browser, but write ES6 for the command line OR b) we come up with some sort of template for how interacting with the browser should work.

Thoughts?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:25 (18 by maintainers)

github_iconTop GitHub Comments

4reactions
lmorchardcommented, Feb 28, 2021

FWIW, this is how I’ve been doing it for Super Star Trek:

Kind of hacked together, but seems to be working decently so far

3reactions
mojoaxelcommented, Apr 2, 2022

With #687 we move to node.js as main target! For playing games online we have a very simple node-terminal-emulator. Here is an example:

lacagy HTML Version: https://coding-horror.github.io/basic-computer-games/57_Literature_Quiz/javascript/litquiz.html

node.js version & terminal emuilator: https://coding-horror.github.io/basic-computer-games/00_Common/javascript/WebTerminal/terminal.html#57_Literature_Quiz/javascript/litquiz.mjs

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGLRenderTarget – three.js docs
WebGLRenderTarget. A render target is a buffer where the video card draws pixels for a scene that is being rendered in the background....
Read more >
three.js Render Target Tutorial - YouTube
Hey, in this video we try out the render target. We will render a second scene as a texture onto a plane and...
Read more >
[Solved] How can I render a shader to a render target?
Hello, I need to post-process the first render target and output to another one, therefore no triangles, no scene, and no camera is...
Read more >
Beautiful and mind-bending effects with WebGL Render ...
js or React Three Fiber, creating a render target is straightforward: all you need to use is the WebGLRenderTarget class. 1. const renderTarget ......
Read more >
Using render target texture in gui - Questions
Rendering the target texture as emissive texture of a plane. I could use it as a billboard so it faces the camera all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found