Home > PCB_Event > addRayTracerEngine3DViewClickMaterialEventListener
PCB_Event.addRayTracerEngine3DViewClickMaterialEventListener() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
新增光线追踪引擎 3D 预览点击材质事件监听
Signature
typescript
addRayTracerEngine3DViewClickMaterialEventListener(id: string, callFn: (props: {
materialId: number;
material: any;
}) => void | Promise<void>, onlyOnce?: boolean): void;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | 事件 ID,用以防止重复注册事件 |
callFn | (props: { materialId: number; material: any; }) => void | Promise<void> | 事件触发时的回调函数 |
onlyOnce | boolean | (Optional) 是否仅监听一次 |
Returns
void
Remarks
注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error
ADD since EDA v4