Skip to content

Instantly share code, notes, and snippets.

View Oyshoboy's full-sized avatar
🦄
Magic

Oleg Smirnoff Oyshoboy

🦄
Magic
View GitHub Profile
@Oyshoboy
Oyshoboy / ElytraModel.java
Created May 13, 2024 02:08 — forked from samsartor/ElytraModel.java
Code for simulating the elytra item in Minecraft
/**
* An accurate simulation of the elytra item as of Minecraft 15w41b
*/
public class ElytraModel
{
public int glideTime;
public int damageTaken;
public double posX;
public double posY;
/*
! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
@Oyshoboy
Oyshoboy / TrajectoryProjector.cs
Last active February 19, 2022 11:21
Useful and lightweight tweak for Unity 3d, that's allows to draw trajectories for physics projectiles based on velocity and gravity. Good for teleporting UI for VR or projectiles prediction. Full repo is here: https://github.com/Oyshoboy/SimpleTrajectoryProjector
using System.Collections.Generic;
using UnityEngine;
public enum TrajectoryDirections
{
RollingOut,
RollingIn
}
public enum TrajectoryState
@Oyshoboy
Oyshoboy / SimpleCameraControl.cs
Last active February 18, 2022 08:43
A simple , but smooth flying camera controller for unity, with all basic features and configurable properties.
using System.Collections.Generic;
using UnityEngine;
public class SimpleCameraControl : MonoBehaviour
{
#region Variables
[Header("Fov Settings")] private float _currFov = 90;
[SerializeField] private float _translationSpeed = 2;
public float fovSpeedMod = 5;
[Header("Camera")] public Camera recordingCamera;
[Header("Smooth Movement")] public KeyCode speedIncreaseKey = KeyCode.LeftAlt;
@Oyshoboy
Oyshoboy / repo-reset.md
Created March 31, 2021 07:10 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A