diff --git a/.gitignore b/.gitignore index 01f30ce..0c6f2a8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,12 @@ */*.blend? */Sources/Main.hx */Sources/arm/node/* -*/khafile.js *.pyc *.DS_Store +khafile.js +node_update_failure.* +_themes.json +.vscode/ +config.arm +_themes.json +_*/ diff --git a/_/README.md b/_/README.md deleted file mode 100644 index e63423c..0000000 --- a/_/README.md +++ /dev/null @@ -1 +0,0 @@ -Note: These examples are not yet implemented. diff --git a/_/material_examples/tessellation.blend b/_/material_examples/tessellation.blend deleted file mode 100644 index dd632bf..0000000 Binary files a/_/material_examples/tessellation.blend and /dev/null differ diff --git a/_/vr_dino/dino.blend b/_/vr_dino/dino.blend deleted file mode 100644 index 7583341..0000000 Binary files a/_/vr_dino/dino.blend and /dev/null differ diff --git a/_/material_examples/README.md b/_material_tesselation/README.md similarity index 100% rename from _/material_examples/README.md rename to _material_tesselation/README.md diff --git a/_material_tesselation/material_tessellation.blend b/_material_tesselation/material_tessellation.blend new file mode 100644 index 0000000..9727a92 Binary files /dev/null and b/_material_tesselation/material_tessellation.blend differ diff --git a/_vr_dino/vr_dino.blend b/_vr_dino/vr_dino.blend new file mode 100644 index 0000000..8533511 Binary files /dev/null and b/_vr_dino/vr_dino.blend differ diff --git a/animation/animation.blend b/animation/animation.blend deleted file mode 100644 index 105b2d5..0000000 Binary files a/animation/animation.blend and /dev/null differ diff --git a/animation_actions/README.md b/animation_actions/README.md new file mode 100644 index 0000000..d580656 --- /dev/null +++ b/animation_actions/README.md @@ -0,0 +1 @@ +Press keyboard `1`, `2`, `3` to change the animation action diff --git a/animation_actions/actions.blend b/animation_actions/actions.blend deleted file mode 100644 index 1162af5..0000000 Binary files a/animation_actions/actions.blend and /dev/null differ diff --git a/animation_actions/animation_actions.blend b/animation_actions/animation_actions.blend new file mode 100644 index 0000000..8a85b37 Binary files /dev/null and b/animation_actions/animation_actions.blend differ diff --git a/animation_blend/README.md b/animation_blend/README.md new file mode 100644 index 0000000..c4f0f30 --- /dev/null +++ b/animation_blend/README.md @@ -0,0 +1 @@ +Hold keyboard `W`, `S` to blend between animations diff --git a/animation_blend/animation.blend b/animation_blend/animation.blend deleted file mode 100644 index 3607a3b..0000000 Binary files a/animation_blend/animation.blend and /dev/null differ diff --git a/animation_blend/animation_blend.blend b/animation_blend/animation_blend.blend new file mode 100644 index 0000000..d29c7c8 Binary files /dev/null and b/animation_blend/animation_blend.blend differ diff --git a/animation_bonechild/README.md b/animation_bonechild/README.md new file mode 100644 index 0000000..3ee5ba9 --- /dev/null +++ b/animation_bonechild/README.md @@ -0,0 +1,3 @@ +- Hand object is parented to armature bone +- Sword is parented to Hand object +- Press `X` to swap weapons diff --git a/animation_bonechild/animation.blend b/animation_bonechild/animation.blend deleted file mode 100644 index f391d93..0000000 Binary files a/animation_bonechild/animation.blend and /dev/null differ diff --git a/animation_bonechild/animation_bonechild.blend b/animation_bonechild/animation_bonechild.blend new file mode 100644 index 0000000..3102813 Binary files /dev/null and b/animation_bonechild/animation_bonechild.blend differ diff --git a/animation_instanced/README.md b/animation_instanced/README.md new file mode 100644 index 0000000..f2b3c29 --- /dev/null +++ b/animation_instanced/README.md @@ -0,0 +1,2 @@ +Use instancing for fast rendering of linked object duplicates. +https://github.com/armory3d/armory/wiki/instancing diff --git a/animation_instanced/animation.blend b/animation_instanced/animation.blend deleted file mode 100644 index 6d95609..0000000 Binary files a/animation_instanced/animation.blend and /dev/null differ diff --git a/animation_instanced/animation_instanced.blend b/animation_instanced/animation_instanced.blend new file mode 100644 index 0000000..09c2c82 Binary files /dev/null and b/animation_instanced/animation_instanced.blend differ diff --git a/animation_movebone/Sources/arm/MoveBoneFK.hx b/animation_movebone/Sources/arm/MoveBoneFK.hx index ddd5243..e647c64 100644 --- a/animation_movebone/Sources/arm/MoveBoneFK.hx +++ b/animation_movebone/Sources/arm/MoveBoneFK.hx @@ -29,7 +29,7 @@ class MoveBoneFK extends iron.Trait { m.setFrom(w); m.translate(10, 0, Math.sin(iron.system.Time.time()) * 50); iw.getInverse(w); - m.multmat2(iw); + m.multmat(iw); }); }); } diff --git a/animation_movebone/animation_movebone.blend b/animation_movebone/animation_movebone.blend new file mode 100644 index 0000000..8d896c9 Binary files /dev/null and b/animation_movebone/animation_movebone.blend differ diff --git a/animation_movebone/movebone.blend b/animation_movebone/movebone.blend deleted file mode 100644 index 935ff4e..0000000 Binary files a/animation_movebone/movebone.blend and /dev/null differ diff --git a/animation_timeline/animation_timeline.blend b/animation_timeline/animation_timeline.blend new file mode 100644 index 0000000..2b90e16 Binary files /dev/null and b/animation_timeline/animation_timeline.blend differ diff --git a/animation_uv/animation_uv.blend b/animation_uv/animation_uv.blend new file mode 100644 index 0000000..4bb646b Binary files /dev/null and b/animation_uv/animation_uv.blend differ diff --git a/animation_uv/uvanim.blend b/animation_uv/uvanim.blend deleted file mode 100644 index f6104d5..0000000 Binary files a/animation_uv/uvanim.blend and /dev/null differ diff --git a/billboard/billboard.blend b/billboard/billboard.blend deleted file mode 100644 index 6e76f34..0000000 Binary files a/billboard/billboard.blend and /dev/null differ diff --git a/call_hx/README.md b/call_hx/README.md new file mode 100644 index 0000000..e5f2c1a --- /dev/null +++ b/call_hx/README.md @@ -0,0 +1,2 @@ +Check console. +https://github.com/armory3d/armory/wiki/js diff --git a/call_hx/Sources/arm/EvalJS.hx b/call_hx/Sources/arm/EvalJS.hx index e09fcc9..0bb95dc 100644 --- a/call_hx/Sources/arm/EvalJS.hx +++ b/call_hx/Sources/arm/EvalJS.hx @@ -5,7 +5,7 @@ class EvalJS { public function new() { // Evaluate bundled JS, usually you would embed JS into .html file instead iron.data.Data.getBlob("my_plugin.js", function(blob:kha.Blob) { - untyped __js__("(1, eval)({0})", blob.toString()); + js.Syntax.code("(1, eval)({0})", blob.toString()); }); } } diff --git a/call_hx/call_hx.blend b/call_hx/call_hx.blend index b805b51..8bf7ae4 100644 Binary files a/call_hx/call_hx.blend and b/call_hx/call_hx.blend differ diff --git a/call_js/README.md b/call_js/README.md new file mode 100644 index 0000000..e5f2c1a --- /dev/null +++ b/call_js/README.md @@ -0,0 +1,2 @@ +Check console. +https://github.com/armory3d/armory/wiki/js diff --git a/call_js/Sources/arm/CallJS.hx b/call_js/Sources/arm/CallJS.hx index dfc2a71..5b70b83 100644 --- a/call_js/Sources/arm/CallJS.hx +++ b/call_js/Sources/arm/CallJS.hx @@ -10,10 +10,10 @@ class CallJS extends iron.Trait { public function new() { super(); - + var mouse = Input.getMouse(); notifyOnUpdate(function() { + // Check mouse button - var mouse = Input.getMouse(); if (!mouse.started()) return; // Pick object at mouse coords @@ -21,10 +21,9 @@ class CallJS extends iron.Trait { // Check if picked object is our Cube if (rb != null && rb.object.name == 'Cube') { - // Raw JS calls - untyped __js__('document.title = "Cube clicked!"'); - untyped __js__('console.log("Testing..");'); + js.Syntax.code('document.title = "Cube clicked!"'); + js.Syntax.code('console.log("Testing..");'); } }); } diff --git a/call_js/call_js.blend b/call_js/call_js.blend index a881888..df781d4 100644 Binary files a/call_js/call_js.blend and b/call_js/call_js.blend differ diff --git a/debug_draw/README.md b/debug_draw/README.md new file mode 100644 index 0000000..dd45c81 --- /dev/null +++ b/debug_draw/README.md @@ -0,0 +1 @@ +Open DebugConsole to enable/disable debug drawing \ No newline at end of file diff --git a/debug_draw/debug_draw.blend b/debug_draw/debug_draw.blend new file mode 100644 index 0000000..1bfd60d Binary files /dev/null and b/debug_draw/debug_draw.blend differ diff --git a/debug_draw/draw.blend b/debug_draw/draw.blend deleted file mode 100644 index 51f1e5f..0000000 Binary files a/debug_draw/draw.blend and /dev/null differ diff --git a/dev_logicnode/dev_logicnode.blend b/dev_logicnode/dev_logicnode.blend new file mode 100644 index 0000000..b8d6156 Binary files /dev/null and b/dev_logicnode/dev_logicnode.blend differ diff --git a/dev_logicnode/logicnode.blend b/dev_logicnode/logicnode.blend deleted file mode 100644 index 858a132..0000000 Binary files a/dev_logicnode/logicnode.blend and /dev/null differ diff --git a/ease/README.md b/ease/README.md new file mode 100644 index 0000000..f4dd2d2 --- /dev/null +++ b/ease/README.md @@ -0,0 +1 @@ +https://armory3d.org/api/iron/system/Ease.html diff --git a/ease/Sources/arm/TweenTest.hx b/ease/Sources/arm/TweenTest.hx new file mode 100644 index 0000000..4e8dbab --- /dev/null +++ b/ease/Sources/arm/TweenTest.hx @@ -0,0 +1,42 @@ +package arm; + +import iron.system.Tween; +#if arm_debug +import armory.trait.internal.DebugDraw; +#end + +class TweenTest extends iron.Trait { + + @prop var ease : Int = 0; + + public function new() { + + super(); + + #if arm_debug + //DebugDraw.notifyOnRender( draw -> draw.bounds( object.transform) ); + #end + + notifyOnInit(tweenUp); + } + + function tweenUp() { + doTween( 15, tweenDown ); + } + + function tweenDown() { + doTween( -15, tweenUp ); + } + + function doTween( z : Float, onDone : Void->Void ) { + Tween.to({ + target: object.transform.loc, + props: { z: z }, + duration: 2.0, + delay: 0.5, + tick: object.transform.buildMatrix, + ease: ease, + done: onDone + }); + } +} diff --git a/ease/ease.blend b/ease/ease.blend new file mode 100644 index 0000000..a316216 Binary files /dev/null and b/ease/ease.blend differ diff --git a/file_read/README.md b/file_read/README.md new file mode 100644 index 0000000..afddf99 --- /dev/null +++ b/file_read/README.md @@ -0,0 +1 @@ +Loads a json file from the `Bundled/` directory. diff --git a/file_read/Sources/arm/ReadFile.hx b/file_read/Sources/arm/ReadFile.hx index 0645cb6..17e272d 100644 --- a/file_read/Sources/arm/ReadFile.hx +++ b/file_read/Sources/arm/ReadFile.hx @@ -1,8 +1,8 @@ package arm; -import iron.Scene; -import iron.data.Data; import armory.trait.internal.CanvasScript; +import iron.data.Data; +import iron.Scene; class ReadFile extends iron.Trait { public function new() { @@ -11,7 +11,7 @@ class ReadFile extends iron.Trait { notifyOnInit(function() { // Relative or absolute path to file - // In this case we load the file placed in the "Bundled/" folder + // In this case we load the file placed in the "Bundled/" directory var file = "my_file.json"; // Load the file asynchronously diff --git a/file_read/file.blend b/file_read/file.blend deleted file mode 100644 index a65a16b..0000000 Binary files a/file_read/file.blend and /dev/null differ diff --git a/file_read/file_read.blend b/file_read/file_read.blend new file mode 100644 index 0000000..4f314f3 Binary files /dev/null and b/file_read/file_read.blend differ diff --git a/file_storage/README.md b/file_storage/README.md new file mode 100644 index 0000000..67975e2 --- /dev/null +++ b/file_storage/README.md @@ -0,0 +1 @@ +https://armory3d.org/api/kha/Storage.html diff --git a/file_storage/storage.blend b/file_storage/file_storage.blend similarity index 100% rename from file_storage/storage.blend rename to file_storage/file_storage.blend diff --git a/file_write/README.md b/file_write/README.md new file mode 100644 index 0000000..654a91c --- /dev/null +++ b/file_write/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/reference#write-json diff --git a/file_write/file.blend b/file_write/file.blend deleted file mode 100644 index e83c4e3..0000000 Binary files a/file_write/file.blend and /dev/null differ diff --git a/file_write/file_write.blend b/file_write/file_write.blend new file mode 100644 index 0000000..8be258d Binary files /dev/null and b/file_write/file_write.blend differ diff --git a/game_bowling/bowling.blend b/game_bowling/bowling.blend deleted file mode 100644 index 185c36f..0000000 Binary files a/game_bowling/bowling.blend and /dev/null differ diff --git a/game_bowling/game_bowling.blend b/game_bowling/game_bowling.blend new file mode 100644 index 0000000..6d155e0 Binary files /dev/null and b/game_bowling/game_bowling.blend differ diff --git a/game_endlessrun/endless.blend b/game_endlessrun/endless.blend deleted file mode 100644 index 9f803bd..0000000 Binary files a/game_endlessrun/endless.blend and /dev/null differ diff --git a/game_endlessrun/game_endless.blend b/game_endlessrun/game_endless.blend new file mode 100644 index 0000000..99a86ba Binary files /dev/null and b/game_endlessrun/game_endless.blend differ diff --git a/graphics_settings/Bundled/canvas/MyCanvas.json b/graphics_settings/Bundled/canvas/MyCanvas.json index e32d29e..3ddac01 100644 --- a/graphics_settings/Bundled/canvas/MyCanvas.json +++ b/graphics_settings/Bundled/canvas/MyCanvas.json @@ -1 +1 @@ -{"name":"untitled","x":0,"y":0,"width":1280,"height":720,"elements":[{"id":2,"type":6,"name":"SSR","event":"","x":40,"y":290,"width":150,"height":44,"rotation":0,"text":"SSR","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":3,"type":6,"name":"SSAO","event":"","x":40,"y":340,"width":150,"height":44,"rotation":0,"text":"SSAO","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":4,"type":6,"name":"Fullscreen","event":"","x":40,"y":90,"width":191,"height":44,"rotation":0,"text":"Fullscreen","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":6,"type":6,"name":"Bloom","event":"","x":40,"y":240,"width":150,"height":44,"rotation":0,"text":"Bloom","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":7,"type":6,"name":"MotionBlur","event":"","x":40,"y":190,"width":177,"height":44,"rotation":0,"text":"Motion Blur","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":8,"type":8,"name":"Shadows","event":"","x":40,"y":140,"width":150,"height":44,"rotation":0,"text":"High;Medium;Low","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":9,"type":10,"name":"ViewDistance","event":"","x":40,"y":390,"width":250,"height":44,"rotation":0,"text":"View Distance","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":10,"type":10,"name":"FoV","event":"","x":40,"y":440,"width":250,"height":44,"rotation":0,"text":"FoV","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":11,"type":0,"name":"Title","event":"","x":20,"y":20,"width":377,"height":44,"rotation":0,"text":"Graphics Settings","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":12,"type":0,"name":"ShadowsTitle","event":"","x":180,"y":140,"width":184,"height":28,"rotation":0,"text":"Shadows","asset":"","color":-6381922,"anchor":0,"parent":null,"children":[],"visible":true},{"id":13,"type":2,"name":"Apply","event":"apply_settings","x":40,"y":490,"width":150,"height":44,"rotation":0,"text":"Apply","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true}],"assets":[]} \ No newline at end of file +{"name":"untitled","x":0,"y":0,"width":1280,"height":720,"elements":[{"id":2,"type":6,"name":"SSR","event":"","x":40,"y":300,"width":150,"height":34,"rotation":0,"text":"SSR","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":3,"type":6,"name":"SSAO","event":"","x":40,"y":340,"width":150,"height":44,"rotation":0,"text":"SSAO","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":4,"type":6,"name":"Fullscreen","event":"","x":40,"y":90,"width":191,"height":24,"rotation":0,"text":"Fullscreen","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":6,"type":6,"name":"Bloom","event":"","x":40,"y":240,"width":150,"height":44,"rotation":0,"text":"Bloom","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":7,"type":6,"name":"MotionBlur","event":"","x":40,"y":190,"width":177,"height":44,"rotation":0,"text":"Motion Blur","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":8,"type":8,"name":"Shadows","event":"","x":40,"y":160,"width":80,"height":20,"rotation":0,"text":"High;Medium;Low","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":9,"type":10,"name":"ViewDistance","event":"","x":40,"y":390,"width":250,"height":44,"rotation":0,"text":"View Distance","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":10,"type":10,"name":"FoV","event":"","x":40,"y":440,"width":250,"height":40,"rotation":0,"text":"FoV","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":11,"type":0,"name":"Title","event":"","x":20,"y":20,"width":260,"height":32,"rotation":0,"text":"Graphics Settings","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true},{"id":12,"type":0,"name":"ShadowsTitle","event":"","x":180,"y":140,"width":184,"height":20,"rotation":0,"text":"Shadows","asset":"","color":-6381922,"anchor":0,"parent":null,"children":[],"visible":true},{"id":13,"type":2,"name":"Apply","event":"apply_settings","x":40,"y":480,"width":80,"height":30,"rotation":0,"text":"Apply","asset":"","color":-1,"anchor":0,"parent":null,"children":[],"visible":true}],"assets":[],"theme":"Default Light"} \ No newline at end of file diff --git a/graphics_settings/Bundled/config.arm b/graphics_settings/Bundled/config.arm index e7cf930..f75078d 100644 --- a/graphics_settings/Bundled/config.arm +++ b/graphics_settings/Bundled/config.arm @@ -8,7 +8,7 @@ "rp_ssgi": true, "rp_ssr": true, "rp_supersample": 1.0, - "window_h": 720, + "window_h": 540, "window_maximizable": false, "window_minimizable": true, "window_mode": 0, @@ -16,5 +16,5 @@ "window_resizable": false, "window_scale": 1.0, "window_vsync": true, - "window_w": 1280 + "window_w": 960 } \ No newline at end of file diff --git a/graphics_settings/README.md b/graphics_settings/README.md new file mode 100644 index 0000000..a73866a --- /dev/null +++ b/graphics_settings/README.md @@ -0,0 +1 @@ +https://armory3d.org/api/armory/data/Config.html diff --git a/graphics_settings/graphics_settings.blend b/graphics_settings/graphics_settings.blend new file mode 100644 index 0000000..c52e2ed Binary files /dev/null and b/graphics_settings/graphics_settings.blend differ diff --git a/graphics_settings/settings.blend b/graphics_settings/settings.blend deleted file mode 100644 index 491a354..0000000 Binary files a/graphics_settings/settings.blend and /dev/null differ diff --git a/input_mouselock/README.md b/input_mouselock/README.md new file mode 100644 index 0000000..1ce955c --- /dev/null +++ b/input_mouselock/README.md @@ -0,0 +1,2 @@ +Click to lock mouse, press ESC to unlock mouse. +https://armory3d.org/api/iron/system/Mouse.html diff --git a/mouse_lock/Sources/arm/LockTrait.hx b/input_mouselock/Sources/arm/LockTrait.hx similarity index 71% rename from mouse_lock/Sources/arm/LockTrait.hx rename to input_mouselock/Sources/arm/LockTrait.hx index 20a07ce..e30b6ed 100644 --- a/mouse_lock/Sources/arm/LockTrait.hx +++ b/input_mouselock/Sources/arm/LockTrait.hx @@ -1,22 +1,23 @@ package arm; import iron.math.Vec4; +import iron.system.Input; class LockTrait extends iron.Trait { + public function new() { + super(); - notifyOnUpdate(function() { - var mouse = iron.system.Input.getMouse(); - var kb = iron.system.Input.getKeyboard(); + var mouse = Input.getMouse(); + var kb = Input.getKeyboard(); + notifyOnUpdate(() -> { if (mouse.started("left")) { mouse.lock(); - } - else if (kb.started("escape")) { + } else if (kb.started("escape")) { mouse.unlock(); } - var cube = iron.Scene.active.getChild("Cube"); if (cube != null) { cube.transform.rotate(Vec4.zAxis(), mouse.movementX * 0.002); diff --git a/input_mouselock/input_mouselock.blend b/input_mouselock/input_mouselock.blend new file mode 100644 index 0000000..7146d73 Binary files /dev/null and b/input_mouselock/input_mouselock.blend differ diff --git a/multitouch/Sources/arm/TouchTrait.hx b/input_multitouch/Sources/arm/TouchTrait.hx similarity index 100% rename from multitouch/Sources/arm/TouchTrait.hx rename to input_multitouch/Sources/arm/TouchTrait.hx diff --git a/input_multitouch/input_multitouch.blend b/input_multitouch/input_multitouch.blend new file mode 100644 index 0000000..0c7f7c4 Binary files /dev/null and b/input_multitouch/input_multitouch.blend differ diff --git a/sensor/Sources/arm/SensorTrait.hx b/input_sensor/Sources/arm/SensorTrait.hx similarity index 100% rename from sensor/Sources/arm/SensorTrait.hx rename to input_sensor/Sources/arm/SensorTrait.hx diff --git a/input_sensor/input_sensor.blend b/input_sensor/input_sensor.blend new file mode 100644 index 0000000..c7022f3 Binary files /dev/null and b/input_sensor/input_sensor.blend differ diff --git a/instancing/README.md b/instancing/README.md new file mode 100644 index 0000000..3a42f1b --- /dev/null +++ b/instancing/README.md @@ -0,0 +1,6 @@ +#### Enable instancing + +- Select object and set `Properties - Object - Armory Props - Instanced Children` property +- Create linked duplicates and parent them to object being instanced + +https://github.com/armory3d/armory/wiki/instancing diff --git a/instancing/inst.blend b/instancing/inst.blend deleted file mode 100644 index f048898..0000000 Binary files a/instancing/inst.blend and /dev/null differ diff --git a/instancing/instancing.blend b/instancing/instancing.blend new file mode 100644 index 0000000..92a9119 Binary files /dev/null and b/instancing/instancing.blend differ diff --git a/light_area/area.blend b/light_area/area.blend deleted file mode 100644 index d9a7341..0000000 Binary files a/light_area/area.blend and /dev/null differ diff --git a/light_area/light_area.blend b/light_area/light_area.blend new file mode 100644 index 0000000..4b57bd1 Binary files /dev/null and b/light_area/light_area.blend differ diff --git a/light_ies/ies.blend b/light_ies/ies.blend deleted file mode 100644 index 9ec9aa4..0000000 Binary files a/light_ies/ies.blend and /dev/null differ diff --git a/light_ies/light_ies.blend b/light_ies/light_ies.blend new file mode 100644 index 0000000..c18bfd8 Binary files /dev/null and b/light_ies/light_ies.blend differ diff --git a/light_probes/reflection_cubemap.blend b/light_probes/reflection_cubemap.blend deleted file mode 100644 index 33e3364..0000000 Binary files a/light_probes/reflection_cubemap.blend and /dev/null differ diff --git a/light_probes/reflection_plane.blend b/light_probes/reflection_plane.blend deleted file mode 100644 index 16b9a1d..0000000 Binary files a/light_probes/reflection_plane.blend and /dev/null differ diff --git a/light_probes_cubemap/light_probes_cubemap.blend b/light_probes_cubemap/light_probes_cubemap.blend new file mode 100644 index 0000000..6864c8c Binary files /dev/null and b/light_probes_cubemap/light_probes_cubemap.blend differ diff --git a/light_probes_plane/light_probes_plane.blend b/light_probes_plane/light_probes_plane.blend new file mode 100644 index 0000000..b59876c Binary files /dev/null and b/light_probes_plane/light_probes_plane.blend differ diff --git a/light_volumetric/README.md b/light_volumetric/README.md new file mode 100644 index 0000000..767e803 --- /dev/null +++ b/light_volumetric/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/screen-effects#volumetric-fog diff --git a/light_volumetric/light_volumetric.blend b/light_volumetric/light_volumetric.blend new file mode 100644 index 0000000..1c95b81 Binary files /dev/null and b/light_volumetric/light_volumetric.blend differ diff --git a/light_volumetric/volumetric.blend b/light_volumetric/volumetric.blend deleted file mode 100644 index 57f8253..0000000 Binary files a/light_volumetric/volumetric.blend and /dev/null differ diff --git a/linked_proxy/README.md b/linked_proxy/README.md new file mode 100644 index 0000000..a8ec405 --- /dev/null +++ b/linked_proxy/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/multiuser#linked-proxy diff --git a/linked_proxy/linked_proxy.blend b/linked_proxy/linked_proxy.blend index 4151d8f..2a83091 100644 Binary files a/linked_proxy/linked_proxy.blend and b/linked_proxy/linked_proxy.blend differ diff --git a/load_screen/load_screen.blend b/load_screen/load_screen.blend index 3ecb6f4..f42dbd9 100644 Binary files a/load_screen/load_screen.blend and b/load_screen/load_screen.blend differ diff --git a/lod/README.md b/lod/README.md new file mode 100644 index 0000000..dacbf91 --- /dev/null +++ b/lod/README.md @@ -0,0 +1 @@ +LOD (level of detail) can be decreased as the model moves away from the viewer. diff --git a/lod/lod.blend b/lod/lod.blend index 0b8120e..8d44aa3 100644 Binary files a/lod/lod.blend and b/lod/lod.blend differ diff --git a/logic_break/logic_break.blend b/logic_break/logic_break.blend new file mode 100644 index 0000000..e6bb5a7 Binary files /dev/null and b/logic_break/logic_break.blend differ diff --git a/logic_callgroup/README.md b/logic_callgroup/README.md new file mode 100644 index 0000000..3c213ac --- /dev/null +++ b/logic_callgroup/README.md @@ -0,0 +1,3 @@ +- Keyboard `C` NodeTreeA calls NodeTreeB, NodeTreeB sets current time to global object property +- Keyboard `V` NodeTreeA prints value of global object property +- Check console output diff --git a/logic_callgroup/logic_callgroup.blend b/logic_callgroup/logic_callgroup.blend new file mode 100644 index 0000000..9c5a5f9 Binary files /dev/null and b/logic_callgroup/logic_callgroup.blend differ diff --git a/logic_camera_pan/logic_camera_pan.blend b/logic_camera_pan/logic_camera_pan.blend new file mode 100644 index 0000000..0038d70 Binary files /dev/null and b/logic_camera_pan/logic_camera_pan.blend differ diff --git a/logic_camera_zoom/logic_camera_zoom.blend b/logic_camera_zoom/logic_camera_zoom.blend new file mode 100644 index 0000000..a7ef430 Binary files /dev/null and b/logic_camera_zoom/logic_camera_zoom.blend differ diff --git a/logic_canvas/logic_canvas.blend b/logic_canvas/logic_canvas.blend index df42d5f..4910739 100644 Binary files a/logic_canvas/logic_canvas.blend and b/logic_canvas/logic_canvas.blend differ diff --git a/graphics_settings/Bundled/canvas/_themes.json b/logic_event_fromhaxe/README.md similarity index 100% rename from graphics_settings/Bundled/canvas/_themes.json rename to logic_event_fromhaxe/README.md diff --git a/logic_event_fromhaxe/Sources/arm/SendEvent.hx b/logic_event_fromhaxe/Sources/arm/SendEvent.hx new file mode 100644 index 0000000..1e5967e --- /dev/null +++ b/logic_event_fromhaxe/Sources/arm/SendEvent.hx @@ -0,0 +1,19 @@ +package arm; + +import armory.system.Event; + +class SendEvent extends iron.Trait { + + public function new() { + + super(); + + var mouse = iron.system.Input.getMouse(); + + notifyOnUpdate(function() { + if (mouse.started("left")) { + Event.send("my_event"); + } + }); + } +} diff --git a/logic_event_fromhaxe/logic_event_fromhaxe.blend b/logic_event_fromhaxe/logic_event_fromhaxe.blend new file mode 100644 index 0000000..8711a21 Binary files /dev/null and b/logic_event_fromhaxe/logic_event_fromhaxe.blend differ diff --git a/logic_event_global/logic_event_global.blend b/logic_event_global/logic_event_global.blend new file mode 100644 index 0000000..9138e4b Binary files /dev/null and b/logic_event_global/logic_event_global.blend differ diff --git a/logic_events/Sources/arm/SendEvent.hx b/logic_event_object/Sources/arm/SendEvent.hx similarity index 100% rename from logic_events/Sources/arm/SendEvent.hx rename to logic_event_object/Sources/arm/SendEvent.hx diff --git a/logic_event_object/logic_event_object.blend b/logic_event_object/logic_event_object.blend new file mode 100644 index 0000000..253e469 Binary files /dev/null and b/logic_event_object/logic_event_object.blend differ diff --git a/logic_events/from_haxe.blend b/logic_events/from_haxe.blend deleted file mode 100644 index 50fd05f..0000000 Binary files a/logic_events/from_haxe.blend and /dev/null differ diff --git a/logic_events/global_event.blend b/logic_events/global_event.blend deleted file mode 100644 index d13f3c9..0000000 Binary files a/logic_events/global_event.blend and /dev/null differ diff --git a/logic_events/object_event.blend b/logic_events/object_event.blend deleted file mode 100644 index d9c557f..0000000 Binary files a/logic_events/object_event.blend and /dev/null differ diff --git a/logic_examples/LoadUrl.blend b/logic_examples/LoadUrl.blend deleted file mode 100644 index 22bc3cf..0000000 Binary files a/logic_examples/LoadUrl.blend and /dev/null differ diff --git a/logic_examples/break.blend b/logic_examples/break.blend deleted file mode 100644 index d168484..0000000 Binary files a/logic_examples/break.blend and /dev/null differ diff --git a/logic_examples/callgroup.blend b/logic_examples/callgroup.blend deleted file mode 100644 index 8a823e8..0000000 Binary files a/logic_examples/callgroup.blend and /dev/null differ diff --git a/logic_examples/camera_pan.blend b/logic_examples/camera_pan.blend deleted file mode 100644 index fae6304..0000000 Binary files a/logic_examples/camera_pan.blend and /dev/null differ diff --git a/logic_examples/camera_zoom.blend b/logic_examples/camera_zoom.blend deleted file mode 100644 index cfe3f75..0000000 Binary files a/logic_examples/camera_zoom.blend and /dev/null differ diff --git a/logic_examples/get_contacts.blend b/logic_examples/get_contacts.blend deleted file mode 100644 index 4d3876c..0000000 Binary files a/logic_examples/get_contacts.blend and /dev/null differ diff --git a/logic_examples/hello_world.blend b/logic_examples/hello_world.blend deleted file mode 100644 index e71a231..0000000 Binary files a/logic_examples/hello_world.blend and /dev/null differ diff --git a/logic_examples/keyboard.blend b/logic_examples/keyboard.blend deleted file mode 100644 index 684c86d..0000000 Binary files a/logic_examples/keyboard.blend and /dev/null differ diff --git a/logic_examples/linked_variable.blend b/logic_examples/linked_variable.blend deleted file mode 100644 index 85a75ac..0000000 Binary files a/logic_examples/linked_variable.blend and /dev/null differ diff --git a/logic_examples/logic_scenetree.blend b/logic_examples/logic_scenetree.blend deleted file mode 100644 index f61288e..0000000 Binary files a/logic_examples/logic_scenetree.blend and /dev/null differ diff --git a/logic_examples/object_rotate.blend b/logic_examples/object_rotate.blend deleted file mode 100644 index 60f09bf..0000000 Binary files a/logic_examples/object_rotate.blend and /dev/null differ diff --git a/logic_examples/object_scale.blend b/logic_examples/object_scale.blend deleted file mode 100644 index 9d339f8..0000000 Binary files a/logic_examples/object_scale.blend and /dev/null differ diff --git a/logic_examples/object_translate.blend b/logic_examples/object_translate.blend deleted file mode 100644 index 6c23562..0000000 Binary files a/logic_examples/object_translate.blend and /dev/null differ diff --git a/logic_examples/pause_trait.blend b/logic_examples/pause_trait.blend deleted file mode 100644 index f594d5d..0000000 Binary files a/logic_examples/pause_trait.blend and /dev/null differ diff --git a/logic_examples/scenes.blend b/logic_examples/scenes.blend deleted file mode 100644 index 0de0108..0000000 Binary files a/logic_examples/scenes.blend and /dev/null differ diff --git a/logic_examples/script.blend b/logic_examples/script.blend deleted file mode 100644 index 29182b9..0000000 Binary files a/logic_examples/script.blend and /dev/null differ diff --git a/logic_examples/set_property.blend b/logic_examples/set_property.blend deleted file mode 100644 index 4a4b4a6..0000000 Binary files a/logic_examples/set_property.blend and /dev/null differ diff --git a/logic_examples/toy_car.blend b/logic_examples/toy_car.blend deleted file mode 100644 index 0d7eaf8..0000000 Binary files a/logic_examples/toy_car.blend and /dev/null differ diff --git a/logic_examples/transform.blend b/logic_examples/transform.blend deleted file mode 100644 index f32771d..0000000 Binary files a/logic_examples/transform.blend and /dev/null differ diff --git a/logic_examples/triggers.blend b/logic_examples/triggers.blend deleted file mode 100644 index 9699e6c..0000000 Binary files a/logic_examples/triggers.blend and /dev/null differ diff --git a/logic_examples/watch_variable.blend b/logic_examples/watch_variable.blend deleted file mode 100644 index 48fa998..0000000 Binary files a/logic_examples/watch_variable.blend and /dev/null differ diff --git a/logic_gamepad/Sources/arm/VirtualGamepad.hx b/logic_gamepad/Sources/arm/VirtualGamepad.hx new file mode 100644 index 0000000..aab1294 --- /dev/null +++ b/logic_gamepad/Sources/arm/VirtualGamepad.hx @@ -0,0 +1,112 @@ +package arm; + +import iron.Trait; +import iron.math.Vec2; +import iron.system.Input; + +using kha.graphics2.GraphicsExtension; + +@:access(iron.system.Gamepad) +class VirtualGamepad extends Trait { + + @prop public var gamepad : Int = 0; + @prop public var radius : Int = 100; + @prop public var offset : Int = 45; + @prop public var sizeRatio : Float = 2.2; + + public var colorA : kha.Color = 0xff888888; + public var colorB : kha.Color = 0xffcf2b43; + + var leftPadX = 0; + var leftPadY = 0; + var rightPadX = 0; + var rightPadY = 0; + var leftStickX = 0; + var leftStickY = 0; + var rightStickX = 0; + var rightStickY = 0; + // var leftStickXLast = 0; + // var leftStickYLast = 0; + // var rightStickXLast = 0; + // var rightStickYLast = 0; + var leftLocked = false; + var rightLocked = false; + var gamepad_ : Gamepad; + + public function new() { + super(); + notifyOnInit(function() { + gamepad_ = Input.getGamepad( gamepad ); + notifyOnUpdate(update); + notifyOnRender2D(render2D); + }); + } + + function update() { + + var r = radius; + var o = offset; + + leftPadX = r + o; + rightPadX = iron.App.w() - r - o; + leftPadY = rightPadY = iron.App.h() - r - o; + + final mouse = Input.getMouse(); + if (mouse.started() ) { + leftLocked = Vec2.distancef(mouse.x, mouse.y, leftPadX, leftPadY) <= r; + } else if (mouse.released()) { + leftLocked = false; + } + if (leftLocked) { + leftStickX = Std.int(mouse.x - leftPadX); + leftStickY = Std.int(mouse.y - leftPadY); + if (Math.sqrt(leftStickX * leftStickX + leftStickY * leftStickY) > r) { + leftStickX = Std.int(r * (leftStickX / Math.sqrt(leftStickX * leftStickX + leftStickY * leftStickY))); + leftStickY = Std.int(r * (leftStickY / Math.sqrt(leftStickX * leftStickX + leftStickY * leftStickY))); + } + } else { + leftStickX = leftStickY = 0; + } + + if (mouse.started() ) { + rightLocked = Vec2.distancef(mouse.x, mouse.y, rightPadX, rightPadY) <= r; + } else if (mouse.released()) { + rightLocked = false; + } + if (rightLocked) { + rightStickX = Std.int(mouse.x - rightPadX); + rightStickY = Std.int(mouse.y - rightPadY); + if (Math.sqrt(rightStickX * rightStickX + rightStickY * rightStickY) > r) { + rightStickX = Std.int(r * (rightStickX / Math.sqrt(rightStickX * rightStickX + rightStickY * rightStickY))); + rightStickY = Std.int(r * (rightStickY / Math.sqrt(rightStickX * rightStickX + rightStickY * rightStickY))); + } + } + else { + rightStickX = rightStickY = 0; + } + + gamepad_.axisListener(0, leftStickX / r); + gamepad_.axisListener(1, leftStickY / r); + gamepad_.axisListener(2, rightStickY / r); + gamepad_.axisListener(3, rightStickX / r); + + // leftStickXLast = leftStickX; + // leftStickYLast = leftStickY; + // rightStickXLast = rightStickX; + // rightStickYLast = rightStickY; + } + + function render2D(g: kha.graphics2.Graphics) { + + var r = radius; + var r2 = Std.int(r / sizeRatio); + + g.color = colorA; + g.fillCircle(leftPadX, leftPadY, r); + g.fillCircle(rightPadX, rightPadY, r); + + g.color = colorB; + g.fillCircle(leftPadX + leftStickX, leftPadY + leftStickY, r2); + g.fillCircle(rightPadX + rightStickX, rightPadY + rightStickY, r2); + } +} diff --git a/logic_gamepad/logic_gamepad.blend b/logic_gamepad/logic_gamepad.blend new file mode 100644 index 0000000..9e683a0 Binary files /dev/null and b/logic_gamepad/logic_gamepad.blend differ diff --git a/logic_gate/gate.blend b/logic_gate/gate.blend deleted file mode 100644 index f089ccd..0000000 Binary files a/logic_gate/gate.blend and /dev/null differ diff --git a/logic_gate/logic_gate.blend b/logic_gate/logic_gate.blend new file mode 100644 index 0000000..ff6d42a Binary files /dev/null and b/logic_gate/logic_gate.blend differ diff --git a/logic_get_contacts/logic_get_contacts.blend b/logic_get_contacts/logic_get_contacts.blend new file mode 100644 index 0000000..b3fe018 Binary files /dev/null and b/logic_get_contacts/logic_get_contacts.blend differ diff --git a/logic_hello_world/logic_hello_world.blend b/logic_hello_world/logic_hello_world.blend new file mode 100644 index 0000000..9b74703 Binary files /dev/null and b/logic_hello_world/logic_hello_world.blend differ diff --git a/logic_keyboard/logic_keyboard.blend b/logic_keyboard/logic_keyboard.blend new file mode 100644 index 0000000..f13ae00 Binary files /dev/null and b/logic_keyboard/logic_keyboard.blend differ diff --git a/logic_linked_variable/logic_linked_variable.blend b/logic_linked_variable/logic_linked_variable.blend new file mode 100644 index 0000000..1925552 Binary files /dev/null and b/logic_linked_variable/logic_linked_variable.blend differ diff --git a/logic_loadurl/logic_loadurl.blend b/logic_loadurl/logic_loadurl.blend new file mode 100644 index 0000000..4f83940 Binary files /dev/null and b/logic_loadurl/logic_loadurl.blend differ diff --git a/logic_mouselock/logic_mouselock.blend b/logic_mouselock/logic_mouselock.blend new file mode 100644 index 0000000..f3c05eb Binary files /dev/null and b/logic_mouselock/logic_mouselock.blend differ diff --git a/logic_object_rotate/README.md b/logic_object_rotate/README.md new file mode 100644 index 0000000..740d841 --- /dev/null +++ b/logic_object_rotate/README.md @@ -0,0 +1 @@ +Press keyboard A, D to rotate object diff --git a/logic_object_rotate/logic_object_rotate.blend b/logic_object_rotate/logic_object_rotate.blend new file mode 100644 index 0000000..722344c Binary files /dev/null and b/logic_object_rotate/logic_object_rotate.blend differ diff --git a/logic_object_scale/README.md b/logic_object_scale/README.md new file mode 100644 index 0000000..ec9c10e --- /dev/null +++ b/logic_object_scale/README.md @@ -0,0 +1 @@ +Press keyboard `↓` `↑` to scale object diff --git a/logic_object_scale/logic_object_scale.blend b/logic_object_scale/logic_object_scale.blend new file mode 100644 index 0000000..9b078aa Binary files /dev/null and b/logic_object_scale/logic_object_scale.blend differ diff --git a/logic_object_translate/README.md b/logic_object_translate/README.md new file mode 100644 index 0000000..766b938 --- /dev/null +++ b/logic_object_translate/README.md @@ -0,0 +1 @@ +Keyboard `WASD` to translate object diff --git a/logic_object_translate/logic_object_translate.blend b/logic_object_translate/logic_object_translate.blend new file mode 100644 index 0000000..abf6802 Binary files /dev/null and b/logic_object_translate/logic_object_translate.blend differ diff --git a/logic_pause_trait/README.md b/logic_pause_trait/README.md new file mode 100644 index 0000000..299e610 --- /dev/null +++ b/logic_pause_trait/README.md @@ -0,0 +1,3 @@ +#### Keyboard +- `1` to pause trait +- `2` to resume trait diff --git a/logic_pause_trait/logic_pause_trait.blend b/logic_pause_trait/logic_pause_trait.blend new file mode 100644 index 0000000..d87ba15 Binary files /dev/null and b/logic_pause_trait/logic_pause_trait.blend differ diff --git a/logic_pong/logic_pong.blend b/logic_pong/logic_pong.blend new file mode 100644 index 0000000..17e6f80 Binary files /dev/null and b/logic_pong/logic_pong.blend differ diff --git a/logic_pong/pong.blend b/logic_pong/pong.blend deleted file mode 100644 index 6f50897..0000000 Binary files a/logic_pong/pong.blend and /dev/null differ diff --git a/logic_scenes/README.md b/logic_scenes/README.md new file mode 100644 index 0000000..359a34c --- /dev/null +++ b/logic_scenes/README.md @@ -0,0 +1,3 @@ +#### Keyboard +- `1` to drop all objects from other scene into current +- `2` to remove current scene and switch to Scene3 diff --git a/logic_scenes/logic_scenes.blend b/logic_scenes/logic_scenes.blend new file mode 100644 index 0000000..4cd5835 Binary files /dev/null and b/logic_scenes/logic_scenes.blend differ diff --git a/logic_scenetree/README.md b/logic_scenetree/README.md new file mode 100644 index 0000000..0ebe169 --- /dev/null +++ b/logic_scenetree/README.md @@ -0,0 +1 @@ +Check console \ No newline at end of file diff --git a/logic_scenetree/logic_scenetree.blend b/logic_scenetree/logic_scenetree.blend new file mode 100644 index 0000000..151d873 Binary files /dev/null and b/logic_scenetree/logic_scenetree.blend differ diff --git a/logic_script/logic_script.blend b/logic_script/logic_script.blend new file mode 100644 index 0000000..14f5ea3 Binary files /dev/null and b/logic_script/logic_script.blend differ diff --git a/logic_set_property/README.md b/logic_set_property/README.md new file mode 100644 index 0000000..edb2b12 --- /dev/null +++ b/logic_set_property/README.md @@ -0,0 +1 @@ +- Press 1, 2 or 3 \ No newline at end of file diff --git a/logic_set_property/logic_set_property.blend b/logic_set_property/logic_set_property.blend new file mode 100644 index 0000000..3e457d6 Binary files /dev/null and b/logic_set_property/logic_set_property.blend differ diff --git a/logic_transform/logic_transform.blend b/logic_transform/logic_transform.blend new file mode 100644 index 0000000..d874775 Binary files /dev/null and b/logic_transform/logic_transform.blend differ diff --git a/material_examples/baked.blend b/material_bake/material_bake.blend similarity index 54% rename from material_examples/baked.blend rename to material_bake/material_bake.blend index 8580cb1..4ef502f 100644 Binary files a/material_examples/baked.blend and b/material_bake/material_bake.blend differ diff --git a/material_batch/material_batch.blend b/material_batch/material_batch.blend new file mode 100644 index 0000000..fa36377 Binary files /dev/null and b/material_batch/material_batch.blend differ diff --git a/billboard/bunny.png b/material_billboard/bunny.png similarity index 100% rename from billboard/bunny.png rename to material_billboard/bunny.png diff --git a/material_billboard/material_billboard.blend b/material_billboard/material_billboard.blend new file mode 100644 index 0000000..ae799f6 Binary files /dev/null and b/material_billboard/material_billboard.blend differ diff --git a/material_bump/brick_bump.jpg b/material_bump/brick_bump.jpg new file mode 100644 index 0000000..727b52a Binary files /dev/null and b/material_bump/brick_bump.jpg differ diff --git a/material_examples/bump.blend b/material_bump/material_bump.blend similarity index 61% rename from material_examples/bump.blend rename to material_bump/material_bump.blend index 475f681..d054375 100644 Binary files a/material_examples/bump.blend and b/material_bump/material_bump.blend differ diff --git a/material_examples/decal.png b/material_decal/decal.png similarity index 100% rename from material_examples/decal.png rename to material_decal/decal.png diff --git a/material_decal/material_decal.blend b/material_decal/material_decal.blend new file mode 100644 index 0000000..385c171 Binary files /dev/null and b/material_decal/material_decal.blend differ diff --git a/material_displace/README.md b/material_displace/README.md new file mode 100644 index 0000000..8d2063b --- /dev/null +++ b/material_displace/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/materials#displacement diff --git a/material_examples/checker.png b/material_displace/checker.png similarity index 100% rename from material_examples/checker.png rename to material_displace/checker.png diff --git a/material_examples/checker_rough.png b/material_displace/checker_rough.png similarity index 100% rename from material_examples/checker_rough.png rename to material_displace/checker_rough.png diff --git a/material_displace/material_displace.blend b/material_displace/material_displace.blend new file mode 100644 index 0000000..e7e683b Binary files /dev/null and b/material_displace/material_displace.blend differ diff --git a/material_examples/batch.blend b/material_examples/batch.blend deleted file mode 100644 index 971f63c..0000000 Binary files a/material_examples/batch.blend and /dev/null differ diff --git a/material_examples/decal.blend b/material_examples/decal.blend deleted file mode 100644 index 7692e13..0000000 Binary files a/material_examples/decal.blend and /dev/null differ diff --git a/material_examples/displace.blend b/material_examples/displace.blend deleted file mode 100644 index 4400a14..0000000 Binary files a/material_examples/displace.blend and /dev/null differ diff --git a/material_examples/normalmap.blend b/material_examples/normalmap.blend deleted file mode 100644 index bc2fa4a..0000000 Binary files a/material_examples/normalmap.blend and /dev/null differ diff --git a/material_examples/shadeless.blend b/material_examples/shadeless.blend deleted file mode 100644 index 303d686..0000000 Binary files a/material_examples/shadeless.blend and /dev/null differ diff --git a/material_examples/sss.blend b/material_examples/sss.blend deleted file mode 100644 index 6f41d51..0000000 Binary files a/material_examples/sss.blend and /dev/null differ diff --git a/material_movie/movie.blend b/material_movie/movie.blend deleted file mode 100644 index 8c53f86..0000000 Binary files a/material_movie/movie.blend and /dev/null differ diff --git a/material_examples/multiuvs.blend b/material_multiuvs/multiuvs.blend similarity index 100% rename from material_examples/multiuvs.blend rename to material_multiuvs/multiuvs.blend diff --git a/material_normalmap/material_normalmap.blend b/material_normalmap/material_normalmap.blend new file mode 100644 index 0000000..9cc34cd Binary files /dev/null and b/material_normalmap/material_normalmap.blend differ diff --git a/material_params/README.md b/material_params/README.md new file mode 100644 index 0000000..3561411 --- /dev/null +++ b/material_params/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/materials#material-parameters diff --git a/material_params/material_params.blend b/material_params/material_params.blend new file mode 100644 index 0000000..85c5844 Binary files /dev/null and b/material_params/material_params.blend differ diff --git a/material_params/params.blend b/material_params/params.blend deleted file mode 100644 index 20fea8e..0000000 Binary files a/material_params/params.blend and /dev/null differ diff --git a/material_shadeless/material_shadeless.blend b/material_shadeless/material_shadeless.blend new file mode 100644 index 0000000..efff35f Binary files /dev/null and b/material_shadeless/material_shadeless.blend differ diff --git a/material_shaders/Bundled/MyMaterial/MyMaterial.json b/material_shaders/Bundled/MyCustomMaterial/MyCustomMaterial.json similarity index 84% rename from material_shaders/Bundled/MyMaterial/MyMaterial.json rename to material_shaders/Bundled/MyCustomMaterial/MyCustomMaterial.json index a7232ad..94dd7fc 100644 --- a/material_shaders/Bundled/MyMaterial/MyMaterial.json +++ b/material_shaders/Bundled/MyCustomMaterial/MyCustomMaterial.json @@ -3,6 +3,9 @@ { "contexts": [ { + "color_attachments": [ + "RGBA64" + ], "compare_mode": "less", "constants": [ { @@ -10,7 +13,7 @@ "name": "WVP", "type": "mat4" }, - { + { "link": "_normalMatrix", "name": "N", "type": "mat3" @@ -33,10 +36,9 @@ ], "cull_mode": "clockwise", "depth_write": true, - "fragment_shader": "MyMaterial.frag", + "fragment_shader": "MyCustomMaterial.frag", "name": "mesh", "texture_units": [], - "vertex_shader": "MyMaterial.vert", "vertex_elements": [ { "name": "pos", @@ -46,10 +48,11 @@ "name": "nor", "data": "short2norm" } - ] + ], + "vertex_shader": "MyCustomMaterial.vert" } ], - "name": "MyMaterial.json" + "name": "MyCustomMaterial" } ] } diff --git a/material_shaders/Shaders/MyMaterial.frag.glsl b/material_shaders/Shaders/MyCustomMaterial.frag.glsl similarity index 51% rename from material_shaders/Shaders/MyMaterial.frag.glsl rename to material_shaders/Shaders/MyCustomMaterial.frag.glsl index 01c91ff..b61495f 100644 --- a/material_shaders/Shaders/MyMaterial.frag.glsl +++ b/material_shaders/Shaders/MyCustomMaterial.frag.glsl @@ -3,10 +3,14 @@ in vec3 mpos; in vec3 normal; +// Color of each fragment on the screen out vec4 fragColor; void main() { - // Assuming forward rendering path for simplicity + // Shadeless red color + //fragColor = vec4(1.0,0.0,0.0,0.0); + + // Assuming forward rendering path for simplicity vec3 col = (mpos + vec3(1.0)) / 8.0; col += normal * 0.1; fragColor = vec4(col, 1.0); diff --git a/material_shaders/Shaders/MyMaterial.vert.glsl b/material_shaders/Shaders/MyCustomMaterial.vert.glsl similarity index 100% rename from material_shaders/Shaders/MyMaterial.vert.glsl rename to material_shaders/Shaders/MyCustomMaterial.vert.glsl diff --git a/material_shaders/material_shaders.blend b/material_shaders/material_shaders.blend new file mode 100644 index 0000000..bdbf602 Binary files /dev/null and b/material_shaders/material_shaders.blend differ diff --git a/material_shaders/shaders.blend b/material_shaders/shaders.blend deleted file mode 100644 index 38e29c3..0000000 Binary files a/material_shaders/shaders.blend and /dev/null differ diff --git a/material_sss/material_sss.blend b/material_sss/material_sss.blend new file mode 100644 index 0000000..a0df327 Binary files /dev/null and b/material_sss/material_sss.blend differ diff --git a/material_translucent/material_translucent.blend b/material_translucent/material_translucent.blend new file mode 100644 index 0000000..87f11a2 Binary files /dev/null and b/material_translucent/material_translucent.blend differ diff --git a/material_translucent/translucent.blend b/material_translucent/translucent.blend deleted file mode 100644 index 8dc04d9..0000000 Binary files a/material_translucent/translucent.blend and /dev/null differ diff --git a/material_video/README.md b/material_video/README.md new file mode 100644 index 0000000..9607d60 --- /dev/null +++ b/material_video/README.md @@ -0,0 +1,7 @@ +Note: Krom is not yet supported, please use HTML5 or native targets for now. +ffmpeg is required to process video files. + +1. Install ffmpeg binaries from https://ffmpeg.org +2. Point 'Edit - Preferences... - Add-ons - Armory - Advanced - FFMPEG Path' to ffmpeg binary +3. Play! +4. During the first build, video processing may take some time diff --git a/material_video/material_video.blend b/material_video/material_video.blend new file mode 100644 index 0000000..fa99416 Binary files /dev/null and b/material_video/material_video.blend differ diff --git a/material_movie/movie.mp4 b/material_video/video.mp4 similarity index 100% rename from material_movie/movie.mp4 rename to material_video/video.mp4 diff --git a/mesh_generate/README.md b/mesh_generate/README.md new file mode 100644 index 0000000..305065d --- /dev/null +++ b/mesh_generate/README.md @@ -0,0 +1,5 @@ +https://github.com/armory3d/armory/wiki/generate_mesh + +#### Keyboard +- `Up`, `W` Add cubes +- `Down`, `S` Remove cubes diff --git a/mesh_generate/Sources/arm/BoxGenerator.hx b/mesh_generate/Sources/arm/BoxGenerator.hx index 20e311e..974e056 100644 --- a/mesh_generate/Sources/arm/BoxGenerator.hx +++ b/mesh_generate/Sources/arm/BoxGenerator.hx @@ -1,18 +1,21 @@ package arm; -import kha.arrays.Int16Array; -import kha.arrays.Uint32Array; -import iron.Scene; -import iron.data.SceneFormat; import iron.data.Data; -import iron.data.MeshData; import iron.data.MaterialData; +import iron.data.MeshData; +import iron.data.SceneFormat; +import iron.object.MeshObject; +import iron.Scene; import iron.system.Input; +import kha.arrays.Int16Array; +import kha.arrays.Uint32Array; class BoxGenerator extends iron.Trait { var meshData:MeshData; var materials:haxe.ds.Vector; + var cubes = new Array(); + var font : kha.Font; function toI16(toPos:Int16Array, toNor:Int16Array, fromPos:Array, fromNor:Array) { var numVertices = Std.int(fromPos.length / 3); @@ -36,6 +39,7 @@ class BoxGenerator extends iron.Trait { public function new() { super(); + // Raw vertex data for our box var positions = [1.0,1.0,-1.0,1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,1.0,-1.0,1.0,1.0,-1.0,-1.0,1.0,1.0,-1.0,1.0,1.0,1.0,-1.0,1.0,1.0,1.0,1.0,-1.0,1.0,1.0,-1.0,-1.0,1.0,-1.0,-1.0,1.0,-1.0,1.0,-1.0,-1.0,1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,1.0,-1.0,1.0,1.0,-1.0,1.0,-1.0,1.0,1.0,1.0,1.0,1.0,-1.0,-1.0,1.0,-1.0,-1.0,1.0,1.0]; var normals = [0.0,0.0,-1.0,0.0,0.0,-1.0,0.0,0.0,-1.0,0.0,0.0,-1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,-1.0,-0.0,0.0,-1.0,-0.0,0.0,-1.0,-0.0,0.0,-1.0,-0.0,-1.0,0.0,-0.0,-1.0,0.0,-0.0,-1.0,0.0,-0.0,-1.0,0.0,-0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0]; @@ -48,7 +52,7 @@ class BoxGenerator extends iron.Trait { var posI16 = new Int16Array(numVertices * 4); // pos.xyz, nor.z var norI16 = new Int16Array(numVertices * 2); // nor.xy toI16(posI16, norI16, positions, normals); - + var indU32 = new Uint32Array(indices.length); toU32(indU32, indices); @@ -61,14 +65,14 @@ class BoxGenerator extends iron.Trait { vertex_arrays: [pos, nor], index_arrays: [ind], // Usable to scale positions over the (-1, 1) range - scale_pos: 1.0 + scale_pos: 0.5 }; - + new MeshData(rawmeshData, function(data:MeshData) { // Mesh data parsed meshData = data; meshData.geom.calculateAABB(); - + // Fetch material from scene data Data.getMaterial("Scene", "Material", function(data:MaterialData) { // Material loaded @@ -76,21 +80,49 @@ class BoxGenerator extends iron.Trait { notifyOnUpdate(update); }); }); + + Data.getFont('font_default.ttf', f -> { + font = f; + notifyOnRender2D( render2D ); + }); } function update() { // Left mouse button was pressed / display touched - var mouse = Input.getMouse(); - if (mouse.started()) { - // Create new object in active scene - var object = Scene.active.addMeshObject(meshData, materials); - - // Just for testing, add rigid body trait - var aabb = meshData.geom.aabb; - object.transform.loc.set(Math.random() * 8 - 4, Math.random() * 8 - 4, 5); - object.transform.buildMatrix(); - object.transform.dim.set(aabb.x, aabb.y, aabb.z); - object.addTrait(new armory.trait.physics.RigidBody()); + final keyboard = Input.getKeyboard(); + final mouse = Input.getMouse(); + //if (mouse.down('left')) { + if (keyboard.down('up') || keyboard.down('w') || mouse.down('left')) { + final aabb = meshData.geom.aabb; + for( i in 0...10) { + // Create new object in active scene + final object = Scene.active.addMeshObject(meshData, materials); + + // Just for testing, add rigid body trait + object.transform.loc.set(Math.random() * 8- 4, Math.random() * 8 - 4, 5); + object.transform.buildMatrix(); + object.transform.dim.set(aabb.x, aabb.y, aabb.z); + object.addTrait(new armory.trait.physics.RigidBody()); + cubes.push(object); + } + trace(cubes.length); + } else if (keyboard.down('down') || keyboard.down('s') || mouse.down('right')) { + for( i in 0...10) { + if( cubes.length == 0 ) break; + cubes.shift().remove(); + } + trace(cubes.length); } } + + function render2D( g : kha.graphics2.Graphics ) { + g.end(); + g.font = font; + final fontSize = 13; + final text = 'CUBES: '+cubes.length; + final w = font.width( g.fontSize, text ); + g.fontSize = 13; + g.drawString( text, 10, 10 ); + g.begin( false ); + } } diff --git a/mesh_generate/generate_mesh.blend b/mesh_generate/generate_mesh.blend deleted file mode 100644 index c68a4e3..0000000 Binary files a/mesh_generate/generate_mesh.blend and /dev/null differ diff --git a/mesh_generate/mesh_generate.blend b/mesh_generate/mesh_generate.blend new file mode 100644 index 0000000..6ee7afe Binary files /dev/null and b/mesh_generate/mesh_generate.blend differ diff --git a/mesh_import/Sources/arm/ImportMesh.hx b/mesh_import/Sources/arm/ImportMesh.hx index c846c48..adabf37 100644 --- a/mesh_import/Sources/arm/ImportMesh.hx +++ b/mesh_import/Sources/arm/ImportMesh.hx @@ -52,7 +52,7 @@ class ImportMesh extends iron.Trait { function update() { // Left mouse button was pressed / display touched var mouse = Input.getMouse(); - if (mouse.started()) { + if (mouse.down()) { // Create new object in active scene var object = Scene.active.addMeshObject(meshData, materials); diff --git a/mesh_import/import_mesh.blend b/mesh_import/import_mesh.blend deleted file mode 100644 index 60f46ab..0000000 Binary files a/mesh_import/import_mesh.blend and /dev/null differ diff --git a/mesh_import/mesh_import.blend b/mesh_import/mesh_import.blend new file mode 100644 index 0000000..ebd36a3 Binary files /dev/null and b/mesh_import/mesh_import.blend differ diff --git a/terrain/Bundled/heightmap_01.png b/mesh_terrain/Bundled/heightmap_01.png similarity index 100% rename from terrain/Bundled/heightmap_01.png rename to mesh_terrain/Bundled/heightmap_01.png diff --git a/mesh_terrain/README.md b/mesh_terrain/README.md new file mode 100644 index 0000000..9f7f5f8 --- /dev/null +++ b/mesh_terrain/README.md @@ -0,0 +1,9 @@ +To generate terrain: +- Place your heightmap as `Bundled/heightmap_01.png` +- Navigate to `Properties - Scene - Armory Terrain` +- Set terrain dimensions using `Sector Size` +- Set terrain height using `Height Scale` +- Click `Generate` +- Adjust terrain material + +Check terrain template: diff --git a/terrain/Bundled/base.png b/mesh_terrain/base.png similarity index 100% rename from terrain/Bundled/base.png rename to mesh_terrain/base.png diff --git a/mesh_terrain/mesh_terrain.blend b/mesh_terrain/mesh_terrain.blend new file mode 100644 index 0000000..bc9d125 Binary files /dev/null and b/mesh_terrain/mesh_terrain.blend differ diff --git a/mouse_lock/mouse_lock.blend b/mouse_lock/mouse_lock.blend deleted file mode 100644 index 7a645ba..0000000 Binary files a/mouse_lock/mouse_lock.blend and /dev/null differ diff --git a/multitouch/multitouch.blend b/multitouch/multitouch.blend deleted file mode 100644 index 14ac0d5..0000000 Binary files a/multitouch/multitouch.blend and /dev/null differ diff --git a/navmesh/README.md b/navmesh/README.md new file mode 100644 index 0000000..66cd2c6 --- /dev/null +++ b/navmesh/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/navmesh diff --git a/navmesh/gridbox.png b/navmesh/gridbox.png new file mode 100644 index 0000000..20f90f4 Binary files /dev/null and b/navmesh/gridbox.png differ diff --git a/navmesh/gridbox2.png b/navmesh/gridbox2.png new file mode 100644 index 0000000..398526b Binary files /dev/null and b/navmesh/gridbox2.png differ diff --git a/navmesh/navmesh.blend b/navmesh/navmesh.blend index 7cf35aa..ceb864d 100644 Binary files a/navmesh/navmesh.blend and b/navmesh/navmesh.blend differ diff --git a/navmesh_follow/README.md b/navmesh_follow/README.md new file mode 100644 index 0000000..66cd2c6 --- /dev/null +++ b/navmesh_follow/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/navmesh diff --git a/navmesh_follow/navmesh_follow.blend b/navmesh_follow/navmesh_follow.blend new file mode 100644 index 0000000..fbcaa47 Binary files /dev/null and b/navmesh_follow/navmesh_follow.blend differ diff --git a/particle_examples/bunny.png b/particle_bunny/bunny.png similarity index 100% rename from particle_examples/bunny.png rename to particle_bunny/bunny.png diff --git a/particle_bunny/particle_bunny.blend b/particle_bunny/particle_bunny.blend new file mode 100644 index 0000000..c5eee2c Binary files /dev/null and b/particle_bunny/particle_bunny.blend differ diff --git a/particle_examples/bunny.blend b/particle_examples/bunny.blend deleted file mode 100644 index 9b254f3..0000000 Binary files a/particle_examples/bunny.blend and /dev/null differ diff --git a/particle_examples/hair.blend b/particle_examples/hair.blend deleted file mode 100644 index 94a03cc..0000000 Binary files a/particle_examples/hair.blend and /dev/null differ diff --git a/particle_examples/mesh.blend b/particle_examples/mesh.blend deleted file mode 100644 index eb6263c..0000000 Binary files a/particle_examples/mesh.blend and /dev/null differ diff --git a/particle_examples/particle_info.blend b/particle_examples/particle_info.blend deleted file mode 100644 index 223b89b..0000000 Binary files a/particle_examples/particle_info.blend and /dev/null differ diff --git a/particle_examples/smoke.blend b/particle_examples/smoke.blend deleted file mode 100644 index e7e6ddf..0000000 Binary files a/particle_examples/smoke.blend and /dev/null differ diff --git a/particle_hair/particle_hair.blend b/particle_hair/particle_hair.blend new file mode 100644 index 0000000..0d37c2d Binary files /dev/null and b/particle_hair/particle_hair.blend differ diff --git a/particle_examples/part.png b/particle_info/part.png similarity index 100% rename from particle_examples/part.png rename to particle_info/part.png diff --git a/particle_info/particle_info.blend b/particle_info/particle_info.blend new file mode 100644 index 0000000..9533b5f Binary files /dev/null and b/particle_info/particle_info.blend differ diff --git a/particle_mesh/README.md b/particle_mesh/README.md new file mode 100644 index 0000000..2793eb3 --- /dev/null +++ b/particle_mesh/README.md @@ -0,0 +1,5 @@ +https://github.com/armory3d/armory/wiki/supported_particles + +#### Keyboard +- `1` Particle speed = 1 +- `2` Particle speed = 0 diff --git a/particle_mesh/particle_mesh.blend b/particle_mesh/particle_mesh.blend new file mode 100644 index 0000000..3227265 Binary files /dev/null and b/particle_mesh/particle_mesh.blend differ diff --git a/particle_smoke/particle_smoke.blend b/particle_smoke/particle_smoke.blend new file mode 100644 index 0000000..5ebc138 Binary files /dev/null and b/particle_smoke/particle_smoke.blend differ diff --git a/particle_examples/smoke.jpg b/particle_smoke/smoke.jpg similarity index 100% rename from particle_examples/smoke.jpg rename to particle_smoke/smoke.jpg diff --git a/physics_break/physics_break.blend b/physics_break/physics_break.blend new file mode 100644 index 0000000..5de1962 Binary files /dev/null and b/physics_break/physics_break.blend differ diff --git a/physics_collision_groups/physics_collision_groups.blend b/physics_collision_groups/physics_collision_groups.blend new file mode 100644 index 0000000..3a74500 Binary files /dev/null and b/physics_collision_groups/physics_collision_groups.blend differ diff --git a/physics_constraints/README.md b/physics_constraints/README.md new file mode 100644 index 0000000..f19cfa7 --- /dev/null +++ b/physics_constraints/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/physics#rigid-body-constraints diff --git a/physics_constraints/physics_constraints.blend b/physics_constraints/physics_constraints.blend new file mode 100644 index 0000000..7f7c83b Binary files /dev/null and b/physics_constraints/physics_constraints.blend differ diff --git a/physics_drag/physics_drag.blend b/physics_drag/physics_drag.blend new file mode 100644 index 0000000..28bb8dd Binary files /dev/null and b/physics_drag/physics_drag.blend differ diff --git a/physics_examples/break.blend b/physics_examples/break.blend deleted file mode 100644 index 482eb0f..0000000 Binary files a/physics_examples/break.blend and /dev/null differ diff --git a/physics_examples/collision_groups.blend b/physics_examples/collision_groups.blend deleted file mode 100644 index 1cf1030..0000000 Binary files a/physics_examples/collision_groups.blend and /dev/null differ diff --git a/physics_examples/constraint.blend b/physics_examples/constraint.blend deleted file mode 100644 index 5bac40e..0000000 Binary files a/physics_examples/constraint.blend and /dev/null differ diff --git a/physics_examples/drag.blend b/physics_examples/drag.blend deleted file mode 100644 index 4f3548f..0000000 Binary files a/physics_examples/drag.blend and /dev/null differ diff --git a/physics_examples/softbody.blend b/physics_examples/softbody.blend deleted file mode 100644 index a5cc3a8..0000000 Binary files a/physics_examples/softbody.blend and /dev/null differ diff --git a/physics_picking/pick.blend b/physics_picking/physics_pick.blend similarity index 100% rename from physics_picking/pick.blend rename to physics_picking/physics_pick.blend diff --git a/physics_ragdoll/README.md b/physics_ragdoll/README.md new file mode 100644 index 0000000..192c6b1 --- /dev/null +++ b/physics_ragdoll/README.md @@ -0,0 +1,11 @@ +Drag ragdoll with mouse, legs and arms are destructible. + +### Building a ragdoll + +1. Build approx rig from hitboxes +2. Connect hitboxes using rigid body constraints +3. Clear bone parents +4. Attach bones to hitboxes using bone constraints - type 'Child Of'. +5. Press 'Clear Inverse' and 'Set Inverse' once target is set. + + diff --git a/physics_ragdoll/physics_ragdoll.blend b/physics_ragdoll/physics_ragdoll.blend new file mode 100644 index 0000000..ebc3263 Binary files /dev/null and b/physics_ragdoll/physics_ragdoll.blend differ diff --git a/physics_ragdoll/ragdoll.blend b/physics_ragdoll/ragdoll.blend deleted file mode 100644 index 9f4e61a..0000000 Binary files a/physics_ragdoll/ragdoll.blend and /dev/null differ diff --git a/physics_raycast/README.md b/physics_raycast/README.md new file mode 100644 index 0000000..317f41f --- /dev/null +++ b/physics_raycast/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/physics#raycast diff --git a/physics_raycast/physics_raycast.blend b/physics_raycast/physics_raycast.blend new file mode 100644 index 0000000..f6f0cc5 Binary files /dev/null and b/physics_raycast/physics_raycast.blend differ diff --git a/physics_raycast/raycast.blend b/physics_raycast/raycast.blend deleted file mode 100644 index 4746c7c..0000000 Binary files a/physics_raycast/raycast.blend and /dev/null differ diff --git a/physics_softbody/README.md b/physics_softbody/README.md new file mode 100644 index 0000000..1045557 --- /dev/null +++ b/physics_softbody/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/physics#soft-bodies diff --git a/physics_softbody/physics_softbody.blend b/physics_softbody/physics_softbody.blend new file mode 100644 index 0000000..4f51b0c Binary files /dev/null and b/physics_softbody/physics_softbody.blend differ diff --git a/render_bloom/README.md b/render_bloom/README.md new file mode 100644 index 0000000..7ca3bc8 --- /dev/null +++ b/render_bloom/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/screen-effects#bloom diff --git a/render_bloom/bloom.blend b/render_bloom/bloom.blend deleted file mode 100644 index 87cadb3..0000000 Binary files a/render_bloom/bloom.blend and /dev/null differ diff --git a/render_bloom/render_bloom.blend b/render_bloom/render_bloom.blend new file mode 100644 index 0000000..06ca719 Binary files /dev/null and b/render_bloom/render_bloom.blend differ diff --git a/render_colorgrading/colorgrading.blend b/render_colorgrading/colorgrading.blend deleted file mode 100644 index ea5addb..0000000 Binary files a/render_colorgrading/colorgrading.blend and /dev/null differ diff --git a/render_colorgrading/render_colorgrading.blend b/render_colorgrading/render_colorgrading.blend new file mode 100644 index 0000000..65331c4 Binary files /dev/null and b/render_colorgrading/render_colorgrading.blend differ diff --git a/split_screen/Sources/arm/SplitScreen.hx b/render_splitscreen/Sources/arm/SplitScreen.hx similarity index 100% rename from split_screen/Sources/arm/SplitScreen.hx rename to render_splitscreen/Sources/arm/SplitScreen.hx diff --git a/render_splitscreen/render_splitscreen.blend b/render_splitscreen/render_splitscreen.blend new file mode 100644 index 0000000..4ecaf6d Binary files /dev/null and b/render_splitscreen/render_splitscreen.blend differ diff --git a/render_to_texture/README.md b/render_to_texture/README.md new file mode 100644 index 0000000..e811be7 --- /dev/null +++ b/render_to_texture/README.md @@ -0,0 +1 @@ +Press keyboard r, t, f, g, v, b to rotate suzanne \ No newline at end of file diff --git a/render_to_texture/render_to_texture.blend b/render_to_texture/render_to_texture.blend index 6fd8915..4f343c4 100644 Binary files a/render_to_texture/render_to_texture.blend and b/render_to_texture/render_to_texture.blend differ diff --git a/render_voxelao_teapots/render_voxelao_teapots.blend b/render_voxelao_teapots/render_voxelao_teapots.blend new file mode 100644 index 0000000..5496346 Binary files /dev/null and b/render_voxelao_teapots/render_voxelao_teapots.blend differ diff --git a/voxelao_teapots/shadows.blend b/render_voxelao_teapots/shadows.blend similarity index 100% rename from voxelao_teapots/shadows.blend rename to render_voxelao_teapots/shadows.blend diff --git a/scene_stream/README.md b/scene_stream/README.md new file mode 100644 index 0000000..cf47040 --- /dev/null +++ b/scene_stream/README.md @@ -0,0 +1,8 @@ +- Scene contains 3000+ unique, non-linked meshes, first build may take over 30 sec +- Far plane is set to 100 to visualize streaming +- Object is streamed at camera distance less than (far_plane * 1.1), and unloaded at distance over (far_plane * 1.5) +- Check debug console to see amount of objects loaded +- Mobile render path is set to focus on stream performance + +- Only HTML5 streaming is multi-threaded currently +- Materials (and associated textures) are preloaded at scene startup diff --git a/scene_stream/stream.blend b/scene_stream/scene_stream.blend similarity index 52% rename from scene_stream/stream.blend rename to scene_stream/scene_stream.blend index 493c3b4..ea32356 100644 Binary files a/scene_stream/stream.blend and b/scene_stream/scene_stream.blend differ diff --git a/screen_image/screentex.blend b/screen_image/screentex.blend deleted file mode 100644 index 658e00e..0000000 Binary files a/screen_image/screentex.blend and /dev/null differ diff --git a/screen_image/Sources/arm/MyTrait.hx b/screentex/Sources/arm/MyTrait.hx similarity index 100% rename from screen_image/Sources/arm/MyTrait.hx rename to screentex/Sources/arm/MyTrait.hx diff --git a/screentex/screentex.blend b/screentex/screentex.blend new file mode 100644 index 0000000..077b30b Binary files /dev/null and b/screentex/screentex.blend differ diff --git a/script_examples/script_camera_lerp/Sources/arm/CameraTrait.hx b/script_camera_lerp/Sources/arm/CameraTrait.hx similarity index 100% rename from script_examples/script_camera_lerp/Sources/arm/CameraTrait.hx rename to script_camera_lerp/Sources/arm/CameraTrait.hx diff --git a/script_examples/script_camera_lerp/Sources/arm/MyTrait.hx b/script_camera_lerp/Sources/arm/MyTrait.hx similarity index 100% rename from script_examples/script_camera_lerp/Sources/arm/MyTrait.hx rename to script_camera_lerp/Sources/arm/MyTrait.hx diff --git a/script_camera_lerp/script_camera_lerp.blend b/script_camera_lerp/script_camera_lerp.blend new file mode 100644 index 0000000..8f03d7d Binary files /dev/null and b/script_camera_lerp/script_camera_lerp.blend differ diff --git a/script_examples/script_camera_lerp/camera_lerp.blend b/script_examples/script_camera_lerp/camera_lerp.blend deleted file mode 100644 index 15298f2..0000000 Binary files a/script_examples/script_camera_lerp/camera_lerp.blend and /dev/null differ diff --git a/script_examples/script_find_objects_scene/Sources/arm/FindObjects.hx b/script_examples/script_find_objects_scene/Sources/arm/FindObjects.hx deleted file mode 100644 index fffabb1..0000000 --- a/script_examples/script_find_objects_scene/Sources/arm/FindObjects.hx +++ /dev/null @@ -1,88 +0,0 @@ -package arm; - -import iron.Scene; -import iron.object.Object; - -class FindObjects extends iron.Trait { - public function new() { - super(); - - notifyOnInit(init); - - notifyOnUpdate(update); - } - - function init(){ - // if we want to find an object in the scene and we know the name - var myLight = Scene.active.getChild("my light"); - if (myLight != null) trace("found my light"); - - // to get a Group (Collection in Blender) we can do so by their name - var propsGroup = Scene.active.getGroup("props"); - if (propsGroup != null) trace("found Group props with " + propsGroup.length + " props"); - - var sceneParent = Scene.active.sceneParent; - - var sceneObjs = sceneParent.children; - if (sceneObjs != null) trace("total objects in scene: " + sceneObjs.length); - - var array = []; - - for(obj in sceneObjs) if(!obj.visible) array.push(obj); - trace("invisible objects: " + array.length); - } - - function update(){ - var array = []; - var sceneParent = Scene.active.sceneParent; - var objsNotVisibleToCam = objsNotVisibleToCamera(sceneParent,array); - trace("objects not visible to camera: " + objsNotVisibleToCam.length); - } - - function objsNotVisible(obj:Object, group:Array, ignoreRoot=true):Array{ - if (!obj.visible && !ignoreRoot) group.push(obj); - for (ch in obj.children) { - if (ch.children.length > 0) objsNotVisible(ch, group, false); - else if (!ch.visible) group.push(ch); - } - return group; - } - - function objsNotVisibleToCamera(obj:Object, group:Array, ignoreRoot=true):Array{ - if (obj.culledMesh && !ignoreRoot) group.push(obj); - for (ch in obj.children) { - if (ch.children.length > 0) objsNotVisibleToCamera(ch, group, false); - else if (ch.culledMesh) group.push(ch); - } - return group; - } - - function objsWithTrait(t:Class, obj:Object, group:Array, ignoreRoot=true):Array{ - if (obj.getTrait(t) != null && !ignoreRoot) group.push(obj); - for (ch in obj.children) { - if (ch.children.length > 0) objsWithTrait(t,ch,group,false); - else if (ch.getTrait(t) != null) group.push(ch); - } - return group; - } - // this is a more lengthier one. We allow the choice for case sensitive search - function objsNameContains(string:String, obj:Object, group:Array, caseSensitive=false, ignoreRoot=true):Array{ - if(!ignoreRoot){ - if(!caseSensitive) - if(obj.name.toLowerCase().lastIndexOf(string.toLowerCase()) != -1) group.push(obj); - else - if(obj.name.lastIndexOf(string) != -1) group.push(obj); - } - - for (ch in obj.children) { - if(ch.children.length > 0) objsNameContains(string,ch,group,caseSensitive,false); - else { - if(!caseSensitive) - if(ch.name.toLowerCase().lastIndexOf(string.toLowerCase()) != -1) group.push(ch); - else - if(ch.name.lastIndexOf(string) != -1) group.push(ch); - } - } - return group; - } -} diff --git a/script_examples/script_linkedgroup/linkedgroup.blend b/script_examples/script_linkedgroup/linkedgroup.blend deleted file mode 100644 index 212162a..0000000 Binary files a/script_examples/script_linkedgroup/linkedgroup.blend and /dev/null differ diff --git a/script_examples/script_properties/props.blend b/script_examples/script_properties/props.blend deleted file mode 100644 index 90065e5..0000000 Binary files a/script_examples/script_properties/props.blend and /dev/null differ diff --git a/script_examples/script_properties_global/props.blend b/script_examples/script_properties_global/props.blend deleted file mode 100644 index 01c7c7e..0000000 Binary files a/script_examples/script_properties_global/props.blend and /dev/null differ diff --git a/script_examples/script_rigidbody_trigger/rigidbody_trigger.blend b/script_examples/script_rigidbody_trigger/rigidbody_trigger.blend deleted file mode 100644 index 7c9a306..0000000 Binary files a/script_examples/script_rigidbody_trigger/rigidbody_trigger.blend and /dev/null differ diff --git a/script_examples/script_spawnobject/spawnobject.blend b/script_examples/script_spawnobject/spawnobject.blend deleted file mode 100644 index b76d80b..0000000 Binary files a/script_examples/script_spawnobject/spawnobject.blend and /dev/null differ diff --git a/script_examples/script_transform/Sources/arm/TransformTest.hx b/script_examples/script_transform/Sources/arm/TransformTest.hx deleted file mode 100644 index 6f6c6b9..0000000 --- a/script_examples/script_transform/Sources/arm/TransformTest.hx +++ /dev/null @@ -1,53 +0,0 @@ -package arm; - -class TransformTest extends iron.Trait { - public function new() { - super(); - - notifyOnInit(function() { - - // Testing 2 cubes, parent cube at (1, 0, 0), - // child cube at (5, 0, 0) - - // Parent location - trace(object.parent.transform.loc); - // (1, 0, 0) - - // Child location - trace(object.transform.loc); - // (5, 0, 0) - - // Child location in world space - trace(object.transform.world.getLoc()); - // (6, 0, 0) - - // Set child to parent location - object.transform.loc.set(0, 0, 0); - object.transform.buildMatrix(); - - // Child location - trace(object.transform.loc); - // (0, 0, 0) - - // Child location in world space - trace(object.transform.world.getLoc()); - // (1, 0, 0) - - // Move parent - object.parent.transform.loc.set(0, 3, 0); - object.parent.transform.buildMatrix(); - - // Child location - trace(object.transform.loc); - // (0, 0, 0) - - // Child location in world space - trace(object.transform.world.getLoc()); - // (0, 3, 0) - - // Nore: In Blender, you may need to - // Clear Parent - Clear Parent Inverse - // To get local transform - }); - } -} diff --git a/script_examples/script_transform/transform.blend b/script_examples/script_transform/transform.blend deleted file mode 100644 index bdf226d..0000000 Binary files a/script_examples/script_transform/transform.blend and /dev/null differ diff --git a/script_linkedgroup/README.md b/script_linkedgroup/README.md new file mode 100644 index 0000000..59f01a9 --- /dev/null +++ b/script_linkedgroup/README.md @@ -0,0 +1 @@ +Click to spawn pin \ No newline at end of file diff --git a/script_examples/script_linkedgroup/Sources/arm/PinSpawner.hx b/script_linkedgroup/Sources/arm/PinSpawner.hx similarity index 100% rename from script_examples/script_linkedgroup/Sources/arm/PinSpawner.hx rename to script_linkedgroup/Sources/arm/PinSpawner.hx diff --git a/script_examples/script_linkedgroup/Sources/arm/PinTrait.hx b/script_linkedgroup/Sources/arm/PinTrait.hx similarity index 100% rename from script_examples/script_linkedgroup/Sources/arm/PinTrait.hx rename to script_linkedgroup/Sources/arm/PinTrait.hx diff --git a/script_examples/script_linkedgroup/pin.blend b/script_linkedgroup/pin.blend similarity index 100% rename from script_examples/script_linkedgroup/pin.blend rename to script_linkedgroup/pin.blend diff --git a/script_linkedgroup/script_linkedgroup.blend b/script_linkedgroup/script_linkedgroup.blend new file mode 100644 index 0000000..0746a0a Binary files /dev/null and b/script_linkedgroup/script_linkedgroup.blend differ diff --git a/script_examples/script_logic_talk/property/Sources/arm/ReadConfig.hx b/script_logic_talk/property/Sources/arm/ReadConfig.hx similarity index 100% rename from script_examples/script_logic_talk/property/Sources/arm/ReadConfig.hx rename to script_logic_talk/property/Sources/arm/ReadConfig.hx diff --git a/script_examples/script_logic_talk/property/property.blend b/script_logic_talk/property/property.blend similarity index 100% rename from script_examples/script_logic_talk/property/property.blend rename to script_logic_talk/property/property.blend diff --git a/script_examples/script_properties/Sources/arm/MyTrait.hx b/script_properties/Sources/arm/MyTrait.hx similarity index 100% rename from script_examples/script_properties/Sources/arm/MyTrait.hx rename to script_properties/Sources/arm/MyTrait.hx diff --git a/script_properties/script_properties.blend b/script_properties/script_properties.blend new file mode 100644 index 0000000..9125b31 Binary files /dev/null and b/script_properties/script_properties.blend differ diff --git a/script_examples/script_properties_global/Sources/arm/Config.hx b/script_properties_global/Sources/arm/Config.hx similarity index 100% rename from script_examples/script_properties_global/Sources/arm/Config.hx rename to script_properties_global/Sources/arm/Config.hx diff --git a/script_examples/script_properties_global/Sources/arm/ReadConfig.hx b/script_properties_global/Sources/arm/ReadConfig.hx similarity index 100% rename from script_examples/script_properties_global/Sources/arm/ReadConfig.hx rename to script_properties_global/Sources/arm/ReadConfig.hx diff --git a/script_properties_global/script_properties_global.blend b/script_properties_global/script_properties_global.blend new file mode 100644 index 0000000..d148e2f Binary files /dev/null and b/script_properties_global/script_properties_global.blend differ diff --git a/script_rigidbody_trigger/README.md b/script_rigidbody_trigger/README.md new file mode 100644 index 0000000..7dff43c --- /dev/null +++ b/script_rigidbody_trigger/README.md @@ -0,0 +1,10 @@ +Rigid body set to: +- Active dynamic +- Axis and rotation locked (linear and angular factor) +- Trigger/Ghost checked making this a trigger instead of a collision object +- Force deactivation unchecked to make sure physics engine keep the rigid body active +- Trigger script checks for overlapping rigid bodies on each update + +## How to test +Move the box around using WASD+QE. +When box is overlapping sphere the icoshpere object is visible, otherwise it's hidden. diff --git a/script_examples/script_rigidbody_trigger/Sources/arm/Trigger.hx b/script_rigidbody_trigger/Sources/arm/Trigger.hx similarity index 100% rename from script_examples/script_rigidbody_trigger/Sources/arm/Trigger.hx rename to script_rigidbody_trigger/Sources/arm/Trigger.hx diff --git a/script_rigidbody_trigger/script_rigidbody_trigger.blend b/script_rigidbody_trigger/script_rigidbody_trigger.blend new file mode 100644 index 0000000..64688a4 Binary files /dev/null and b/script_rigidbody_trigger/script_rigidbody_trigger.blend differ diff --git a/script_examples/script_spawnobject/Sources/arm/SpawnTrait.hx b/script_spawnobject/Sources/arm/SpawnTrait.hx similarity index 100% rename from script_examples/script_spawnobject/Sources/arm/SpawnTrait.hx rename to script_spawnobject/Sources/arm/SpawnTrait.hx diff --git a/script_spawnobject/script_spawnobject.blend b/script_spawnobject/script_spawnobject.blend new file mode 100644 index 0000000..b3f7d93 Binary files /dev/null and b/script_spawnobject/script_spawnobject.blend differ diff --git a/script_transform/README.md b/script_transform/README.md new file mode 100644 index 0000000..0ebe169 --- /dev/null +++ b/script_transform/README.md @@ -0,0 +1 @@ +Check console \ No newline at end of file diff --git a/script_transform/Sources/arm/TransformTest.hx b/script_transform/Sources/arm/TransformTest.hx new file mode 100644 index 0000000..9a57799 --- /dev/null +++ b/script_transform/Sources/arm/TransformTest.hx @@ -0,0 +1,45 @@ +package arm; + +class TransformTest extends iron.Trait { + public function new() { + super(); + + notifyOnInit(function() { + + trace('Testing 2 cubes, parent cube at (1, 0, 0), child cube at (5, 0, 0)'); + + trace('Parent location: ' + object.parent.transform.loc); + // (1, 0, 0) + + trace('Child location: ' + object.transform.loc); + // (5, 0, 0) + + trace('Child location in world space: ' + object.transform.world.getLoc()); + // (6, 0, 0) + + trace('Setting child to parent location …'); + object.transform.loc.set(0, 0, 0); + object.transform.buildMatrix(); + + trace('Child location: ' + object.transform.loc); + // (0, 0, 0) + + trace('Child location in world space: ' + object.transform.world.getLoc()); + // (1, 0, 0) + + trace('Moving parent …'); + object.parent.transform.loc.set(0, 3, 0); + object.parent.transform.buildMatrix(); + + trace('Child location: ' + object.transform.loc); + // (0, 0, 0) + + trace('Child location in world space: ' + object.transform.world.getLoc()); + // (0, 3, 0) + + // Note: In Blender, you may need to: + // - Clear Parent - Clear Parent Inverse + // - To get local transform + }); + } +} diff --git a/script_transform/script_transform.blend b/script_transform/script_transform.blend new file mode 100644 index 0000000..96ef487 Binary files /dev/null and b/script_transform/script_transform.blend differ diff --git a/sensor/sensor.blend b/sensor/sensor.blend deleted file mode 100644 index 9b53fa6..0000000 Binary files a/sensor/sensor.blend and /dev/null differ diff --git a/server_stream/README.md b/server_stream/README.md new file mode 100644 index 0000000..5fe77e5 --- /dev/null +++ b/server_stream/README.md @@ -0,0 +1 @@ +Press keyboard space to play speaker sound \ No newline at end of file diff --git a/server_stream/load.blend b/server_stream/load.blend deleted file mode 100644 index 8b3b6c9..0000000 Binary files a/server_stream/load.blend and /dev/null differ diff --git a/server_stream/server_stream.blend b/server_stream/server_stream.blend new file mode 100644 index 0000000..5a654fd Binary files /dev/null and b/server_stream/server_stream.blend differ diff --git a/sound/README.md b/sound/README.md new file mode 100644 index 0000000..ec11caa --- /dev/null +++ b/sound/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/sound diff --git a/sound/sound.blend b/sound/sound.blend index df6f71c..e64bcb0 100644 Binary files a/sound/sound.blend and b/sound/sound.blend differ diff --git a/spawn_from_scene/README.md b/spawn_from_scene/README.md new file mode 100644 index 0000000..0190bda --- /dev/null +++ b/spawn_from_scene/README.md @@ -0,0 +1 @@ +Spawns an object from another scene. \ No newline at end of file diff --git a/spawn_from_scene/spawn.blend b/spawn_from_scene/spawn.blend deleted file mode 100644 index db02c4c..0000000 Binary files a/spawn_from_scene/spawn.blend and /dev/null differ diff --git a/spawn_from_scene/spawn_from_scene.blend b/spawn_from_scene/spawn_from_scene.blend new file mode 100644 index 0000000..e29093a Binary files /dev/null and b/spawn_from_scene/spawn_from_scene.blend differ diff --git a/split_screen/split_screen.blend b/split_screen/split_screen.blend deleted file mode 100644 index 41d0b0a..0000000 Binary files a/split_screen/split_screen.blend and /dev/null differ diff --git a/terrain/terrain.blend b/terrain/terrain.blend deleted file mode 100644 index 50b4c85..0000000 Binary files a/terrain/terrain.blend and /dev/null differ diff --git a/tilesheet/README.md b/tilesheet/README.md new file mode 100644 index 0000000..3d76564 --- /dev/null +++ b/tilesheet/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/Tilesheets diff --git a/tilesheet/sprytile.md b/tilesheet/sprytile.md deleted file mode 100644 index c20802e..0000000 --- a/tilesheet/sprytile.md +++ /dev/null @@ -1,2 +0,0 @@ -The level is built using SpryTile add-on! -https://chemikhazi.itch.io/sprytile diff --git a/tilesheet/textures/license.txt b/tilesheet/textures/license.txt deleted file mode 100644 index 3608fc2..0000000 --- a/tilesheet/textures/license.txt +++ /dev/null @@ -1,22 +0,0 @@ -Dungeon tileset by Calciumtrice, usable under Creative Commons Attribution 3.0 license. - - -An original dungeon tileset suited for rogue-likes with 16x16 tiles and a wall height of 32 pixels. - -The tileset includes walls, ceilings, floors, doors and gates, furniture and containers, characters, monsters and items. - -Two varieties of the tileset are included: with or without complex ceilings. In the simple tileset, ceilings are omitted and a finish included at the top of wall tiles. I included the simplified version as I understand the standard version's ceiling edging might be too fiddly to use so you can take your pick! - -Floors and ceilings should include edges for all possible tile placements. - -If used, shadows should be applied as a multiply layer between characters/objects and floor tiles. - -Character and monster sprites include both versions with a weapon and unarmed versions that may be useful for editing. - -For best results, most items and characters should be offset a little vertically so they appear to be standing in the middle of a tile rather than the edge. This should give a better sense of scale and depth but naturally, feel free to experiment with what feels best for you. - -I suggest the following tile types be given a small vertical offset of a few pixels (e.g. 4-6 pixels): - -Chairs (furniture 16x32), containers, torches, levers, loot, misc. items, scrolls, books, potions, weapons, characters, monsters and fire. - -Credit should be given to Calciumtrice. I can be found on twitter as @Calciumtrice if you'd like to contact me or see my work at calciumtrice.tumblr.com. I am available for comissions! \ No newline at end of file diff --git a/tilesheet/tilesheet.blend b/tilesheet/tilesheet.blend index 566166b..e8e45b1 100644 Binary files a/tilesheet/tilesheet.blend and b/tilesheet/tilesheet.blend differ diff --git a/tilesheet/tilesheet2d.blend b/tilesheet/tilesheet2d.blend deleted file mode 100644 index 763dd12..0000000 Binary files a/tilesheet/tilesheet2d.blend and /dev/null differ diff --git a/tilesheet/tilesheet_walkcycle.blend b/tilesheet/tilesheet_walkcycle.blend deleted file mode 100644 index 65589b9..0000000 Binary files a/tilesheet/tilesheet_walkcycle.blend and /dev/null differ diff --git a/tilesheet_2d/README.md b/tilesheet_2d/README.md new file mode 100644 index 0000000..3d76564 --- /dev/null +++ b/tilesheet_2d/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/Tilesheets diff --git a/tilesheet_2d/Sources/arm/AnimControl.hx b/tilesheet_2d/Sources/arm/AnimControl.hx new file mode 100644 index 0000000..f797a2b --- /dev/null +++ b/tilesheet_2d/Sources/arm/AnimControl.hx @@ -0,0 +1,22 @@ +package arm; + +class AnimControl extends iron.Trait { + + var tilesheet:iron.object.Tilesheet; + + public function new() { + super(); + + notifyOnInit(function() { + tilesheet = cast(object, iron.object.MeshObject).tilesheet; + iron.system.Tween.timer(Std.random(8), playAnim); + }); + } + + function playAnim() { + tilesheet.play("rest", function() { + tilesheet.play("idle"); + iron.system.Tween.timer(Std.random(8), playAnim); + }); + } +} diff --git a/tilesheet_2d/textures/dungeon tileset calciumtrice simple.png b/tilesheet_2d/textures/dungeon tileset calciumtrice simple.png new file mode 100644 index 0000000..1c07787 Binary files /dev/null and b/tilesheet_2d/textures/dungeon tileset calciumtrice simple.png differ diff --git a/tilesheet_2d/textures/minotaur spritesheet calciumtrice.png b/tilesheet_2d/textures/minotaur spritesheet calciumtrice.png new file mode 100644 index 0000000..2c3a5f8 Binary files /dev/null and b/tilesheet_2d/textures/minotaur spritesheet calciumtrice.png differ diff --git a/tilesheet_2d/textures/orc spritesheet calciumtrice.png b/tilesheet_2d/textures/orc spritesheet calciumtrice.png new file mode 100644 index 0000000..9c6f84b Binary files /dev/null and b/tilesheet_2d/textures/orc spritesheet calciumtrice.png differ diff --git a/tilesheet_2d/textures/ranger spritesheet calciumtrice.png b/tilesheet_2d/textures/ranger spritesheet calciumtrice.png new file mode 100644 index 0000000..c6e4593 Binary files /dev/null and b/tilesheet_2d/textures/ranger spritesheet calciumtrice.png differ diff --git a/tilesheet_2d/textures/rogue spritesheet calciumtrice_0.png b/tilesheet_2d/textures/rogue spritesheet calciumtrice_0.png new file mode 100644 index 0000000..9a979f9 Binary files /dev/null and b/tilesheet_2d/textures/rogue spritesheet calciumtrice_0.png differ diff --git a/tilesheet_2d/textures/warrior spritesheet calciumtrice.png b/tilesheet_2d/textures/warrior spritesheet calciumtrice.png new file mode 100644 index 0000000..881f12f Binary files /dev/null and b/tilesheet_2d/textures/warrior spritesheet calciumtrice.png differ diff --git a/tilesheet_2d/textures/wizard spritesheet calciumtrice.png b/tilesheet_2d/textures/wizard spritesheet calciumtrice.png new file mode 100644 index 0000000..5694a1c Binary files /dev/null and b/tilesheet_2d/textures/wizard spritesheet calciumtrice.png differ diff --git a/tilesheet_2d/tilesheet_2d.blend b/tilesheet_2d/tilesheet_2d.blend new file mode 100644 index 0000000..d8bae15 Binary files /dev/null and b/tilesheet_2d/tilesheet_2d.blend differ diff --git a/tilesheet_walkcycle/README.md b/tilesheet_walkcycle/README.md new file mode 100644 index 0000000..61097d6 --- /dev/null +++ b/tilesheet_walkcycle/README.md @@ -0,0 +1,2 @@ +The level is built using [SpryTile blender add-on](https://chemikhazi.itch.io/sprytile). +https://github.com/armory3d/armory/wiki/Tilesheets diff --git a/tilesheet_walkcycle/Sources/arm/AnimControl.hx b/tilesheet_walkcycle/Sources/arm/AnimControl.hx new file mode 100644 index 0000000..f797a2b --- /dev/null +++ b/tilesheet_walkcycle/Sources/arm/AnimControl.hx @@ -0,0 +1,22 @@ +package arm; + +class AnimControl extends iron.Trait { + + var tilesheet:iron.object.Tilesheet; + + public function new() { + super(); + + notifyOnInit(function() { + tilesheet = cast(object, iron.object.MeshObject).tilesheet; + iron.system.Tween.timer(Std.random(8), playAnim); + }); + } + + function playAnim() { + tilesheet.play("rest", function() { + tilesheet.play("idle"); + iron.system.Tween.timer(Std.random(8), playAnim); + }); + } +} diff --git a/tilesheet/sprite_tux.png b/tilesheet_walkcycle/sprite_tux.png similarity index 100% rename from tilesheet/sprite_tux.png rename to tilesheet_walkcycle/sprite_tux.png diff --git a/tilesheet_walkcycle/tilesheet_walkcycle.blend b/tilesheet_walkcycle/tilesheet_walkcycle.blend new file mode 100644 index 0000000..4b50b2f Binary files /dev/null and b/tilesheet_walkcycle/tilesheet_walkcycle.blend differ diff --git a/tween/tween.blend b/tween/tween.blend index 89df451..8c419c1 100644 Binary files a/tween/tween.blend and b/tween/tween.blend differ diff --git a/ui_canvas/README.md b/ui_canvas/README.md new file mode 100644 index 0000000..e6d8b3d --- /dev/null +++ b/ui_canvas/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/ui_editor diff --git a/ui_canvas/canvas.blend b/ui_canvas/canvas.blend deleted file mode 100644 index 4250493..0000000 Binary files a/ui_canvas/canvas.blend and /dev/null differ diff --git a/ui_canvas/ui_canvas.blend b/ui_canvas/ui_canvas.blend new file mode 100644 index 0000000..51bd031 Binary files /dev/null and b/ui_canvas/ui_canvas.blend differ diff --git a/ui_events/Bundled/canvas/MyCanvas.json b/ui_events/Bundled/canvas/MyCanvas.json index e628c22..68faff4 100644 --- a/ui_events/Bundled/canvas/MyCanvas.json +++ b/ui_events/Bundled/canvas/MyCanvas.json @@ -1 +1 @@ -{"name":"untitled","x":0,"y":0,"width":960,"height":540,"elements":[{"id":1,"type":2,"name":"Button","event":"button","x":99,"y":83,"width":150,"height":100,"text":"Move Box","asset":"","color":-1,"anchor":0,"children":[]},{"id":3,"type":0,"name":"Text","event":"","x":12,"y":15,"width":220,"height":48,"text":"UI Canvas","asset":"","color":-1,"anchor":0,"children":[]}],"assets":[]} \ No newline at end of file +{"name":"untitled","x":0,"y":0,"width":960,"height":540,"elements":[{"id":1,"type":2,"name":"Button","event":"move_box","x":20,"y":20,"width":201,"height":57,"text":"Move Box","asset":"","color":-1,"anchor":0,"children":[],"visible":true,"rotation":0}],"assets":[],"theme":"Default Light"} \ No newline at end of file diff --git a/ui_events/README.md b/ui_events/README.md new file mode 100644 index 0000000..e6d8b3d --- /dev/null +++ b/ui_events/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/ui_editor diff --git a/ui_events/events.blend b/ui_events/events.blend deleted file mode 100644 index 0429d5b..0000000 Binary files a/ui_events/events.blend and /dev/null differ diff --git a/ui_events/ui_events.blend b/ui_events/ui_events.blend new file mode 100644 index 0000000..fc0e075 Binary files /dev/null and b/ui_events/ui_events.blend differ diff --git a/ui_script2d/README.md b/ui_script2d/README.md new file mode 100644 index 0000000..8dfc49b --- /dev/null +++ b/ui_script2d/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/zui diff --git a/ui_script2d/ui.blend b/ui_script2d/ui.blend deleted file mode 100644 index 36662fa..0000000 Binary files a/ui_script2d/ui.blend and /dev/null differ diff --git a/ui_script2d/ui_script2d.blend b/ui_script2d/ui_script2d.blend new file mode 100644 index 0000000..e942004 Binary files /dev/null and b/ui_script2d/ui_script2d.blend differ diff --git a/ui_script3d/README.md b/ui_script3d/README.md new file mode 100644 index 0000000..8dfc49b --- /dev/null +++ b/ui_script3d/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/zui diff --git a/ui_script3d/ui.blend b/ui_script3d/ui.blend deleted file mode 100644 index 1afcee7..0000000 Binary files a/ui_script3d/ui.blend and /dev/null differ diff --git a/ui_script3d/ui_script3d.blend b/ui_script3d/ui_script3d.blend new file mode 100644 index 0000000..c0674c3 Binary files /dev/null and b/ui_script3d/ui_script3d.blend differ diff --git a/virtual_gamepad/virtual_gamepad.blend b/virtual_gamepad/virtual_gamepad.blend deleted file mode 100644 index 4ca1adf..0000000 Binary files a/virtual_gamepad/virtual_gamepad.blend and /dev/null differ diff --git a/voxelao_teapots/teapots.blend b/voxelao_teapots/teapots.blend deleted file mode 100644 index b4ef009..0000000 Binary files a/voxelao_teapots/teapots.blend and /dev/null differ diff --git a/wasm_call/Bundled/main.wasm b/wasm_call/Bundled/main.wasm new file mode 100755 index 0000000..3a4ab81 Binary files /dev/null and b/wasm_call/Bundled/main.wasm differ diff --git a/wasm_call/README.md b/wasm_call/README.md new file mode 100644 index 0000000..09092ee --- /dev/null +++ b/wasm_call/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/wasm diff --git a/web_assembly/call_wasm/Sources/arm/MyTrait.hx b/wasm_call/Sources/arm/MyTrait.hx similarity index 82% rename from web_assembly/call_wasm/Sources/arm/MyTrait.hx rename to wasm_call/Sources/arm/MyTrait.hx index f6f773c..a59be62 100644 --- a/web_assembly/call_wasm/Sources/arm/MyTrait.hx +++ b/wasm_call/Sources/arm/MyTrait.hx @@ -12,9 +12,9 @@ class MyTrait extends iron.Trait { function init() { // Load wasm blob - Data.getBlob("main.wasm", function(b:kha.Blob) { + Data.getBlob("main.wasm", blob -> { // Create wasm module - var wasm = Wasm.instance(b); + var wasm = Wasm.instance(blob); var rot = 0.0; notifyOnUpdate(function() { // Call function from wasm module diff --git a/web_assembly/call_wasm/main.c b/wasm_call/main.c similarity index 100% rename from web_assembly/call_wasm/main.c rename to wasm_call/main.c diff --git a/web_assembly/c_trait/wasm.png b/wasm_call/wasm.png similarity index 100% rename from web_assembly/c_trait/wasm.png rename to wasm_call/wasm.png diff --git a/wasm_call/wasm_call.blend b/wasm_call/wasm_call.blend new file mode 100644 index 0000000..ed55642 Binary files /dev/null and b/wasm_call/wasm_call.blend differ diff --git a/web_assembly/c_trait/Bundled/main.wasm b/wasm_trait_c/Bundled/main.wasm old mode 100644 new mode 100755 similarity index 100% rename from web_assembly/c_trait/Bundled/main.wasm rename to wasm_trait_c/Bundled/main.wasm diff --git a/wasm_trait_c/README.md b/wasm_trait_c/README.md new file mode 100644 index 0000000..8065155 --- /dev/null +++ b/wasm_trait_c/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/wasm \ No newline at end of file diff --git a/web_assembly/c_trait/main.c b/wasm_trait_c/main.c similarity index 100% rename from web_assembly/c_trait/main.c rename to wasm_trait_c/main.c diff --git a/web_assembly/call_wasm/wasm.png b/wasm_trait_c/wasm.png similarity index 100% rename from web_assembly/call_wasm/wasm.png rename to wasm_trait_c/wasm.png diff --git a/wasm_trait_c/wasm_trait_c.blend b/wasm_trait_c/wasm_trait_c.blend new file mode 100644 index 0000000..54b4c32 Binary files /dev/null and b/wasm_trait_c/wasm_trait_c.blend differ diff --git a/wasm_trait_rust/Bundled/main.wasm b/wasm_trait_rust/Bundled/main.wasm new file mode 100644 index 0000000..f61aeb7 Binary files /dev/null and b/wasm_trait_rust/Bundled/main.wasm differ diff --git a/wasm_trait_rust/README.md b/wasm_trait_rust/README.md new file mode 100644 index 0000000..09092ee --- /dev/null +++ b/wasm_trait_rust/README.md @@ -0,0 +1 @@ +https://github.com/armory3d/armory/wiki/wasm diff --git a/web_assembly/rust_trait/main.rs b/wasm_trait_rust/main.rs similarity index 100% rename from web_assembly/rust_trait/main.rs rename to wasm_trait_rust/main.rs diff --git a/web_assembly/rust_trait/wasm.png b/wasm_trait_rust/wasm.png similarity index 100% rename from web_assembly/rust_trait/wasm.png rename to wasm_trait_rust/wasm.png diff --git a/wasm_trait_rust/wasm_trait_rust.blend b/wasm_trait_rust/wasm_trait_rust.blend new file mode 100644 index 0000000..5008cfa Binary files /dev/null and b/wasm_trait_rust/wasm_trait_rust.blend differ diff --git a/web_assembly/c_trait/readme.md b/web_assembly/c_trait/readme.md deleted file mode 100644 index 3991558..0000000 --- a/web_assembly/c_trait/readme.md +++ /dev/null @@ -1 +0,0 @@ -http://armory3d.org/manual/#/code/wasm diff --git a/web_assembly/c_trait/wasm.blend b/web_assembly/c_trait/wasm.blend deleted file mode 100644 index a970522..0000000 Binary files a/web_assembly/c_trait/wasm.blend and /dev/null differ diff --git a/web_assembly/call_wasm/Bundled/main.wasm b/web_assembly/call_wasm/Bundled/main.wasm deleted file mode 100644 index fbe49a7..0000000 Binary files a/web_assembly/call_wasm/Bundled/main.wasm and /dev/null differ diff --git a/web_assembly/call_wasm/readme.md b/web_assembly/call_wasm/readme.md deleted file mode 100644 index 3991558..0000000 --- a/web_assembly/call_wasm/readme.md +++ /dev/null @@ -1 +0,0 @@ -http://armory3d.org/manual/#/code/wasm diff --git a/web_assembly/call_wasm/wasm.blend b/web_assembly/call_wasm/wasm.blend deleted file mode 100644 index 04ed71e..0000000 Binary files a/web_assembly/call_wasm/wasm.blend and /dev/null differ diff --git a/web_assembly/rust_trait/Bundled/main.wasm b/web_assembly/rust_trait/Bundled/main.wasm deleted file mode 100644 index e31d23d..0000000 Binary files a/web_assembly/rust_trait/Bundled/main.wasm and /dev/null differ diff --git a/web_assembly/rust_trait/readme.md b/web_assembly/rust_trait/readme.md deleted file mode 100644 index 3991558..0000000 --- a/web_assembly/rust_trait/readme.md +++ /dev/null @@ -1 +0,0 @@ -http://armory3d.org/manual/#/code/wasm diff --git a/web_assembly/rust_trait/wasm.blend b/web_assembly/rust_trait/wasm.blend deleted file mode 100644 index 1b6ac39..0000000 Binary files a/web_assembly/rust_trait/wasm.blend and /dev/null differ diff --git a/world_sun_direction/README.md b/world_sun_direction/README.md new file mode 100644 index 0000000..107ba74 --- /dev/null +++ b/world_sun_direction/README.md @@ -0,0 +1,6 @@ +Sky Texture synchronized with light direction. + +### Keyboard + +- `1` HosekWilkie +- `2` Nishita diff --git a/world_sun_direction/Sources/arm/MyTrait.hx b/world_sun_direction/Sources/arm/MyTrait.hx index c24cd59..194b281 100644 --- a/world_sun_direction/Sources/arm/MyTrait.hx +++ b/world_sun_direction/Sources/arm/MyTrait.hx @@ -1,26 +1,42 @@ package arm; import armory.renderpath.HosekWilkie; +import armory.renderpath.Nishita; +import iron.Scene; +import iron.math.Vec4; +import iron.system.Input; class MyTrait extends iron.Trait { public function new() { super(); - - notifyOnUpdate(function() { - var world = iron.Scene.active.world; - var light = iron.Scene.active.lights[0]; + notifyOnInit(function() { - // Sync sun direction - var v = light.look(); - world.raw.sun_direction[0] = v.x; - world.raw.sun_direction[1] = v.y; - world.raw.sun_direction[2] = v.z; + var world = Scene.active.world; + var center = Scene.active.getEmpty('Center'); + var light = Scene.active.lights[0]; + var keyboard = Input.getKeyboard(); + var model = 'hosekwilkie'; + notifyOnUpdate(function() { + + if (keyboard.started("1")) Scene.setActive('Scene_'+(model = 'hosekwilkie')); + if (keyboard.started("2")) Scene.setActive('Scene_'+(model = 'nishita')); + + center.transform.rotate(Vec4.xAxis(),0.02); - // Update sky model - HosekWilkie.recompute(world); + // Sync sun direction + var v = light.look(); + world.raw.sun_direction[0] = v.x; + world.raw.sun_direction[1] = v.y; + world.raw.sun_direction[2] = v.z; - // Set world strength - // world.getGlobalProbe().raw.strength = 1.0; + switch model { + case 'hosekwilkie': HosekWilkie.recompute(world); + case 'nishita': Nishita.recompute(world); + } + + // Set world strength + // world.getGlobalProbe().raw.strength = 1.0; + }); }); } } diff --git a/world_sun_direction/world.blend b/world_sun_direction/world.blend deleted file mode 100644 index 251082b..0000000 Binary files a/world_sun_direction/world.blend and /dev/null differ diff --git a/world_sun_direction/world_sun_direction.blend b/world_sun_direction/world_sun_direction.blend new file mode 100644 index 0000000..9a4dce3 Binary files /dev/null and b/world_sun_direction/world_sun_direction.blend differ