Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / threejs.txt
Last active May 29, 2021 15:26
three.js notes webgl javascript
*** OBJLoader ***
PROBLEM:
default is flat/faceted shading?
need to set shading to 2:
SOLUTION:
objLoader.load('model.obj', function (object)
{
object.traverse( function (child)
@unitycoder
unitycoder / online-tools.md
Last active November 13, 2026 08:32
Online Tools And Converters
@unitycoder
unitycoder / run.bat
Last active December 16, 2019 14:17
Run Chrome Locally with --allow-file-access-from-files parameter from .bat batch file
REM runs chrome to view index.html in currend directory, with local file access allowed
start chrome.exe "%cd%/index.html" --allow-file-access-from-files
@unitycoder
unitycoder / SmartSheet.txt
Last active June 20, 2019 10:14
SmartSheet Notes UX
General
- Browser only, always need to login daily
- Browser only, so top bar is wasted space for browser toolbar
- Apparently mo autosave like google cloud spreadsheet, so if browser crashes or is closed, lost all work
- If 2 people edit same row in spreadsheet, only latest changes are saved, without warnings!
- Cannot use ctrl+mousewheel to resize screen (and there is no zoom tool)
- Top banner ads for their own services and tools "show your leadership with this example dashboard check link"
- Spread sheet saving results some kind of page refresh, so your position in the list is lost
- slow scrolling for large "200 rows" grid table (keeps jumping upwards on each scroll down while loading data?)
- Starts to get really slow on bigger (+100 rows) documents, would be just easier and faster to use Excel at this point
@unitycoder
unitycoder / TestGradient.cs
Created March 2, 2019 09:12
Gradient Texture Maker Example
// requires this script: https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Texture/GradientTextureMaker.cs
using UnityEngine;
public class TestGradient : MonoBehaviour
{
public Color[] colors;
public FilterMode filterMode = FilterMode.Point;
public TextureWrapMode wrapMode = TextureWrapMode.Clamp;
public bool isLinear = false;
@unitycoder
unitycoder / AppVeyor.txt
Last active August 10, 2025 19:14
AppVeyor Github Automatic Build and Releases
Settings (from UI)
Note: You can use web UI to adjust most settings, OR use appveyor.yml in your repo.
(cannot use both, except for a few limited settings. using yml file allows some advanced settings that are not available in the web UI)
General
- Project name
- Next Build : You only need to adjust this, if you do builds manually (and the previous build or release already exists)
- Branches to build: can set selected branches, "master"
- [x] do not build tags
- [x] Do not build feature branches with open Pull Requests
@unitycoder
unitycoder / shadow-caster-issue.txt
Created February 22, 2019 09:58
Shadow Disappears from Custom Shadow Caster - Geometry Shader
Something wrong with queue
- try setting regular pass to alphatest, then shadows work?
@unitycoder
unitycoder / PrecalcGradient.cs
Created February 22, 2019 09:24
Faster than Gradient.evaluate - precalculate values to lut array
Color32[] gradientLUT;
void PrecalcGradient()
{
gradientLUT = new Color32[256];
for (int i = 0; i < 256; i++)
{
gradientLUT[i] = gradient.Evaluate((float)i / 255f);
}