float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
This file contains hidden or 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
| // converted with chatGPT | |
| // https://github.com/keijiro/Metawire/blob/main/Packages/jp.keijiro.metawire/Editor/Line.cs | |
| // linq | |
| public void Generate(Mesh mesh) | |
| { | |
| var p = Enumerable.Range(0, Segments + 1) | |
| .Select(i => (float)i / Segments); | |
| var idx = Enumerable.Range(0, Segments) |
This file contains hidden or 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
| // created by chatGPT | |
| using UnityEngine; | |
| using UnityEditor; | |
| public class RemoveDuplicateSurfaces : EditorWindow | |
| { | |
| [MenuItem("Tools/Remove Duplicate Surfaces")] | |
| static void Init() | |
| { | |
| RemoveDuplicateSurfaces window = (RemoveDuplicateSurfaces)EditorWindow.GetWindow(typeof(RemoveDuplicateSurfaces)); |
This file contains hidden or 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
| // chatGPT | |
| This system of equations has two unknowns, x and y. To solve for these unknowns, we can use a method called elimination. | |
| First, we can rewrite the equations so that the x terms are on one side and the y terms are on the other side. This will make it easier to eliminate one of the variables. The equations become: | |
| -1x + y = 0 | |
| 1x + y = 1 | |
| Next, we can add the two equations together. This will eliminate the y terms and leave us with an equation in terms of x. The equations become: |
This file contains hidden or 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
| // https://stevencraeynest.wordpress.com/2013/03/29/easy-volumetric-explosion-in-unity3d/ | |
| Shader "Custom/Explosion" | |
| { | |
| Properties | |
| { | |
| _RampTex ("Color Ramp", 2D) = "white" {} | |
| _DispTex ("Displacement Texture", 2D) = "gray" {} | |
| _Displacement ("Displacement", Range(0, 1.0)) = 0.1 | |
| _ChannelFactor ("ChannelFactor (r,g,b)", Vector) = (1,0,0) | |
| _Range ("Range (min,max)", Vector) = (0,0.5,0) |
This file contains hidden or 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
| // created by chatGPT | |
| const fetch = require('node-fetch'); | |
| const parser = require('rss-parser'); | |
| // Replace this with the URL of the RSS feed you want to fetch | |
| const RSS_FEED_URL = 'http://example.com/rss'; | |
| // Set the interval to 1 hour (in milliseconds) | |
| const FETCH_INTERVAL = 1 * 60 * 60 * 1000; |
- extract files from .gam with https://kippykip.com/index.php?threads/cextract-the-games-factory-multimedia-fusion-game-extractor-unprotector.498/
- edit 0C_Music.mus in hex editor, remove all bytes before "MThd"
- save, rename as .mid
This file contains hidden or 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
| const os = require('os'); | |
| // Get the network interfaces object | |
| const interfaces = os.networkInterfaces(); | |
| // Create an array to store the IP addresses | |
| const ipAddresses = []; | |
| // Iterate over the properties in the object | |
| for (const interfaceName in interfaces) { |
This file contains hidden or 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
| // get external IP address using ipify https://stackoverflow.com/questions/20273128/node-js-how-to-get-my-external-ip-address-in-node-js-app/37850722#37850722 | |
| // this code was created by chatGPT | |
| const http = require('http'); | |
| // Set the URL of the request to the ipify API | |
| const options = { | |
| host: 'api.ipify.org', | |
| port: 80, | |
| path: '/?format=json' | |
| }; |
This file contains hidden or 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
| // https://forum.unity.com/threads/let-us-override-functions-of-inputsystemuiinputmodule.867592/#post-8628135 | |
| /// Used to expose the internal function of the Unity.InputSystem to XXXX assembly | |
| using System.Runtime.CompilerServices; | |
| [assembly: InternalsVisibleTo("XXXXX")] |