@eva/plugin-a11y 2.0.0-beta.1 → 2.0.0-beta.3
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.a11y.js +314 -516
- package/dist/EVA.plugin.a11y.min.js +1 -1
- package/dist/plugin-a11y.cjs.js +239 -385
- package/dist/plugin-a11y.cjs.prod.js +16 -1
- package/dist/plugin-a11y.esm.js +240 -386
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(null,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{};var _EVA_IIFE_a11y=function(t,e,n){"use strict";var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function a(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function c(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function u(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,e){return t.constructor.IDEProps||(t.constructor.IDEProps={}),t.constructor.IDEProps[e]||(t.constructor.IDEProps[e]={}),t.constructor.IDEProps[e]}function l(t){return function(e,n){var r=h(e,n);r.key=n,r.type=t}}function p(t){return function(e,n){h(e,n).step=t}}var d,v,f,y,g=function(t,e){var n=e.width,r=e.height,o=e.position,i=e.left,a=void 0===i?0:i,s=e.top,c=void 0===s?0:s,u=e.zIndex,h=e.pointerEvents,l=e.background;t.style.width=n+"px",t.style.height=r+"px",t.style.position=o,t.style.left=""+a,t.style.top=""+c,t.style.zIndex=""+u,t.style.pointerEvents=h,t.style.background=l,t.style.border="none",t.style.overflow="hidden"},m=function(t){function e(e){var n=t.call(this)||this;_extends(n,e);var r=e.hint,o=void 0===r?"":r,i=e.event,a=e.delay,s=void 0===a?0:a,c=e.attr,u=void 0===c?{}:c,h=e.role,l=void 0===h?"":h,p=e.props,d=void 0===p?{}:p,v=e.state,f=void 0===v?{}:v;return n.hint=o,n.event=i,n.delay=s,n.attr=u,n.role=l,n.props=d,n.state=f,n.a11yId="_"+function(t){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[],r=e.length,o=0;o<t;o++)n[o]=e[0|Math.random()*r];return n.join("")}(6),n}return o(e,t),e.componentName="A11y",a([l("boolean")],e.prototype,"interactive",void 0),a([l("string")],e.prototype,"hint",void 0),a([l("number"),p(1)],e.prototype,"delay",void 0),a([l("string")],e.prototype,"role",void 0),a([l("string")],e.prototype,"a11yId",void 0),e}(e.Component),b=m,E="absolute";t.A11yActivate=void 0,(d=t.A11yActivate||(t.A11yActivate={}))[d.ENABLE=0]="ENABLE",d[d.DISABLE=1]="DISABLE",d[d.CHECK=2]="CHECK",function(t){t.NONE="none",t.AUTO="auto"}(v||(v={})),function(t){t.DEBUG="rgba(255,0,0,0.5)",t.NONE="transparent"}(f||(f={})),function(t){t.BUTTON="button",t.DIV="div"}(y||(y={}));var w=["hint","event","delay","attr","role","props","state","a11yId","name"],A=function(t,e,n){var r=this;["touchstart","touchend","tap"].forEach((function(o){t.emit(o,{stopPropagation:function(){return n.stopPropagation()},data:{position:r.eventPosition},gameObject:e})}))},O=function(r){function h(t){var e=r.call(this,t)||this;return e.cache=new Map,e.eventCache=new Map,e.zIndex=3,e}return o(h,r),Object.defineProperty(h.prototype,"ratioX",{get:function(){return this._ratioX||this.setRatio()?this._ratioX:0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ratioY",{get:function(){return this._ratioY||this.setRatio()?this._ratioY:0},enumerable:!1,configurable:!0}),h.prototype.init=function(e){return void 0===e&&(e={}),s(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,h,l;return c(this,(function(c){switch(c.label){case 0:switch(n=e.activate,r=void 0===n?t.A11yActivate.CHECK:n,o=e.delay,i=void 0===o?100:o,a=e.checkA11yOpen,s=void 0===a?function(){return Promise.resolve(!1)}:a,u=e.zIndex,this.delay=i,this.zIndex=u||this.zIndex,r){case t.A11yActivate.CHECK:return[3,1];case t.A11yActivate.DISABLE:return[3,5];case t.A11yActivate.ENABLE:return[3,6]}return[3,7];case 1:return c.trys.push([1,3,,4]),h=this,[4,s()];case 2:return h.activate=c.sent(),[3,4];case 3:return c.sent(),this.activate=!1,[3,4];case 4:return[3,7];case 5:return this.activate=!1,[3,7];case 6:return this.activate=!0,[3,7];case 7:return this.debug=e.debug||!1,this.debug&&(this.activate=!0),this.activate?(l=document.createElement("div"),this.div=l,this.game.canvas.parentNode&&this.game.canvas.parentNode.insertBefore(this.div,this.game.canvas),[2]):[2]}}))}))},h.prototype.setRatio=function(){var t=this.getCanvasBoundingClientRect(),e=t.width,n=t.height,r=this.getRenderRect(),o=r.renderWidth,i=r.renderHeight;return this._ratioX=e/o,this._ratioY=n/i,!(!e&&!n)&&(this.initDiv(),!0)},h.prototype.getRenderRect=function(){var t=this.game.getSystem(n.RendererSystem).params,e=void 0===t?{width:300,height:300}:t,r=e.height;return{renderWidth:e.width,renderHeight:r}},h.prototype.getCanvasBoundingClientRect=function(){var t=this.game.canvas.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}},h.prototype.initDiv=function(){var t=this,e=window.pageXOffset,n=window.pageYOffset,r=this.getCanvasBoundingClientRect(),o={width:r.width,height:r.height,left:r.left+e+"px",top:r.top+n+"px",position:E,zIndex:this.zIndex,pointerEvents:v.NONE,background:f.NONE};g(this.div,o),this.div.addEventListener("click",(function(e){var n=e.currentTarget.getBoundingClientRect(),r=n.left,o=n.top,i=(e.pageX-r)/t.ratioX,a=(e.pageY-o)/t.ratioY;t.eventPosition={x:i,y:a}}),!0)},h.prototype.update=function(){return s(this,void 0,void 0,(function(){var t,n,r,o,i,a;return c(this,(function(s){if(t=this.componentObserver.clear(),!this.activate)return[2];try{for(n=u(t),r=n.next();!r.done;r=n.next())switch((o=r.value).type){case e.OBSERVER_TYPE.ADD:"Event"===o.componentName&&this.addEvent(o.gameObject),"A11y"===o.componentName&&this.add(o);break;case e.OBSERVER_TYPE.CHANGE:"Transform"===o.componentName&&this.transformChange(o),"A11y"===o.componentName&&this.change(o);break;case e.OBSERVER_TYPE.REMOVE:"Event"===o.componentName&&this.removeEvent(o),"A11y"===o.componentName&&this.remove(o)}}catch(t){i={error:t}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(i)throw i.error}}return[2]}))}))},h.prototype.change=function(t){var e=t.component;if("hint"===t.prop.prop[0]){var n=this.cache.get(e.a11yId);null==n||n.setAttribute("aria-label",e.hint),n&&this.setPosition(n,t.gameObject.transform)}},h.prototype.remove=function(t){var e=t.component;if(e){var n=e.a11yId,r=this.div.querySelector("#"+n);r&&this.div.removeChild(r),this.cache.delete(n)}},h.prototype.add=function(t){var e=this;if(this.activate){var n=t.component,r=t.gameObject,o=n.delay,i=n.a11yId,a=n.event;if(r){var s=r.transform;if(s){var c=document.createElement("div");this.cache.set(i,c),a||(a=r.getComponent("Event")),setTimeout((function(){e.setPosition(c,s),e.setA11yAttr(c,n),a&&e.addEvent(r),r.scene&&e.div.appendChild(c)}),o||this.delay)}}}},h.prototype.transformChange=function(t){var e=t.component,n=t.gameObject.getComponent(b);if(n){var r=n.a11yId;if(e.inScene){if(this.cache.has(r)){var o=this.cache.get(r);o&&this.div.appendChild(o)}}else{var i=this.div.querySelector("#"+r);i&&this.div.removeChild(i)}}},h.prototype.setEvent=function(t,e,n,r){if(e){var o=A.bind(this,e,n);this.eventCache.set(r,o),t.addEventListener("click",o)}},h.prototype.addEvent=function(t){var e=t.getComponent(b);if(e){var n=t.getComponent("Event");if(n){var r=this.cache.get(e.a11yId);r&&this.setEvent(r,n,t,e.a11yId)}}},h.prototype.removeEvent=function(t){var e=t.gameObject.getComponent(b);if(e&&t.component){var n=e.a11yId,r=this.eventCache.get(n),o=this.cache.get(n);o&&o.removeEventListener("click",r)}},h.prototype.setA11yAttr=function(t,e){var n,r,o,i,a,s,c=e.hint,h=e.props,l=void 0===h?{}:h,p=e.state,d=void 0===p?{}:p,v=e.role,f=e.a11yId,y=v||"text";t.setAttribute("role",y),t.setAttribute("aria-label",c),t.id=f;var g=Object.keys(l);try{for(var m=u(g),b=m.next();!b.done;b=m.next()){var E=b.value;t.setAttribute(E,l[E])}}catch(t){n={error:t}}finally{try{b&&!b.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var A=Object.keys(d);try{for(var O=u(A),x=O.next();!x.done;x=O.next()){E=x.value;t.setAttribute(E,d[E])}}catch(t){o={error:t}}finally{try{x&&!x.done&&(i=O.return)&&i.call(O)}finally{if(o)throw o.error}}try{for(var C=u(Object.keys(e)),I=C.next();!I.done;I=C.next()){"string"==typeof e[E=I.value]&&-1===w.indexOf(E)&&1!==E.indexOf("_")&&t.setAttribute(E,e[E])}}catch(t){a={error:t}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}},h.prototype.setPosition=function(t,e){var n=e.size,r=n.width,o=n.height,a={width:0===r?1:r*this.ratioX,height:0===o?1:o*this.ratioY,position:E,zIndex:this.zIndex,pointerEvents:v.AUTO,background:this.debug?f.DEBUG:f.NONE},s=i({},e);g(t,a),function(t,e,n,r){var o=e.worldTransform,i="matrix("+o.a+", "+o.b+", "+o.c+", "+o.d+", "+o.tx*n+", "+o.ty*r+")";t.style.transform=""+i,t.style.webkitTransform=""+i,t.style.transformOrigin="left top",t.style.webkitTransformOrigin="left top"}(t,s,this.ratioX,this.ratioY)},h.prototype.onDestroy=function(){this.div.parentElement.removeChild(this.div),this.cache=null,this.eventCache=null,this.div=null},h.systemName="A11ySystem",h=a([e.decorators.componentObserver({A11y:["hint"],Transform:["inScene"],Event:[]})],h)}(e.System);return t.A11y=b,t.A11ySystem=O,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA,EVA.plugin.renderer);window.EVA.plugin.a11y=window.EVA.plugin.a11y||_EVA_IIFE_a11y;
|
|
1
|
+
function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_extends.apply(null,arguments)}window.EVA=window.EVA||{},window.EVA.plugin=window.EVA.plugin||{};var _EVA_IIFE_a11y=function(t,e,n){"use strict";function i(t,e,n,i){var o,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,n,r):o(e,n))||r);return s>3&&r&&Object.defineProperty(e,n,r),r}function o(t,e,n,i){return new(n||(n=Promise))((function(o,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(r,a)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){return t.constructor.IDEProps||(t.constructor.IDEProps={}),t.constructor.IDEProps[e]||(t.constructor.IDEProps[e]={}),t.constructor.IDEProps[e]}function r(t){return function(e,n){var i=s(e,n);i.key=n,i.type=t}}const a=(t,e)=>{const{width:n,height:i,position:o,left:s=0,top:r=0,zIndex:a,pointerEvents:c,background:h}=e;t.style.width=`${n}px`,t.style.height=`${i}px`,t.style.position=o,t.style.left=`${s}`,t.style.top=`${r}`,t.style.zIndex=`${a}`,t.style.pointerEvents=c,t.style.background=h,t.style.border="none",t.style.overflow="hidden"};class c extends e.Component{constructor(t){super(),_extends(this,t);const{hint:e="",event:n,delay:i=0,attr:o={},role:s="",props:r={},state:a={}}=t;this.hint=e,this.event=n,this.delay=i,this.attr=o,this.role=s,this.props=r,this.state=a,this.a11yId=`_${function(t){let e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[],i=e.length;for(let o=0;o<t;o++)n[o]=e[0|Math.random()*i];return n.join("")}(6)}`}}c.componentName="A11y",i([r("boolean")],c.prototype,"interactive",void 0),i([r("string")],c.prototype,"hint",void 0),i([r("number"),function(t){return function(e,n){s(e,n).step=t}}(1)],c.prototype,"delay",void 0),i([r("string")],c.prototype,"role",void 0),i([r("string")],c.prototype,"a11yId",void 0);const h="absolute";var d,p,u,l;t.A11yActivate=void 0,(d=t.A11yActivate||(t.A11yActivate={}))[d.ENABLE=0]="ENABLE",d[d.DISABLE=1]="DISABLE",d[d.CHECK=2]="CHECK",function(t){t.NONE="none",t.AUTO="auto"}(p||(p={})),function(t){t.DEBUG="rgba(255,0,0,0.5)",t.NONE="transparent"}(u||(u={})),function(t){t.BUTTON="button",t.DIV="div"}(l||(l={}));const v=["hint","event","delay","attr","role","props","state","a11yId","name"],f=function(t,e,n){["touchstart","touchend","tap"].forEach((i=>{t.emit(i,{stopPropagation:()=>n.stopPropagation(),data:{position:this.eventPosition},gameObject:e})}))};let y=class extends e.System{constructor(t){super(t),this.cache=new Map,this.eventCache=new Map,this.zIndex=3}get ratioX(){if(this._ratioX)return this._ratioX;return this.setRatio()?this._ratioX:0}get ratioY(){if(this._ratioY)return this._ratioY;return this.setRatio()?this._ratioY:0}init(e={}){return o(this,void 0,void 0,(function*(){const{activate:n=t.A11yActivate.CHECK,delay:i=100,checkA11yOpen:o=()=>Promise.resolve(!1),zIndex:s}=e;switch(this.delay=i,this.zIndex=s||this.zIndex,n){case t.A11yActivate.CHECK:try{this.activate=yield o()}catch(t){this.activate=!1}break;case t.A11yActivate.DISABLE:this.activate=!1;break;case t.A11yActivate.ENABLE:this.activate=!0}if(this.debug=e.debug||!1,this.debug&&(this.activate=!0),!this.activate)return;const r=document.createElement("div");this.div=r,this.game.canvas.parentNode&&this.game.canvas.parentNode.insertBefore(this.div,this.game.canvas)}))}setRatio(){const{width:t,height:e}=this.getCanvasBoundingClientRect(),{renderWidth:n,renderHeight:i}=this.getRenderRect();return this._ratioX=t/n,this._ratioY=e/i,!(!t&&!e)&&(this.initDiv(),!0)}getRenderRect(){const{params:t={width:300,height:300}}=this.game.getSystem(n.RendererSystem),{height:e,width:i}=t;return{renderWidth:i,renderHeight:e}}getCanvasBoundingClientRect(){const{width:t,height:e,left:n,top:i}=this.game.canvas.getBoundingClientRect();return{width:t,height:e,left:n,top:i}}initDiv(){const{pageXOffset:t,pageYOffset:e}=window,{width:n,height:i,left:o,top:s}=this.getCanvasBoundingClientRect(),r={width:n,height:i,left:`${o+t}px`,top:`${s+e}px`,position:h,zIndex:this.zIndex,pointerEvents:p.NONE,background:u.NONE};a(this.div,r),this.div.addEventListener("click",(t=>{const e=t.currentTarget,{left:n,top:i}=e.getBoundingClientRect(),o=(t.pageX-n)/this.ratioX,s=(t.pageY-i)/this.ratioY;this.eventPosition={x:o,y:s}}),!0)}update(){return o(this,void 0,void 0,(function*(){const t=this.componentObserver.clear();if(this.activate)for(const n of t)switch(n.type){case e.OBSERVER_TYPE.ADD:"Event"===n.componentName&&this.addEvent(n.gameObject),"A11y"===n.componentName&&this.add(n);break;case e.OBSERVER_TYPE.CHANGE:"Transform"===n.componentName&&this.transformChange(n),"A11y"===n.componentName&&this.change(n);break;case e.OBSERVER_TYPE.REMOVE:"Event"===n.componentName&&this.removeEvent(n),"A11y"===n.componentName&&this.remove(n)}}))}change(t){const e=t.component;if("hint"===t.prop.prop[0]){const n=this.cache.get(e.a11yId);null==n||n.setAttribute("aria-label",e.hint),n&&this.setPosition(n,t.gameObject.transform)}}remove(t){const e=t.component;if(!e)return;const{a11yId:n}=e,i=this.div.querySelector(`#${n}`);i&&this.div.removeChild(i),this.cache.delete(n)}add(t){if(!this.activate)return;const e=t.component,{gameObject:n}=t,{delay:i,a11yId:o}=e;let{event:s}=e;if(!n)return;const{transform:r}=n;if(!r)return;const a=document.createElement("div");this.cache.set(o,a),s||(s=n.getComponent("Event")),setTimeout((()=>{this.setPosition(a,r),this.setA11yAttr(a,e),s&&this.addEvent(n),n.scene&&this.div.appendChild(a)}),i||this.delay)}transformChange(t){const e=t.component,{gameObject:n}=t,i=n.getComponent(c);if(!i)return;const{a11yId:o}=i;if(e.inScene){if(this.cache.has(o)){const t=this.cache.get(o);t&&this.div.appendChild(t)}}else{const t=this.div.querySelector(`#${o}`);t&&this.div.removeChild(t)}}setEvent(t,e,n,i){if(!e)return;const o=f.bind(this,e,n);this.eventCache.set(i,o),t.addEventListener("click",o)}addEvent(t){const e=t.getComponent(c);if(!e)return;const n=t.getComponent("Event");if(!n)return;const i=this.cache.get(e.a11yId);i&&this.setEvent(i,n,t,e.a11yId)}removeEvent(t){const{gameObject:e}=t,n=e.getComponent(c);if(!n)return;if(!t.component)return;const{a11yId:i}=n,o=this.eventCache.get(i),s=this.cache.get(i);s&&s.removeEventListener("click",o)}setA11yAttr(t,e){const{hint:n,props:i={},state:o={},role:s,a11yId:r}=e,a=s||"text";t.setAttribute("role",a),t.setAttribute("aria-label",n),t.id=r;const c=Object.keys(i);for(const e of c)t.setAttribute(e,i[e]);const h=Object.keys(o);for(const e of h)t.setAttribute(e,o[e]);for(const n of Object.keys(e))"string"==typeof e[n]&&-1===v.indexOf(n)&&1!==n.indexOf("_")&&t.setAttribute(n,e[n])}setPosition(t,e){const{width:n,height:i}=e.size,o={width:0===n?1:n*this.ratioX,height:0===i?1:i*this.ratioY,position:h,zIndex:this.zIndex,pointerEvents:p.AUTO,background:this.debug?u.DEBUG:u.NONE},s=_extends({},e);a(t,o),((t,e,n,i)=>{const{worldTransform:o}=e,{a:s,b:r,c:a,d:c,tx:h,ty:d}=o,p=`matrix(${s}, ${r}, ${a}, ${c}, ${h*n}, ${d*i})`;t.style.transform=`${p}`,t.style.webkitTransform=`${p}`,t.style.transformOrigin="left top",t.style.webkitTransformOrigin="left top"})(t,s,this.ratioX,this.ratioY)}onDestroy(){this.div.parentElement.removeChild(this.div),this.cache=null,this.eventCache=null,this.div=null}};y.systemName="A11ySystem",y=i([e.decorators.componentObserver({A11y:["hint"],Transform:["inScene"],Event:[]})],y);var g=y;return t.A11y=c,t.A11ySystem=g,Object.defineProperty(t,"__esModule",{value:!0}),t}({},EVA,EVA.plugin.renderer);window.EVA.plugin.a11y=window.EVA.plugin.a11y||_EVA_IIFE_a11y;
|