+ else
+ {
+ ShaderEffect effect;
+
+ bool found( false );
+ std::string typeName = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args );
+ if( !found )
+ {
+ DALI_SCRIPT_EXCEPTION( isolate, "string parameter missing" );
+ }
+ else
+ {
+ // create a new shader effect based on type, using the type registry.
+ Dali::TypeInfo typeInfo = Dali::TypeRegistry::Get().GetTypeInfo( typeName );
+ if( typeInfo ) // handle, check if it has a value
+ {
+ Dali::BaseHandle handle = typeInfo.CreateInstance();
+ if( handle )
+ {
+ effect = ShaderEffect::DownCast( handle );
+ }
+ }
+ else
+ {
+ DALI_SCRIPT_EXCEPTION(isolate,"Unknown shader effect type");
+ }
+ }