Note for cmake ODE must build first then raylib due to config in ODE conflicts.
raylib 5.5 ode 0.16.6 flecs v4.1.1
KEY_C = enable/disable mouse orbiting mouse motion to rotate camera Q and E keys to rotate the camera’s yaw left and right
| // transform 3d hierarchy matrix4 | |
| import * as THREE from 'three'; | |
| import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; | |
| // import { TransformControls } from 'three/addons/controls/TransformControls.js'; | |
| import { ViewportGizmo } from "three-viewport-gizmo"; | |
| import van from "vanjs-core"; | |
| import { Pane } from 'https://cdn.jsdelivr.net/npm/tweakpane@4.0.5/dist/tweakpane.min.js'; | |
| import { label } from 'three/tsl'; |
| import * as THREE from 'three'; | |
| import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; | |
| // import { TransformControls } from 'three/addons/controls/TransformControls.js'; | |
| import { ViewportGizmo } from "three-viewport-gizmo"; | |
| import van from "vanjs-core"; | |
| import { Pane } from 'https://cdn.jsdelivr.net/npm/tweakpane@4.0.5/dist/tweakpane.min.js'; | |
| import { label } from 'three/tsl'; | |
| function degreeToRadians(degrees) { |
| // sqlite wasm | |
| // <script type="importmap"> | |
| // { | |
| // "imports":{ | |
| // "three":"https://cdn.jsdelivr.net/npm/three@0.183.2/+esm" | |
| // } | |
| // } | |
| // </script> | |
| import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.183.2/+esm'; |
| // sqlite wasm | |
| // <script type="importmap"> | |
| // { | |
| // "imports":{ | |
| // "three":"https://cdn.jsdelivr.net/npm/three@0.183.2/+esm" | |
| // } | |
| // } | |
| // </script> | |
| import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.183.2/+esm'; |
| import {System, Type, World} from 'https://esm.run/@lastolivegames/becsy'; | |
| // import * as THREE from 'https://esm.run/three'; | |
| import van from "vanjs-core"; | |
| class ConfigComponent { | |
| static schema = { | |
| gameSpeed: {type:Type.float32, default: 60}, | |
| isPaused: {type:Type.boolean, default: false}, | |
| }; |
| // =============================================== | |
| // TINY GPT FROM SCRATCH IN PURE JAVASCRIPT | |
| // ~250 lines | No dependencies | Runs in Node.js & Browser | |
| // Educational version with deep comments | |
| // =============================================== | |
| class TinyLLM { | |
| constructor(config = {}) { | |
| // Hyperparameters — feel free to tweak | |
| this.vocabSize = config.vocabSize || 65; // How many tokens exist |
| /********************************************************************* | |
| * raylib 5.5 + raygui – Hex-Bar Progress Bar (100% fill) | |
| * gcc raylib_hex01.c -o hexbar -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 | |
| *********************************************************************/ | |
| #define RAYGUI_IMPLEMENTATION | |
| #include "raylib.h" | |
| #include "raymath.h" | |
| #include "raygui.h" | |
| #include <stdio.h> |
| #define RAYLIB_IMPLEMENTATION // <-- tells raylib to include its source once | |
| #include <raylib.h> | |
| #include <Jolt/Jolt.h> | |
| #include <Jolt/RegisterTypes.h> | |
| #include <Jolt/Core/Factory.h> | |
| #include "Jolt/Physics/PhysicsSettings.h" | |
| #include <Jolt/Core/JobSystemThreadPool.h> | |
| #include <Jolt/Physics/PhysicsSystem.h> |
| #include "raylib.h" | |
| #include <ode/ode.h> | |
| #include <stdio.h> | |
| #include <math.h> // Ensure math.h is included for PI | |
| // Global ODE variables | |
| dWorldID world; | |
| dSpaceID space; | |
| dJointGroupID contactgroup; | |
| dGeomID floorGeom, cube1Geom, cube2Geom; |
Note for cmake ODE must build first then raylib due to config in ODE conflicts.
raylib 5.5 ode 0.16.6 flecs v4.1.1
KEY_C = enable/disable mouse orbiting mouse motion to rotate camera Q and E keys to rotate the camera’s yaw left and right