Commit Graph

447 Commits

Author SHA1 Message Date
Yao Wei Tjong 姚伟忠
88d86548a4 Further minor clean up the CrowdAgent class.
Revise the sample so Jack walk and turn more naturally.
2015-05-28 17:52:12 +08:00
Yao Wei Tjong 姚伟忠
6b72c4412a Minor code clean up and bug fixes for DetourCrowd implementation.
Avoid using multiple vectors to hold the same set of objects in the DetourCrowd sample.
2015-05-27 21:51:10 +08:00
Mike3D
e166e7a84d Added moving obstacles and teleportation to sample 39. Also various behavior tweaks and ground texture modified to break monotony and discriminate with sample 15. If something doesn't appeal it can be reverted.
Also set default mask and areaID at OffMeshConnection initialization.
2015-05-23 09:27:39 +02:00
Mike3D
7f3a6ef86b Added off-mesh connections to sample 39 2015-05-20 10:56:32 +02:00
Mike3D
cca861f6d3 Simplified sample 39 using the crowd manager 2015-05-17 10:15:41 +02:00
Lasse Öörni
5b41352680 Minor whitespace and code convention edits. 2015-05-12 15:37:27 +03:00
JSandusky
ca7a6af1f3 CrowdAgent state handling
- CrowdAgentStateChanged event includes Node and Agent parameters
- CrowdAgentFailure event for target/agent-state failures
- GetAreaCost in NavigationMesh, script bindings updated
- Fixed error spawning Jack nodes on top of boxes in Angelscript sample
- DebugRendering for DynamicNavigationMesh layers
- Rename all references to AreaType as AreaID
- CrowdAgent angelscript enum bindings made consistent
- Include simple example handling of CrowdAgentFailure for faulty
initial state (sides of boxes) in all samples
- Consistent values in samples (box/mushroom counts)
- Completed "todo" for investigating rcFilterLedgeSpans in
DynamicNavigationMesh
2015-05-12 02:29:32 -04:00
Yao Wei Tjong 姚伟忠
fb84bcf179 For Travis CI - tune down email notifications frequency.
Add checkpoint for Emscripten CI build and use it to determine whether to skip make test and/or scaffolding test when running short of time.

For Travis CI - perform the full CI jobs for topic branches and PRs.

For Travis CI - use custom data in .travis.yml for excluding samples.
2015-05-08 18:39:14 +08:00
Mike3D
581d1b550b Do not hardcode obstacle radius 2015-05-07 17:20:05 +02:00
Yao Wei Tjong 姚伟忠
252206a207 Decouple Physics subsystem from DetourCrowd implementation.
Also minor code clean up (dot the i's and cross the t's).
2015-05-07 16:52:18 +08:00
Lasse Öörni
42c352f2ba Tabs to spaces. Change NavArea Bounds to BoundingBox to match Urho convention elsewhere. Added NavArea component Lua binding. 2015-05-06 11:56:12 +03:00
JSandusky
567a29d74e Implementation of DetourCrowd and DetourTileCache
Added Components:
- DynamicNavigationMesh (uses DetourTileCache)
- Obstacle (interacts with DynamicNavigationMesh)
- DetourCrowdManager (uses DetourCrowd for crowd control)
- CrowdAgent (interacts with DetourCrowdManager)
- NavArea (marks area types)

Changes:
- Refactor NavigationMesh build process
- Addition of cylinder debug rendering
- Exposed Area Type Costs in navigation

CrowdNavigation sample for Lua, Angelscript, and C++ using
DynamicNavigationMesh, Obstacle, CrowdAgent, and DetourCrowdManager
components.
2015-05-04 22:14:00 -04:00
Yao Wei Tjong 姚伟忠
d2ea0ca934 Finetune the default test timeout value for Emscripten platform.
We have a time constraint on Travis CI side for all our CI builds and tests. Default value of 10 for Emscripten and 5 for native platform is also inline with Emscripten's claim that asm.js is about 50% slower than native speed.
2015-03-14 12:46:15 +08:00
Yao Wei Tjong 姚伟忠
0fe597223f Add initial support for integration tests on Emscripten platform.
At the moment the 'make test' cannot be run non-interactively yet on Linux host and Mac OS X host systems due to what-could-be a bug in 'emrun' script. The issue with 'emrun' has been reported to upstream (https://github.com/kripken/emscripten/issues/3234).
2015-03-07 12:00:47 +08:00
Yao Wei Tjong 姚伟忠
4d34d0a626 Add new Emscripten build option for creating shared data file. 2015-03-03 23:32:27 +08:00
Yao Wei Tjong 姚伟忠
02572a9ec5 Add generic support for embedding and loading files for Emscripten.
Via the following source file property "EMCC_OPTION". The supported property values are: js-library, pre-js, post-js, embed-file, preload-file, shell-file. The files are added as link dependency so a relink will automatically occur when they are modified (have newer timestamp than target).
2015-03-03 01:16:40 +08:00
Lasse Öörni
b6ea033ce3 Enable CharacterDemo & VehicleDemo also without networking. Update documentation. 2015-02-14 22:16:39 +02:00
Yao Wei Tjong 姚伟忠
24e70ecd60 For Travis-CI - reduce number of samples in Emscripten build.
Also remove CI build for shared lib type. It is anyway just an emulation as Emscripten does not support dynamic library (yet) and our earlier issue with emar for static lib type has been fully resolved. Test [ci package] for Emscripten.
2015-02-13 21:31:59 +08:00
Yao Wei Tjong 姚伟忠
6763207787 Complet the rebase to master branch. 2015-02-13 21:23:05 +08:00
aster2013
83e1fbebe3 Remove WeakPtr<LuaFunction> in LuaIntegration sample;
Convert tab to spaces in ParticleEffect2D.
2015-02-05 14:01:17 +08:00
Yao Wei Tjong 姚伟忠
cfff44873f Bump missed out files. [ci skip]
$ for f in `git grep -l '2008-2014 the Urho3D project'`; do perl -pi -e 's/2008-2014 the Urho3D project/2008-2015 the Urho3D project/g' $f; done
2015-02-01 08:16:05 +08:00
Lasse Öörni
bb2ebf7568 Bump copyright to 2015. 2015-01-31 21:03:53 +02:00
Yao Wei Tjong 姚伟忠
ed214bbeb3 Avoid the include dirs hack for finding the Urho3D.h header.
It is now a library user own's responsibility to include the Urho3D.h in their source code. Or to include it as part of their own precompiled header similar to what Urho3D project has done.
2015-01-20 18:15:29 +08:00
Yao Wei Tjong 姚伟忠
35307869ee Clean up to remove unused CMake variables.
LIBS is now defunct. No more dual purpose usage.
INCLUDE_DIRS_ONLY is renamed to INCLUDE_DIRS.
LINK_LIBS_ONLY is renamed to LIBS.
2015-01-07 21:51:00 +08:00
Yao Wei Tjong 姚伟忠
359efb2d37 Move the DebugNew.h from Urho3D/Container subdir to Urho3D subdir. 2015-01-05 22:31:32 +08:00
Mike3D
7f805b8645 Centered Imp Spriter anim on the Y axis and removed position offset in samples. 2015-01-05 14:32:12 +01:00
Mike3D
be94437b69 Simplified sample 15 2015-01-05 14:21:37 +01:00
Yao Wei Tjong 姚伟忠
65aa095a0c Refactor newly added sample app to use Urho3D SDK include path. 2015-01-04 22:49:18 +08:00
Yao Wei Tjong 姚伟忠
b51e419c88 Change impl. file to include the header file from corresponding subdir.
Change header file to use relative pathspec when including other files.
2015-01-04 22:40:40 +08:00
Yao Wei Tjong 姚伟忠
4feb135281 Clean up SDK include dirs. Refactor FindUrho3D CMake module.
For Travis CI - add new steps to install the Urho3D SDK and to reference Urho3D library from the installed SDK.
2015-01-04 22:32:41 +08:00
Lasse Öörni
50e2493b97 Added example of loading scene & UI content. Closes #583. 2014-12-29 22:33:15 +02:00
Mike3D
598fab2371 Use GetPosition2D() when appropriate. 2014-12-27 11:37:25 +01:00
Mike3D
c676f13d8b Removed Spriter position offset (no longer needed) 2014-12-27 11:14:56 +01:00
Mike3D
08813e8e4b Ensure full display of Urho2D samples whatever the user's resolution 2014-12-23 07:54:15 +01:00
Yao Wei Tjong 姚伟忠
9855bfe5fb Apply the attribute changes after animating its values.
Fixes #554.
2014-12-04 12:56:22 +08:00
aster2013
4655ee1ee4 Submit code in LuaScript samples. 2014-11-22 16:23:17 +08:00
aster2013
c7e248b13a Enable mouse visible in UIDrag sample. 2014-11-21 22:13:22 +08:00
Lasse Öörni
b325ba5195 Support excluding 2D functionality from the build (CMake option URHO3D_URHO2D=0). Removed empty scene creation from the UIDrag example. Make compiling Civetweb conditional of URHO3D_NETWORK. Exclude samples depending on the Controls structure when URHO3D_NETWORK is disabled. 2014-11-17 21:00:02 +02:00
Lasse Öörni
16c05ee6cf Fix occlusion rendering to work with reverse triangle winding. Fix MultipleViewports C++ example using depth test in debug geometry. 2014-11-17 18:04:32 +02:00
Lasse Öörni
3969b69b0d Refactor material shader parameter animations so that they happen in response to update events, the same as component/node attribute animations. This fixes material animations depending on visibility and therefore possibly going out of sync from other updates. Add possibility to associate material with scene to make it use the scene attribute update event instead of the global update event. 2014-11-17 14:00:45 +02:00
Lasse Öörni
50eb143319 Fix consistency in touch hover touch ID. Fix returning touch IDs as available. When resetting touches, reset the touch ID mapping also. In UIDrag example, show the actual touch ID's instead of indices, to verify that the ID's stay consistent. Fix UIDrag Lua example erroneously modifying the TouchState's position. 2014-11-15 18:42:28 +02:00
hdunderscore
3d58fc94c9 Updated the UI Drag sample descriptions. 2014-11-09 18:55:37 +11:00
hdunderscore
ad6081192b Added Lua and AngelScript versions of Sample.
Added UIElement::GetDragButtonCount / UIElement::GetDragButtonCombo bindings to AngelScript.
2014-11-04 16:56:01 +11:00
hdunderscore
13412bc68f A sample showing how to use UI drag features (drag begin/move/end/cancel and how to use most of the event data), and it can be used to demonstrate multi-touch drag support on touch-enabled devices. 2014-11-02 15:29:04 +11:00
Lasse Öörni
807bd28a9d Add URHO3D_NETWORK CMake parameter to control whether networking support is built. 2014-10-07 19:33:33 +03:00
Yao Wei Tjong 姚伟忠
f943bb4faa Unwarn patch for AppleClang. A few warnings were indeed coding error. 2014-10-05 20:22:49 +08:00
Lasse Öörni
d07dc5919a Start model's geometries with at least 1 LOD level to prevent error when a call to SetNumGeometryLodLevels() is forgotten. 0 LOD levels does not make sense. 2014-10-01 14:06:37 +03:00
Lasse Öörni
9fce7ef0b7 Add "from scratch" model creation to the DynamicGeometry sample. 2014-10-01 13:56:18 +03:00
Lasse Öörni
cb0103d518 Require always registering remote events for reception. Implement a fixed blacklist of remote events that can not be registered (see Network.cpp). Removed obsolete E_WINDOWMESSAGE event definition. 2014-09-29 14:23:41 +03:00
aster2013
058428dc9c Revert test code.[ci skip] 2014-08-28 13:38:14 +08:00
aster2013
c82759de85 Add STAGGERED tile map support. 2014-08-28 12:18:35 +08:00
aster2013
937ed5f732 Merge branch 'more-options' 2014-08-22 17:47:06 +08:00
aster2013
a04edb1108 Refactor tile map, add TileMapInfo2D struct. 2014-08-21 21:03:03 +08:00
aster2013
25132bd4a0 ADD URHO3D_PHYSICS AND URHO3D_NAVIGATION OPTIONS. 2014-08-21 12:41:24 +08:00
aster
8c99b8d866 Merge branch 'tile-map' 2014-08-13 22:16:19 +08:00
aster
85bcdaecf4 Add screen to world convert functions, PhysicsWorld2D use these function to pick rigid body. 2014-08-13 22:07:46 +08:00
aster
d13338f793 Add isometric map support. 2014-08-11 21:13:13 +08:00
aster2013
a3c819f32a Add tile map Lua binding and sample. 2014-08-11 13:26:39 +08:00
Lasse Öörni
6d5c73a15f Note that client cameras should be created into a local node in networked applications. 2014-08-07 10:45:50 +03:00
aster2013
1262869ac6 Change tile size to float, fix bug, change Desert.png. 2014-08-06 12:37:53 +08:00
aster
ef32eee6ee Add tile map support in Urho2D, current not all of features are supported in Urho2D, but I think we can add it later. Fore more information about tile map, please refer http://www.mapeditor.org/. 2014-08-05 22:55:33 +08:00
aster
9e716da779 Dump used resource file name at sample exiting. 2014-08-04 22:02:59 +08:00
aster2013
09baed3460 Add text effect code to text shader for Text3D. 2014-08-04 13:18:25 +08:00
aster
d72dcde96d Remove useSDF parameter in Text and Text3D classes, now signed distance field font is a bitmap font file with .sdf extension. 2014-08-03 13:58:15 +08:00
aster
436908e031 Add Use SDF option to Text3D to enable signed distance field text. 2014-07-31 22:36:23 +08:00
Lasse Öörni
921b1ef792 Fixed the button name in DynamicGeometry touch controls. 2014-07-15 22:32:46 +03:00
Lasse Öörni
b281e555d7 Added dynamic geometry C++ sample. Minor comment & warning fixes in other samples. 2014-07-15 22:03:53 +03:00
Aster@中国上海
dec9ecfde2 LightAnimation sample now use ObjectAnimation in C++. 2014-07-02 21:39:37 +08:00
Aster@中国上海
84fe0946c8 Remove ShortStringHash, Now all of ShortStringHash are replaced by StringHash. 2014-06-21 21:45:05 +08:00
Aster@中国上海
318e388777 Add LoopMode2D to control animation loop mode, make spriter animation sample in force loop mode. 2014-06-06 13:07:15 +08:00
aster2013
fe3af57199 Merge branch 'spriter-animation' 2014-06-02 21:53:59 +08:00
aster2013
4c47170f8e Rename XAnimationSet2D to AnimationSet2D, Rename XAnimatedSprite2D to AnimatedSprite2D. 2014-06-01 15:43:32 +08:00
aster2013
e5a93022c4 Rename XAnimation2D to Animation2D 2014-06-01 15:28:18 +08:00
aster2013
a99145a80c Update 24_Urho2DSprite sample with spriter animation. 2014-06-01 15:11:56 +08:00
aster2013
4807ed7d37 Add Spriter animation Lua binding and sample. 2014-06-01 14:30:46 +08:00
aster2013
22d6ede8e6 Add spriter animation AS binding and sample. 2014-06-01 14:02:27 +08:00
aster2013
002292d01f Make XAnimatedSprite2D derived from Drawable, export attributes. 2014-06-01 13:27:00 +08:00
Lasse Öörni
e079878e40 Remove the gather4 path similarly from HLSL FXAA3. Fix FXAA2 tag name in the examples. Removed dead link from documentation. 2014-06-01 02:33:19 +03:00
Lasse Öörni
f2e6e86a1d Rename EdgeFilter shader to FXAA2. Rename FXAA shader to FXAA3. Clean up FXAA3 GLSL code and port to HLSL. 2014-05-31 23:24:31 +03:00
aster2013
07f5c97854 Fixed text format.[ci skip] 2014-06-01 00:01:37 +08:00
aster2013
6cea8b84f5 Add spriter animation sample in C++. 2014-05-31 23:58:48 +08:00
Lasse Öörni
f3b6a718f7 Merge remote-tracking branch 'remotes/mike3d/master' 2014-05-26 23:27:09 +03:00
Mike3D
c04bceb490 Update CMakeLists.txt 2014-05-24 07:22:43 +02:00
Yao Wei Tjong 姚伟忠
96295b4923 Ensure the application logs are created in a writeable location.
- Add a new function to get application preferences directory and expose it to scripting.
- Change Editor to save/load configuration file from the application preferences directory.
- Standardized the location of log files generated by Urho3DPlayer and samples. Ensure it is created in a user writeable location to prevent application locked up during closing.
2014-05-24 12:16:18 +08:00
Mike3D
bba58e1287 New Urho2D sample demonstrating constraints.
Thanks to Aster for his help.
2014-05-23 21:17:45 +02:00
Lasse Öörni
0d183d6301 Added FromString() function to XMLFile. 2014-05-13 21:50:26 +03:00
Yao Wei Tjong 姚伟忠
24e6b0d3cf Clean up CharacterDemo sample to use the same TOUCH_SENSITIVITY value. 2014-05-01 11:39:17 +08:00
Yao Wei Tjong 姚伟忠
6ad8c14346 Add engine param for enabling touch emulation during initialization.
Adjust sample base class to add screen joystick on desktop platform when touch emulation is enabled.
2014-04-29 10:36:43 +08:00
Yao Wei Tjong 姚伟忠
4cf5ffd6db Code cleanup on screen joystick to make Input.h easier to include. 2014-04-23 18:30:21 +08:00
Yao Wei Tjong 姚伟忠
dfe4caf3d6 Add logic to suppress zoom when multi-touching screen joystick buttons. 2014-04-22 12:41:02 +08:00
Yao Wei Tjong 姚伟忠
125000454c Refactor samples to use patched screen joystick layout. Closes #321.
Enhance screen joystick to also support mouse button binding. It can be used in combination with key binding, e.g. to bind SHIFT+LMB.
2014-04-22 01:12:46 +08:00
aster
11a9b1f1dc Bind material parameter animation to Lua and AngelScript, Add MaterialAnimation sample. 2014-04-21 18:59:07 +08:00
aster
113cb5584a Rename AttributeAnimation to ValueAnimation make animaiton more general. 2014-04-21 18:09:35 +08:00
Lasse Öörni
955a8bb34e Joystick refactoring after merging the joystick pull request from thebluefish.
- Fixed "ghost" buttons due to setting button down state both by joystick button and controller button mapping.
- Fixed missing name in joystick state.
- Allow getting joystick state both by joystick ID (Input::GetJoystick()) and a zero-based index (Input::GetJoystickByIndex()).
- Fixed ambiguity in Input class parameter names whether functions take a joystick ID, or an index. Most take joystick ID by now.
- Controller events removed. Controller joysticks will receive ordinary joystick events, but with controller axis & button mappings.
- Joystick identifying parameter in joystick events changed to JoystickID to denote that it's an ID and not a zero-based index.
- Code convention edits to Input code.
2014-04-18 23:33:25 +03:00
Lasse Öörni
5209e6e6a6 Merge remote-tracking branch 'remotes/thebluefish/master' 2014-04-18 15:00:59 +03:00
Yao Wei Tjong 姚伟忠
dbeb244fb5 Minor clean up on sample code. Move Console & HUD to settings joystick. 2014-04-18 18:06:41 +08:00
thebluefish
907c6a15f5 Bugfixes 2014-04-18 00:03:55 -07:00
thebluefish
1ba75f5222 Resolved virtual joystick support
- Added function to set virtual joystick visibility.
- Updated samples.iml to reflect changess.
2014-04-17 23:50:06 -07:00
Yao Wei Tjong 姚伟忠
ec25e56046 Refactor Samples to support yaw and pitch by touch on mobile platform. 2014-04-17 01:56:59 +08:00
aster
fff89efdd8 Make 2D camera auto aspect ratio. 2014-04-16 10:59:01 +08:00
Yao Wei Tjong 姚伟忠
c78f34d5ca Improve the hats response on screen joystick (in joystick event mode).
Refactor Samples base class to take advantage of the screen joystick.
Add second screen joystick layout for changing app settings.
Closes #264.
2014-04-15 22:59:10 +08:00
aster2013
2c672b154b Remove animation only attribute support. 2014-04-12 21:47:08 +08:00
aster2013
afaa9c7702 Demonstrate usage of spline interpolated animation, and set animation to node's world position(animation only attribute). 2014-04-12 13:12:29 +08:00
Aster Jian
b7917af4fd Revert "Remove wrap mode default value."
This reverts commit 3f832eb5d0.
2014-04-11 13:38:54 +08:00
Aster Jian
3f832eb5d0 Remove wrap mode default value. 2014-04-11 12:54:49 +08:00
Yao Wei Tjong 姚伟忠
5ce5be8d66 Enhance FileSystem class to also able to execute console command. 2014-04-11 12:44:20 +08:00
aster2013
d2f9db942a Add LightAnimation in AngelScript.[ci skip] 2014-04-09 23:17:45 +08:00
aster2013
00b57c1231 Add LightAnimation sample, revert StaticScene. 2014-04-09 23:01:39 +08:00
aster2013
a2197916a7 Update LuaIntegration sample. 2014-04-09 22:24:52 +08:00
aster2013
496fb3e74e Refactor AttributeAnimation. 2014-04-09 22:24:17 +08:00
aster2013
da7936dd68 Add attribute animation sample in StaticScene. 2014-04-09 22:24:15 +08:00
Lasse Öörni
9066f6873d Merge remote-tracking branch 'remotes/origin/transformspace' 2014-04-05 16:59:24 +03:00
Yao Wei Tjong 姚伟忠
46285baf97 Refactor build scripts to group Urho3D specific build option.
Initial support of project configuration and generation via cmake-gui.
2014-04-05 00:20:56 +08:00
Lasse Öörni
67d603d8e5 Node transform space refactoring. Translate(), Rotate() and LookAt() functions take a transform space (local, parent or world). Translate() has a behavior change: default space is local, as that is most often used in eg. camera movement, and is consistent with the default for rotations (the earlier fixedAxis = false was same as local space). The redundant TranslateRelative() function is removed. Add RotateAround() function, which allows rotating around a pivot in either local, parent or world space. Closes #295. 2014-04-03 22:36:29 +03:00
Alex Parlett
a22a24c0e4 Rename RigidBody::Phantom to RigidBody::Trigger to align it with common terminology for physics. 2014-03-24 20:44:34 +00:00
aster2013
ff0d806587 Rename ParticleModel2D to ParticleEffect2D. 2014-03-24 12:09:51 +08:00
aster2013
fc0e65a8d9 Add Lua and AngelScript binding. 2014-03-21 17:48:30 +08:00
aster2013
9cd40fb07f Revert attribute animation. It will be added in a new branch. 2014-03-21 10:44:18 +08:00
aster2013
29e930d495 Add commend and use shared ptr for attribute animation. [ci skip] 2014-03-20 22:32:49 +08:00
aster2013
b1b9c34c11 Add simple attribute animation system, and change StaticScene to test it. 2014-03-20 22:23:33 +08:00
aster2013
86ae9190a7 Fix particle emitter, add radial particle in sample. 2014-03-19 23:09:10 +08:00
Lasse Öörni
12e6bcf4e0 Fixed typo and improved SoundSynthesis example comments. 2014-03-19 13:43:55 +02:00
Lasse Öörni
e8c550a98f Added documentation for the sound streaming feature. 2014-03-19 12:28:11 +02:00
Lasse Öörni
a06e4238b3 Simplify sound stream code and improve the SoundSynthesis sample. Closes #257. 2014-03-19 12:15:31 +02:00
aster2013
6e5d43a56b Replace plist particle file with Staring extension particle system (pex). 2014-03-19 16:11:02 +08:00
Lasse Öörni
1cc8f2b82b Added BufferedSoundStream class and sound synthesis C++ example.
Removed SharedArrayPtr DynamicCast() as it made no sense; replaced with ReinterpretCast().
2014-03-19 09:18:13 +02:00
aster2013
c7153fd67d Add Urho2DPhysicsRope sample.[ci skip] 2014-03-18 18:43:00 +08:00
Yao Wei Tjong 姚伟忠
10cbd8deed Add a simple Android samples launcher activity.
The launcher activity will only be shown when there are actually more samples built into the deployed apk. If no other samples then the launcher will just launch Urho3DPlayer without prompting. Otherwise a list view is presented in the launcher activity to let user to choose which sample library to be loaded.
Due to unloading of shared library is not supported from Java side, currently once a sample library is being loaded, the launcher cannot unload the library and let user to choose other samples. Until a workaround is found, user would have to perform a long pressed on a home button, close the app, and restart it again from scratch.
2014-03-18 16:33:27 +08:00
aster2013
c5c715ee84 Add 2D sprite to physics samples.[ci skip] 2014-03-14 14:03:14 +08:00
aster2013
8dca005f9c Add Lua binding and AngelScript Binding.[ci skip] 2014-03-14 13:30:02 +08:00
aster2013
b9940bdac1 Apply node transform to collision shape, add CollisionCircle2D.[ci skip] 2014-03-13 22:03:38 +08:00
aster2013
5bb12f4a2d Add Box collision shape. 2014-03-13 13:14:15 +08:00
aster2013
74a059d899 Add Urho2D Physics sample. 2014-03-12 20:59:39 +08:00
aster2013
e116ab8150 Add 2D physics class. 2014-03-12 20:58:35 +08:00
aster2013
130551f4d8 Add fixed pixel size (user don't need change the value). 2014-03-12 19:58:32 +08:00
Yao Wei Tjong 姚伟忠
24aeabb02f Move back MarkAllDrawable2DDirty() to Node class as public method.
The method could be called to mark Drawable2D as dirty for other reasons and not just because of Scene's pixels per unit attribute has changed. It could also be called on a particular node instead of Scene node to partially mark the attached 2D components as dirty.
2014-03-11 23:09:27 +08:00
aster2013
c96d44fcb8 rename unitSize2D to pixelsPerUnit. 2014-03-11 22:39:18 +08:00
aster2013
3101a308f9 Change default unitSize2D to 100, Apply model scale in ParticleModel2D. 2014-03-11 22:14:50 +08:00
Lasse Öörni
0f3d781c3b Update copyright year in some files. Added copyright notice to ForEach.h. 2014-03-10 00:56:06 +02:00
Lasse Öörni
d0595084d4 Initial implementation of LogicComponent base class, which should make writing C++ logic/updater components more similar to scripting. Refactored C++ examples to use LogicComponent where possible. 2014-03-06 21:47:39 +02:00
Lasse Öörni
7fd40cf630 Moved the test for ENABLE_TESTING into GetConsoleInput(), as script applications can not know whether it is safe to call.
Show OS mouse cursor in ConsoleInput sample.
2014-03-04 12:16:31 +02:00
Lasse Öörni
ac21be3e39 Implemented ConsoleInput sample in AngelScript. Added possibility to the Script subsystem to disable automatic execution of console input as AngelScript. Tidied up newlines from the ConsoleInput sample. 2014-03-04 11:51:28 +02:00
Yao Wei Tjong 姚伟忠
c08e1a2822 Fix last sample to bypass taking input from stdin during CI testing.
For some reason, xcodebuild does not support non-blocking stdin read while running the last test. Interestingly xctool does not have this problem. Alas, we use xcodebuild instead of xctool when performing testing because the former provides immediate testing results.
2014-03-04 16:58:33 +08:00
aster2013
2d8f14ce12 Merge branch 'master' of https://github.com/urho3d/Urho3D 2014-03-04 11:51:25 +08:00
Yao Wei Tjong 姚伟忠
b5f9b52717 Minor fixes on C++ ConsoleInput sample class. 2014-03-04 11:39:36 +08:00
aster2013
3e7aa8512e Fixed warning. 2014-03-04 11:21:06 +08:00
Lasse Öörni
dd77e395b8 Process Urho threat level first to avoid message spam when he kills you and other stuff is also happening. 2014-03-04 02:13:53 +02:00
Lasse Öörni
1ed123194c Fixed 'hide' command behaving incorrectly during Urho cooldown period. 2014-03-04 02:08:24 +02:00
Lasse Öörni
e2779d0509 Added ConsoleInput C++ example. Closes #159.
When setting the number of rows, ensure Console sets the text style if available, so that the row container appears immediately with the correct height.
2014-03-04 02:01:50 +02:00
Yao Wei Tjong 姚伟忠
1a7d032425 Misc. minor fixes. 2014-03-02 16:16:50 +08:00
aster2013
7cfb4fe6be Add Urho2DParticle sample in C++. 2014-03-01 13:52:32 +08:00
aster2013
7c609e4629 Add AnimatedSprite to sample. 2014-02-28 19:20:10 +08:00
aster2013
383da73503 Add Urho2DSprite sample. 2014-02-27 23:20:33 +08:00
Lasse Öörni
076b333124 Simplify pointer usage in HelloGUI example. 2014-02-21 10:25:33 +02:00
Lasse Öörni
47836474e2 Variant pointer refactoring. Variant can now hold a weak pointer to a RefCounted object, which is safer, and is returned using GetPtr(). Engine events have been converted to use that mechanism. GetPtr() is also directly available in AngelScript, as well as assigning a RefCounted or derived class handle to a Variant.
Important: when you assign a non-RefCounted object as a void pointer to a Variant, you must now retrieve it with GetVoidPtr() instead.

The legacy methods in AngelScript for obtaining object handles from Variant, ie. GetNode(), GetUIElement() etc. still exist, but are considered deprecated.
2014-02-15 19:22:29 +02:00
Lasse Öörni
b496c5a012 Added a square Urho icon (same as the Android icon) to use for the samples on desktop. 2014-02-12 15:19:58 +02:00
Lasse Öörni
fd140ddb32 Minor code reorganization of the HelloGUI example. Removed SubscribeToEvents() as it was only used for 1 event and events were also subscribed to elsewhere. 2014-02-11 21:41:57 +02:00
Mike3D
a0f42bee35 Added drag and tooltip to sample#2 HelloGUI 2014-02-11 09:49:53 +01:00
Lasse Öörni
6d5ddc23e0 Bump the copyright for 2014. 2014-02-01 14:37:21 +02:00
Lasse Öörni
50c54346eb Check for not overshooting the target when moving in the Navigation sample. 2014-02-01 14:37:19 +02:00
Lasse Öörni
be060dfb8a Fix Jack looking in weird direction if teleporting to above or below. 2014-02-01 01:22:40 +02:00
Lasse Öörni
5062dbba42 Sanitate screenshot name in the samples to ensure saving it succeeds. Prepend the executable path properly. Flip image in OpenGL Graphics::TakeScreenShot() instead of having the user to do it. 2014-02-01 01:07:03 +02:00
Lasse Öörni
2af8244543 Convert the Navigation sample to move the Jack character from current position to new target. Shift + LMB to teleport. 2014-02-01 01:04:50 +02:00
Mike3D
75321c632d Extended Sample with ability to set window title and icon and take screenshots 2014-01-31 16:56:50 +01:00
Mike3D
0e3389eb7b Update Sample.h 2014-01-31 16:55:06 +01:00
Mike3D
431133127f Added follow path function. RecalculatePath()is no longer used but kept anyway. 2014-01-31 16:44:06 +01:00
Mike3D
188dddf601 Update Navigation.h 2014-01-31 16:39:49 +01:00
Lasse Öörni
8fafdbf842 Ported the CharacterDemo touch input code to C++. 2014-01-28 00:40:36 +02:00
Lasse Öörni
25a887cfe4 Fix crash in 15_Navigation.lua when adding and removing objects without having a path defined yet. Cleanup Navigation sample code. 2014-01-26 16:32:21 +02:00
Lasse Öörni
9486d17667 Bump the depth constant bias in all shadowed directional light samples to work better on mobile platforms. Disable Urho3D logo in samples when using touch controls. 2014-01-23 16:07:08 +02:00
Yao Wei Tjong 姚伟忠
48eb0497df Rename var name from <package>_INCLUDE_DIR to <package>_INCLUDE_DIRS.
See http://urho3d.prophpbb.com/topic9.html.
2014-01-21 15:57:07 +08:00
Lasse Öörni
40d759fbae New skybox from Vladimir. Set fog to white in scenes using the skybox. Water scene lighting slightly brightened to match the skybox. 2014-01-20 12:01:38 +02:00
Lasse Öörni
1ace697dc9 Added water example with reflection/refraction. Improved the water shader to include proper fresnel calculation and a noise map. Closes #120. 2014-01-19 15:47:56 +02:00
Lasse Öörni
a26d5b98d5 Added example of manual bone control to CharacterDemo. Added a version of Skeleton::GetBone() that takes a C string parameter to avoid ambiguity. 2014-01-18 23:05:52 +02:00
Yao Wei Tjong 姚伟忠
088eef9e60 Add simple test cases as part of the Travis CI build.
Also fix Editor in case-sensitive platforms.
2013-12-30 07:48:31 +08:00
Lasse Öörni
e19bed4946 Clean up scene node related comments in samples. 2013-12-17 13:28:46 +02:00
Lasse Öörni
aa0f72cf65 Added world position & normal to RayQueryResult. 2013-12-02 23:20:00 +02:00
StevenZhang
a17baf2695 make AngelScript an optional module, you can use -DENABLE_ANGELSCRIPT=0 to disable it. 2013-12-02 19:02:39 +02:00
Lasse Öörni
82007cc4f4 Removed the nonintuitive "invisible LOD factor" attribute from AnimatedModel and replaced it with updateInvisible flag similar to ParticleEmitter. This flag must be used for ragdolls or other physically animated objects to ensure that they come into view properly during animation if they previously were outside view. Fixes #40. 2013-11-09 21:26:08 +02:00
Yao Wei Tjong 姚伟忠
6071001b5c Refactor define_source_files macro.
Change the argument names to indicate their intent usage better. Add option to pass in directly globbing patterns.
2013-10-30 18:06:24 +08:00
Yao Wei Tjong 姚伟忠
e423a26461 Refactor CMake build scripts.
Changes:
- Avoid globbing engine source files twice.
- Setup folder group for VS and Xcode. Also group object files according to 3rd-party library name.
- New define_source_files() macro.
2013-10-28 18:21:18 +08:00
Yao Wei Tjong 姚伟忠
a9ed330890 Create sub-projects for Samples/Tools/Extras. 2013-10-22 23:19:03 +08:00
Yao Wei Tjong 姚伟忠
2b3af05f26 Added license notice. 2013-10-21 22:39:16 +08:00
Yao Wei Tjong 姚伟忠
d33ac02538 Refactor build scripts to build Urho3D library as main target.
Other changes in the commit:
- Change build option from URHO3D_BUILD_TYPE to URHO3D_LIB_TYPE. Default value is STATIC.
- Automatically add compiler definition 'URHO3D_STATIC_DEFINE' when linking with Urho3D library statically.
- Move LuaScript subsystem from Extra/ to Engine/.
- Enable FindUrho3D module to also detect Urho3D library target when the FindUrho3D module is being used internally by Urho3D project.
- Configure to build all the samples for iOS and Android platforms also when option to build samples is enabled.
- Export all the Register*Library() global functions.
- Rewrite all the tools, samples, and extras targets to link against Urho3D library.

TODOs:
- Combine engine sub-libraries into one.
- Test builds on non-Linux platforms.
2013-10-21 02:28:29 +08:00
aster2003
8098f588b4 Change LuaFunction to subclass of RefCounted. 2013-10-03 21:06:46 +08:00
Lasse Öörni
c169684bcd Crashproofed most of the C++ samples when running with empty resource directories. 18 & 19 will still crash inside Bullet. 2013-09-30 20:12:45 +00:00
Aster Jian
4b9f241065 Add LuaFunction class, Add more Lua API in Sound, fixed typo. 2013-09-26 16:18:38 +00:00
Aster Jian
3e4765e4f4 Change SetRotationSpeed's parameter to Vector3. 2013-09-23 05:54:29 +00:00
Lasse Öörni
f93a5e4a23 LuaScript library header formatting. Allow parameters also for procedural Lua functions. Renamed LuaScriptInstance::Execute() to ExecuteFunction(). 2013-09-22 22:08:26 +00:00
Lasse Öörni
48532b2509 Added C++ / script integration samples, which reimplement AnimatingScene sample, but use a script object instead of a C++ component.
Added Execute() function to LuaScriptInstance.
Fixed LuaScriptInstance::SetScriptFileName() not loading the script.
2013-09-22 19:15:30 +00:00
Lasse Öörni
7a55a43725 Tidied up the sample descriptions.
Exposed UIElement::SetVar() and GetVar() to Lua script.
Modified the Lua Sprites sample to use custom vars inside UIElement.
2013-09-20 07:30:07 +00:00
Lasse Öörni
1cd73e46fd Exposed StaticModelGroup to script. Ported HugeObjectCount example group mode switching to script versions. 2013-09-19 22:44:06 +00:00
Lasse Öörni
41f627b230 Fixed Urho3D.cpp compile error on VS2008.
Re-entrancy safety for StaticModelGroup::OnWorldBoundingBoxUpdate(): do not resize the worldTransforms_ vector. Instead set maximum size beforehand.
Do not make group mode light as bright in HugeObjectCount so that text remains easier to read.
2013-09-19 07:28:18 +00:00
Lasse Öörni
0f965d3443 Optimize StaticModelGroup by going through the objects in one pass during transform / bounding box update.
Change light color in HugeObjectCount when the group optimization is enabled.
2013-09-18 20:02:06 +00:00
Lasse Öörni
168b69c09d Added StaticObjectGroup component for optimizing culling, light and drawcall processing. Update HugeObjectCount to use it. Not yet exposed to script. 2013-09-18 16:19:15 +00:00
Lasse Öörni
1034f8856f Added scene load/save to C++ VehicleDemo. 2013-09-15 16:38:29 +00:00
Lasse Öörni
ef43398d7f Added scene load/save to CharacterDemo, both C++ & script versions. 2013-09-15 10:51:27 +00:00
Wei Tjong Yao
205fffb4ad Refactored Sample.h to use class forward for Sprite class. Fixed the alignment of the forward classes to be inlined with convention used by other codes in Urho3D. Added the generated LuaScript wiki into SVN. 2013-09-12 05:44:23 +00:00
Lasse Öörni
629d96473c Added skybox material.
Demonstrate use of skybox in the Physics sample.
2013-09-10 09:16:13 +00:00
Lasse Öörni
c1e03c48db Combine octree update & reinsertion queuing.
Queue only one large work item per thread for threaded Octree & View operations.
Protect the network replication dirty sets with mutex if nodes/components are inserted during the threaded update phase.
2013-09-07 21:08:40 +00:00
Lasse Öörni
e6d0b4d3f3 Normalize ray direction in constructor. 2013-09-04 14:42:32 +00:00
Lasse Öörni
94a3c80e34 Added C++ version of HugeObjectCount example, and animation to both versions.
Added note of event subscription time to the first C++ example.
2013-09-03 19:32:10 +00:00
Wei Tjong Yao
274c06d3a4 Use the else-if construct as the conditions are mutually exclusive. 2013-09-02 13:59:08 +00:00
Lasse Öörni
55ef6dd6c3 CharacterDemo & VehicleDemo in script. 2013-09-02 13:40:10 +00:00
Lasse Öörni
9cbea3b331 Added SoundEffects, Navigation, Chat & SceneReplication samples in script. 2013-09-02 00:05:05 +00:00
Lasse Öörni
b9cc284048 PhysicsStressTest & Ragdolls samples in script. 2013-09-01 17:36:01 +00:00
Lasse Öörni
869046d7cb Added Physics sample in script. 2013-09-01 12:05:11 +00:00
Lasse Öörni
30b7905d98 Decals & MultipleViewports samples in script.
Fixed camera rotation in VehicleDemo.
2013-08-31 14:22:36 +00:00
Lasse Öörni
3c6a0f57d7 In the SoundEffects sample, start/stop music when buttons released. 2013-08-31 12:41:37 +00:00
Lasse Öörni
7b4ae12fe0 Ported Sprites, StaticScene & AnimatingScene samples to AngelScript. 2013-08-29 21:34:34 +00:00
Lasse Öörni
10abc4414b Ported HelloGUI sample to script. 2013-08-29 15:53:55 +00:00
Lasse Öörni
5094541394 Ported the first sample to AngelScript. 2013-08-29 14:11:34 +00:00
Lasse Öörni
26901cdc4c Added vehicle sample. 2013-08-28 23:35:10 +00:00
Lasse Öörni
04b00263b0 Moved CharacterDemo to the samples.
Use forward declarations in the samples.
2013-08-27 21:45:43 +00:00
Lasse Öörni
3b32acf27f Added possibility to clear scene of only replicated or local content. Do not clear local content from a client scene when joining a server. This makes the startup of the SceneReplication sample faster, as the static scene is not replicated.
Exposed missing Node::RemoveAllComponents() to script.
2013-08-27 15:15:30 +00:00
Lasse Öörni
dfb318b4f9 Added scene network replication sample. 2013-08-27 00:12:07 +00:00
Lasse Öörni
796d8871b9 Sample code cleanup. 2013-08-26 07:41:02 +00:00
Lasse Öörni
426d664990 Added network chat sample. Cleaned up UI creation code in SoundEffects sample.
Include kNet include dir when finding Urho3D library.
Reset the server connection pointer before sending disconnection event in the Network subsystem.
2013-08-25 23:42:22 +00:00
Lasse Öörni
31da083870 Disallow headless mode from the samples as they do not nullcheck eg. for the Graphics subsystem and would crash. 2013-08-25 21:25:15 +00:00
Lasse Öörni
cfb11454b4 Refactored raycast code in the Decals & Navigation samples.
Added adding & removing obstacles in the Navigation sample.
2013-08-25 20:50:04 +00:00
Lasse Öörni
829bd2a221 Clean up some comments. 2013-08-25 18:52:02 +00:00
Lasse Öörni
fc1c2e6f13 Initial Navigation sample.
Added overload of NavigationMesh::DrawDebugGeometry() that finds the DebugRenderer component from the root scene node automatically.
2013-08-25 18:47:48 +00:00
Lasse Öörni
056acfcc68 Added sound effects example. 2013-08-25 09:20:56 +00:00
Lasse Öörni
e7558a3be9 Demonstrate rolling friction in the Ragdolls sample. 2013-08-24 20:21:16 +00:00
Lasse Öörni
2271d6ba83 Added Ragdolls sample.
Added template version of RemoveComponent to Node.
2013-08-24 14:20:02 +00:00
Lasse Öörni
31f4ac0bab Larger plane in the Physics sample. 2013-08-23 05:09:26 +00:00
Lasse Öörni
81d87af14c Make the mesh objects larger for more interesting collision response. 2013-08-22 21:29:45 +00:00
Lasse Öörni
e7e469cf5a Added PhysicsStressTest sample. 2013-08-22 21:23:20 +00:00
Lasse Öörni
58903874f7 Scene node name consistency in the samples. 2013-08-22 06:35:49 +00:00
Lasse Öörni
056a071ed2 Adjusted physics sample materials. Let the boxes fall a bit in the beginning.
Copy export header only if it has changed to prevent unnecessary engine rebuild.
2013-08-22 06:30:41 +00:00
Lasse Öörni
b8882c588f Adjust the physics sample initial object positions & friction. 2013-08-21 23:07:16 +00:00
Lasse Öörni
497bd8c101 Added Physics sample. 2013-08-21 22:58:41 +00:00
Lasse Öörni
27f1f3ec59 Use the same object count in RenderToTexture as in AnimatingScene. 2013-08-21 10:03:22 +00:00
Lasse Öörni
dbdafefaae Set bilinear filter on the render texture so it looks better up close. 2013-08-20 23:29:36 +00:00
Lasse Öörni
99b2724708 Adjust object & camera position in the RenderToTexture sample. 2013-08-20 23:27:41 +00:00
Lasse Öörni
87a6ee9578 Added MultipleViewports & RenderToTexture samples.
Added diffuse unlit & notexture unlit techniques.
Do not use occlusion if viewport is very tall compared to width, as the pixel width of the occlusion buffer is fixed and would result in large CPU time consumption.
2013-08-20 23:23:42 +00:00
Lasse Öörni
4a31966a14 Updated comments in the samples.
Updated script API.
2013-08-20 07:08:02 +00:00
Lasse Öörni
e4ed439148 Added common rendering quality controls to all samples.
Fixed quality for the Logo & LogoLarge textures.
2013-08-20 06:39:01 +00:00
Lasse Öörni
cc494ac7e7 Added safety check for the number of animation states. 2013-08-19 20:31:00 +00:00
Lasse Öörni
54a0c90d7a Update AnimatedModel's bounding box with bone accuracy only when the animation is updated. Otherwise transform the previous last calculated bone bounding box. This results in a significant performance boost when a large amount of AnimatedModels are both moved, and animated. 2013-08-19 20:24:01 +00:00
Lasse Öörni
0f4fbda5fb Added Decals example.
Refactored SkeletalAnimation example to use a custom component as well.
2013-08-19 19:45:27 +00:00
Lasse Öörni
26a9bc763e Added Temporary flag to Serializable, which means it will not be saved if enabled. Currently the sub-nodes created by Terrain are marked temporary.
Temporary objects are by default not shown in the editor.
Added trigonometric functions which take degrees argument into the C++ API, not just script.
Edited the Billboards sample.
Made the Urho3D logo in the samples slightly transparent.
2013-08-18 16:50:28 +00:00
Lasse Öörni
a9eb0e1e61 Added Billboards sample.
Some code cleanup/formatting of the other samples.
2013-08-17 23:45:09 +00:00
Lasse Öörni
f74f4dd6f8 Moved the logic for determining whether to use executable directory or the current working directory into FileSystem::GetProgramDir(). 2013-08-17 21:09:47 +00:00
Lasse Öörni
1ef35d353c Added skeletal animation sample.
Fixed build of samples.
Removed line to disable MinSizeRel build type in CMake script as it seems to have no effect any longer.
Removed unused function to get AnimationState by C string of animation name.
2013-08-17 18:38:07 +00:00
Lasse Öörni
e2d2c01636 Added AnimatingScene sample. 2013-08-11 22:24:26 +00:00
Wei Tjong Yao
02512cecf9 In order to move the out-of-source 'build' directory back to Urho3D project root directory, all the source codes sub-directories are now moved down one level to a new directory under project root called 'Source'. 2013-08-09 10:29:22 +00:00