Creates a new MethodMaterial object.
Creates a new MethodMaterial object.
A value that can be used by materials that only work with a given type of renderer. The renderer can test the classification to choose which render path to use. For example, a deferred material could set this value so that the deferred renderer knows not to take the forward rendering path.
adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class
The alpha of the surface.
Indicates whether or not the material has transparency. If binary transparency is sufficient, for example when using textures of foliage, consider using alphaThreshold instead.
Indicates whether visible textures (or other pixels) used by this material have already been premultiplied. Toggle this if you are seeing black halos around your blended alpha edges.
The minimum alpha value for which pixels should be drawn. This is used for transparency that is either invisible or entirely opaque, often used with textures for foliage, etc. Recommended values are 0 to disable alpha, or 0.5 to create smooth edges. Default value is 0 (disabled).
Specifies whether or not the UV coordinates should be animated using a transformation matrix.
The blend mode to use when drawing this renderable. The following blend modes are supported:
Defines whether or not the material should cull triangles facing away from the camera.
The ColorTransform object to transform the colour of the material with. Defaults to null.
Indicates whether material should use curves. Defaults to false.
An object to contain any extra data.
A list of the IEntities that use this material
A unique id for the asset, used to identify assets in an associative array
Indicates whether or not any used textures should use an atlas. Defaults to false.
The original name used for this asset in the resource (e.g. file) in which
it was found. This may not be the same as name
, which may
have changed due to of a name conflict.
The style used to render the current TriangleGraphic. If set to null, its parent Sprite's style will be used instead.
Specifies whether or not the UV coordinates should be animated using a transformation matrix.
The method that provides the ambient lighting contribution. Defaults to AmbientBasicMethod.
The method that provides the ambient lighting contribution. Defaults to AmbientBasicMethod.
The depth compare mode used to render the renderables using this material.
The depth compare mode used to render the renderables using this material.
Define which light source types to use for diffuse reflections. This allows choosing between regular lights and/or light probes for diffuse reflections.
Define which light source types to use for diffuse reflections. This allows choosing between regular lights and/or light probes for diffuse reflections.
The method that provides the diffuse lighting contribution. Defaults to DiffuseBasicMethod.
The method that provides the diffuse lighting contribution. Defaults to DiffuseBasicMethod.
Whether or not to use fallOff and radius properties for lights. This can be used to improve performance and compatibility for constrained mode.
Whether or not to use fallOff and radius properties for lights. This can be used to improve performance and compatibility for constrained mode.
The light picker used by the material to provide lights to the material if it supports lighting.
The light picker used by the material to provide lights to the material if it supports lighting.
The method used to generate the per-pixel normals. Defaults to NormalBasicMethod.
The method used to generate the per-pixel normals. Defaults to NormalBasicMethod.
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. Defaults to null.
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. Defaults to null.
Define which light source types to use for specular reflections. This allows choosing between regular lights and/or light probes for specular reflections.
Define which light source types to use for specular reflections. This allows choosing between regular lights and/or light probes for specular reflections.
The method that provides the specular lighting contribution. Defaults to SpecularBasicMethod.
The method that provides the specular lighting contribution. Defaults to SpecularBasicMethod.
Appends an "effect" shading method to the shader. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods added prior.
Adds an effect method at the specified index amongst the methods already added to the material. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods with a lower index.
Add an event listener
Dispatch an event
Returns the method added at the given index.
The index of the method to retrieve.
The method at the given index.
check if an object has an event listener assigned to it
Mark an IEntity as owner of this material. Assures we're not using the same material across renderables with different animations, since the Programs depend on animation. This method needs to be called when a material is assigned.
The IEntity that had this material assigned
Removes an IEntity as owner.
Marks the shader programs for all passes as invalid, so they will be recompiled before the next use.
Removes an effect method from the material.
The method to be removed.
Remove an event listener
Generated using TypeDoc
MethodMaterial forms an abstract base class for the default shaded materials provided by Stage, using material methods to define their appearance.