Skip to content

⬅️ Back to Table of Contents

📄 Vector2Editor.js

📊 Analysis Summary

Metric Count
🧱 Classes 1
📦 Imports 2

📚 Table of Contents

🛠️ File Location:

📂 playground/editors/Vector2Editor.js

📦 Imports

Name Source
BaseNodeEditor ../BaseNodeEditor.js
createElementFromJSON ../NodeEditorUtils.js

Classes

Vector2Editor

Class Code
export class Vector2Editor extends BaseNodeEditor {

    constructor() {

        const { element, inputNode } = createElementFromJSON( {
            inputType: 'vec2',
            inputConnection: false
        } );

        super( 'Vector 2', inputNode );

        element.addEventListener( 'changeInput', () => this.invalidate() );

        this.add( element );


    }

}