MCPcopy Index your code
hub / github.com/spritejs/spritejs / isPointCollision

Method isPointCollision

src/node/node.js:419–428  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

417 }
418
419 isPointCollision(x, y) {
420 if(!this.mesh) return false;
421 const pointerEvents = this.attributes.pointerEvents;
422 if(pointerEvents === 'none') return false;
423 if(pointerEvents !== 'all' && !this.isVisible) return false;
424 let which = 'both';
425 if(pointerEvents === 'visibleFill') which = 'fill';
426 if(pointerEvents === 'visibleStroke') which = 'stroke';
427 return this.mesh.isPointCollision(x, y, which);
428 }
429
430 onPropertyChange(key, newValue, oldValue) {
431 if(key !== 'id' && key !== 'name' && key !== 'className' && key !== 'pointerEvents' && key !== 'passEvents') {

Callers 1

dispatchPointerEventMethod · 0.95

Calls 1

isPointCollisionMethod · 0.65

Tested by

no test coverage detected