Skip to content

Instantly share code, notes, and snippets.

@kkukshtel
kkukshtel / export_specific_layers.lua
Created August 6, 2023 16:27
toggles the visibility of layers in an aseprite file and exports the sprite with those layers visible only - can do multiple exports as part of a single script run as well
-- Obtain the active sprite
local spr = app.activeSprite
if not spr then
return app.alert("There is no active sprite!")
end
-- Extract the directory from the sprite's filename
local spritePath = spr.filename
local directory = spritePath:match("^(.*[/\\])")
if not directory or directory == "" then
@kkukshtel
kkukshtel / ffmpeg-hap-readme.md
Created December 11, 2017 20:27 — forked from dlublin/ffmpeg-hap-readme.md
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@kkukshtel
kkukshtel / DebugText.cs
Last active September 12, 2019 20:32
Add text into your Unity Game/Scene view using only a script. Basically Debug.Log for runtime text.
//by kyle kukshtel
//sample usage of DebugText.cs
using UnityEngine;
using System.Collections.Generic;
public static class DebugText
{
static float defaultXScale = .3f;
static float defaultYScale = .3f;
@kkukshtel
kkukshtel / SaveLoad.cs
Last active September 17, 2020 19:07
Super easy saving/loading of binary data for Unity games
using UnityEngine;
using System.Collections.Generic;
using System;
using System.IO;
using System.Text;
// Super easy saving/loading of binary data for Unity games
// by @kkukshtel
// License: Do whatever!
@kkukshtel
kkukshtel / VerletMovement.cs
Last active September 5, 2016 01:53
Simple 2D Verlet Movement for Unity C#
using UnityEngine;
using System.Collections;
// by kyle kukshtel
// ported from playscii's game_object move code
// http://vectorpoem.com/playscii/
public class VerletMovement : MonoBehaviour
{
//accleration per update from player movement