@antv/g 5.16.12 → 5.16.14

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/index.umd.js CHANGED
@@ -8330,7 +8330,7 @@
8330
8330
  if(tagName==='svg'){return this.documentElement;}// d3 will use <tspan>
8331
8331
  var clazz=this.defaultView.customElements.get(tagName);if(!clazz){console.warn('Unsupported tagName: ',tagName);clazz=tagName==='tspan'?Text:Group;}var shape=new clazz(options);shape.ownerDocument=this;return shape;};_proto.createElementNS=function createElementNS(namespaceURI,tagName,options){return this.createElement(tagName,options);};_proto.cloneNode=function cloneNode(deep){throw new Error(ERROR_MSG_METHOD_NOT_IMPLEMENTED);};_proto.destroy=function destroy(){try{this.documentElement.destroyChildren();this.timeline.destroy();}catch(e){}}/**
8332
8332
  * Picking 2D graphics with RBush based on BBox, fast but inaccurate.
8333
- */;_proto.elementsFromBBox=function elementsFromBBox(minX,minY,maxX,maxY){var rBush=this.defaultView.context.rBushRoot;var rBushNodes=rBush.search({minX:minX,minY:minY,maxX:maxX,maxY:maxY});var hitTestList=[];rBushNodes.forEach(function(_ref2){var id=_ref2.id;var displayObject=runtime.displayObjectPool.getByEntity(id);var pointerEvents=displayObject.parsedStyle.pointerEvents;// account for `visibility`
8333
+ */;_proto.elementsFromBBox=function elementsFromBBox(minX,minY,maxX,maxY){var rBush=this.defaultView.context.rBushRoot;var rBushNodes=rBush.search({minX:minX,minY:minY,maxX:maxX,maxY:maxY});var hitTestList=[];rBushNodes.forEach(function(_ref2){var displayObject=_ref2.displayObject;var pointerEvents=displayObject.parsedStyle.pointerEvents;// account for `visibility`
8334
8334
  // @see https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
8335
8335
  var isVisibilityAffected=['auto','visiblepainted','visiblefill','visiblestroke','visible'].includes(pointerEvents);if((!isVisibilityAffected||isVisibilityAffected&&displayObject.isVisible())&&!displayObject.isCulled()&&displayObject.isInteractive()){hitTestList.push(displayObject);}});// find group with max z-index
8336
8336
  hitTestList.sort(function(a,b){return b.sortable.renderOrder-a.sortable.renderOrder;});return hitTestList;};_proto.elementFromPointSync=function elementFromPointSync(x,y){var _this$defaultView$can=this.defaultView.canvas2Viewport({x:x,y:y}),viewportX=_this$defaultView$can.x,viewportY=_this$defaultView$can.y;var _this$defaultView$get=this.defaultView.getConfig(),width=_this$defaultView$get.width,height=_this$defaultView$get.height;// outside canvas' viewport
@@ -8611,9 +8611,7 @@
8611
8611
  _this.initAttributes(_this.config.style);var Proxy=runtime.globalThis.Proxy?runtime.globalThis.Proxy:function(){};_this.dataset=new Proxy({},{get:function get(target,name){var formattedName=""+DATASET_PREFIX+kebabize(name);if(target[formattedName]!==undefined){return target[formattedName];}return _this.getAttribute(formattedName);},set:function set(_,prop,value){_this.setAttribute(""+DATASET_PREFIX+kebabize(prop),value);return true;}});_this.style=new Proxy(// @ts-ignore
8612
8612
  {// ...this.attributes,
8613
8613
  setProperty:function setProperty(propertyName,value){_this.setAttribute(propertyName,value);},getPropertyValue:function getPropertyValue(propertyName){return _this.getAttribute(propertyName);},removeProperty:function removeProperty(propertyName){_this.removeAttribute(propertyName);},item:function item(){return '';}},{get:function get(target,name){if(target[name]!==undefined){// if (name in target) {
8614
- return target[name];}return _this.getAttribute(name);},set:function set(_,prop,value){_this.setAttribute(prop,value);return true;}});// insert this group into pool
8615
- runtime.displayObjectPool.add(_this.entity,_assertThisInitialized(_this));return _this;}var _proto=DisplayObject.prototype;_proto.destroy=function destroy(){_Element.prototype.destroy.call(this);// remove from pool
8616
- runtime.displayObjectPool.remove(this.entity);// stop all active animations
8614
+ return target[name];}return _this.getAttribute(name);},set:function set(_,prop,value){_this.setAttribute(prop,value);return true;}});return _this;}var _proto=DisplayObject.prototype;_proto.destroy=function destroy(){_Element.prototype.destroy.call(this);// stop all active animations
8617
8615
  this.getAnimations().forEach(function(animation){animation.cancel();});// FIXME
8618
8616
  // this.renderable = null;
8619
8617
  // this.cullable = null;
@@ -8635,7 +8633,7 @@
8635
8633
  // : INHERITABLE_BASE_STYLE_PROPS,
8636
8634
  };if(runtime.enableCSSParsing){// @ts-ignore
8637
8635
  options.usedAttributes=INHERITABLE_STYLE_PROPS;}// account for FCP, process properties as less as possible
8638
- runtime.styleValueRegistry.processProperties(this,attributes,options);// redraw at next frame
8636
+ var formattedAttributes={};for(var name in attributes){var attributeName=formatAttributeName(name);formattedAttributes[attributeName]=attributes[name];}runtime.styleValueRegistry.processProperties(this,formattedAttributes,options);// redraw at next frame
8639
8637
  renderable.dirty=true;};_proto.setAttribute=function setAttribute(name,value,force){if(force===void 0){force=false;}var attributeName=formatAttributeName(name);// ignore undefined value
8640
8638
  if(isUndefined(value)){return;}if(force||value!==this.attributes[attributeName]){this.internalSetAttribute(attributeName,value);_Element.prototype.setAttribute.call(this,attributeName,value);}}/**
8641
8639
  * called when attributes get changed or initialized
@@ -8762,7 +8760,7 @@
8762
8760
  // return [];
8763
8761
  // }
8764
8762
  // private shadowNodes: DisplayObject[] = [];
8765
- function CustomElement(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$1);_this=_DisplayObject.call(this,_extends({style:runtime.enableCSSParsing?_extends({x:'',y:''},style):_extends({},style)},rest))||this;_this.isCustomElement=true;return _this;}return CustomElement;}(DisplayObject);var pool={};var htmlPool=[];var DisplayObjectPool=/*#__PURE__*/function(){function DisplayObjectPool(){}var _proto=DisplayObjectPool.prototype;_proto.getByEntity=function getByEntity(entity){return pool[entity];};_proto.getAll=function getAll(){return Object.keys(pool).map(function(entity){return pool[entity];});};_proto.add=function add(entity,groupOrShape){pool[entity]=groupOrShape;if(groupOrShape.nodeName===exports.Shape.HTML){htmlPool.push(groupOrShape);}};_proto.remove=function remove(entity){var existed=pool[entity];if(existed){delete pool[entity];if(existed.nodeName===exports.Shape.HTML){var index=htmlPool.indexOf(existed);htmlPool.splice(index,1);}}};_proto.getHTMLs=function getHTMLs(){return htmlPool;};return DisplayObjectPool;}();var _excluded$2=["style"];var Ellipse=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Ellipse,_DisplayObject);function Ellipse(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$2);return _DisplayObject.call(this,_extends({type:exports.Shape.ELLIPSE,style:runtime.enableCSSParsing?_extends({cx:'',cy:'',rx:'',ry:''},style):_extends({},style),initialParsedStyle:{anchor:[0.5,0.5],transformOrigin:runtime.enableCSSParsing?null:[PECENTAGE_50,PECENTAGE_50]}},rest))||this;}return Ellipse;}(DisplayObject);var _excluded$3=["style"];/**
8763
+ function CustomElement(_temp){var _this;var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$1);_this=_DisplayObject.call(this,_extends({style:runtime.enableCSSParsing?_extends({x:'',y:''},style):_extends({},style)},rest))||this;_this.isCustomElement=true;return _this;}return CustomElement;}(DisplayObject);var _excluded$2=["style"];var Ellipse=/*#__PURE__*/function(_DisplayObject){_inheritsLoose(Ellipse,_DisplayObject);function Ellipse(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$2);return _DisplayObject.call(this,_extends({type:exports.Shape.ELLIPSE,style:runtime.enableCSSParsing?_extends({cx:'',cy:'',rx:'',ry:''},style):_extends({},style),initialParsedStyle:{anchor:[0.5,0.5],transformOrigin:runtime.enableCSSParsing?null:[PECENTAGE_50,PECENTAGE_50]}},rest))||this;}return Ellipse;}(DisplayObject);var _excluded$3=["style"];/**
8766
8764
  * its attributes are inherited by its children.
8767
8765
  * @see https://developer.mozilla.org/zh-CN/docs/Web/SVG/Element/g
8768
8766
  *
@@ -8885,7 +8883,9 @@
8885
8883
  */n:'fill',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT},{n:'fillRule',k:['nonzero','evenodd'],d:'nonzero'},/**
8886
8884
  * default to none
8887
8885
  * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke#usage_notes
8888
- */{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT},{n:'shadowType',k:['inner','outer','both'],d:'outer',l:true},{n:'shadowColor',int:true,syntax:exports.PropertySyntax.COLOR},{n:'shadowOffsetX',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowOffsetY',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowBlur',int:true,l:true,d:'0',syntax:exports.PropertySyntax.SHADOW_BLUR},{/**
8886
+ */{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT,/**
8887
+ * Stroke 'none' won't affect geometry but others will.
8888
+ */l:true},{n:'shadowType',k:['inner','outer','both'],d:'outer',l:true},{n:'shadowColor',int:true,syntax:exports.PropertySyntax.COLOR},{n:'shadowOffsetX',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowOffsetY',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowBlur',int:true,l:true,d:'0',syntax:exports.PropertySyntax.SHADOW_BLUR},{/**
8889
8889
  * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width
8890
8890
  */n:'lineWidth',int:true,inh:true,d:'1',l:true,a:['strokeWidth'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'increasedLineWidthForHitTesting',inh:true,d:'0',l:true,syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'lineJoin',inh:true,l:true,a:['strokeLinejoin'],k:['miter','bevel','round'],d:'miter'},{n:'lineCap',inh:true,l:true,a:['strokeLinecap'],k:['butt','round','square'],d:'butt'},{n:'lineDash',int:true,inh:true,k:['none'],a:['strokeDasharray'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE_12},{n:'lineDashOffset',int:true,inh:true,d:'0',a:['strokeDashoffset'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'offsetPath',syntax:exports.PropertySyntax.DEFINED_PATH},{n:'offsetDistance',int:true,syntax:exports.PropertySyntax.OFFSET_DISTANCE},{n:'dx',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'dy',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'zIndex',ind:true,int:true,d:'0',k:['auto'],syntax:exports.PropertySyntax.Z_INDEX},{n:'visibility',k:['visible','hidden'],ind:true,inh:true,/**
8891
8891
  * support interpolation
@@ -8929,14 +8929,7 @@
8929
8929
  *
8930
8930
  * * calculate used value
8931
8931
  * * post process
8932
- */;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){// alias
8933
- // @ts-ignore
8934
- if(attributes.src){// @ts-ignore
8935
- attributes.img=attributes.src;}// @ts-ignore
8936
- if(attributes.d){// @ts-ignore
8937
- attributes.path=attributes.d;}if(attributes.strokeDasharray){attributes.lineDash=attributes.strokeDasharray;}if(attributes.strokeWidth){attributes.lineWidth=attributes.strokeWidth;}// @ts-ignore
8938
- if(attributes.textAnchor){// @ts-ignore
8939
- attributes.textAlign=attributes.textAnchor;}Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
8932
+ */;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
8940
8933
  var oldClipPath=object.parsedStyle.clipPath;var oldOffsetPath=object.parsedStyle.offsetPath;object.parsedStyle=Object.assign(object.parsedStyle,attributes);var _needUpdateGeometry=!!options.forceUpdateGeometry;if(!_needUpdateGeometry){for(var i=0;i<GEOMETRY_ATTRIBUTE_NAMES.length;i++){if(GEOMETRY_ATTRIBUTE_NAMES[i]in attributes){_needUpdateGeometry=true;break;}}}if(attributes.fill){object.parsedStyle.fill=parseColor(attributes.fill);}if(attributes.stroke){object.parsedStyle.stroke=parseColor(attributes.stroke);}if(attributes.shadowColor){object.parsedStyle.shadowColor=parseColor(attributes.shadowColor);}if(attributes.filter){object.parsedStyle.filter=parseFilter(attributes.filter);}// Rect
8941
8934
  // @ts-ignore
8942
8935
  if(!isNil(attributes.radius)){// @ts-ignore
@@ -8978,7 +8971,7 @@
8978
8971
  !isNil(attributes.y2)||// @ts-ignore
8979
8972
  !isNil(attributes.z2))){runtime.CSSPropertySyntaxFactory['<coordinate>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.zIndex)){runtime.CSSPropertySyntaxFactory['<z-index>'].postProcessor(object,_attributeNames);}// @ts-ignore
8980
8973
  if(attributes.path){runtime.CSSPropertySyntaxFactory['<path>'].postProcessor(object,_attributeNames);}// @ts-ignore
8981
- if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;var name=formatAttributeName(attributeName);if(!skipUpdateAttribute){object.attributes[name]=attributes[attributeName];}if(!needUpdateGeometry&&((_propertyMetadataCach=propertyMetadataCache[name])===null||_propertyMetadataCach===void 0?void 0:_propertyMetadataCach.l)){needUpdateGeometry=true;}});if(!skipParse){attributeNames.forEach(function(name){object.computedStyle[name]=_this2.parseProperty(name,object.attributes[name],object);});}// let hasUnresolvedProperties = false;
8974
+ if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;if(!skipUpdateAttribute){object.attributes[attributeName]=attributes[attributeName];}if(!needUpdateGeometry&&((_propertyMetadataCach=propertyMetadataCache[attributeName])===null||_propertyMetadataCach===void 0?void 0:_propertyMetadataCach.l)){needUpdateGeometry=true;}});if(!skipParse){attributeNames.forEach(function(name){object.computedStyle[name]=_this2.parseProperty(name,object.attributes[name],object);});}// let hasUnresolvedProperties = false;
8982
8975
  // parse according to priority
8983
8976
  // path 50
8984
8977
  // points 50
@@ -9305,7 +9298,9 @@
9305
9298
  */;_proto.isNativeEventFromCanvas=function isNativeEventFromCanvas(event){var _event$nativeEvent;var $el=this.context.contextService.getDomElement();var target=(_event$nativeEvent=event.nativeEvent)===null||_event$nativeEvent===void 0?void 0:_event$nativeEvent.target;if(target){// from <canvas>
9306
9299
  if(target===$el){return true;}// from <svg>
9307
9300
  if($el&&$el.contains){return $el.contains(target);}}if(event.nativeEvent.composedPath){return event.nativeEvent.composedPath().indexOf($el)>-1;}// account for Touch
9308
- return false;};_proto.getExistedHTML=function getExistedHTML(event){if(event.nativeEvent.composedPath){var htmls=this.globalRuntime.displayObjectPool.getHTMLs();for(var _iterator=_createForOfIteratorHelperLoose(htmls),_step;!(_step=_iterator()).done;){var html=_step.value;if(event.nativeEvent.composedPath().indexOf(html)>-1){return html;}}}return null;};_proto.pickTarget=function pickTarget(event){return this.hitTest({clientX:event.clientX,clientY:event.clientY,viewportX:event.viewportX,viewportY:event.viewportY,x:event.canvasX,y:event.canvasY});};_proto.createPointerEvent=function createPointerEvent(from,type,target){var event=this.allocateEvent(FederatedPointerEvent);this.copyPointerData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.nativeEvent=from.nativeEvent;event.originalEvent=from;var existedHTML=this.getExistedHTML(event);event.target=target!==null&&target!==void 0?target:existedHTML||this.isNativeEventFromCanvas(event)&&this.pickTarget(event);if(typeof type==='string'){event.type=type;}return event;};_proto.createWheelEvent=function createWheelEvent(from){var event=this.allocateEvent(FederatedWheelEvent);this.copyWheelData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.nativeEvent=from.nativeEvent;event.originalEvent=from;var existedHTML=this.getExistedHTML(event);event.target=existedHTML||this.isNativeEventFromCanvas(event)&&this.pickTarget(event);return event;};_proto.trackingData=function trackingData(id){if(!this.mappingState.trackingData[id]){this.mappingState.trackingData[id]={pressTargetsByButton:{},clicksByButton:{},overTarget:null};}return this.mappingState.trackingData[id];};_proto.cloneWheelEvent=function cloneWheelEvent(from){var event=this.allocateEvent(FederatedWheelEvent);event.nativeEvent=from.nativeEvent;event.originalEvent=from.originalEvent;this.copyWheelData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.target=from.target;event.path=from.composedPath().slice();event.type=from.type;return event;};_proto.clonePointerEvent=function clonePointerEvent(from,type){var event=this.allocateEvent(FederatedPointerEvent);event.nativeEvent=from.nativeEvent;event.originalEvent=from.originalEvent;this.copyPointerData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.target=from.target;event.path=from.composedPath().slice();event.type=type!==null&&type!==void 0?type:event.type;return event;};_proto.copyPointerData=function copyPointerData(from,to){// if (
9301
+ return false;}/**
9302
+ * Find HTML from composed path in native UI event.
9303
+ */;_proto.getExistedHTML=function getExistedHTML(event){if(event.nativeEvent.composedPath){for(var _iterator=_createForOfIteratorHelperLoose(event.nativeEvent.composedPath()),_step;!(_step=_iterator()).done;){var eventTarget=_step.value;var existed=runtime.nativeHTMLMap.get(eventTarget);if(existed){return existed;}}}return null;};_proto.pickTarget=function pickTarget(event){return this.hitTest({clientX:event.clientX,clientY:event.clientY,viewportX:event.viewportX,viewportY:event.viewportY,x:event.canvasX,y:event.canvasY});};_proto.createPointerEvent=function createPointerEvent(from,type,target){var event=this.allocateEvent(FederatedPointerEvent);this.copyPointerData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.nativeEvent=from.nativeEvent;event.originalEvent=from;var existedHTML=this.getExistedHTML(event);event.target=target!==null&&target!==void 0?target:existedHTML||this.isNativeEventFromCanvas(event)&&this.pickTarget(event);if(typeof type==='string'){event.type=type;}return event;};_proto.createWheelEvent=function createWheelEvent(from){var event=this.allocateEvent(FederatedWheelEvent);this.copyWheelData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.nativeEvent=from.nativeEvent;event.originalEvent=from;var existedHTML=this.getExistedHTML(event);event.target=existedHTML||this.isNativeEventFromCanvas(event)&&this.pickTarget(event);return event;};_proto.trackingData=function trackingData(id){if(!this.mappingState.trackingData[id]){this.mappingState.trackingData[id]={pressTargetsByButton:{},clicksByButton:{},overTarget:null};}return this.mappingState.trackingData[id];};_proto.cloneWheelEvent=function cloneWheelEvent(from){var event=this.allocateEvent(FederatedWheelEvent);event.nativeEvent=from.nativeEvent;event.originalEvent=from.originalEvent;this.copyWheelData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.target=from.target;event.path=from.composedPath().slice();event.type=from.type;return event;};_proto.clonePointerEvent=function clonePointerEvent(from,type){var event=this.allocateEvent(FederatedPointerEvent);event.nativeEvent=from.nativeEvent;event.originalEvent=from.originalEvent;this.copyPointerData(from,event);this.copyMouseData(from,event);this.copyData(from,event);event.target=from.target;event.path=from.composedPath().slice();event.type=type!==null&&type!==void 0?type:event.type;return event;};_proto.copyPointerData=function copyPointerData(from,to){// if (
9309
9304
  // !(
9310
9305
  // from instanceof FederatedPointerEvent &&
9311
9306
  // to instanceof FederatedPointerEvent
@@ -9556,7 +9551,7 @@
9556
9551
  * `g-camera-api` will provide an advanced implementation
9557
9552
  */runtime.CameraContribution=Camera;/**
9558
9553
  * `g-web-animations-api` will provide an AnimationTimeline
9559
- */runtime.AnimationTimeline=null;runtime.EasingFunction=null;runtime.offscreenCanvas=new OffscreenCanvasCreator();runtime.displayObjectPool=new DisplayObjectPool();runtime.sceneGraphSelector=new DefaultSceneGraphSelector();runtime.sceneGraphService=new DefaultSceneGraphService(runtime);runtime.textService=new TextService(runtime);runtime.geometryUpdaterFactory=geometryUpdaterFactory;runtime.CSSPropertySyntaxFactory=CSSPropertySyntaxFactory;runtime.styleValueRegistry=new DefaultStyleValueRegistry();runtime.layoutRegistry=null;runtime.globalThis=getGlobalThis();runtime.enableCSSParsing=true;var AbstractRendererPlugin=/*#__PURE__*/function(){function AbstractRendererPlugin(){this.context=void 0;this.plugins=[];}var _proto=AbstractRendererPlugin.prototype;_proto.addRenderingPlugin=function addRenderingPlugin(plugin){this.plugins.push(plugin);this.context.renderingPlugins.push(plugin);};_proto.removeAllRenderingPlugins=function removeAllRenderingPlugins(){var _this=this;this.plugins.forEach(function(plugin){var index=_this.context.renderingPlugins.indexOf(plugin);if(index>=0){_this.context.renderingPlugins.splice(index,1);}});};return AbstractRendererPlugin;}();var AbstractRenderer=/*#__PURE__*/function(){function AbstractRenderer(config){this.plugins=[];this.config=void 0;this.config=_extends({/**
9554
+ */runtime.AnimationTimeline=null;runtime.EasingFunction=null;runtime.offscreenCanvas=new OffscreenCanvasCreator();runtime.nativeHTMLMap=new WeakMap();runtime.sceneGraphSelector=new DefaultSceneGraphSelector();runtime.sceneGraphService=new DefaultSceneGraphService(runtime);runtime.textService=new TextService(runtime);runtime.geometryUpdaterFactory=geometryUpdaterFactory;runtime.CSSPropertySyntaxFactory=CSSPropertySyntaxFactory;runtime.styleValueRegistry=new DefaultStyleValueRegistry();runtime.layoutRegistry=null;runtime.globalThis=getGlobalThis();runtime.enableCSSParsing=true;var AbstractRendererPlugin=/*#__PURE__*/function(){function AbstractRendererPlugin(){this.context=void 0;this.plugins=[];}var _proto=AbstractRendererPlugin.prototype;_proto.addRenderingPlugin=function addRenderingPlugin(plugin){this.plugins.push(plugin);this.context.renderingPlugins.push(plugin);};_proto.removeAllRenderingPlugins=function removeAllRenderingPlugins(){var _this=this;this.plugins.forEach(function(plugin){var index=_this.context.renderingPlugins.indexOf(plugin);if(index>=0){_this.context.renderingPlugins.splice(index,1);}});};return AbstractRendererPlugin;}();var AbstractRenderer=/*#__PURE__*/function(){function AbstractRenderer(config){this.plugins=[];this.config=void 0;this.config=_extends({/**
9560
9555
  * only dirty object will cause re-render
9561
9556
  */enableDirtyCheck:true,enableCulling:false,/**
9562
9557
  * enable auto rendering by default
@@ -9649,8 +9644,7 @@
9649
9644
  // bounds changed, need re-inserting its children
9650
9645
  var bulk=[];Array.from(this.toSync)// some objects may be removed since last frame
9651
9646
  .filter(function(object){return object.isConnected;}).forEach(function(node){var rBushNode=node.rBushNode;// clear dirty node
9652
- if(rBushNode&&rBushNode.aabb){_this2.rBush.remove(rBushNode.aabb);}var renderBounds=node.getRenderBounds();if(renderBounds){var _renderBounds$getMin=renderBounds.getMin(),minX=_renderBounds$getMin[0],minY=_renderBounds$getMin[1];var _renderBounds$getMax=renderBounds.getMax(),maxX=_renderBounds$getMax[0],maxY=_renderBounds$getMax[1];if(!rBushNode.aabb){// @ts-ignore
9653
- rBushNode.aabb={};}rBushNode.aabb.id=node.entity;rBushNode.aabb.minX=minX;rBushNode.aabb.minY=minY;rBushNode.aabb.maxX=maxX;rBushNode.aabb.maxY=maxY;}if(rBushNode.aabb){// TODO: NaN occurs when width/height of Rect is 0
9647
+ if(rBushNode&&rBushNode.aabb){_this2.rBush.remove(rBushNode.aabb);}var renderBounds=node.getRenderBounds();if(renderBounds){var _renderBounds$getMin=renderBounds.getMin(),minX=_renderBounds$getMin[0],minY=_renderBounds$getMin[1];var _renderBounds$getMax=renderBounds.getMax(),maxX=_renderBounds$getMax[0],maxY=_renderBounds$getMax[1];if(!rBushNode.aabb){rBushNode.aabb={};}rBushNode.aabb.displayObject=node;rBushNode.aabb.minX=minX;rBushNode.aabb.minY=minY;rBushNode.aabb.maxX=maxX;rBushNode.aabb.maxY=maxY;}if(rBushNode.aabb){// TODO: NaN occurs when width/height of Rect is 0
9654
9648
  if(!isNaN(rBushNode.aabb.maxX)&&!isNaN(rBushNode.aabb.maxX)&&!isNaN(rBushNode.aabb.minX)&&!isNaN(rBushNode.aabb.minY)){bulk.push(rBushNode.aabb);}}});// use bulk inserting, which is ~2-3 times faster
9655
9649
  // @see https://github.com/mourner/rbush#bulk-inserting-data
9656
9650
  this.rBush.load(bulk);bulk.length=0;this.toSync.clear();// this.syncing = false;
@@ -13381,7 +13375,6 @@
13381
13375
  exports.DefaultSceneGraphSelector = DefaultSceneGraphSelector;
13382
13376
  exports.DefaultSceneGraphService = DefaultSceneGraphService;
13383
13377
  exports.DisplayObject = DisplayObject;
13384
- exports.DisplayObjectPool = DisplayObjectPool;
13385
13378
  exports.Document = Document;
13386
13379
  exports.EMPTY_PARSED_PATH = EMPTY_PARSED_PATH;
13387
13380
  exports.ERROR_MSG_METHOD_NOT_IMPLEMENTED = ERROR_MSG_METHOD_NOT_IMPLEMENTED;