Gist is a nice service. We can write code so easily and manage files as repository.
But bad points are …
- Many repository
- Gist destributes random hash to perticular gists (repositories).
- So difficult to find or remember contents as repository.
#ifndef __QUATERNION_INCLUDED__ | |
#define __QUATERNION_INCLUDED__ | |
#define QUATERNION_IDENTITY float4(0, 0, 0, 1) | |
#ifndef PI | |
#define PI 3.14159265359f | |
#endif | |
// Quaternion multiplication |
Shader "Name" { | |
Properties { | |
_Name ("display name", Range (min, max)) = number | |
_Name ("display name", Float) = number | |
_Name ("display name", Int) = number | |
_Name ("display name", Color) = (number,number,number,number) | |
_Name ("display name", Vector) = (number,number,number,number) |
/************************************************************************************ | |
Content : First-person view test application for Oculus Rift | |
Created : 19th June 2015 | |
Authors : Tom Heath | |
Copyright : Copyright 2015 Oculus, Inc. All Rights reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at |
## Photon Methods | |
**public class Blank : Photon.PunBehaviour** | |
instead of mono behavior, use this to receive photon callbacks in your script. | |
**public override void OnLeftRoom()** | |
An example of overriding a punbehavior callback |
Gist is a nice service. We can write code so easily and manage files as repository.
But bad points are …
using UnityEngine; | |
namespace Ditzelgames | |
{ | |
public static class PhysicsHelper | |
{ | |
public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force) | |
{ | |
if (force == 0 || velocity.magnitude == 0) |
using BovineLabs.Entities.Systems; | |
using Unity.Burst; | |
using Unity.Entities; | |
using Unity.Jobs; | |
using Unity.Collections; | |
using Unity.Physics; | |
using Unity.Physics.Systems; | |
using UnityEngine; | |
[UpdateAfter(typeof(BuildPhysicsWorld)), UpdateBefore(typeof(EndFramePhysicsSystem))] |
MarchingCubesGPU.cs: | |
... | |
// DrawProceduralIndirect | |
ComputeBuffer argsBuffer; | |
[StructLayout(LayoutKind.Sequential)] | |
struct DrawCallArgBuffer | |
{ | |
public const int size = | |
sizeof(int) + | |
sizeof(int) + |
# Carve legends into keycaps. | |
# | |
# This script uses Intersect (knife) to make accurate cuts. The downside is you need to convert | |
# a text object into a mesh and extrude by just the right amount. We can do this for caps since | |
# we know how tall the cap-well is. | |
# | |
# Unlike knife-project; this doesn't mess with context, view3d, projections, etc. | |
# | |
# TODO: save some custom data to layout the keyboard for renderin. | |
import bpy |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Rendering; | |
namespace Katas.Experimental | |
{ | |
public class WorldSpaceUIDocument : MonoBehaviour, IPointerMoveHandler, IPointerUpHandler, IPointerDownHandler, | |
ISubmitHandler, ICancelHandler, IMoveHandler, IScrollHandler, ISelectHandler, IDeselectHandler, IDragHandler |