Options
Menu

Class EffectProjectiveTextureMethod

ProjectiveTextureMethod is a material method used to project a texture unto the surface of an object. This can be used for various effects apart from acting like a normal projector, such as projecting fake shadows unto a surface, the impact of light coming through a stained glass window, ...

Hierarchy

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

  • Creates a new ProjectiveTextureMethod object.

    see

    away3d.entities.TextureProjector

    Parameters

    • projector: TextureProjector

      The TextureProjector object that defines the projection properties as well as the texture.

    • Default value mode: string = "multiply"

      The blend mode with which the texture is blended unto the surface.

    • Default value exposure: number = 1

    Returns EffectProjectiveTextureMethod

Properties

_adapter

_adapter: IAssetAdapter

_counts

_counts: Array<number>

_owners

_owners: Array<IMaterial>

_textures

_textures: Array<TextureBase>

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

id

id: number

A unique id for the asset, used to identify assets in an associative array

name

name: string

originalName

originalName: string

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.

Static ADD

ADD: string

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static MIX

MIX: string

Static MULTIPLY

MULTIPLY: string

Static OVERLAY

OVERLAY: string

Static assetType

assetType: string

Accessors

assetType

  • get (): string
  • inheritdoc

    Returns string

exposure

  • get (): number
  • set (value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

mode

  • get (): string
  • set (value: string): void
  • The blend mode with which the texture is blended unto the object. ProjectiveTextureMethod.MULTIPLY can be used to project shadows. To prevent clamping, the texture's alpha should be white! ProjectiveTextureMethod.ADD can be used to project light, such as a slide projector or light coming through stained glass. To prevent clamping, the texture's alpha should be black! ProjectiveTextureMethod.MIX provides normal alpha blending. To prevent clamping, the texture's alpha should be transparent!

    Returns string

  • The blend mode with which the texture is blended unto the object. ProjectiveTextureMethod.MULTIPLY can be used to project shadows. To prevent clamping, the texture's alpha should be white! ProjectiveTextureMethod.ADD can be used to project light, such as a slide projector or light coming through stained glass. To prevent clamping, the texture's alpha should be black! ProjectiveTextureMethod.MIX provides normal alpha blending. To prevent clamping, the texture's alpha should be transparent!

    Parameters

    • value: string

    Returns void

projector

  • get (): TextureProjector
  • set (value: TextureProjector): void
  • The TextureProjector object that defines the projection properties as well as the texture.

    see

    away3d.entities.TextureProjector

    Returns TextureProjector

  • The TextureProjector object that defines the projection properties as well as the texture.

    Parameters

    • value: TextureProjector

    Returns void

Methods

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

clear

  • clear(): void
  • Returns void

copyFrom

  • Copies the state from a ShadingMethodBase object into the current object.

    Parameters

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Cleans up any resources used by the current object.

    Returns void

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

iAddOwner

  • iAddOwner(owner: IMaterial): void

iAddTexture

  • iAddTexture(texture: TextureBase): void

iRemoveOwner

  • iRemoveOwner(owner: IMaterial): void

iRemoveTexture

  • iRemoveTexture(texture: TextureBase): void

invalidate

  • invalidate(): void
  • Returns void

invalidateShaderProgram

  • invalidateShaderProgram(): void
  • Marks the shader program as invalid, so it will be recompiled before the next render.

    internal

    Returns void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

Generated using TypeDoc