It took time to get the code working correctly. This is rope mesh generator and spring mechanic.
create MeshIstance3D
- mesh > new ImmediateMesh
#links:
@tool | |
extends MeshInstance3D | |
@export var rope_length: float = 5.0 # Total length of the rope | |
@export var segments: int = 20 # Number of segments | |
@export var radius: float = 0.1 # Thickness of the rope | |
@export var sides: int = 8 # Number of sides for the rope's cross-section | |
func _ready() -> void: | |
generate_rope() |
@tool | |
extends MeshInstance3D | |
# this is for ImmediateMesh | |
# works uv align but scale does not work. | |
# Rope properties | |
@export var rope_width: float = 0.1 # Radius of the rope | |
@export var resoulution: int = 8 # Number of vertices around the rope's circumference | |
@export var uv_scale: Vector2 = Vector2(1.0, 1.0) # UV scaling factor | |
@export var texture_height_to_width: float = 1.0 # Texture aspect ratio (height/width) |
It took time to get the code working correctly. This is rope mesh generator and spring mechanic.
create MeshIstance3D
- mesh > new ImmediateMesh
#links:
bl_info = { | |
"name": "Test Build", | |
"category": "3D View", | |
"author": "lightnet", | |
"blender": (4, 4, 0), | |
"version": (0, 0, 1), | |
"description": "Test Script", | |
"doc_url": "", | |
"tracker_url": "", | |
} |
Blender 4.4.x
Testing how node editor works. Trying to make simple as possible but the register and unregister has some bug to handle remove nodes.
Simple physics collision 3d.
Raylib 5.5
W,A,S,D = movement. Space = jump.
Notes:
#define WIN32_LEAN_AND_MEAN | |
#define _WINSOCK_DEPRECATED_NO_WARNINGS | |
#define NOGDI | |
#define NOUSER | |
#define MMNOSOUND | |
#include "raylib.h" | |
#include "raymath.h" | |
#include <stdio.h> | |
#include <stdlib.h> |
Ported to mineccraft clone base on javascript. https://www.youtube.com/watch?v=_aK-1L-GC6I&list=PLtzt35QOXmkKALLv9RzT8oGwN5qwmRjTo&index=5
simple collision detect but still need work. move around but input bugged a bit.
// parent | |
// https://www.flecs.dev/flecs/md_docs_2Relationships.html#iterate-all-children-for-a-parent | |
// | |
#include "flecs.h" | |
int main(){ | |
// Initialize Flecs world | |
ecs_world_t *world = ecs_init(); | |
ecs_entity_t parent = ecs_entity(world, {.name = "Parent"}); |
/* | |
Credits: | |
* https://github.com/juliangruber/stream | |
* https://gist.github.com/4poc/1454516 | |
*/ | |
import http from 'http'; | |
import path from 'path'; | |
import fs from 'fs'; | |
import mime from 'mime'; |