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
import { createRef, HTMLAttributes, useEffect, useState } from "react" | |
const positions = [ | |
-1, -1, // Bottom left | |
1, -1, // Bottom right | |
-1, 1, // Top left | |
1, 1 // Top right | |
]; | |
function createShader(gl: WebGLRenderingContext, type: GLenum, source: string): WebGLShader | null { |
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
local profiler = { | |
call_stack = {}, -- Stack to keep track of active function calls | |
timings = {}, -- Stores the total time spent in each function | |
call_counts = {} -- Stores how many times each function was called | |
} | |
local function get_time() | |
return os.clock() | |
end |
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
--[[ | |
THIS IS A LIBRARY THAT SCANS FOR THE SURFACE OF BODIES OF WATER IN A SECLUDED AREA. | |
IT IS USED TO FIND RANDOM POSITIONS IN WATER FOR ENTITIES TO SPAWN IN. | |
OR TO CHECK IF A SPECIFIC POSITION IS IN WATER. | |
/!\ IT IS HIGHLY RECOMMENDED TO CALL THIS FUNCTION ONCE AND STORE THE RESULT AS IT A VERY INTENSIVE FUNCTION! | |
EXAMPLE USAGE: | |
local origin = landmark.get("land_fish1") -- The origin point of the scan | |
local scan_precision = 100 -- The precision of the scan, higher = more accurate but slower |
OlderNewer