fp_init() is the API used to initialize FancyPants SDK. Only a single instance can be obtained and calling this API multiple times will return the same instance each time.
Instance of Fp class allow subsequent FancyPants operations to be possible.
var fp = fp_init();
fp_acquire() is the API used to acquire an instance of a specific FancyPants module.
fp_acquire() with “fp” as the module, the API will return an instance of the Fp class, therefore
fp_init() must have been called prior to this and this API returns null if FancyPants has not been initialized. This call is useful within the theme system where often an instance of the Fp is required for added effects.
|module||string||The instance of the module to acquire|
Instance of specified module
var fp = fp_acquire("fp");
include() API allowing developers to organize their code into different files for easier management.
The environment variable
FP_JS_INCLUDE_PATH is searched for the file to include. The syntax for the
FP_JS_INCLUDE_PATH environment variable is as follows:
export FP_JS_INCLUDE_PATH=”<path>:<other path>:<3rd path>”
print() API allowing developers to print arbitrary string(s) for the purpose of debugging.
This API accepts one or more parameter values. The API utilizes the
toString() of each value and outputs the resulting string onto the console. Please note that this API is not equivalent to C
printf(), thus no formatting is supported, the string can be concatenated by the
+ operator however.
var name = name_get(); print("The name is " + name);
Back to main - Copyright © 2015 Fluffy Spider Techologies - http://fluffyspider.com