laya-coreui-es
Version:
laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改
69 lines (68 loc) • 3.11 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PerformancePlugin = void 0;
class PerformancePlugin {
static setPerformanceDataTool(tool) {
this.performanceTool = tool;
}
static begainSample(path) {
if (this.performanceTool)
this.performanceTool.enable && this.performanceTool.BegainSample(path);
}
static endSample(path) {
if (this.performanceTool)
return this.performanceTool.enable ? this.performanceTool.EndSample(path) : 0;
else
return 0;
}
static expoertFile(path) {
if (this.performanceTool)
return this.performanceTool.enable ? this.performanceTool.exportPerformanceFile() : null;
}
static showFunSampleFun(path) {
this.performanceTool.showFunSampleFun(path);
}
static set enable(value) {
if (this.performanceTool) {
this.performanceTool.enable = value;
}
}
static get enable() {
if (this.performanceTool)
return this._enable;
else
return false;
}
static set enableDataExport(value) {
if (this.performanceTool) {
this.performanceTool.enableDataExport = value;
}
}
static get enableDataExport() {
if (this.performanceTool)
return this.performanceTool.enableDataExport;
return false;
}
}
exports.PerformancePlugin = PerformancePlugin;
PerformancePlugin.performanceTool = null;
PerformancePlugin._enable = false;
PerformancePlugin.PERFORMANCE_LAYA = "Laya";
PerformancePlugin.PERFORMANCE_LAYA_3D = "Laya/3D";
PerformancePlugin.PERFORMANCE_LAYA_2D = "Laya/2D";
PerformancePlugin.PERFORMANCE_LAYA_3D_PRERENDER = "Laya/3D/PreRender";
PerformancePlugin.PERFORMANCE_LAYA_3D_UPDATESCRIPT = "Laya/3D/UpdateScript";
PerformancePlugin.PERFORMANCE_LAYA_3D_PHYSICS = "Laya/3D/Physics";
PerformancePlugin.PERFORMANCE_LAYA_3D_PHYSICS_SIMULATE = "Laya/3D/Physics/simulate";
PerformancePlugin.PERFORMANCE_LAYA_3D_PHYSICS_CHARACTORCOLLISION = "Laya/3D/Physics/updataCharacters&Collisions";
PerformancePlugin.PERFORMANCE_LAYA_3D_PHYSICS_EVENTSCRIPTS = "Laya/3D/Physics/eventScripts";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER = "Laya/3D/Render";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_SHADOWMAP = "Laya/3D/Render/ShadowMap";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_CLUSTER = "Laya/3D/Render/Cluster";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_CULLING = "Laya/3D/Render/Culling";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_RENDERDEPTHMDOE = "Laya/3D/Render/RenderDepthMode";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_RENDEROPAQUE = "Laya/3D/Render/RenderOpaque";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_RENDERCOMMANDBUFFER = "Laya/3D/Render/RenderCommandBuffer";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_RENDERTRANSPARENT = "Laya/3D/Render/RenderTransparent";
PerformancePlugin.PERFORMANCE_LAYA_3D_RENDER_POSTPROCESS = "Laya/3D/Render/PostProcess";
window.PerformancePlugin = PerformancePlugin;