Members
-
parse-uri - Lightweight module for parse an URI.
- Version:
- v1.0.0
- License:
- MIT
Methods
-
Clear font metrics in metrics cache.
Name Type Description fontstring optional font name. If font name not set then clear cache for all fonts.
-
Encodes binary into base64.
Name Type Description inputstring The input data to encode.
Returns:
Type Description string The encoded base64 string -
measureFont (font)PIXI.TextMetrics~FontMetrics
-
Calculates the ascent, descent and fontSize of a given font-style
Name Type Description fontstring String representing the style of the font
Returns:
Type Description PIXI.TextMetrics~FontMetrics Font properties object -
measureText (text, style, wordWrap, canvas)PIXI.TextMetrics
-
Measures the supplied string of text and returns a Rectangle.
Name Type Description textstring the text to measure.
stylePIXI.TextStyle the text style to use for measuring
wordWrapboolean optional optional override for if word-wrap should be applied to the text.
canvasHTMLCanvasElement optional optional specification of the canvas to use for measuring.
Returns:
Type Description PIXI.TextMetrics measured width and height of the text. -
Sets the float precision on the shader. If the precision is already present this function will do nothing
Name Type Description srcstring the shader source
precisionstring The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'.
Returns:
Type Description string modified shader source -
Name Type Description glWebGLRenderingContext The current WebGL context
attribs* state*
Type Definitions
-
Options for a call to
.add().- See:
-
- Loader#add
Properties:
Name Type Argument Default Description namestring <optional>
The name of the resource to load, if not passed the url is used.
keystring <optional>
Alias for
name.urlstring <optional>
The url for this resource, relative to the baseUrl of this loader.
crossOriginstring | boolean <optional>
Is this request cross-origin? Default is to determine automatically.
timeoutnumber <optional>
0 A timeout in milliseconds for the load. If the load takes longer than this time it is cancelled and the load is considered a failure. If this value is set to
0then there is no explicit timeout.loadTypeResource.LOAD_TYPE <optional>
Resource.LOAD_TYPE.XHR How should this resource be loaded?
xhrTypeResource.XHR_RESPONSE_TYPE <optional>
Resource.XHR_RESPONSE_TYPE.DEFAULT How should the data being loaded be interpreted when using XHR?
onCompleteResource.OnCompleteSignal <optional>
Callback to add an an onComplete signal istener.
callbackResource.OnCompleteSignal <optional>
Alias for
onComplete.metadataResource.IMetadata <optional>
Extra configuration for middleware and the Resource object.