This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"1": { | |
"probability": 0.2373158756137479, | |
"name": "I", | |
"next": { | |
"2": { | |
"probability": 0.09345794392523363, | |
"name": "ii", | |
"next": { | |
"1": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"1": { | |
"probability": 0.22480620155038752, | |
"name": "I", | |
"next": { | |
"2": { | |
"probability": 0.08823529411764704, | |
"name": "ii", | |
"next": { | |
"1": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var material = new THREE.MeshBasicMaterial({ | |
color: 0xff0000, | |
shading: THREE.SmoothShading, | |
transparent: true, | |
blending: THREE.CustomBlending, | |
blendEquation: THREE.MaxEquation, | |
}); | |
material.needsUpdate = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
material = new THREE.MeshBasicMaterial({ | |
color: 0xff0000, | |
shading: THREE.SmoothShading, | |
transparent: true, | |
blending: THREE.CustomBlending, | |
blendEquation: THREE.MaxEquation, | |
}); | |
material.needsUpdate = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override Vector3 GetThrowVelocity() | |
{ | |
var device = GetDevice(); | |
// basically to calc throw velocity: | |
// 1) set phantom volume to controller pos | |
// 2) set its velocity calc the velocity point of throwing | |
var rb = throwVolume; | |
rb.transform.position = transform.position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v2f vert (appdata v) | |
{ | |
v2f o; | |
v.vertex.x = frac(v.vertex.x + frac(_Time.y * .1)); | |
//v.vertex.x = frac(v.vertex.x); | |
float cSize = _MainTex_TexelSize.z; | |
float4 cCd = float4(v.vertex.x, 0, 0, 0); | |
//cCd.x = floor(cCd.x * cSize) / cSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public struct AudioPlayerParams | |
{ | |
public float minDistance; | |
public float maxDistance; | |
public float volume; | |
public bool dopplerEnabled; | |
public bool autoPlay; // auto play when it starts? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class #SCRIPTNAME# : MonoBehaviour | |
{ | |
void Start () | |
{ | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem: you are making an AI that goes to a location, stops for 1 second, then starts again | |
IEnumerator DoCoroutine() { | |
// go to a location | |
Vector3 randomDestination = GetRandomLocation(); | |
float walkTotalTime = 1.0; | |
// walk towards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input that you pass in, however unity does it | |
uniform vec2 uvTouchPos; | |
uniform float circleRadius; | |
// the fragment shader basically tells the GPU what to color that exact pixel on screen | |
// the UV is what texture coordinate you are looking at | |
vec4 FragColor( vec2 uv ) | |
{ | |
// find out how far you are from touch | |
float distanceToTouch = length( uv - uvTouchPos ); |