Class: AxResource

AxResource()

new AxResource()

Creates a new AxResource object This is the base class for all axis resources such as meshes, cameras, textures and etc.
Source:

Methods

Deserialize(source) → {Boolean}

Deserialized a whole resource This method relies on DeserializeChunk() to be properly overriden for the particular inherited resource type. It reads the contents wrapped in a SerializationId_Resource and calls DeserializeChunk() method for each chunk encountered Can be overriden to perform pre or post deserialization routines, but for child resources, deserialization itself is meant to be customized through the DeserializeChunk method
Parameters:
Name Type Description
source AxStream The stream holding the serialized data
Source:
Returns:
True if the deserialization was successfull
Type
Boolean

DeserializeChunk(reader) → {Boolean}

Reads the data of a chunk. The chunk header is already read by the reader and this method deserializes the contents of the chunk. Called continuously for each of the resource's chunks. Override to read chunks of resource-specific data
Parameters:
Name Type Description
reader AxHierarchyStreamReader Reader to use for reading the serialized data.
Source:
Returns:
True if a chunk was successfully deserialized
Type
Boolean

DeserializeParameter(parameter, source)

Deserializes a parameter from a stream. In effect, it reads the parameter's type and value from a stream
Parameters:
Name Type Description
parameter AxParameter The parameter which will be deserialized from the source data
source AxStream Stream with the serialized data
Source:

GetProperty(name) → {AxProperty}

Gets the property with the given name. If the resource has no such property, returns null
Parameters:
Name Type Description
name AxString Name of the property to get
Source:
Returns:
The property with the given name. If the resource has no such property, returns null
Type
AxProperty

NotifyPropertiesChange(checkNewPropertiesnon-null) → {Boolean}

Checks whether any of the resource's properties has been changed since the last call and calls the OnPropertiesChanged() and OnPropertyChanged() methods respectively.
Parameters:
Name Type Description
checkNewProperties Boolean Denotes whether to notify about newly created properties. If omitted, a default value of true is assumed.
Source:
Returns:
True if one of more properties have been changed.
Type
Boolean

OnPropertiesChanged()

Gets called by the NotifyPropertiesChange() method when one or more properties have been changed
Source:

OnPropertyChanged(propertyIndex)

Gets called by the NotifyPropertiesChange() method for each changed property
Parameters:
Name Type Description
propertyIndex Integer The index of the changed property
Source:

Serialize(destination)

Serializes the whole resource. This method relies on SerializeChunks() to be properly overridden for the particular inherited resource type. It calls SerializeChunks(), wrapping its whole output in a SerializationId_Resource Can be overriden to perform pre or post serialization routines, but for child resources, serialization itself is meant to be customized through the SerializeChunks method
Parameters:
Name Type Description
destination AxStream The stream into which to write the serialized data
Source:

SerializeChunks(writer)

Writes chunks for all the data which is needed to serialize the resource. Can be overridden by child resources to serialize their implementation-specific data
Parameters:
Name Type Description
writer AxHierarchyStreamWriter Writer to use for writing the serialization data
Source:

SerializeParameter(parameter, destination)

Serializes a parameter into a stream. In effect, it writes the parameter's type and value
Parameters:
Name Type Description
parameter AxParameter The parameter to serialize
destination AxStream The stream in which the serialized parameter will be written
Source:

Documentation generated by JSDoc 3.5.3 on Mon Feb 19 2018 20:39:27 GMT+0200 (FLE Standard Time)