UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

32 lines (23 loc) 634 B
import { MarkerNodeMatcher } from "./MarkerNodeMatcher.js"; import { assert } from "../../../core/assert.js"; export class MarkerNodeMatcherNot extends MarkerNodeMatcher { /** * * @type {MarkerNodeMatcher} */ source = null; /** * * @param {MarkerNodeMatcher} source * @return {MarkerNodeMatcherNot} */ static from(source) { assert.equal(source.isMarkerNodeMatcher, true); const r = new MarkerNodeMatcherNot(); r.source = source; return r; } match(node) { return !this.source.match(node); } }