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
using System; | |
using System.Diagnostics; | |
namespace Clay; | |
public static class Clay | |
{ | |
[CRepr] | |
public struct Array<T> | |
{ |
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 luact = require "main.luact_defold.luact_defold" | |
local Button = luact.component(function(props) | |
return luact.Box { | |
on = props.on, | |
style = { | |
width = 50, | |
height = 50, | |
color = {1, 1, 1, 1}, | |
scale = {1, 1, 1}, |
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
2023-11-16 07:05:26.339 981-1022 WindowManagerShell com.android.systemui V Transition requested: android.os.BinderProxy@511d46e TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=50 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.todo/com.dynamo.android.DefoldActivity } baseActivity=ComponentInfo{com.example.todo/com.dynamo.android.DefoldActivity} topActivity=ComponentInfo{com.example.todo/com.dynamo.android.DefoldActivity} origActivity=null realActivity=ComponentInfo{com.example.todo/com.dynamo.android.DefoldActivity} numActivities=1 lastActiveTime=2778611 supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@265270f} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutout |
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
module ESMLoader { | |
fun load (name : String, imports : string) : Promise(Value) { | |
let {resolve, promise} = | |
Promise.create() | |
let uid = | |
Uid.generate() | |
let content = | |
" |
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
1b. Bug: lifecycle method causes with a comments but no return causes exception in compiler | |
``` | |
component Main { | |
connect App exposing { method } | |
fun componentDidMount { | |
// foo | |
} |
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
using UnityEngine; | |
public class Viewcone : MonoBehaviour | |
{ | |
static readonly int alertScaleID = Shader.PropertyToID("_AlertScale"); | |
static readonly int farViewDistanceID = Shader.PropertyToID("_FarViewDistance"); | |
static readonly int isAttackingID = Shader.PropertyToID("_IsAttacking"); | |
static readonly int nearViewDistanceID = Shader.PropertyToID("_NearViewDistance"); | |
static readonly int originYID = Shader.PropertyToID("_OriginY"); | |
static readonly int viewAngleID = Shader.PropertyToID("_ViewAngle"); |
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
// gray = fully occluded, no enemy visibility. vertical occlusion occurs at < -4 and > +4 units. | |
// green = full enemy visibilty. 0 to 5 units horizontal range. -4 to 0 units vertical range. | |
// half green = partial enemy visibility. 5 to 30 units horizontal range. 0 to +4 units vertical range | |
Shader "Custom/Viewcone" { | |
Properties{ | |
_Color("Color of viewcone",Color) = (1,1,1,1) | |
_Color2("Secondary color of viewcone",Color) = (1,1,1,1) | |
_WarningColor("Color of viewcone when detected",Color) = (1,1,1,1) | |
_AlertColor("Color of viewcone danger area",Color) = (1,1,1,1) |
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 * as Jsx from "../Jsx" | |
import { InputActionId } from "../Document" | |
import { SCALING_FACTOR } from "../constants" | |
import { color, onTick, vec3 } from "../utils" | |
const REPEAT_RATE = 0.075 | |
const stylesheet: Stylesheet = { | |
input: { | |
alignItems: "stretch", |
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 * as Jsx from "../Jsx" | |
import { InputActionId } from "../Document" | |
import { Node } from "../Node" | |
import { FlexDisplay, SCALING_FACTOR } from "../constants" | |
import { color, merge, onTick, slice9, vec3 } from "../utils" | |
const stylesheet = { | |
container: { | |
grow: 1, | |
color: color(1, 1, 1, 1), |
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
## create a nimble dev task | |
## | |
## task dev, "run watcher": | |
## exec "nim c -r watcher.nim <src> <binary>" | |
import osproc, os, tables, times | |
let | |
dir = if paramCount() > 0: paramStr(1) else: "src" | |
bin = if paramCount() > 1: paramStr(2) else: "client" |
NewerOlder