Skip to content

Instantly share code, notes, and snippets.

View abc3dz's full-sized avatar
🇹🇭
Working from home

ABC3Dz abc3dz

🇹🇭
Working from home
View GitHub Profile
@abc3dz
abc3dz / SteamMain.cs
Created March 1, 2026 13:34
Test connecting steamwork in Ubuntu 24.04 with Godot C#
using Godot;
using Steamworks;
using System;
using System.Runtime.InteropServices;
public partial class SteamMain : Node
{
// ใช้ฟังก์ชัน Internal ตัวเดิมที่เราพิสูจน์แล้วว่าเรียกติด
[DllImport("steam_api", EntryPoint = "SteamInternal_SteamAPI_Init", CallingConvention = CallingConvention.Cdecl)]
private static extern bool SteamInternal_SteamAPI_Init();
@abc3dz
abc3dz / TestEnumFlags.cs
Last active March 5, 2026 01:06
TestEnumFlags tutorial by chat ai
using Godot;
using System;
public partial class TestEnumFlags : Node
{
// ===== แบบที่ 1: enum ธรรมดา =====
public enum NormalAction
{
None = 0,
Left = 1,
@abc3dz
abc3dz / test.gdscript
Last active January 18, 2026 09:37
Testing Steam free app 480
func _init() -> void:
var res : Dictionary = Steam.steamInitEx(480)
print(res)
var player_name: String = Steam.getPersonaName()
print(player_name,"\n")
var game_id:Array=[]
for i in 6:
var ach_name: String = Steam.getAchievementName(i)
var display = Steam.getAchievementDisplayAttribute(ach_name, "name")
var desc = Steam.getAchievementDisplayAttribute(name, "desc")
@abc3dz
abc3dz / r5b.js
Last active May 24, 2025 13:40
resistor by threejs
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { Line2 } from 'three/addons/lines/Line2.js';
import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
import { LineGeometry } from 'three/addons/lines/LineGeometry.js';
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
//interavtive
const raycaster = new THREE.Raycaster();
using Godot;
using System;
public partial class Tadpole : Area3D
{
AnimationPlayer tadpoleAnimationPlayer;
Label clickScoreLabel;
int clickScore = 0;
float moveSpeedX = GD.RandRange(-5,5);
float moveSpeedY = GD.RandRange(-5,5);
body{
color: #61443e;
font-family:Monospace;
font-size:13px;
text-align:center;
margin: 0;
overflow: hidden;
}
#info {