瀏覽代碼

Missed MaterialExtension types

master
Palash Bansal 1 年之前
父節點
當前提交
3b09b70624
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 30 行新增0 行删除
  1. 30
    0
      src/materials/MaterialExtension.ts

+ 30
- 0
src/materials/MaterialExtension.ts 查看文件

*/ */
onAfterRender?: (object: Object3D, material: IMaterial, renderer: IWebGLRenderer) => void onAfterRender?: (object: Object3D, material: IMaterial, renderer: IWebGLRenderer) => void


/**
* Custom callback to run code when the material is updated. (when `materialUpdate` event is dispatched on the material)
* @param material - material that was updated
*/
onMaterialUpdate?: (material: IMaterial) => void
/**
* Custom callback to run code when the material is added/applied to a mesh or any Object3D.
* @param mesh - object/mesh applied to
* @param material - material that was added
*/
onAddToMesh?: (mesh: Object3D, material: IMaterial) => void
/**
* Custom callback to run code when the material is removed from a mesh or any Object3D.
* @param mesh
* @param material
*/
onRemoveFromMesh?: (mesh: Object3D, material: IMaterial) => void

/**
* Custom callback to run code when this material extension is registered to a material.
* @param material
*/
onRegister?: (material: IMaterial) => void // when this extension is registered to a material
/**
* Custom callback to run code when this material extension is unregistered from a material.
* @param material
*/
onUnregister?: (material: IMaterial) => void // when this extension is registered to a material


/** /**
* Function to check if this material extension is compatible with the given material. * Function to check if this material extension is compatible with the given material.
* If not compatible, the material extension will not be applied. * If not compatible, the material extension will not be applied.

Loading…
取消
儲存