Commit Graph

129 Commits

Author SHA1 Message Date
1vanK
b08f08dfb6
36_Urho2DTileMap: Fix invisible cursor - Revert ef6284c938 (#2749) 2020-12-24 05:15:16 +03:00
1vanK
107d99711e
Add MSG_USER const. Fix https://github.com/urho3d/Urho3D/issues/2734 (#2735) 2020-12-05 15:50:29 +03:00
魔大农
96cb0d5d1e Fixed event data names in sample 25
Liberates emitter from screen corner.
2020-03-16 09:51:10 +08:00
Arnis Lielturks
02c9072fee 17_SceneReplication lua fix 2020-03-08 11:07:00 +02:00
1vanK
5f52f9433f Fix invisible character in lua version of example 50 2019-08-18 04:44:12 +08:00
1vanK
9a61d48076 Fix example 50 invisible traps https://github.com/urho3d/Urho3D/issues/2390 2019-08-18 04:44:12 +08:00
ELMERzark
b4b8667f3e Update 06_SkeletalAnimation.lua 2019-03-30 18:58:52 +08:00
Arnis Lielturks
d4cf8a9f05
localization JSON file now supports simple key-value structure (#2359)
* localization JSON file now supports simple key-value structure

* docs updated, code refactoring

* minor fix

* AngelScript integration fixed
2019-02-16 14:42:01 +02:00
Arnis Lielturks
e363036036
kNet replaced with SLikeNet (RakNet fork). 2018-08-11 20:35:09 +08:00
Yao Wei Tjong 姚伟忠
0631979496
Clean up redundant semicolons in sample Lua scripts.
[ci skip]
2018-02-04 22:58:19 +08:00
Yao Wei Tjong 姚伟忠
3a76654c44
Demonstrate how to bring to front an UI-element.
Close #2251.
2018-02-04 16:11:50 +08:00
Ricardo Abreu
38feb91078 use explicit default initialization in TrailPoint in-class member initializers; add periods to comments. 2018-02-01 18:59:01 +08:00
Ricardo Abreu
10734bad2c fix RibbonTrail coverity issues; CID: 127543, 216057, 216060, 216066 2018-02-01 18:59:01 +08:00
Ricardo Abreu
c6a6598764 Add stretchable sprite component and corresponding sample. 2018-01-26 06:57:23 +08:00
thesquib
b46db86f24 Updated for current Urho3D, modified isometric demo to include interactions similar to the 2d platformer. 2017-11-23 23:01:51 +13:00
Mike3D
e7ff66e6d7 Added 2 Urho2D samples (isometric demo and platformer) 2017-11-23 23:01:50 +13:00
Lasse Öörni
4f54e7a95e Hello3DUI Lua version and minor Lua binding fix. 2017-08-23 23:29:02 +03:00
Eugene Kozlov
d537c2027a Merge pull request #2061 from eugeneko/navmesh-streaming
Navmesh streaming
2017-08-12 15:52:35 +03:00
Eugene Kozlov
ef3b6efd96 Add streaming mode to Lua samples 15_Navigation and 39_CrowdNavigation. Minor changes. 2017-08-08 01:34:57 +03:00
TheComet
e134de1b18 Updating sample scripts 2017-08-06 17:09:27 +02:00
TheComet
4f96c7c29f Refactoring the 'feature' setters and getters into a single method. Renaming a few things to be more consistent. Adding Documentation 2017-07-28 18:36:57 +02:00
TheComet
4a6d86804e Fixing bugs, updating script bindings and sample code 2017-07-28 03:42:16 +02:00
Iain Merrick
0450bcd11e Add configurable oversampling to improve subpixel font rendering (#1953)
Subpixel-positioned text looks blurry, due to bilinear filtering of the
underlying texture. The basic idea here is to stretch the font glyphs
horizontally to increase the sharpness at subpixel positions. The
stretched images need to be smoothed to avoid aliasing artifacts; this
is done in FontFaceFreeType::BoxFilter().

Glyphs are always pixel-aligned vertically, so no vertical oversampling
is needed.

To make this feature comprehensible (I hope!) I've removed the
'subpixelGlyphPositions' flag and replaced it with a couple of values:
'fontSubpixelThreshold' sets the point at which subpixel positioning
kicks on, and 'fontOversampling' controls the amount of stretching.

The default values are 12pt text and 2x oversampling. These are fairly
conservative settings, which should improve small text without wasting
a lot of memory.

Note that when the font hint level is NORMAL (the default), subpixel
positioning and oversampling are both disabled. So, this feature doesn't
change any default behavior, and applies some hopefully sensible values
if the hint level is set to LIGHT or NONE.
2017-07-03 11:21:47 -05:00
Iain Merrick
e603eed814 Add a 'subpixel glyph positions' option to UI (#1953)
When this option is enabled, text will be formatted with subpixel
(fractional) positions on the x-axis. Positions on the y-axis are
still pixel-aligned.

Note that this option has no effect if the hinting level is set
to FONT_HINT_LEVEL_NORMAL, as each glyph is rounded to an integral
pixel size by the hinter. It only makes a different if the hinting
mode is LIGHT (vertical hinting only) or NONE.

With subpixel positioning, the output will look blurrier due to
texture filtering. TODO: Add horizontal oversampling to improve
sharpness. That needs extra memory so it should be configurable.
2017-06-20 17:04:56 -05:00
Iain Merrick
1e3a1edd45 Change font size to a float (closes #1952)
This commit changes the 'pointSize' parameter in Font, Text
and Text3D from an int to a float, allowing e.g. 14.5pt text.
Note that when hinting is enabled, font metrics are snapped
to pixel boundaries, so the effect may be hard to see unless
you also set UI.FontHintLevel to LIGHT or NONE.

This is a change to the public API, but existing code (including
scripts) should compile and run as before.
2017-06-18 22:27:59 -05:00
Lasse Öörni
b9c3199a25 Merge remote-tracking branch 'iainmerrick/font_hinting' 2017-06-17 22:17:59 +03:00
Lasse Öörni
e5dcfdafbb Merge remote-tracking branch 'dragonCASTjosh/master' 2017-06-17 00:08:03 +03:00
Iain Merrick
282f250e3a Add UI.FontHintLevel property
There are three levels: NORMAL (the default), LIGHT and NONE.
The LIGHT level makes FreeType align font outlines to pixel
boundaries vertically, but not horizontally.
2017-06-15 15:30:28 -05:00
Iain Merrick
8fe78f261b Lua version of Typography sample program 2017-06-13 13:40:31 -05:00
dragonCASTjosh
53c36d25f9 Added PBR demo changes to LUA and AS 2017-06-13 19:25:40 +01:00
1vanK
fa767d1dc1 40_Localization: Center mouse on start 2017-05-05 19:39:45 +03:00
Lasse Öörni
d4df1937c8 Line breaks formatting for RaycastVehicle demo code. 2017-04-29 20:33:36 +03:00
Sergey Lapin
ed210093d4 RaycastVehicle Lua demo code 2017-04-25 13:45:09 +03:00
Yao Wei Tjong 姚伟忠
8c9122ce25 Minor refactoring and cleaning on IK component's code. 2017-04-01 21:28:27 +08:00
Alex Murray
68f8d23411 Fixing issues raised by Mike3D (incorrect offset in sample, exposing auto solve) 2017-03-22 14:23:14 +01:00
TheComet
327965a40c Fixing build on windows, fixing segfault in release builds 2017-03-22 02:15:32 +01:00
TheComet
8fc0aa2866 Lua script bindings and CPP sample 2017-03-21 15:56:47 +01:00
Enhex
0e2182b4e8 Updated sound effects Lua sample to use SetAutoRemoveMode() instead of nodes. 2017-03-15 21:15:56 +02:00
Lasse Öörni
2821837f2a Remove zero damping from Urho2DConstraints sample to eliminate jittering behavior. Closes #1816. 2017-02-11 15:33:09 +02:00
Mateus Vendramini
78b77ed48f Fixing small typos in comments 2017-02-05 17:33:01 -02:00
Lasse Öörni
11f099c655 Minor style edits. Use position instead of iterator in autocomplete to be safe against iterator invalidation. Add Lua binding to autocomplete. Add short description of the new feature being demonstrated in sample 26. 2017-01-01 22:35:16 +02:00
1vanK
9d7dceb2f2 06_SkeletalAnimatin: fix running out bounds, lighting correction
Fix excessive specular on Kachujin texture
2016-12-30 13:58:41 +03:00
Lasse Öörni
299dbf803b Squashed commit of the following:
commit 8b67f0edcb9b588c70df1676bdbfa4853e50c3aa
Author: Lumak <lumak5309@gmail.com>
Date:   Thu Dec 29 10:18:40 2016 -0800

    corrected to stonetiled mat

commit c17d68b1e0ed5435c492a26ed8010c4f4aa708eb
Author: Lumak <lumak5309@gmail.com>
Date:   Thu Dec 29 10:14:20 2016 -0800

    removed proto mat/texture

commit 1c322d19556d7796c4958a920203e5b1c80af843
Author: Lumak <lumak5309@gmail.com>
Date:   Wed Dec 28 12:18:59 2016 -0800

    replaced the Jack with Jill in 06_SkeletalAnimation sample
2016-12-29 20:39:28 +02:00
Lasse Öörni
fef73ba4c4 Squashed commit of the following:
commit 06f4d6afab933e32eaf3428dd080766b11a87f82
Author: Lasse Öörni <loorni@gmail.com>
Date:   Sun Dec 18 18:31:39 2016 +0200

    Black variant of logo.

commit 8fa11f888de023fcc76f26908e2ea77ebfd3146b
Author: Lasse Öörni <loorni@gmail.com>
Date:   Sun Dec 18 17:12:14 2016 +0200

    New logo in Lua samples.

commit 1283e38db1164a1c1e5db7d1042feabf996031fb
Merge: 4062553 4f5a2ea
Author: Lasse Öörni <loorni@gmail.com>
Date:   Sun Dec 18 16:51:04 2016 +0200

    Merge remote-tracking branch 'Modanung/new-logo'

commit 4f5a2ea104feeac12b87d3fb89d116e1866c2513
Author: Modanung <frode@lindeijer.nl>
Date:   Sun Dec 18 05:36:37 2016 +0100

    Also replaced logo in angelscript samples

commit 7c6e5e90c4dc82705883806e46b0957a44fbc787
Author: Modanung <frode@lindeijer.nl>
Date:   Sun Dec 18 03:34:31 2016 +0100

    Changed logo in samples to fishbone logo
2016-12-18 18:48:39 +02:00
Johnathan Jenkins
d78fc4020f minor typos 2016-10-28 13:07:14 -07:00
Yao Wei Tjong 姚伟忠
c13084b962 Add Lua binding for Model's SetVertexBuffer() and SetIndexBuffer().
Related to #1638.
2016-10-14 00:59:15 +08:00
1vanK
bba9766c66 39_CrowdNavigation: animation sync 2016-09-14 11:24:20 +03:00
Lasse Öörni
8bef941082 Fix slowed down navigation crowd agent when node dirtied in E_CROWD_AGENT_NODE_REPOSITION. Send the event only after position has been updated. Check for only rotation changing when node dirtied, and do not update position / reset state in that case. Closes #1548. 2016-08-31 12:41:10 +03:00
Lasse Öörni
b3964e21c5 Demonstrate Z fighting elimination by depth bias in 10_RenderToTexture sample. Closes #1543. 2016-08-30 21:21:10 +03:00
Lasse Öörni
98a3c8d49a Remove Abs() from NinjaSnowWar & CharacterDemo ground contact handling to prove that we can check for normals pointing up to detect ground. 2016-08-17 23:52:13 +03:00