Jump to content

Interact with line


Recommended Posts


I want to create resize-able room by dragging

Currently to interact with line, I'm create transparent React over line to make interact but it did not work well when line is curved

How should I do to get interact with line ?


drawWalls() {
        this.lineStyle(30, 0, 1);
        this.beginFill(defaultVal(this._options.backgroundColor, 0xe74c3c), 1);
        this.moveTo(this._options.points[0].x, this._options.points[0].y);
        let totalPoints = this._options.points.length;
        for (let i = 1; i < totalPoints; i++) {
            this.addChild(new Wall([this._options.points[i - 1], this._options.points[i]])); // my interact overlay
            this.lineTo(this._options.points[i].x, this._options.points[i].y);



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...