@eva/plugin-stats 1.3.0-alpha.0 → 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EVA.plugin.stats.js +210 -73
- package/dist/EVA.plugin.stats.min.js +1 -1
- package/dist/packages/eva.js/lib/core/Component.d.ts +35 -0
- package/dist/packages/eva.js/lib/core/Component.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/core/ComponentObserver.d.ts +22 -0
- package/dist/packages/eva.js/lib/core/ComponentObserver.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/core/GameObject.d.ts +31 -0
- package/dist/packages/eva.js/lib/core/GameObject.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/core/System.d.ts +30 -0
- package/dist/packages/eva.js/lib/core/System.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/core/Transform.d.ts +51 -0
- package/dist/packages/eva.js/lib/core/Transform.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/core/observer.d.ts +23 -0
- package/dist/packages/eva.js/lib/core/observer.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/decorators/ide.d.ts +2 -0
- package/dist/packages/eva.js/lib/decorators/ide.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/decorators/system.d.ts +11 -0
- package/dist/packages/eva.js/lib/decorators/system.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/game/Game.d.ts +72 -0
- package/dist/packages/eva.js/lib/game/Game.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/game/Scene.d.ts +12 -0
- package/dist/packages/eva.js/lib/game/Scene.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/game/Ticker.d.ts +25 -0
- package/dist/packages/eva.js/lib/game/Ticker.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/index.d.ts +26 -0
- package/dist/packages/eva.js/lib/index.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/loader/Progress.d.ts +21 -0
- package/dist/packages/eva.js/lib/loader/Progress.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/loader/Resource.d.ts +99 -0
- package/dist/packages/eva.js/lib/loader/Resource.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/loader/resourceLoader.d.ts +14 -0
- package/dist/packages/eva.js/lib/loader/resourceLoader.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/timeline/index.d.ts +40 -0
- package/dist/packages/eva.js/lib/timeline/index.d.ts.map +1 -0
- package/dist/packages/eva.js/lib/timeline/utils.d.ts +2 -0
- package/dist/packages/eva.js/lib/timeline/utils.d.ts.map +1 -0
- package/dist/packages/plugin-a11y/lib/A11y.d.ts +26 -0
- package/dist/packages/plugin-a11y/lib/A11y.d.ts.map +1 -0
- package/dist/packages/plugin-a11y/lib/A11ySystem.d.ts +54 -0
- package/dist/packages/plugin-a11y/lib/A11ySystem.d.ts.map +1 -0
- package/dist/packages/plugin-a11y/lib/constant.d.ts +34 -0
- package/dist/packages/plugin-a11y/lib/constant.d.ts.map +1 -0
- package/dist/packages/plugin-a11y/lib/index.d.ts +4 -0
- package/dist/packages/plugin-a11y/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-a11y/lib/utils.d.ts +6 -0
- package/dist/packages/plugin-a11y/lib/utils.d.ts.map +1 -0
- package/dist/packages/plugin-evax/lib/EvaXComponent.d.ts +20 -0
- package/dist/packages/plugin-evax/lib/EvaXComponent.d.ts.map +1 -0
- package/dist/packages/plugin-evax/lib/EvaXSystem.d.ts +33 -0
- package/dist/packages/plugin-evax/lib/EvaXSystem.d.ts.map +1 -0
- package/dist/packages/plugin-evax/lib/index.d.ts +10 -0
- package/dist/packages/plugin-evax/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-evax/lib/utils.d.ts +3 -0
- package/dist/packages/plugin-evax/lib/utils.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/BodiesFactory.d.ts +31 -0
- package/dist/packages/plugin-matterjs/lib/BodiesFactory.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/Physics.d.ts +32 -0
- package/dist/packages/plugin-matterjs/lib/Physics.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/PhysicsEngine.d.ts +35 -0
- package/dist/packages/plugin-matterjs/lib/PhysicsEngine.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/PhysicsSystem.d.ts +32 -0
- package/dist/packages/plugin-matterjs/lib/PhysicsSystem.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/index.d.ts +5 -0
- package/dist/packages/plugin-matterjs/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-matterjs/lib/matter.d.ts +3 -0
- package/dist/packages/plugin-matterjs/lib/matter.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/Renderer.d.ts +19 -0
- package/dist/packages/plugin-renderer/lib/Renderer.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/System.d.ts +40 -0
- package/dist/packages/plugin-renderer/lib/System.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/Transform.d.ts +28 -0
- package/dist/packages/plugin-renderer/lib/Transform.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/ability.d.ts +20 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/ability.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/fix/loader.d.ts +2 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/fix/loader.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/index.d.ts +7 -0
- package/dist/packages/plugin-renderer/lib/compressedTexture/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/index.d.ts +8 -0
- package/dist/packages/plugin-renderer/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/manager/ContainerManager.d.ts +18 -0
- package/dist/packages/plugin-renderer/lib/manager/ContainerManager.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/manager/RendererManager.d.ts +17 -0
- package/dist/packages/plugin-renderer/lib/manager/RendererManager.d.ts.map +1 -0
- package/dist/packages/plugin-renderer/lib/mixin.d.ts +2 -0
- package/dist/packages/plugin-renderer/lib/mixin.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/component.d.ts +26 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/db.d.ts +3 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/db.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/engine.d.ts +10 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/engine.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/system.d.ts +24 -0
- package/dist/packages/plugin-renderer-dragonbone/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-event/lib/component.d.ts +52 -0
- package/dist/packages/plugin-renderer-event/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-event/lib/index.d.ts +5 -0
- package/dist/packages/plugin-renderer-event/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-event/lib/system.d.ts +19 -0
- package/dist/packages/plugin-renderer-event/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-graphics/lib/component.d.ts +8 -0
- package/dist/packages/plugin-renderer-graphics/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-graphics/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-graphics/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-graphics/lib/system.d.ts +12 -0
- package/dist/packages/plugin-renderer-graphics/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-img/lib/component.d.ts +10 -0
- package/dist/packages/plugin-renderer-img/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-img/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-img/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-img/lib/system.d.ts +18 -0
- package/dist/packages/plugin-renderer-img/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/Lottie.d.ts +27 -0
- package/dist/packages/plugin-renderer-lottie/lib/Lottie.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/LottieSystem.d.ts +18 -0
- package/dist/packages/plugin-renderer-lottie/lib/LottieSystem.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/index.d.ts +3 -0
- package/dist/packages/plugin-renderer-lottie/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/lottie-pixi.d.ts +180 -0
- package/dist/packages/plugin-renderer-lottie/lib/lottie-pixi.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/types.d.ts +18 -0
- package/dist/packages/plugin-renderer-lottie/lib/types.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-lottie/lib/utils.d.ts +2 -0
- package/dist/packages/plugin-renderer-lottie/lib/utils.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-mask/lib/component.d.ts +33 -0
- package/dist/packages/plugin-renderer-mask/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-mask/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-mask/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-mask/lib/system.d.ts +31 -0
- package/dist/packages/plugin-renderer-mask/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/component.d.ts +22 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/system.d.ts +19 -0
- package/dist/packages/plugin-renderer-nine-patch/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-render/lib/component.d.ts +17 -0
- package/dist/packages/plugin-renderer-render/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-render/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-render/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-render/lib/system.d.ts +17 -0
- package/dist/packages/plugin-renderer-render/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-spine/lib/Spine.d.ts +4 -0
- package/dist/packages/plugin-renderer-spine/lib/Spine.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-spine/lib/SpineSystem.d.ts +5 -0
- package/dist/packages/plugin-renderer-spine/lib/SpineSystem.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-spine/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-spine/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite/lib/component.d.ts +12 -0
- package/dist/packages/plugin-renderer-sprite/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-sprite/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite/lib/system.d.ts +17 -0
- package/dist/packages/plugin-renderer-sprite/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/component.d.ts +31 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/system.d.ts +31 -0
- package/dist/packages/plugin-renderer-sprite-animation/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-test/lib/component.d.ts +20 -0
- package/dist/packages/plugin-renderer-test/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-test/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-test/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-test/lib/system.d.ts +21 -0
- package/dist/packages/plugin-renderer-test/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-test/lib/system2.d.ts +12 -0
- package/dist/packages/plugin-renderer-test/lib/system2.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-text/lib/component.d.ts +43 -0
- package/dist/packages/plugin-renderer-text/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-text/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-text/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-text/lib/system.d.ts +22 -0
- package/dist/packages/plugin-renderer-text/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/component.d.ts +20 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/index.d.ts +4 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/system.d.ts +18 -0
- package/dist/packages/plugin-renderer-tiling-sprite/lib/system.d.ts.map +1 -0
- package/dist/packages/plugin-sound/lib/Sound.d.ts +44 -0
- package/dist/packages/plugin-sound/lib/Sound.d.ts.map +1 -0
- package/dist/packages/plugin-sound/lib/SoundSystem.d.ts +37 -0
- package/dist/packages/plugin-sound/lib/SoundSystem.d.ts.map +1 -0
- package/dist/packages/plugin-sound/lib/index.d.ts +3 -0
- package/dist/packages/plugin-sound/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/Stats.d.ts +19 -0
- package/dist/packages/plugin-stats/lib/Stats.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/StatsComponent.d.ts +7 -0
- package/dist/packages/plugin-stats/lib/StatsComponent.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/StatsSystem.d.ts +28 -0
- package/dist/packages/plugin-stats/lib/StatsSystem.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/hooks/BaseHooks.d.ts +18 -0
- package/dist/packages/plugin-stats/lib/hooks/BaseHooks.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/hooks/GLHook.d.ts +11 -0
- package/dist/packages/plugin-stats/lib/hooks/GLHook.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/hooks/TextureHook.d.ts +16 -0
- package/dist/packages/plugin-stats/lib/hooks/TextureHook.d.ts.map +1 -0
- package/dist/packages/plugin-stats/lib/index.d.ts +9 -0
- package/dist/packages/plugin-stats/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-transition/lib/Animation.d.ts +38 -0
- package/dist/packages/plugin-transition/lib/Animation.d.ts.map +1 -0
- package/dist/packages/plugin-transition/lib/component.d.ts +35 -0
- package/dist/packages/plugin-transition/lib/component.d.ts.map +1 -0
- package/dist/packages/plugin-transition/lib/index.d.ts +3 -0
- package/dist/packages/plugin-transition/lib/index.d.ts.map +1 -0
- package/dist/packages/plugin-transition/lib/system.d.ts +6 -0
- package/dist/packages/plugin-transition/lib/system.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/Application.d.ts +3 -0
- package/dist/packages/renderer-adapter/lib/Application.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/Container.d.ts +5 -0
- package/dist/packages/renderer-adapter/lib/Container.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/Graphics.d.ts +5 -0
- package/dist/packages/renderer-adapter/lib/Graphics.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/NinePatch.d.ts +5 -0
- package/dist/packages/renderer-adapter/lib/NinePatch.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/Sprite.d.ts +9 -0
- package/dist/packages/renderer-adapter/lib/Sprite.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/SpriteAnimation.d.ts +14 -0
- package/dist/packages/renderer-adapter/lib/SpriteAnimation.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/Text.d.ts +6 -0
- package/dist/packages/renderer-adapter/lib/Text.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/TilingSprite.d.ts +9 -0
- package/dist/packages/renderer-adapter/lib/TilingSprite.d.ts.map +1 -0
- package/dist/packages/renderer-adapter/lib/index.d.ts +9 -0
- package/dist/packages/renderer-adapter/lib/index.d.ts.map +1 -0
- package/dist/packages/spine-base/lib/Spine.d.ts +32 -0
- package/dist/packages/spine-base/lib/Spine.d.ts.map +1 -0
- package/dist/packages/spine-base/lib/SpineData.d.ts +5 -0
- package/dist/packages/spine-base/lib/SpineData.d.ts.map +1 -0
- package/dist/packages/spine-base/lib/SpineSystem.d.ts +20 -0
- package/dist/packages/spine-base/lib/SpineSystem.d.ts.map +1 -0
- package/dist/packages/spine-base/lib/TexCache.d.ts +10 -0
- package/dist/packages/spine-base/lib/TexCache.d.ts.map +1 -0
- package/dist/packages/spine-base/lib/index.d.ts +4 -0
- package/dist/packages/spine-base/lib/index.d.ts.map +1 -0
- package/dist/plugin-stats.cjs.js +190 -3
- package/dist/plugin-stats.cjs.prod.js +2 -2
- package/dist/plugin-stats.esm.js +189 -2
- package/package.json +2 -2
- package/dist/plugin-stats.d.ts +0 -37
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;CACL;AACD,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;CAC1C;AACD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACjE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAgB;IAE5C,OAAO,CAAC,UAAU,CAAiC;IAEnD,UAAU,EAAE,KAAK,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAM;IAC9C,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,QAAQ,CAA8C;IAE9D,IAAI,CAAC,EAAE,KAAK,EAAE;;KAAgB;IAK9B,KAAK;IAML,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAYrC,IAAI,CAAC,IAAI,KAAA;IAUT,OAAO;IAMP,QAAQ;IAMR,SAAS;IAUT,MAAM,CAAC,CAAC,KAAA;IAYR,YAAY,CAAC,IAAI,KAAA;CAKlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,MAAM;IAClD,MAAM,CAAC,UAAU,SAAgB;IACjC,QAAQ,CAAC,IAAI,gBAAgB;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["Application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["Container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Graphics.d.ts","sourceRoot":"","sources":["Graphics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,YAAY;IAChD,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NinePatch.d.ts","sourceRoot":"","sources":["NinePatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,eAAe;gBACxC,GAAG,KAAA,EAAE,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,KAAA,EAAE,YAAY,KAAA;CAehE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Texture as PIXITexture, Sprite as PIXISprite } from 'pixi.js';
|
|
2
|
+
export default class Sprite {
|
|
3
|
+
_image: HTMLImageElement | PIXITexture;
|
|
4
|
+
sprite: PIXISprite;
|
|
5
|
+
constructor(image: HTMLImageElement | PIXITexture);
|
|
6
|
+
set image(val: HTMLImageElement | PIXITexture<import("pixi.js").TextureSource<any>>);
|
|
7
|
+
get image(): HTMLImageElement | PIXITexture<import("pixi.js").TextureSource<any>>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Sprite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sprite.d.ts","sourceRoot":"","sources":["Sprite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAQ;IACvC,MAAM,EAAE,UAAU,CAAC;gBACd,KAAK,EAAE,gBAAgB,GAAG,WAAW;IAYjD,IAAI,KAAK,CAAC,GAAG,sEAAA,EAYZ;IACD,IAAI,KAAK,yEAER;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnimatedSprite } from 'pixi.js';
|
|
2
|
+
export default class SpriteAnimation {
|
|
3
|
+
animatedSprite: AnimatedSprite;
|
|
4
|
+
constructor({ frames }: {
|
|
5
|
+
frames: any;
|
|
6
|
+
});
|
|
7
|
+
play(): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
gotoAndPlay(frameNumber: any): void;
|
|
10
|
+
gotoAndStop(frameNumber: any): void;
|
|
11
|
+
set speed(val: number);
|
|
12
|
+
get speed(): number;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=SpriteAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpriteAnimation.d.ts","sourceRoot":"","sources":["SpriteAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,cAAc,EAAE,cAAc,CAAC;gBACnB,EAAE,MAAM,EAAE;;KAAA;IAGtB,IAAI;IAGJ,IAAI;IAGJ,WAAW,CAAC,WAAW,KAAA;IAGvB,WAAW,CAAC,WAAW,KAAA;IAGvB,IAAI,KAAK,CAAC,GAAG,QAAA,EAEZ;IACD,IAAI,KAAK,WAER;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["Text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAkC,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,QAAQ;gBAC5B,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,gBAAgB;CA8CnD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Texture as PIXITexture, TilingSprite as PIXITilingSprite } from 'pixi.js';
|
|
2
|
+
export default class TilingSprite {
|
|
3
|
+
_image: HTMLImageElement | PIXITexture;
|
|
4
|
+
tilingSprite: PIXITilingSprite;
|
|
5
|
+
constructor(image: HTMLImageElement | PIXITexture);
|
|
6
|
+
set image(val: HTMLImageElement | PIXITexture<import("pixi.js").TextureSource<any>>);
|
|
7
|
+
get image(): HTMLImageElement | PIXITexture<import("pixi.js").TextureSource<any>>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TilingSprite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TilingSprite.d.ts","sourceRoot":"","sources":["TilingSprite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAQ;IACvC,YAAY,EAAE,gBAAgB,CAAC;gBAE1B,KAAK,EAAE,gBAAgB,GAAG,WAAW;IAYjD,IAAI,KAAK,CAAC,GAAG,sEAAA,EAWZ;IACD,IAAI,KAAK,yEAER;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Application } from './Application';
|
|
2
|
+
export { default as Container } from './Container';
|
|
3
|
+
export { default as Graphics } from './Graphics';
|
|
4
|
+
export { default as NinePatch } from './NinePatch';
|
|
5
|
+
export { default as Sprite } from './Sprite';
|
|
6
|
+
export { default as SpriteAnimation } from './SpriteAnimation';
|
|
7
|
+
export { default as Text } from './Text';
|
|
8
|
+
export { default as TilingSprite } from './TilingSprite';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component } from '@eva/eva.js';
|
|
2
|
+
export interface SpineParams {
|
|
3
|
+
resource: string;
|
|
4
|
+
animationName?: string;
|
|
5
|
+
scale?: number;
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default class Spine extends Component<SpineParams> {
|
|
9
|
+
static componentName: string;
|
|
10
|
+
resource: string;
|
|
11
|
+
scale: number;
|
|
12
|
+
animationName: string;
|
|
13
|
+
autoPlay: boolean;
|
|
14
|
+
private _armature;
|
|
15
|
+
private waitExecuteInfos;
|
|
16
|
+
set armature(val: any);
|
|
17
|
+
get armature(): any;
|
|
18
|
+
destroied: boolean;
|
|
19
|
+
addHandler: any;
|
|
20
|
+
lastResource: string;
|
|
21
|
+
init(obj?: SpineParams): void;
|
|
22
|
+
onDestroy(): void;
|
|
23
|
+
play(name?: string, loop?: boolean, track?: number): void;
|
|
24
|
+
stop(track?: number): void;
|
|
25
|
+
addAnimation(name?: string, delay?: number, loop?: boolean, track?: number): void;
|
|
26
|
+
setMix(from: string, to: string, duration: number): void;
|
|
27
|
+
getAnim(track?: number): any;
|
|
28
|
+
setDefaultMix(duration: number): void;
|
|
29
|
+
setAttachment(slotName: string, attachmentName: string): void;
|
|
30
|
+
getBone(boneName: string): any;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=Spine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spine.d.ts","sourceRoot":"","sources":["Spine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAS,CAAC,WAAW,CAAC;IACvD,MAAM,CAAC,aAAa,EAAE,MAAM,CAAW;IAGvC,QAAQ,EAAE,MAAM,CAAM;IAGtB,KAAK,EAAE,MAAM,CAAK;IAGlB,aAAa,EAAE,MAAM,CAAM;IAG3B,QAAQ,EAAE,OAAO,CAAQ;IAEzB,OAAO,CAAC,SAAS,CAAM;IAEvB,OAAO,CAAC,gBAAgB,CAA8E;IAEtG,IAAI,QAAQ,CAAC,GAAG,KAAA,EAef;IACD,IAAI,QAAQ,QAEX;IAED,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW;IAKtB,SAAS;IAIT,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IA2BlD,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM;IAcnB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAa1E,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAOjD,OAAO,CAAC,KAAK,GAAE,MAAU;IAWzB,aAAa,CAAC,QAAQ,EAAE,MAAM;IAO9B,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAOtD,OAAO,CAAC,QAAQ,EAAE,MAAM;CAMzB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const registryResource: (pixiSpine: any) => void;
|
|
2
|
+
export default function getSpineData(res: any, scale: any, pixiSpine: any): Promise<any>;
|
|
3
|
+
export declare function clearCache(): void;
|
|
4
|
+
export declare function releaseSpineData(resourceName: any, imageSrc: any): void;
|
|
5
|
+
//# sourceMappingURL=SpineData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpineData.d.ts","sourceRoot":"","sources":["SpineData.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,gBAAgB,0BAgB5B,CAAC;AAEF,wBAA8B,YAAY,CAAC,GAAG,KAAA,EAAE,KAAK,KAAA,EAAE,SAAS,KAAA,gBAc/D;AAED,wBAAgB,UAAU,SAGzB;AAED,wBAAgB,gBAAgB,CAAC,YAAY,KAAA,EAAE,QAAQ,KAAA,QAUtD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { ComponentChanged, UpdateParams } from '@eva/eva.js';
|
|
3
|
+
import { Renderer, RendererSystem, RendererManager, ContainerManager } from '@eva/plugin-renderer';
|
|
4
|
+
export default class SpineSystem extends Renderer {
|
|
5
|
+
static systemName: string;
|
|
6
|
+
armatures: Record<number, Container>;
|
|
7
|
+
renderSystem: RendererSystem;
|
|
8
|
+
rendererManager: RendererManager;
|
|
9
|
+
containerManager: ContainerManager;
|
|
10
|
+
pixiSpine: any;
|
|
11
|
+
init({ pixiSpine }: {
|
|
12
|
+
pixiSpine: any;
|
|
13
|
+
}): void;
|
|
14
|
+
update(e: UpdateParams): void;
|
|
15
|
+
componentChanged(changed: ComponentChanged): Promise<void>;
|
|
16
|
+
add(changed: ComponentChanged, count?: number): Promise<void>;
|
|
17
|
+
change(changed: ComponentChanged): void;
|
|
18
|
+
remove(changed: ComponentChanged): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=SpineSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpineSystem.d.ts","sourceRoot":"","sources":["SpineSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAc,gBAAgB,EAA2B,YAAY,EAAE,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AASnG,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,QAAQ;IAC/C,MAAM,CAAC,UAAU,SAAiB;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAM;IAC1C,YAAY,EAAE,cAAc,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,GAAG,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,EAAE;;KAAA;IA6ClB,MAAM,CAAC,CAAC,EAAE,YAAY;IAQhB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB;IAe1C,GAAG,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM;IA4EnD,MAAM,CAAC,OAAO,EAAE,gBAAgB;IAI1B,MAAM,CAAC,OAAO,EAAE,gBAAgB;CA0BvC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Texture } from 'pixi.js';
|
|
2
|
+
interface CacheData {
|
|
3
|
+
image?: any;
|
|
4
|
+
}
|
|
5
|
+
export declare function retainTexture(name: string, data: CacheData): Texture<import("pixi.js").TextureSource<any>>;
|
|
6
|
+
export declare function getTexture(imageSrc: string, data: CacheData): Texture<import("pixi.js").TextureSource<any>>;
|
|
7
|
+
export declare function cleanTextures(): void;
|
|
8
|
+
export declare function releaseTexture(imageSrc: string): void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=TexCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TexCache.d.ts","sourceRoot":"","sources":["TexCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAWD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,iDAQ1D;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,iDAO3D;AAED,wBAAgB,aAAa,SAQ5B;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,QAiB9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/plugin-stats.cjs.js
CHANGED
|
@@ -80,6 +80,8 @@ var Stats = function (style) {
|
|
|
80
80
|
var beginTime = (performance || Date).now(), prevTime = beginTime, frames = 0;
|
|
81
81
|
var fpsPanel = addPanel(Stats.Panel('FPS', '#0ff', '#002'));
|
|
82
82
|
var msPanel = addPanel(Stats.Panel('MS', '#0f0', '#020'));
|
|
83
|
+
var dcPanel = addPanel(Stats.Panel('DrawCall', '#330570', '#A69700'));
|
|
84
|
+
var tcPanel = addPanel(Stats.Panel('TC:', '#A62500', '#00B454'));
|
|
83
85
|
var memPanel;
|
|
84
86
|
if (self.performance && self.performance.memory) {
|
|
85
87
|
memPanel = addPanel(Stats.Panel('MB', '#f08', '#201'));
|
|
@@ -93,10 +95,14 @@ var Stats = function (style) {
|
|
|
93
95
|
begin: function (time) {
|
|
94
96
|
beginTime = time || (performance || Date).now();
|
|
95
97
|
},
|
|
96
|
-
end: function () {
|
|
98
|
+
end: function (hook) {
|
|
97
99
|
frames++;
|
|
98
100
|
var time = (performance || Date).now();
|
|
99
101
|
msPanel.update(time - beginTime, 200);
|
|
102
|
+
if (hook) {
|
|
103
|
+
dcPanel.update(hook.deltaDrawCalls, Math.max(50, hook.maxDeltaDrawCalls));
|
|
104
|
+
tcPanel.update(hook.texturesCount, Math.max(20, hook.maxTextureCount));
|
|
105
|
+
}
|
|
100
106
|
if (time >= prevTime + 1000) {
|
|
101
107
|
fpsPanel.update((frames * 1000) / (time - prevTime), 100);
|
|
102
108
|
prevTime = time;
|
|
@@ -155,6 +161,180 @@ Stats.Panel = function (name, fg, bg) {
|
|
|
155
161
|
};
|
|
156
162
|
var Stats$1 = Stats;
|
|
157
163
|
|
|
164
|
+
var GLHook = (function () {
|
|
165
|
+
function GLHook(_gl) {
|
|
166
|
+
this.drawPasses = 0;
|
|
167
|
+
this.isInit = false;
|
|
168
|
+
this.realGLDrawElements = function () { };
|
|
169
|
+
if (_gl) {
|
|
170
|
+
if (_gl.__proto__.drawElements) {
|
|
171
|
+
this.gl = _gl;
|
|
172
|
+
this.realGLDrawElements = _gl.__proto__.drawElements;
|
|
173
|
+
_gl.__proto__.drawElements = this.fakeGLdrawElements(this);
|
|
174
|
+
this.isInit = true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
console.error("[GLHook] GL can't be NULL");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
GLHook.prototype.fakeGLdrawElements = function (context) {
|
|
182
|
+
return function (mode, count, type, offset) {
|
|
183
|
+
context.drawPasses++;
|
|
184
|
+
context.realGLDrawElements.call(this, mode, count, type, offset);
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
GLHook.prototype.reset = function () {
|
|
188
|
+
this.drawPasses = 0;
|
|
189
|
+
};
|
|
190
|
+
GLHook.prototype.release = function () {
|
|
191
|
+
if (this.isInit) {
|
|
192
|
+
this.gl.__proto__.drawElements = this.realGLDrawElements;
|
|
193
|
+
}
|
|
194
|
+
this.isInit = false;
|
|
195
|
+
};
|
|
196
|
+
return GLHook;
|
|
197
|
+
}());
|
|
198
|
+
|
|
199
|
+
var TextureHook = (function () {
|
|
200
|
+
function TextureHook(_gl) {
|
|
201
|
+
this.createdTextures = new Array();
|
|
202
|
+
this.maxTexturesCount = 0;
|
|
203
|
+
this.isInit = false;
|
|
204
|
+
this.realGLCreateTexture = function () { };
|
|
205
|
+
this.realGLDeleteTexture = function () { };
|
|
206
|
+
if (_gl) {
|
|
207
|
+
if (_gl.__proto__.createTexture) {
|
|
208
|
+
this.gl = _gl;
|
|
209
|
+
this.realGLCreateTexture = _gl.__proto__.createTexture;
|
|
210
|
+
this.realGLDeleteTexture = _gl.__proto__.deleteTexture;
|
|
211
|
+
_gl.__proto__.createTexture = this.fakeGLCreateTexture(this);
|
|
212
|
+
_gl.__proto__.deleteTexture = this.fakeGLDeleteTexture(this);
|
|
213
|
+
this.isInit = true;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
console.error("[TextureHook] GL can't be NULL");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
Object.defineProperty(TextureHook.prototype, "currentTextureCount", {
|
|
221
|
+
get: function () {
|
|
222
|
+
return this.createdTextures.length;
|
|
223
|
+
},
|
|
224
|
+
enumerable: false,
|
|
225
|
+
configurable: true
|
|
226
|
+
});
|
|
227
|
+
TextureHook.prototype.registerTexture = function (texture) {
|
|
228
|
+
this.createdTextures.push(texture);
|
|
229
|
+
this.maxTexturesCount = Math.max(this.createdTextures.length, this.maxTexturesCount);
|
|
230
|
+
};
|
|
231
|
+
TextureHook.prototype.fakeGLCreateTexture = function (context) {
|
|
232
|
+
return function () {
|
|
233
|
+
var texture = context.realGLCreateTexture.call(this);
|
|
234
|
+
context.registerTexture(texture);
|
|
235
|
+
return texture;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
TextureHook.prototype.fakeGLDeleteTexture = function (context) {
|
|
239
|
+
return function (texture) {
|
|
240
|
+
var index = context.createdTextures.indexOf(texture);
|
|
241
|
+
if (index > -1) {
|
|
242
|
+
context.createdTextures.splice(index, 1);
|
|
243
|
+
}
|
|
244
|
+
context.realGLDeleteTexture.call(this, texture);
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
TextureHook.prototype.reset = function () {
|
|
248
|
+
this.createdTextures = new Array();
|
|
249
|
+
this.maxTexturesCount = 0;
|
|
250
|
+
};
|
|
251
|
+
TextureHook.prototype.release = function () {
|
|
252
|
+
if (this.isInit) {
|
|
253
|
+
this.gl.__proto__.createTexture = this.realGLCreateTexture;
|
|
254
|
+
this.gl.__proto__.deleteTexture = this.realGLDeleteTexture;
|
|
255
|
+
console.log('[TextureHook] Hook was removed!');
|
|
256
|
+
}
|
|
257
|
+
this.isInit = false;
|
|
258
|
+
};
|
|
259
|
+
return TextureHook;
|
|
260
|
+
}());
|
|
261
|
+
|
|
262
|
+
var BaseHooks = (function () {
|
|
263
|
+
function BaseHooks() {
|
|
264
|
+
this._drawCalls = -1;
|
|
265
|
+
this._maxDeltaDrawCalls = -1;
|
|
266
|
+
}
|
|
267
|
+
BaseHooks.prototype.attach = function (gl) {
|
|
268
|
+
this.glhook = new GLHook(gl);
|
|
269
|
+
this.texturehook = new TextureHook(gl);
|
|
270
|
+
};
|
|
271
|
+
Object.defineProperty(BaseHooks.prototype, "drawCalls", {
|
|
272
|
+
get: function () {
|
|
273
|
+
if (this.glhook && this.glhook.isInit) {
|
|
274
|
+
return this.glhook.drawPasses;
|
|
275
|
+
}
|
|
276
|
+
return -1;
|
|
277
|
+
},
|
|
278
|
+
enumerable: false,
|
|
279
|
+
configurable: true
|
|
280
|
+
});
|
|
281
|
+
Object.defineProperty(BaseHooks.prototype, "maxDeltaDrawCalls", {
|
|
282
|
+
get: function () {
|
|
283
|
+
return this._maxDeltaDrawCalls;
|
|
284
|
+
},
|
|
285
|
+
enumerable: false,
|
|
286
|
+
configurable: true
|
|
287
|
+
});
|
|
288
|
+
Object.defineProperty(BaseHooks.prototype, "deltaDrawCalls", {
|
|
289
|
+
get: function () {
|
|
290
|
+
if (this._drawCalls == -1) {
|
|
291
|
+
this._drawCalls = this.drawCalls;
|
|
292
|
+
return 0;
|
|
293
|
+
}
|
|
294
|
+
var dc = this.drawCalls;
|
|
295
|
+
var delta = dc - this._drawCalls;
|
|
296
|
+
this._drawCalls = dc;
|
|
297
|
+
this._maxDeltaDrawCalls = Math.max(this._maxDeltaDrawCalls, delta);
|
|
298
|
+
return delta;
|
|
299
|
+
},
|
|
300
|
+
enumerable: false,
|
|
301
|
+
configurable: true
|
|
302
|
+
});
|
|
303
|
+
Object.defineProperty(BaseHooks.prototype, "maxTextureCount", {
|
|
304
|
+
get: function () {
|
|
305
|
+
if (this.texturehook && this.texturehook.isInit)
|
|
306
|
+
return this.texturehook.maxTexturesCount;
|
|
307
|
+
return 0;
|
|
308
|
+
},
|
|
309
|
+
enumerable: false,
|
|
310
|
+
configurable: true
|
|
311
|
+
});
|
|
312
|
+
Object.defineProperty(BaseHooks.prototype, "texturesCount", {
|
|
313
|
+
get: function () {
|
|
314
|
+
if (this.texturehook && this.texturehook.isInit)
|
|
315
|
+
return this.texturehook.currentTextureCount;
|
|
316
|
+
return 0;
|
|
317
|
+
},
|
|
318
|
+
enumerable: false,
|
|
319
|
+
configurable: true
|
|
320
|
+
});
|
|
321
|
+
BaseHooks.prototype.reset = function () {
|
|
322
|
+
this._maxDeltaDrawCalls = -1;
|
|
323
|
+
this._drawCalls = -1;
|
|
324
|
+
if (this.glhook)
|
|
325
|
+
this.glhook.reset();
|
|
326
|
+
if (this.texturehook)
|
|
327
|
+
this.texturehook.reset();
|
|
328
|
+
};
|
|
329
|
+
BaseHooks.prototype.release = function () {
|
|
330
|
+
if (this.glhook)
|
|
331
|
+
this.glhook.release();
|
|
332
|
+
if (this.texturehook)
|
|
333
|
+
this.texturehook.release();
|
|
334
|
+
};
|
|
335
|
+
return BaseHooks;
|
|
336
|
+
}());
|
|
337
|
+
|
|
158
338
|
var StatsSystem = (function (_super) {
|
|
159
339
|
__extends(StatsSystem, _super);
|
|
160
340
|
function StatsSystem() {
|
|
@@ -166,6 +346,13 @@ var StatsSystem = (function (_super) {
|
|
|
166
346
|
if (param === void 0) { param = { show: true }; }
|
|
167
347
|
this.show = param.show;
|
|
168
348
|
this.style = param.style;
|
|
349
|
+
this.renderSystem = this.game.getSystem('Renderer');
|
|
350
|
+
this.app = this.renderSystem.application;
|
|
351
|
+
if (this.app && this.show) {
|
|
352
|
+
var gl = this.app.renderer.gl;
|
|
353
|
+
this.hook = new BaseHooks();
|
|
354
|
+
this.hook.attach(gl);
|
|
355
|
+
}
|
|
169
356
|
};
|
|
170
357
|
StatsSystem.prototype.start = function () {
|
|
171
358
|
if (!this.show)
|
|
@@ -179,7 +366,7 @@ var StatsSystem = (function (_super) {
|
|
|
179
366
|
StatsSystem.prototype.lateUpdate = function () {
|
|
180
367
|
if (!this.show)
|
|
181
368
|
return;
|
|
182
|
-
this.stats && this.stats.end();
|
|
369
|
+
this.stats && this.stats.end(this.hook);
|
|
183
370
|
};
|
|
184
371
|
StatsSystem.systemName = 'Stats';
|
|
185
372
|
return StatsSystem;
|
|
@@ -193,4 +380,4 @@ var index = {
|
|
|
193
380
|
|
|
194
381
|
exports.Stats = Stats$2;
|
|
195
382
|
exports.StatsSystem = StatsSystem$1;
|
|
196
|
-
exports[
|
|
383
|
+
exports["default"] = index;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/eva.js"),e=function(t,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@eva/eva.js"),e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},e(t,r)};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12,4 +12,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */function
|
|
15
|
+
***************************************************************************** */function r(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}var o=function(){return o=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},o.apply(this,arguments)},n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(){this.stats&&this.stats.begin()},e.componentName="Stats",e}(t.Component),s=function(t){var e=(t=o({width:20,height:12,x:0,y:0},t)).width,r=t.height,n=t.x,i=t.y,a=0,l=document.createElement("div");function u(t){return l.appendChild(t.dom),t}function h(t){for(var e=0;e<l.children.length;e++)l.children[e].style.display=e===t?"block":"none";a=t}l.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000;width: "+e+"vw;height: "+r+"vw;left: "+n+"vw;top: "+i+"vw;",l.addEventListener("click",(function(t){t.preventDefault(),h(++a%l.children.length)}),!1);var c,p=(performance||Date).now(),f=p,d=0,x=u(s.Panel("FPS","#0ff","#002")),m=u(s.Panel("MS","#0f0","#020")),w=u(s.Panel("DrawCall","#330570","#A69700")),y=u(s.Panel("TC:","#A62500","#00B454"));return self.performance&&self.performance.memory&&(c=u(s.Panel("MB","#f08","#201"))),h(0),{REVISION:16,dom:l,addPanel:u,showPanel:h,begin:function(t){p=t||(performance||Date).now()},end:function(t){d++;var e=(performance||Date).now();if(m.update(e-p,200),t&&(w.update(t.deltaDrawCalls,Math.max(50,t.maxDeltaDrawCalls)),y.update(t.texturesCount,Math.max(20,t.maxTextureCount))),e>=f+1e3&&(x.update(1e3*d/(e-f),100),f=e,d=0,c)){var r=performance.memory;c.update(r.usedJSHeapSize/1048576,r.jsHeapSizeLimit/1048576)}return e},update:function(){p=this.end()},domElement:l,setMode:h}};s.Panel=function(t,e,r){var o=1/0,n=0,s=Math.round,i=s(window.devicePixelRatio||1),a=80*i,l=48*i,u=3*i,h=2*i,c=3*i,p=15*i,f=74*i,d=30*i,x=document.createElement("canvas");x.width=a,x.height=l,x.style.cssText="width:100%;height:100%";var m=x.getContext("2d");return m.font="bold "+9*i+"px Helvetica,Arial,sans-serif",m.textBaseline="top",m.fillStyle=r,m.fillRect(0,0,a,l),m.fillStyle=e,m.fillText(t,u,h),m.fillRect(c,p,f,d),m.fillStyle=r,m.globalAlpha=.9,m.fillRect(c,p,f,d),{dom:x,update:function(l,w){o=Math.min(o,l),n=Math.max(n,l),m.fillStyle=r,m.globalAlpha=1,m.fillRect(0,0,a,p),m.fillStyle=e,m.fillText(s(l)+" "+t+" ("+s(o)+"-"+s(n)+")",u,h),m.drawImage(x,c+i,p,f-i,d,c,p,f-i,d),m.fillRect(c+f-i,p,i,d),m.fillStyle=r,m.globalAlpha=.9,m.fillRect(c+f-i,p,i,s((1-l/w)*d))}}};var i=s,a=function(){function t(t){this.drawPasses=0,this.isInit=!1,this.realGLDrawElements=function(){},t?t.__proto__.drawElements&&(this.gl=t,this.realGLDrawElements=t.__proto__.drawElements,t.__proto__.drawElements=this.fakeGLdrawElements(this),this.isInit=!0):console.error("[GLHook] GL can't be NULL")}return t.prototype.fakeGLdrawElements=function(t){return function(e,r,o,n){t.drawPasses++,t.realGLDrawElements.call(this,e,r,o,n)}},t.prototype.reset=function(){this.drawPasses=0},t.prototype.release=function(){this.isInit&&(this.gl.__proto__.drawElements=this.realGLDrawElements),this.isInit=!1},t}(),l=function(){function t(t){this.createdTextures=new Array,this.maxTexturesCount=0,this.isInit=!1,this.realGLCreateTexture=function(){},this.realGLDeleteTexture=function(){},t?t.__proto__.createTexture&&(this.gl=t,this.realGLCreateTexture=t.__proto__.createTexture,this.realGLDeleteTexture=t.__proto__.deleteTexture,t.__proto__.createTexture=this.fakeGLCreateTexture(this),t.__proto__.deleteTexture=this.fakeGLDeleteTexture(this),this.isInit=!0):console.error("[TextureHook] GL can't be NULL")}return Object.defineProperty(t.prototype,"currentTextureCount",{get:function(){return this.createdTextures.length},enumerable:!1,configurable:!0}),t.prototype.registerTexture=function(t){this.createdTextures.push(t),this.maxTexturesCount=Math.max(this.createdTextures.length,this.maxTexturesCount)},t.prototype.fakeGLCreateTexture=function(t){return function(){var e=t.realGLCreateTexture.call(this);return t.registerTexture(e),e}},t.prototype.fakeGLDeleteTexture=function(t){return function(e){var r=t.createdTextures.indexOf(e);r>-1&&t.createdTextures.splice(r,1),t.realGLDeleteTexture.call(this,e)}},t.prototype.reset=function(){this.createdTextures=new Array,this.maxTexturesCount=0},t.prototype.release=function(){this.isInit&&(this.gl.__proto__.createTexture=this.realGLCreateTexture,this.gl.__proto__.deleteTexture=this.realGLDeleteTexture,console.log("[TextureHook] Hook was removed!")),this.isInit=!1},t}(),u=function(){function t(){this._drawCalls=-1,this._maxDeltaDrawCalls=-1}return t.prototype.attach=function(t){this.glhook=new a(t),this.texturehook=new l(t)},Object.defineProperty(t.prototype,"drawCalls",{get:function(){return this.glhook&&this.glhook.isInit?this.glhook.drawPasses:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDeltaDrawCalls",{get:function(){return this._maxDeltaDrawCalls},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deltaDrawCalls",{get:function(){if(-1==this._drawCalls)return this._drawCalls=this.drawCalls,0;var t=this.drawCalls,e=t-this._drawCalls;return this._drawCalls=t,this._maxDeltaDrawCalls=Math.max(this._maxDeltaDrawCalls,e),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxTextureCount",{get:function(){return this.texturehook&&this.texturehook.isInit?this.texturehook.maxTexturesCount:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texturesCount",{get:function(){return this.texturehook&&this.texturehook.isInit?this.texturehook.currentTextureCount:0},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._maxDeltaDrawCalls=-1,this._drawCalls=-1,this.glhook&&this.glhook.reset(),this.texturehook&&this.texturehook.reset()},t.prototype.release=function(){this.glhook&&this.glhook.release(),this.texturehook&&this.texturehook.release()},t}(),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.show=!0,e}return r(e,t),e.prototype.init=function(t){if(void 0===t&&(t={show:!0}),this.show=t.show,this.style=t.style,this.renderSystem=this.game.getSystem("Renderer"),this.app=this.renderSystem.application,this.app&&this.show){var e=this.app.renderer.gl;this.hook=new u,this.hook.attach(e)}},e.prototype.start=function(){this.show&&(this.component=this.game.scene.addComponent(new n),this.stats=i(this.style),this.component.stats=this.stats,this.stats.showPanel(0),document.body.appendChild(this.stats.dom))},e.prototype.lateUpdate=function(){this.show&&this.stats&&this.stats.end(this.hook)},e.systemName="Stats",e}(t.System),c={Components:[n],Systems:[h]};exports.Stats=n,exports.StatsSystem=h,exports.default=c;
|