kick.core.ProjectAsset Class
A project asset is an object that can be serialized into a project and restored at a later state.
The class is used to describe the behavior any project asset must implement, but instanceof operator does not work.
The constructor must take the following two parameters: kick.core.Engine engine, {Object} config
The config parameter is used to initialize the object and the content should match the output of the
toJSON method
A toJSON method should exist on the object. This method should as a minimum write out the object's uid property.
ProjectAsset objects may reference other ProjectAsset objects, however cyclic references are not allowed.
Methods
init
(
-
config
-
[resourceTracker]
Configures the object using the configuration data.
Parameters:
-
config
Objectconfiguration data in JSON format
-
[resourceTracker]
ResourceTracker optional
toJSON
()
Object
Returns:
Object:
configuration in JSON