@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
23 lines (22 loc) • 548 B
JavaScript
"use strict";
import { CoreWalker } from "../../../../core/Walker";
export class MissingReference {
constructor(param, path) {
this.param = param;
this.path = path;
}
absolutePath() {
if (!this.param.node) {
return;
}
return CoreWalker.makeAbsolutePath(this.param.node, this.path);
}
matchesPath(path) {
return this.absolutePath() == path;
}
resolveMissingDependencies() {
const input = this.param.rawInputSerialized();
this.param.set(this.param.defaultValue());
this.param.set(input);
}
}