Skip to content

Instantly share code, notes, and snippets.

View DanKomorny's full-sized avatar

@dankomorny DanKomorny

View GitHub Profile
@danielbierwirth
danielbierwirth / OffscreenRendering.cs
Last active April 9, 2024 21:32
Offscreen rendering script (unity | c#) | render camera view to texture | save texture as png
using System.Collections; using System.Collections.Generic;
using System.IO; using UnityEngine;
/// <summary>
/// Attach this script to an empty gameObject. Create a secondary camera
/// gameObject for offscreen rendering (not your main camera) and connect it
/// with this script. Offscreen camera should have a texture object attached to it.
/// OffscreenCamera texture object is used for rendering (please see camera properties).
/// </summary>
public class OffscreenRendering : MonoBehaviour {
@tracker1
tracker1 / 01-directory-structure.md
Last active April 15, 2024 13:58
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used