@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
31 lines (23 loc) • 647 B
JavaScript
import { assert } from "../../../../core/assert.js";
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
export class RibbonXMaterialSpec {
/**
*
* @type {String|null}
*/
diffuse = null;
equals(other) {
return this.diffuse === other.diffuse;
}
hash() {
return computeStringHash(this.diffuse);
}
fromJSON({ diffuse }) {
if (diffuse !== undefined) {
assert.isString(diffuse, "diffuse");
this.diffuse = diffuse;
} else {
this.diffuse = null;
}
}
}