Update Examples

This commit is contained in:
2026-10-25 12:04:24 -07:00
parent 0c116b8c60
commit b6551ad24c
218 changed files with 224 additions and 13 deletions

3
RaycastRay/README.md Normal file
View File

@ -0,0 +1,3 @@
Ray casting from a logic tree.
- Press Left or Right arrow keys to cast a ray; results print to the debug console.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Screen-to-world coordinate conversion.
- Click the left mouse button to project the mouse position into world space; results show as canvas text.

View File

@ -15,7 +15,7 @@ class MoveBoneFK extends iron.Trait {
// Fetch armature animation // Fetch armature animation
var anim = cast(object.children[0].animation, BoneAnimation); var anim = cast(object.children[0].animation, BoneAnimation);
// Fetch bone // Fetch bone
var bone = anim.getBone("mixamorig:RightLnx"); var bone = anim.getBone("mixamorig:RightArm");
// Manipulating bone in local space // Manipulating bone in local space
//var m = anim.getBoneMat(bone); //var m = anim.getBoneMat(bone);
@ -27,7 +27,7 @@ class MoveBoneFK extends iron.Trait {
// Manipulating bone in world space // Manipulating bone in world space
anim.notifyOnUpdate(function() { anim.notifyOnUpdate(function() {
// Get bone mat in world space // Get bone mat in world space
var m = anim.getAbsWorldMat(bone); var m = anim.getAbsWorldMat(anim.skeletonMats, bone);
// Decompose transform // Decompose transform
var loc = new Vec4(); var loc = new Vec4();
var scl = new Vec4(); var scl = new Vec4();
@ -39,7 +39,7 @@ class MoveBoneFK extends iron.Trait {
// Compose world matrix // Compose world matrix
m.compose(loc, rot, scl); m.compose(loc, rot, scl);
// Set bone matrix from world matrix // Set bone matrix from world matrix
anim.setBoneMatFromWorldMat(m, bone); anim.setBoneMatFromWorldMat(anim.skeletonMats, m, bone);
}); });
}); });
} }

View File

@ -21,7 +21,7 @@ class MoveBoneIK extends iron.Trait {
anim.notifyOnUpdate(function() { anim.notifyOnUpdate(function() {
goal.set(tr.worldx(), tr.worldy(), tr.worldz()); goal.set(tr.worldx(), tr.worldy(), tr.worldz());
// Align skeleton to touch the goal // Align skeleton to touch the goal
anim.solveIK(bone, goal); anim.solveIK(anim.skeletonMats, bone, goal);
}); });
}); });
} }

View File

@ -0,0 +1,4 @@
Skeletal animation driven by the scene timeline.
- The mixamo armature animation starts automatically on load.
- Watch the character play its animation.

3
animation_uv/README.md Normal file
View File

@ -0,0 +1,3 @@
UV animation of material texture coordinates on the cube, sphere and plane.
- Runs automatically; watch the textures scroll.

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Call Plugin class exposed from Haxe // Call Plugin class exposed from Haxe
var plugin = new arm.Plugin(); var plugin = new lnx.Plugin();
plugin.hello(); plugin.hello();
var scene = plugin.scene(); var scene = plugin.scene();

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
dev_logicnode/README.md Normal file
View File

@ -0,0 +1,3 @@
Development test scene for logic nodes on a single cube.
- Runs automatically; check the debug console for node output.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
Endless runner.
- The character runs forward automatically, tiles spawn endlessly.
- Use the Left/Right arrow keys (or A and D) to move between lanes.
- Collect the gems.

Binary file not shown.

View File

@ -1,11 +1,16 @@
{ {
"rp_bloom": true, "rp_bloom": true,
"rp_chromatic_aberration": true,
"rp_dynres": false, "rp_dynres": false,
"rp_fsr1": false,
"rp_fsr1_sharpness": 0.25,
"rp_gi": false, "rp_gi": false,
"rp_motionblur": true, "rp_motionblur": true,
"rp_shadowmap_cascade": 1024, "rp_shadowmap_cascade": 1024,
"rp_shadowmap_cube": 512, "rp_shadowmap_cube": 512,
"rp_ssgi": true, "rp_ss_refraction": true,
"rp_ssao": true,
"rp_ssgi": false,
"rp_ssr": true, "rp_ssr": true,
"rp_supersample": 1.0, "rp_supersample": 1.0,
"window_h": 540, "window_h": 540,

View File

@ -0,0 +1,4 @@
Multi-touch input test using a Haxe trait.
- Touch or click and drag on the canvas to move the cube.
- On a touch device, additional touch points are tracked separately.

4
input_sensor/README.md Normal file
View File

@ -0,0 +1,4 @@
Device sensor input test using a Haxe trait.
- View on a device with sensors (accelerometer).
- Sensor readings drive the cube; check the console for values.

Binary file not shown.

Binary file not shown.

4
light_area/README.md Normal file
View File

@ -0,0 +1,4 @@
Area light lighting a grid of cubes.
- The light animates over the surface.
- WASD keys and mouse to navigate.

Binary file not shown.

3
light_ies/README.md Normal file
View File

@ -0,0 +1,3 @@
IES light profiles projected on spheres and a wall.
- WASD keys and mouse to navigate.

Binary file not shown.

3
light_probes/README.md Normal file
View File

@ -0,0 +1,3 @@
Reflection probe rendering - reflective spheres sample a cubemap probe.
- WASD keys and mouse to navigate.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Reflection cubemap probe sampling on spheres.
- WASD keys and mouse to navigate.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Reflection plane probes under animated characters.
- WASD keys and mouse to navigate.

3
load_screen/README.md Normal file
View File

@ -0,0 +1,3 @@
Custom loading screen displayed while the scene loads.
- Watch the load screen, then the cube appears.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Minimal logic tree that prints Hello World.
- Check the console output on start.

3
logic_break/README.md Normal file
View File

@ -0,0 +1,3 @@
Breakable physics joints on cylinders stacked between boxes.
- Watch the structure break and collapse on its own.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Camera panning with the mouse.
- Hold the left mouse button and drag to pan the camera.

View File

@ -0,0 +1,3 @@
Camera zoom.
- Scroll the mouse wheel to zoom the camera in and out.

3
logic_canvas/README.md Normal file
View File

@ -0,0 +1,3 @@
Canvas UI driven by a logic tree.
- Press Space to cycle through the UI element actions.

Binary file not shown.

View File

@ -0,0 +1,3 @@
A Haxe trait sends an event; a logic tree receives it and moves the cube.
- Runs automatically on start.

View File

@ -0,0 +1,3 @@
Global event sent from one object's logic tree to another.
- Press the Left arrow key to send the event; the second cube responds.

4
logic_gamepad/README.md Normal file
View File

@ -0,0 +1,4 @@
Gamepad input demo.
- Connect a gamepad and move a stick to rotate Suzanne.
- A virtual gamepad overlay is shown when no gamepad is connected.

Binary file not shown.

4
logic_gate/README.md Normal file
View File

@ -0,0 +1,4 @@
Trigger-volume gate using a first-person controller.
- WASD keys to walk, mouse to look.
- Walk into the trigger zone to open and close the animated gate.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Rigid-body contact detection between the red and blue cubes.
- Watch the cube fall; contact info is printed to the debug console.

3
logic_keyboard/README.md Normal file
View File

@ -0,0 +1,3 @@
Keyboard node test.
- Press Space repeatedly; each press triggers the connected node actions on the cube and prints to the debug console.

Binary file not shown.

View File

@ -0,0 +1,3 @@
A variable linked between node trees.
- Runs automatically; check the debug console.

3
logic_loadurl/README.md Normal file
View File

@ -0,0 +1,3 @@
Loads a URL from a logic tree.
- Press A, B or C to load a different page in the browser.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Mouse lock and hide.
- Press CapsLock to lock and hide the cursor; Escape releases it.

4
logic_pong/README.md Normal file
View File

@ -0,0 +1,4 @@
A pong game built entirely from logic trees and physics.
- Use the Left and Back keys to move your bat.
- Out-score the AI bat; the score text updates on screen.

Binary file not shown.

Binary file not shown.

View File

@ -1 +1,3 @@
Check console Searches the scene tree for objects by name.
- Check the debug console for the found objects.

3
logic_script/README.md Normal file
View File

@ -0,0 +1,3 @@
Inline HScript node computing sin() of its inputs each frame.
- Check the debug console for the traced values.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Applies a transform to the cube every frame from a logic tree.
- Watch the cube move; check the debug console.

View File

@ -21,6 +21,7 @@ class Macros {
else if( Context.defined('kha_html5') ) 'html5'; else if( Context.defined('kha_html5') ) 'html5';
else Context.fatalError('Only krom and html5 are supported targets for this project', pos ); else Context.fatalError('Only krom and html5 are supported targets for this project', pos );
var dir = Sys.getCwd() + target; var dir = Sys.getCwd() + target;
if( !FileSystem.exists('$dir/Scene.lnx') ) dir = '$dir/data';
var files = FileSystem.readDirectory(dir); var files = FileSystem.readDirectory(dir);
var sceneData : TSceneFormat = null; var sceneData : TSceneFormat = null;
var meshes = new Array<String>(); var meshes = new Array<String>();

Some files were not shown because too many files have changed in this diff Show More