MCPcopy
hub / github.com/midrender/revideo / constructor

Method constructor

packages/2d/src/lib/components/Node.ts:536–551  ·  view source on GitHub ↗
({children, spawner, key, ...rest}: NodeProps)

Source from the content-addressed store, hash-verified

534 public readonly creationStack?: string;
535
536 public constructor({children, spawner, key, ...rest}: NodeProps) {
537 const scene = useScene2D();
538 [this.key, this.unregister] = scene.registerNode(this, key);
539 this.view2D = scene.getView();
540 this.creationStack = new Error().stack;
541 initializeSignals(this, rest);
542 if (spawner) {
543 useLogger().warn({
544 message: 'Node.spawner() has been deprecated.',
545 remarks: 'Use <code>Node.children()</code> instead.',
546 inspect: this.key,
547 stack: new Error().stack,
548 });
549 }
550 this.children(spawner ?? children);
551 }
552
553 /**
554 * Get the local-to-world matrix for this node.

Callers

nothing calls this directly

Calls 6

useScene2DFunction · 0.90
initializeSignalsFunction · 0.90
useLoggerFunction · 0.90
registerNodeMethod · 0.80
getViewMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected