diff --git a/README.md b/README.md index 2769ce98..b14f9e02 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Dash Logo](https://cloud.githubusercontent.com/assets/512416/2726786/6618d624-c5c2-11e3-9049-23637e5a1739.png)](https://github.com/Circular-Studios/Dash/wiki) -# [![Build Status](http://img.shields.io/travis/Circular-Studios/Dash/develop.svg?style=flat)](https://travis-ci.org/Circular-Studios/Dash) [![Docs](http://img.shields.io/badge/docs-ddoc-yellow.svg?style=flat)](http://circular-studios.github.io/Dash/docs/v0.6.6) [![Gitter Chat](http://img.shields.io/badge/chat-gitter-brightgreen.svg?style=flat)](https://gitter.im/Circular-Studios/Dash) [![Release](http://img.shields.io/github/release/Circular-Studios/Dash.svg?style=flat)](http://code.dlang.org/packages/dash) +# [![Build Status](http://img.shields.io/travis/Circular-Studios/Dash/develop.svg?style=flat)](https://travis-ci.org/Circular-Studios/Dash) [![Docs](http://img.shields.io/badge/docs-ddoc-yellow.svg?style=flat)](http://circular-studios.github.io/Dash/docs/v0.7.0) [![Gitter Chat](http://img.shields.io/badge/chat-gitter-brightgreen.svg?style=flat)](https://gitter.im/Circular-Studios/Dash) [![Release](http://img.shields.io/github/release/Circular-Studios/Dash.svg?style=flat)](http://code.dlang.org/packages/dash) If you're reading this page, chances are you fall into one of the following categories: diff --git a/source/components/animation.d b/source/components/animation.d index eead71fd..02065668 100644 --- a/source/components/animation.d +++ b/source/components/animation.d @@ -58,8 +58,8 @@ public: { // Update currentanimtime based on deltatime and animations fps _currentAnimTime += Time.deltaTime * 24.0f; - - if( _currentAnimTime >= 96.0f ) + + if( _currentAnimTime >= 95.0f ) { _currentAnimTime = 0.0f; } @@ -269,37 +269,40 @@ public: void fillTransforms( shared mat4[] transforms, shared Bone bone, shared float time, shared mat4 parentTransform ) { shared mat4 finalTransform; - if( bone.positionKeys.length == 0 && bone.rotationKeys.length == 0 && bone.scaleKeys.length == 0 ) - { - finalTransform = parentTransform * bone.nodeOffset; - transforms[ bone.boneNumber ] = finalTransform * bone.offset; - } - else + if(bone) { - shared mat4 boneTransform = mat4.identity; - - if( bone.positionKeys.length > cast(int)time ) + if( bone.positionKeys.length == 0 && bone.rotationKeys.length == 0 && bone.scaleKeys.length == 0 ) { - boneTransform = boneTransform.translation( bone.positionKeys[ cast(int)time ].vector[ 0 ], bone.positionKeys[ cast(int)time ].vector[ 1 ], - bone.positionKeys[ cast(int)time ].vector[ 2 ] ); + finalTransform = parentTransform * bone.nodeOffset; + transforms[ bone.boneNumber ] = finalTransform * bone.offset; } - if( bone.rotationKeys.length > cast(int)time ) + else { - boneTransform = boneTransform * bone.rotationKeys[ cast(int)time ].to_matrix!( 4, 4 ); + shared mat4 boneTransform = mat4.identity; + + if( bone.positionKeys.length > cast(int)time ) + { + boneTransform = boneTransform.translation( bone.positionKeys[ cast(int)time ].vector[ 0 ], bone.positionKeys[ cast(int)time ].vector[ 1 ], + bone.positionKeys[ cast(int)time ].vector[ 2 ] ); + } + if( bone.rotationKeys.length > cast(int)time ) + { + boneTransform = boneTransform * bone.rotationKeys[ cast(int)time ].to_matrix!( 4, 4 ); + } + if( bone.scaleKeys.length > cast(int)time ) + { + boneTransform = boneTransform.scale( bone.scaleKeys[ cast(int)time ].vector[ 0 ], bone.scaleKeys[ cast(int)time ].vector[ 1 ], bone.scaleKeys[ cast(int)time ].vector[ 2 ] ); + } + + finalTransform = parentTransform * boneTransform; + transforms[ bone.boneNumber ] = finalTransform * bone.offset; } - if( bone.scaleKeys.length > cast(int)time ) + + // Check children + for( int i = 0; i < bone.children.length; i++ ) { - boneTransform = boneTransform.scale( bone.scaleKeys[ cast(int)time ].vector[ 0 ], bone.scaleKeys[ cast(int)time ].vector[ 1 ], bone.scaleKeys[ cast(int)time ].vector[ 2 ] ); + fillTransforms( transforms, bone.children[ i ], time, finalTransform ); } - - finalTransform = parentTransform * boneTransform; - transforms[ bone.boneNumber ] = finalTransform * bone.offset; - } - - // Check children - for( int i = 0; i < bone.children.length; i++ ) - { - fillTransforms( transforms, bone.children[ i ], time, finalTransform ); } } diff --git a/source/components/assets.d b/source/components/assets.d index 5bd39944..d22d0881 100644 --- a/source/components/assets.d +++ b/source/components/assets.d @@ -35,35 +35,26 @@ public: */ final shared(T) get( T )( string name ) if( is( T == Mesh ) || is( T == Texture ) || is( T == Material ) || is( T == AssetAnimation )) { - enum get( string array ) = q{ - if( auto result = name in $array ) + enum get( Type, string array ) = q{ + static if( is( T == $Type ) ) { - result.isUsed = true; - return *result; + if( auto result = name in $array ) + { + result.isUsed = true; + return *result; + } + else + { + logFatal( "Unable to find ", name, " in $array." ); + return null; + } } - else - { - logFatal( "Unable to find ", name, " in $array." ); - return null; - } - }.replace( "$array", array ); - static if( is( T == Mesh ) ) - { - mixin( get!q{meshes} ); - } - else static if( is( T == Texture ) ) - { - mixin( get!q{textures} ); - } - else static if( is( T == Material ) ) - { - mixin( get!q{materials} ); - } - else static if( is( T == AssetAnimation ) ) - { - mixin( get!q{animations} ); - } - else static assert( false, "Material of type " ~ T.stringof ~ " is not maintained by Assets." ); + }.replaceMap( [ "$array": array, "$Type": Type.stringof ] ); + + mixin( get!( Mesh, q{meshes} ) ); + mixin( get!( Texture, q{textures} ) ); + mixin( get!( Material, q{materials} ) ); + mixin( get!( AssetAnimation, q{animations} ) ); } /** @@ -80,19 +71,19 @@ public: assert(aiIsExtensionSupported(".fbx".toStringz), "fbx format isn't supported by assimp instance!"); // Load the unitSquare - unitSquare = new shared Mesh( "", aiImportFileFromMemory(unitSquareMesh.toStringz, unitSquareMesh.length, - aiProcess_CalcTangentSpace | aiProcess_Triangulate | - aiProcess_JoinIdenticalVertices | aiProcess_SortByPType, - "obj" ).mMeshes[0] ); + unitSquare = new shared Mesh( "", aiImportFileFromMemory( + unitSquareMesh.toStringz, unitSquareMesh.length, + aiProcess_CalcTangentSpace | aiProcess_Triangulate | + aiProcess_JoinIdenticalVertices | aiProcess_SortByPType, + "obj" ).mMeshes[0] ); foreach( file; FilePath.scanDirectory( FilePath.Resources.Meshes ) ) { // Load mesh const aiScene* scene = aiImportFile( file.fullPath.toStringz, - aiProcess_CalcTangentSpace | aiProcess_Triangulate | - aiProcess_JoinIdenticalVertices | aiProcess_SortByPType ); - //| aiProcess_FlipWindingOrder ); - assert(scene, "Failed to load scene file '" ~ file.fullPath ~ "' Error: " ~ aiGetErrorString().fromStringz); + aiProcess_CalcTangentSpace | aiProcess_Triangulate | + aiProcess_JoinIdenticalVertices | aiProcess_SortByPType ); + assert( scene, "Failed to load scene file '" ~ file.fullPath ~ "' Error: " ~ aiGetErrorString().fromStringz ); // If animation data, add animation if( file.baseFileName in meshes ) @@ -144,8 +135,8 @@ public: */ final void shutdown() { - enum shutdownAA( string aaName, string friendlyName ) = q{ - foreach_reverse( name; meshes.keys ) + enum shutdown( string aaName, string friendlyName ) = q{ + foreach_reverse( name; $aaName.keys ) { if( !$aaName[ name ].isUsed ) logWarning( "$friendlyName ", name, " not used during this run." ); @@ -154,14 +145,15 @@ public: $aaName.remove( name ); } }.replaceMap( [ "$aaName": aaName, "$friendlyName": friendlyName ] ); - mixin( shutdownAA!( q{meshes}, "Mesh" ) ); - mixin( shutdownAA!( q{textures}, "Texture" ) ); - mixin( shutdownAA!( q{materials}, "Material" ) ); - mixin( shutdownAA!( q{animations}, "Animation" ) ); + + mixin( shutdown!( q{meshes}, "Mesh" ) ); + mixin( shutdown!( q{textures}, "Texture" ) ); + mixin( shutdown!( q{materials}, "Material" ) ); + mixin( shutdown!( q{animations}, "Animation" ) ); } } -/// TODO +/// Obj for a 1x1 square billboard mesh immutable string unitSquareMesh = q{ v -1.0 1.0 0.0 v -1.0 -1.0 0.0 diff --git a/source/core/prefabs.d b/source/core/prefabs.d index 16b9faaf..c0fa32e7 100644 --- a/source/core/prefabs.d +++ b/source/core/prefabs.d @@ -63,9 +63,6 @@ public: /** * Creates a GameObject instance from the prefab. - * - * Params: - * scriptOverride = Create the instance from this class type instead of the prefab's default. * * Returns: * The new GameObject from the Prefab. diff --git a/source/graphics/adapters/adapter.d b/source/graphics/adapters/adapter.d index f4e6920d..6c56e83d 100644 --- a/source/graphics/adapters/adapter.d +++ b/source/graphics/adapters/adapter.d @@ -1,5 +1,5 @@ /** -* TODO +* Contains all core code for the Graphics adapters, which is similar across all platforms */ module graphics.adapters.adapter; import core, components, graphics, utility; @@ -10,7 +10,7 @@ import derelict.opengl3.gl3; import std.algorithm, std.array; /** -* TODO +* Base class for core rendering logic */ abstract class Adapter { @@ -30,61 +30,61 @@ private: shared UserInterface[] uis; public: - /// TODO + /// GL DeviceContext mixin( Property!_deviceContext ); - /// TODO + /// GL RenderContext mixin( Property!_renderContext ); - /// TODO + /// Pixel width of the rendering area mixin( Property!_width ); - /// TODO + /// Pixel width of the actual window mixin( Property!_screenWidth ); - /// TODO + /// Pixel height of the rendering area mixin( Property!_height ); - /// TODO + /// Pixel height of the actual window mixin( Property!_screenHeight ); - /// TODO + /// If the screen properties match the rendering dimensions mixin( Property!_fullscreen ); - /// TODO + /// Hiding backsides of triangles mixin( Property!_backfaceCulling ); - /// TODO + /// Vertical Syncing mixin( Property!_vsync ); - /// TODO + /// FBO for deferred render textures mixin( Property!_deferredFrameBuffer ); - /// TODO + /// Texture storing the Diffuse colors and Specular Intensity mixin( Property!_diffuseRenderTexture ); - /// TODO + /// Texture storing the Sphermapped Normal XY and the Object ID in Z mixin( Property!_normalRenderTexture ); - /// TODO + /// Texture storing the depth mixin( Property!_depthRenderTexture ); /** - * TODO + * Initializes the Adapter, called in loading */ abstract void initialize(); /** - * TODO + * Shuts down the Adapter */ abstract void shutdown(); /** - * TODO + * Resizes the window and updates FBOs */ abstract void resize(); /** - * TODO + * Reloads the Adapter without closing */ abstract void reload(); /** - * TODO + * Swaps the back buffer to the screen */ abstract void swapBuffers(); /** - * TODO + * Opens the window */ abstract void openWindow(); /** - * TODO + * Closes the window */ abstract void closeWindow(); @@ -94,7 +94,7 @@ public: abstract void messageLoop(); /** - * TODO + * Initializes the FBO and Textures for deferred rendering */ final void initializeDeferredRendering() { @@ -172,8 +172,7 @@ public: } /** - * Called after all desired objects are drawn. - * Handles lighting and post processing. + * Currently the entire rendering pass for the active Scene. TODO: Refactor the name */ final void endDraw() { @@ -211,7 +210,7 @@ public: shared mat4 invProj = scene.camera.inversePerspectiveMatrix; /** - * TODO + * Pass for all objects with Meshes */ void geometryPass() { @@ -260,12 +259,12 @@ public: } /** - * TODO + * Pass for all objects with lights */ void lightPass() { /** - * TODO + * Binds the FBO textures to the shader */ void bindGeometryOutputs( Shader shader ) { @@ -365,7 +364,7 @@ public: } /** - * TODO + * Draw the UI */ void uiPass() { @@ -430,7 +429,7 @@ public: protected: /** - * TODO + * Loads rendering properties from Config */ final void loadProperties() { diff --git a/source/graphics/graphics.d b/source/graphics/graphics.d index 0e42d77c..5cbc781e 100644 --- a/source/graphics/graphics.d +++ b/source/graphics/graphics.d @@ -1,18 +1,18 @@ /** - * TODO + * Container for the graphics adapter needed for the appropriate platform */ module graphics.graphics; import graphics.adapters, graphics.shaders; /** - * TODO + * Abstract class to store the appropriate Adapter */ final abstract class Graphics { public static: - /// TODO + /// The active Adapter Adapter adapter; - /// TODO + /// Aliases adapter to Graphics alias adapter this; /** diff --git a/source/graphics/shaders/glsl/ambientlight.d b/source/graphics/shaders/glsl/ambientlight.d index 213094a4..97b5630b 100644 --- a/source/graphics/shaders/glsl/ambientlight.d +++ b/source/graphics/shaders/glsl/ambientlight.d @@ -1,11 +1,11 @@ /** -* TODO +* Lighting Pass shader for ambient lights */ module graphics.shaders.glsl.ambientlight; package: -/// TODO +/// Takes in a clip-space quad and interpolates the UVs immutable string ambientlightVS = q{ #version 400 @@ -23,7 +23,7 @@ immutable string ambientlightVS = q{ } }; -/// TODO +/// Outputs the color for the diffuse * the ambient light value immutable string ambientlightFS = q{ #version 400 diff --git a/source/graphics/shaders/glsl/animatedgeometry.d b/source/graphics/shaders/glsl/animatedgeometry.d index 2469d32f..d662627c 100644 --- a/source/graphics/shaders/glsl/animatedgeometry.d +++ b/source/graphics/shaders/glsl/animatedgeometry.d @@ -1,11 +1,11 @@ /** -* TODO +* Geometry pash shader for bone-animated meshes. Uses standard Geometry fragment shader */ module graphics.shaders.glsl.animatedgeometry; package: -/// Animated Geometry Shader +/// Animated Geometry Shader. Transforms vertices by bone-weights immutable string animatedGeometryVS = q{ #version 400 diff --git a/source/graphics/shaders/glsl/directionallight.d b/source/graphics/shaders/glsl/directionallight.d index 7394efd8..fe0e5f2b 100644 --- a/source/graphics/shaders/glsl/directionallight.d +++ b/source/graphics/shaders/glsl/directionallight.d @@ -1,11 +1,11 @@ /** -* TODO +* Lighting pass shader for Directional Lights */ module graphics.shaders.glsl.directionallight; package: -/// TODO +/// Takes in a clip-space quad and creates a ray from camera to each vertex, which is interpolated during pass-through immutable string directionallightVS = q{ #version 400 @@ -30,7 +30,7 @@ immutable string directionallightVS = q{ } }; -/// TODO +/// Calculates diffuse and specular lights from the full-screen directional light, using the view ray to reconstruct pixel position immutable string directionallightFS = q{ #version 400 diff --git a/source/graphics/shaders/glsl/geometry.d b/source/graphics/shaders/glsl/geometry.d index a706f9cd..b5753d7a 100644 --- a/source/graphics/shaders/glsl/geometry.d +++ b/source/graphics/shaders/glsl/geometry.d @@ -1,11 +1,11 @@ /** -* TODO +* Geometry pass shader for standard meshes */ module graphics.shaders.glsl.geometry; package: -/// TODO +/// Standard mesh vertex shader, transforms position to screen space and normals/tangents to view space immutable string geometryVS = q{ #version 400 @@ -37,7 +37,7 @@ immutable string geometryVS = q{ } }; -/// TODO +/// Saves diffuse, specular, mappedNormals (encoded to spheremapped XY), and object ID to appropriate FBO textures immutable string geometryFS = q{ #version 400 diff --git a/source/graphics/shaders/glsl/pointlight.d b/source/graphics/shaders/glsl/pointlight.d index 654411fa..05ad4669 100644 --- a/source/graphics/shaders/glsl/pointlight.d +++ b/source/graphics/shaders/glsl/pointlight.d @@ -1,11 +1,11 @@ /** -* TODO +* Lighting pass shader for Point Lights */ module graphics.shaders.glsl.pointlight; package: -/// TODO +/// Takes a mesh representing the possible area of the light and creates a ray to each vertex immutable string pointlightVS = q{ #version 400 @@ -32,7 +32,7 @@ immutable string pointlightVS = q{ } }; -/// TODO +/// Outputs diffuse and specular color from the light, using the view ray to reconstruct position and a falloff rate to attenuate immutable string pointlightFS = q{ #version 400 diff --git a/source/graphics/shaders/glsl/userinterface.d b/source/graphics/shaders/glsl/userinterface.d index 5da9f13c..0f6120e6 100644 --- a/source/graphics/shaders/glsl/userinterface.d +++ b/source/graphics/shaders/glsl/userinterface.d @@ -1,5 +1,5 @@ /** -* TODO +* Post-Processing pass shader to render User Interfaces */ module graphics.shaders.glsl.userinterface; diff --git a/source/graphics/shaders/shaders.d b/source/graphics/shaders/shaders.d index 6b6be2c4..1819d909 100644 --- a/source/graphics/shaders/shaders.d +++ b/source/graphics/shaders/shaders.d @@ -1,5 +1,5 @@ /** -* TODO +* Defines Shader class and the Shaders collection for loading, binding, and setting values in GLSL shaders */ module graphics.shaders.shaders; import core, components, graphics, utility; @@ -43,12 +43,12 @@ private enum ShaderUniform } /** -* TODO +* A constant string representing immutable uint fields for each ShaderUniform enum values */ enum ShaderUniformFields = reduce!( ( a, b ) => a ~ "immutable uint " ~ b ~ ";\n" )( "", [__traits(allMembers,ShaderUniform )] ); /** -* TODO +* Loads necessary shaders into variables, and any custom user shaders into an associative array */ final abstract class Shaders { @@ -57,21 +57,21 @@ private: Shader[string] shaders; public: - /// TODO + /// Geometry Shader Shader geometry; - /// TODO + /// Animated Geometry Shader Shader animatedGeometry; - /// TODO + /// Ambient Lighting Shader Shader ambientLight; - /// TODO + /// Directional Lighting shader Shader directionalLight; - /// TODO + /// Point Lighting shader Shader pointLight; - /// TODO + /// User Interface shader Shader userInterface; /** - * TODO + * Loads the field-shaders first, then any additional shaders in the Shaders folder */ final void initialize() { @@ -93,7 +93,7 @@ public: } /** - * TODO + * Empties the array of shaders and calls their Shutdown function */ final void shutdown() { @@ -106,7 +106,7 @@ public: } /** - * TODO + * Returns a Shader based on its string name */ final Shader opIndex( string name ) { @@ -114,7 +114,7 @@ public: } /** - * TODO + * Returns a Shader based on its string name */ final Shader get( string name ) { @@ -124,7 +124,7 @@ public: } /** -* TODO +* Class storing the programID, VS ID, FS ID and ShaderUniform locations for a given Shader program */ final package class Shader { @@ -133,19 +133,19 @@ private: string _shaderName; public: - /// TODO + /// The program ID for the shader mixin( Property!_programID ); - /// TODO + /// The ID for the vertex shader mixin( Property!_vertexShaderID ); - /// TODO + /// The ID for the fragment shader mixin( Property!_fragmentShaderID ); - /// TODO + /// The string name of the Shader mixin( Property!_shaderName ); - + /// Uint locations for each possible Shader Uniform mixin( ShaderUniformFields ); /** - * TODO + * Creates a Shader Program from the name, and either the vertex and fragment shader strings, or their file names */ this(string name, string vertex, string fragment, bool preloaded = false ) { @@ -176,7 +176,7 @@ public: } /** - * TODO + * Compiles a Vertex and Fragment shader into a Shader Program */ void compile( string vertexBody, string fragmentBody ) { diff --git a/source/utility/output.d b/source/utility/output.d index e4226985..c6dad5db 100644 --- a/source/utility/output.d +++ b/source/utility/output.d @@ -46,13 +46,14 @@ enum Verbosity Off, } -/// Wrapper for logging into default logger instance /** -* Params: -* type - level of logging -* messages - compile-time tuple of printable things -* to be written into the log. -*/ + * Wrapper for logging into default logger instance + * + * Params: + * type - level of logging + * messages - compile-time tuple of printable things + * to be written into the log. + */ void log( A... )( OutputType type, lazy A messages ) { Logger.log( messages.text, type ); @@ -68,8 +69,8 @@ alias logFatal = logError; /// Special case is debug logging /** -* Debug messages are removed in release build. -*/ + * Debug messages are removed in release build. + */ void logDebug( A... )( A messages ) { debug Logger.log( messages.text, OutputType.Debug ); diff --git a/source/utility/tasks.d b/source/utility/tasks.d index 19c23dc8..f0690df1 100644 --- a/source/utility/tasks.d +++ b/source/utility/tasks.d @@ -17,7 +17,7 @@ public: * Schedule a task to be executed until it returns true. * * Params: - * dg = The task to execute + * dg = The task to execute. */ void scheduleTask( bool delegate() dg ) { @@ -28,14 +28,15 @@ void scheduleTask( bool delegate() dg ) * Schedule a task to interpolate a value over a period of time. * * Params: - * val = [ref] The value to interpolate - * start = The starting value for interpolation - * end = The target value for interpolation - * interpFunc = [default=lerp] The function to use for interpolation + * T = The type to interpolate, either vector or quaternion. + * val = [ref] The value to interpolate. + * start = The starting value for interpolation. + * end = The target value for interpolation. + * interpFunc = [default=lerp] The function to use for interpolation. * * Example: * --- - * scheduleInterpolateTask( transform.position, startNode, endNode, 100.msecs ); + * scheduleInterpolateTask( position, startNode, endNode, 100.msecs ); * --- */ void scheduleInterpolateTask(T)( ref T val, T start, T end, Duration duration, T function( T, T, float ) interpFunc = &lerp!T ) if( is_vector!T || is_quaternion!T ) @@ -69,15 +70,17 @@ unittest * Schedule a task to interpolate a property over a period of time. * * Params: - * prop = The name of the property being interpolated - * own = [ref] The owner of the property - * start = The starting value for interpolation - * end = The target value for interpolation - * interpFunc = [default=lerp] The function to use for interpolation + * prop = The name of the property being interpolated. + * T = The type to interpolate, either vector or quaternion. + * Owner = The type that owns the property interpolating. + * own = [ref] The owner of the property. + * start = The starting value for interpolation. + * end = The target value for interpolation. + * interpFunc = [default=lerp] The function to use for interpolation. * * Example: * --- - * scheduleInterpolateTask( transform.position, startNode, endNode, 100.msecs ); + * scheduleInterpolateTask!q{position}( transform, startNode, endNode, 100.msecs ); * --- */ void scheduleInterpolateTask( string prop, T, Owner )( ref Owner own, T start, T end, Duration duration, T function( T, T, float ) interpFunc = &lerp!T ) @@ -122,8 +125,8 @@ class TestPropertyInterpolate * Schedule a task to be executed until the duration expires. * * Params: - * duration = The duration to execute the task for - * dg = The task to execute + * duration = The duration to execute the task for. + * dg = The task to execute. */ void scheduleTimedTask( Duration duration, void delegate() dg ) { @@ -194,8 +197,8 @@ void scheduleTimedTask( Duration duration, bool delegate( float, float ) dg ) * Schedule a task to be executed until the duration expires. * * Params: - * dg = The task to execute - * duration = The duration to execute the task for + * dg = The task to execute. + * duration = The duration to execute the task for. */ deprecated( "Use version with duration as first parameter." ) void scheduleTimedTask( void delegate() dg, Duration duration ) @@ -211,8 +214,8 @@ void scheduleTimedTask( void delegate() dg, Duration duration ) * Schedule a task to be execuated after the specified amount of time. * * Params: - * delay = The ammount of time to wait before executing - * dg = The task to execute + * delay = The ammount of time to wait before executing. + * dg = The task to execute. */ void scheduleDelayedTask( Duration delay, void delegate() dg ) { @@ -234,8 +237,8 @@ void scheduleDelayedTask( Duration delay, void delegate() dg ) * Schedule a task to be execuated after the specified amount of time. * * Params: - * dg = The task to execute - * delay = The ammount of time to wait before executing + * dg = The task to execute. + * delay = The ammount of time to wait before executing. */ deprecated( "Use version with delay as first parameter." ) void scheduleDelayedTask( void delegate() dg, Duration delay )