Update Examples
This commit is contained in:
3
RaycastRay/README.md
Normal file
3
RaycastRay/README.md
Normal 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.
3
ScreenToWorld_WorldToScreen/README.md
Normal file
3
ScreenToWorld_WorldToScreen/README.md
Normal 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.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15,7 +15,7 @@ class MoveBoneFK extends iron.Trait {
|
||||
// Fetch armature animation
|
||||
var anim = cast(object.children[0].animation, BoneAnimation);
|
||||
// Fetch bone
|
||||
var bone = anim.getBone("mixamorig:RightLnx");
|
||||
var bone = anim.getBone("mixamorig:RightArm");
|
||||
|
||||
// Manipulating bone in local space
|
||||
//var m = anim.getBoneMat(bone);
|
||||
@ -27,7 +27,7 @@ class MoveBoneFK extends iron.Trait {
|
||||
// Manipulating bone in world space
|
||||
anim.notifyOnUpdate(function() {
|
||||
// Get bone mat in world space
|
||||
var m = anim.getAbsWorldMat(bone);
|
||||
var m = anim.getAbsWorldMat(anim.skeletonMats, bone);
|
||||
// Decompose transform
|
||||
var loc = new Vec4();
|
||||
var scl = new Vec4();
|
||||
@ -39,7 +39,7 @@ class MoveBoneFK extends iron.Trait {
|
||||
// Compose world matrix
|
||||
m.compose(loc, rot, scl);
|
||||
// Set bone matrix from world matrix
|
||||
anim.setBoneMatFromWorldMat(m, bone);
|
||||
anim.setBoneMatFromWorldMat(anim.skeletonMats, m, bone);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ class MoveBoneIK extends iron.Trait {
|
||||
anim.notifyOnUpdate(function() {
|
||||
goal.set(tr.worldx(), tr.worldy(), tr.worldz());
|
||||
// Align skeleton to touch the goal
|
||||
anim.solveIK(bone, goal);
|
||||
anim.solveIK(anim.skeletonMats, bone, goal);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Binary file not shown.
4
animation_timeline/README.md
Normal file
4
animation_timeline/README.md
Normal 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.
|
||||
Binary file not shown.
3
animation_uv/README.md
Normal file
3
animation_uv/README.md
Normal 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.
@ -1,7 +1,7 @@
|
||||
|
||||
// Call Plugin class exposed from Haxe
|
||||
|
||||
var plugin = new arm.Plugin();
|
||||
var plugin = new lnx.Plugin();
|
||||
plugin.hello();
|
||||
|
||||
var scene = plugin.scene();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
dev_logicnode/README.md
Normal file
3
dev_logicnode/README.md
Normal 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.
BIN
ease/ease.blend
BIN
ease/ease.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
game_endlessrun/Bundled/canvas/_themes.json
Normal file
0
game_endlessrun/Bundled/canvas/_themes.json
Normal file
5
game_endlessrun/README.md
Normal file
5
game_endlessrun/README.md
Normal 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.
@ -1,11 +1,16 @@
|
||||
{
|
||||
"rp_bloom": true,
|
||||
"rp_chromatic_aberration": true,
|
||||
"rp_dynres": false,
|
||||
"rp_fsr1": false,
|
||||
"rp_fsr1_sharpness": 0.25,
|
||||
"rp_gi": false,
|
||||
"rp_motionblur": true,
|
||||
"rp_shadowmap_cascade": 1024,
|
||||
"rp_shadowmap_cube": 512,
|
||||
"rp_ssgi": true,
|
||||
"rp_ss_refraction": true,
|
||||
"rp_ssao": true,
|
||||
"rp_ssgi": false,
|
||||
"rp_ssr": true,
|
||||
"rp_supersample": 1.0,
|
||||
"window_h": 540,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
4
input_multitouch/README.md
Normal file
4
input_multitouch/README.md
Normal 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.
|
||||
Binary file not shown.
4
input_sensor/README.md
Normal file
4
input_sensor/README.md
Normal 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
4
light_area/README.md
Normal 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
3
light_ies/README.md
Normal 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
3
light_probes/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Reflection probe rendering - reflective spheres sample a cubemap probe.
|
||||
|
||||
- WASD keys and mouse to navigate.
|
||||
Binary file not shown.
3
light_probes_cubemap/README.md
Normal file
3
light_probes_cubemap/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Reflection cubemap probe sampling on spheres.
|
||||
|
||||
- WASD keys and mouse to navigate.
|
||||
BIN
light_probes_cubemap/_orb.blend
Normal file
BIN
light_probes_cubemap/_orb.blend
Normal file
Binary file not shown.
Binary file not shown.
3
light_probes_plane/README.md
Normal file
3
light_probes_plane/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Reflection plane probes under animated characters.
|
||||
|
||||
- WASD keys and mouse to navigate.
|
||||
Binary file not shown.
Binary file not shown.
3
load_screen/README.md
Normal file
3
load_screen/README.md
Normal 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.
BIN
lod/lod.blend
BIN
lod/lod.blend
Binary file not shown.
3
logic_Hello_World/README.md
Normal file
3
logic_Hello_World/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Minimal logic tree that prints Hello World.
|
||||
|
||||
- Check the console output on start.
|
||||
Binary file not shown.
3
logic_break/README.md
Normal file
3
logic_break/README.md
Normal 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.
0
logic_callgroup/Bundled/canvas/_themes.json
Normal file
0
logic_callgroup/Bundled/canvas/_themes.json
Normal file
Binary file not shown.
3
logic_camera_pan/README.md
Normal file
3
logic_camera_pan/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Camera panning with the mouse.
|
||||
|
||||
- Hold the left mouse button and drag to pan the camera.
|
||||
Binary file not shown.
3
logic_camera_zoom/README.md
Normal file
3
logic_camera_zoom/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Camera zoom.
|
||||
|
||||
- Scroll the mouse wheel to zoom the camera in and out.
|
||||
Binary file not shown.
3
logic_canvas/README.md
Normal file
3
logic_canvas/README.md
Normal 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.
@ -0,0 +1,3 @@
|
||||
A Haxe trait sends an event; a logic tree receives it and moves the cube.
|
||||
|
||||
- Runs automatically on start.
|
||||
|
||||
Binary file not shown.
3
logic_event_global/README.md
Normal file
3
logic_event_global/README.md
Normal 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.
|
||||
Binary file not shown.
Binary file not shown.
4
logic_gamepad/README.md
Normal file
4
logic_gamepad/README.md
Normal 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
4
logic_gate/README.md
Normal 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.
3
logic_get_contacts/README.md
Normal file
3
logic_get_contacts/README.md
Normal 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.
|
||||
Binary file not shown.
3
logic_keyboard/README.md
Normal file
3
logic_keyboard/README.md
Normal 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.
3
logic_linked_variable/README.md
Normal file
3
logic_linked_variable/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
A variable linked between node trees.
|
||||
|
||||
- Runs automatically; check the debug console.
|
||||
Binary file not shown.
3
logic_loadurl/README.md
Normal file
3
logic_loadurl/README.md
Normal 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.
3
logic_mouselock/README.md
Normal file
3
logic_mouselock/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Mouse lock and hide.
|
||||
|
||||
- Press CapsLock to lock and hide the cursor; Escape releases it.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
logic_pong/README.md
Normal file
4
logic_pong/README.md
Normal 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.
@ -1 +1,3 @@
|
||||
Check console
|
||||
Searches the scene tree for objects by name.
|
||||
|
||||
- Check the debug console for the found objects.
|
||||
|
||||
Binary file not shown.
3
logic_script/README.md
Normal file
3
logic_script/README.md
Normal 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.
Binary file not shown.
3
logic_transform/README.md
Normal file
3
logic_transform/README.md
Normal 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.
|
||||
Binary file not shown.
@ -21,6 +21,7 @@ class Macros {
|
||||
else if( Context.defined('kha_html5') ) 'html5';
|
||||
else Context.fatalError('Only krom and html5 are supported targets for this project', pos );
|
||||
var dir = Sys.getCwd() + target;
|
||||
if( !FileSystem.exists('$dir/Scene.lnx') ) dir = '$dir/data';
|
||||
var files = FileSystem.readDirectory(dir);
|
||||
var sceneData : TSceneFormat = null;
|
||||
var meshes = new Array<String>();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user