Constructors

Properties

collision: Collision
comments: IComment[]
enableLegacyPiP: boolean
lastVpos: number
processedCommentIndex: number
renderer: IRenderer
showCollision: boolean
showCommentCount: boolean
showFPS: boolean
timeline: Timeline
FlashComment: {
    class: typeof FlashComment;
    condition: ((comment) => boolean);
} = ...

Type declaration

  • class: typeof FlashComment
  • condition: ((comment) => boolean)
      • (comment): boolean
      • コメントがFlash適用対象化判定返す

        Parameters

        • comment: {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              is_my_post: boolean;
              layer: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              user_id: number;
              vpos: number;
          }

          コメントデータ

          • content: string
          • date: number
          • date_usec: number
          • id: number
          • is_my_post: boolean
          • layer: number
          • mail: string[]
          • owner: boolean
          • premium: boolean
          • user_id: number
          • vpos: number

        Returns boolean

        Flash適用対象かどうか

default: typeof default = NiconiComments
internal: internal = internal
typeGuard: {
    comment: {
        color: ((i) => i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2");
        colorCode: ((i) => i is string);
        colorCodeAllowAlpha: ((i) => i is string);
        command: {
            key: ((i) => i is "full" | "ender" | "_live" | "invisible");
        };
        font: ((i) => i is "defont" | "mincho" | "gothic" | "gulim" | "simsun");
        loc: ((i) => i is "ue" | "naka" | "shita");
        size: ((i) => i is "big" | "small" | "medium");
    };
    config: {
        initOptions: ((item) => item is Partial<BaseOptions>);
    };
    formatted: {
        comment: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            is_my_post: boolean;
            layer: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            user_id: number;
            vpos: number;
        });
        comments: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            is_my_post: boolean;
            layer: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            user_id: number;
            vpos: number;
        }[]);
        legacyComment: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            vpos: number;
        });
        legacyComments: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            vpos: number;
        }[]);
    };
    internal: {
        CommentMeasuredContentItem: ((i) => i is {
            char: string;
            charWidth: number;
            count: number;
            font?: "defont" | "gulim" | "simsun";
            isButton?: boolean;
            type: "spacer";
        } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...));
        CommentMeasuredContentItemArray: ((i) => i is ({
            char: string;
            charWidth: number;
            count: number;
            font?: "defont" | "gulim" | "simsun";
            isButton?: boolean;
            type: "spacer";
        } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))[]);
        HTML5Fonts: ((i) => i is "defont" | "mincho" | "gothic");
        MeasureInput: ((i) => i is {
            charSize: number;
            content: ({
                char: string;
                charWidth: number;
                count: number;
                font?: "defont" | "gulim" | "simsun";
                isButton?: boolean;
                type: "spacer";
            } | {
                content: string;
                font?: "defont" | "gulim" | "simsun";
                isButton?: boolean;
                slicedContent: string[];
                type: "text";
                width?: number[];
            })[];
            font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
            lineCount: number;
            lineHeight: number;
        });
        MultiConfigItem: (<T>(i) => i is MultiConfigItem<T>);
    };
    legacy: {
        apiChat: ((i) => i is {
            anonymity: number;
            content: string;
            date: number;
            date_usec: number;
            deleted: number;
            mail: string;
            nicoru: number;
            no: number;
            premium: number;
            thread: string;
            user_id: string;
            vpos: number;
        });
        apiGlobalNumRes: ((i) => i is {
            num_res: number;
            thread: string;
        });
        apiLeaf: ((i) => i is {
            count: number;
            thread: string;
        });
        apiPing: ((i) => i is {
            content: string;
        });
        apiThread: ((i) => i is {
            resultcode: number;
            revision: number;
            server_time: number;
            thread: string;
            ticket: string;
        });
        rawApiResponses: ((i) => i is ({
            chat: {
                anonymity: number;
                content: string;
                date: number;
                date_usec: number;
                deleted: number;
                mail: string;
                nicoru: number;
                no: number;
                premium: number;
                thread: string;
                user_id: string;
                vpos: number;
            };
        } | {})[]);
    };
    legacyOwner: {
        comments: ((i) => i is string);
    };
    nicoScript: {
        range: {
            target: ((i) => i is "コメ" | "投コメ" | "全");
        };
        replace: {
            condition: ((i) => i is "部分一致" | "完全一致");
            range: ((i) => i is "全" | "単");
            target: ((i) => i is "コメ" | "投コメ" | "全" | "含まない" | "含む");
        };
    };
    owner: {
        comment: ((i) => i is {
            command: string;
            comment: string;
            time: string;
        });
        comments: ((i) => i is {
            command: string;
            comment: string;
            time: string;
        }[]);
    };
    v1: {
        comment: ((i) => i is {
            body: string;
            commands: string[];
            id: string;
            isMyPost: boolean;
            isPremium: boolean;
            nicoruCount: number;
            nicoruId: null | string;
            no: number;
            postedAt: string;
            score: number;
            source: string;
            userId: string;
            vposMs: number;
        });
        comments: ((i) => i is {
            body: string;
            commands: string[];
            id: string;
            isMyPost: boolean;
            isPremium: boolean;
            nicoruCount: number;
            nicoruId: null | string;
            no: number;
            postedAt: string;
            score: number;
            source: string;
            userId: string;
            vposMs: number;
        }[]);
        thread: ((i) => i is {
            commentCount: number;
            comments: {
                body: string;
                commands: string[];
                id: string;
                isMyPost: boolean;
                isPremium: boolean;
                nicoruCount: number;
                nicoruId: null | string;
                no: number;
                postedAt: string;
                score: number;
                source: string;
                userId: string;
                vposMs: number;
            }[];
            fork: string;
            id: unknown;
        });
        threads: ((i) => i is {
            commentCount: number;
            comments: {
                body: string;
                commands: string[];
                id: string;
                isMyPost: boolean;
                isPremium: boolean;
                nicoruCount: number;
                nicoruId: null | string;
                no: number;
                postedAt: string;
                score: number;
                source: string;
                userId: string;
                vposMs: number;
            }[];
            fork: string;
            id: unknown;
        }[]);
    };
    xml2js: {
        chat: ((i) => i is {
            chat: {
                $: {
                    date: string;
                    date_usec: string;
                    mail: string;
                    no?: string;
                    owner: string;
                    premium: string;
                    user_id?: string;
                    vpos: string;
                };
                _: string;
            }[];
        });
        chatItem: ((i) => i is {
            $: {
                date: string;
                date_usec: string;
                mail: string;
                no?: string;
                owner: string;
                premium: string;
                user_id?: string;
                vpos: string;
            };
            _: string;
        });
        packet: ((i) => i is {
            packet: {
                chat: {
                    $: {
                        date: string;
                        date_usec: string;
                        mail: string;
                        no?: string;
                        owner: string;
                        premium: string;
                        user_id?: string;
                        vpos: string;
                    };
                    _: string;
                }[];
            };
        });
    };
    xmlDocument: ((i) => i is XMLDocument);
} = typeGuard

Type declaration

  • comment: {
        color: ((i) => i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2");
        colorCode: ((i) => i is string);
        colorCodeAllowAlpha: ((i) => i is string);
        command: {
            key: ((i) => i is "full" | "ender" | "_live" | "invisible");
        };
        font: ((i) => i is "defont" | "mincho" | "gothic" | "gulim" | "simsun");
        loc: ((i) => i is "ue" | "naka" | "shita");
        size: ((i) => i is "big" | "small" | "medium");
    }
    • color: ((i) => i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2")
        • (i): i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2"
        • Parameters

          • i: unknown

          Returns i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2"

    • colorCode: ((i) => i is string)
        • (i): i is string
        • Parameters

          • i: unknown

          Returns i is string

    • colorCodeAllowAlpha: ((i) => i is string)
        • (i): i is string
        • Parameters

          • i: unknown

          Returns i is string

    • command: {
          key: ((i) => i is "full" | "ender" | "_live" | "invisible");
      }
      • key: ((i) => i is "full" | "ender" | "_live" | "invisible")
          • (i): i is "full" | "ender" | "_live" | "invisible"
          • Parameters

            • i: unknown

            Returns i is "full" | "ender" | "_live" | "invisible"

    • font: ((i) => i is "defont" | "mincho" | "gothic" | "gulim" | "simsun")
        • (i): i is "defont" | "mincho" | "gothic" | "gulim" | "simsun"
        • Parameters

          • i: unknown

          Returns i is "defont" | "mincho" | "gothic" | "gulim" | "simsun"

    • loc: ((i) => i is "ue" | "naka" | "shita")
        • (i): i is "ue" | "naka" | "shita"
        • Parameters

          • i: unknown

          Returns i is "ue" | "naka" | "shita"

    • size: ((i) => i is "big" | "small" | "medium")
        • (i): i is "big" | "small" | "medium"
        • Parameters

          • i: unknown

          Returns i is "big" | "small" | "medium"

  • config: {
        initOptions: ((item) => item is Partial<BaseOptions>);
    }
  • formatted: {
        comment: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            is_my_post: boolean;
            layer: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            user_id: number;
            vpos: number;
        });
        comments: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            is_my_post: boolean;
            layer: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            user_id: number;
            vpos: number;
        }[]);
        legacyComment: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            vpos: number;
        });
        legacyComments: ((i) => i is {
            content: string;
            date: number;
            date_usec: number;
            id: number;
            mail: string[];
            owner: boolean;
            premium: boolean;
            vpos: number;
        }[]);
    }
    • comment: ((i) => i is {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          is_my_post: boolean;
          layer: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          user_id: number;
          vpos: number;
      })
        • (i): i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              is_my_post: boolean;
              layer: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              user_id: number;
              vpos: number;
          }
        • Parameters

          • i: unknown

          Returns i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              is_my_post: boolean;
              layer: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              user_id: number;
              vpos: number;
          }

    • comments: ((i) => i is {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          is_my_post: boolean;
          layer: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          user_id: number;
          vpos: number;
      }[])
        • (i): i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              is_my_post: boolean;
              layer: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              user_id: number;
              vpos: number;
          }[]
        • Parameters

          • i: unknown

          Returns i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              is_my_post: boolean;
              layer: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              user_id: number;
              vpos: number;
          }[]

    • legacyComment: ((i) => i is {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          vpos: number;
      })
        • (i): i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              vpos: number;
          }
        • Parameters

          • i: unknown

          Returns i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              vpos: number;
          }

    • legacyComments: ((i) => i is {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          vpos: number;
      }[])
        • (i): i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              vpos: number;
          }[]
        • Parameters

          • i: unknown

          Returns i is {
              content: string;
              date: number;
              date_usec: number;
              id: number;
              mail: string[];
              owner: boolean;
              premium: boolean;
              vpos: number;
          }[]

  • internal: {
        CommentMeasuredContentItem: ((i) => i is {
            char: string;
            charWidth: number;
            count: number;
            font?: "defont" | "gulim" | "simsun";
            isButton?: boolean;
            type: "spacer";
        } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...));
        CommentMeasuredContentItemArray: ((i) => i is ({
            char: string;
            charWidth: number;
            count: number;
            font?: "defont" | "gulim" | "simsun";
            isButton?: boolean;
            type: "spacer";
        } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))[]);
        HTML5Fonts: ((i) => i is "defont" | "mincho" | "gothic");
        MeasureInput: ((i) => i is {
            charSize: number;
            content: ({
                char: string;
                charWidth: number;
                count: number;
                font?: "defont" | "gulim" | "simsun";
                isButton?: boolean;
                type: "spacer";
            } | {
                content: string;
                font?: "defont" | "gulim" | "simsun";
                isButton?: boolean;
                slicedContent: string[];
                type: "text";
                width?: number[];
            })[];
            font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
            lineCount: number;
            lineHeight: number;
        });
        MultiConfigItem: (<T>(i) => i is MultiConfigItem<T>);
    }
    • CommentMeasuredContentItem: ((i) => i is {
          char: string;
          charWidth: number;
          count: number;
          font?: "defont" | "gulim" | "simsun";
          isButton?: boolean;
          type: "spacer";
      } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))
        • (i): i is {
              char: string;
              charWidth: number;
              count: number;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              type: "spacer";
          } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...)
        • Parameters

          • i: unknown

          Returns i is {
              char: string;
              charWidth: number;
              count: number;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              type: "spacer";
          } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...)

    • CommentMeasuredContentItemArray: ((i) => i is ({
          char: string;
          charWidth: number;
          count: number;
          font?: "defont" | "gulim" | "simsun";
          isButton?: boolean;
          type: "spacer";
      } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))[])
        • (i): i is ({
              char: string;
              charWidth: number;
              count: number;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              type: "spacer";
          } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))[]
        • Parameters

          • i: unknown

          Returns i is ({
              char: string;
              charWidth: number;
              count: number;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              type: "spacer";
          } | (({ type: "spacer"; char: string; charWidth: number; count: number; font?: "defont" | "gulim" | "simsun" | undefined; isButton?: boolean | undefined; } | { type: "text"; content: string; slicedContent: string[]; width?: number[] | undefined; font?: "defont" | ... 2 more ... | undefined; isButton?: boolean | undefined...))[]

    • HTML5Fonts: ((i) => i is "defont" | "mincho" | "gothic")
        • (i): i is "defont" | "mincho" | "gothic"
        • Parameters

          • i: unknown

          Returns i is "defont" | "mincho" | "gothic"

    • MeasureInput: ((i) => i is {
          charSize: number;
          content: ({
              char: string;
              charWidth: number;
              count: number;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              type: "spacer";
          } | {
              content: string;
              font?: "defont" | "gulim" | "simsun";
              isButton?: boolean;
              slicedContent: string[];
              type: "text";
              width?: number[];
          })[];
          font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
          lineCount: number;
          lineHeight: number;
      })
        • (i): i is {
              charSize: number;
              content: ({
                  char: string;
                  charWidth: number;
                  count: number;
                  font?: "defont" | "gulim" | "simsun";
                  isButton?: boolean;
                  type: "spacer";
              } | {
                  content: string;
                  font?: "defont" | "gulim" | "simsun";
                  isButton?: boolean;
                  slicedContent: string[];
                  type: "text";
                  width?: number[];
              })[];
              font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
              lineCount: number;
              lineHeight: number;
          }
        • Parameters

          • i: unknown

          Returns i is {
              charSize: number;
              content: ({
                  char: string;
                  charWidth: number;
                  count: number;
                  font?: "defont" | "gulim" | "simsun";
                  isButton?: boolean;
                  type: "spacer";
              } | {
                  content: string;
                  font?: "defont" | "gulim" | "simsun";
                  isButton?: boolean;
                  slicedContent: string[];
                  type: "text";
                  width?: number[];
              })[];
              font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
              lineCount: number;
              lineHeight: number;
          }

    • MultiConfigItem: (<T>(i) => i is MultiConfigItem<T>)
  • legacy: {
        apiChat: ((i) => i is {
            anonymity: number;
            content: string;
            date: number;
            date_usec: number;
            deleted: number;
            mail: string;
            nicoru: number;
            no: number;
            premium: number;
            thread: string;
            user_id: string;
            vpos: number;
        });
        apiGlobalNumRes: ((i) => i is {
            num_res: number;
            thread: string;
        });
        apiLeaf: ((i) => i is {
            count: number;
            thread: string;
        });
        apiPing: ((i) => i is {
            content: string;
        });
        apiThread: ((i) => i is {
            resultcode: number;
            revision: number;
            server_time: number;
            thread: string;
            ticket: string;
        });
        rawApiResponses: ((i) => i is ({
            chat: {
                anonymity: number;
                content: string;
                date: number;
                date_usec: number;
                deleted: number;
                mail: string;
                nicoru: number;
                no: number;
                premium: number;
                thread: string;
                user_id: string;
                vpos: number;
            };
        } | {})[]);
    }
    • apiChat: ((i) => i is {
          anonymity: number;
          content: string;
          date: number;
          date_usec: number;
          deleted: number;
          mail: string;
          nicoru: number;
          no: number;
          premium: number;
          thread: string;
          user_id: string;
          vpos: number;
      })
        • (i): i is {
              anonymity: number;
              content: string;
              date: number;
              date_usec: number;
              deleted: number;
              mail: string;
              nicoru: number;
              no: number;
              premium: number;
              thread: string;
              user_id: string;
              vpos: number;
          }
        • Parameters

          • i: unknown

          Returns i is {
              anonymity: number;
              content: string;
              date: number;
              date_usec: number;
              deleted: number;
              mail: string;
              nicoru: number;
              no: number;
              premium: number;
              thread: string;
              user_id: string;
              vpos: number;
          }

    • apiGlobalNumRes: ((i) => i is {
          num_res: number;
          thread: string;
      })
        • (i): i is {
              num_res: number;
              thread: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              num_res: number;
              thread: string;
          }

    • apiLeaf: ((i) => i is {
          count: number;
          thread: string;
      })
        • (i): i is {
              count: number;
              thread: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              count: number;
              thread: string;
          }

    • apiPing: ((i) => i is {
          content: string;
      })
        • (i): i is {
              content: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              content: string;
          }

    • apiThread: ((i) => i is {
          resultcode: number;
          revision: number;
          server_time: number;
          thread: string;
          ticket: string;
      })
        • (i): i is {
              resultcode: number;
              revision: number;
              server_time: number;
              thread: string;
              ticket: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              resultcode: number;
              revision: number;
              server_time: number;
              thread: string;
              ticket: string;
          }

    • rawApiResponses: ((i) => i is ({
          chat: {
              anonymity: number;
              content: string;
              date: number;
              date_usec: number;
              deleted: number;
              mail: string;
              nicoru: number;
              no: number;
              premium: number;
              thread: string;
              user_id: string;
              vpos: number;
          };
      } | {})[])
        • (i): i is ({
              chat: {
                  anonymity: number;
                  content: string;
                  date: number;
                  date_usec: number;
                  deleted: number;
                  mail: string;
                  nicoru: number;
                  no: number;
                  premium: number;
                  thread: string;
                  user_id: string;
                  vpos: number;
              };
          } | {})[]
        • Parameters

          • i: unknown

          Returns i is ({
              chat: {
                  anonymity: number;
                  content: string;
                  date: number;
                  date_usec: number;
                  deleted: number;
                  mail: string;
                  nicoru: number;
                  no: number;
                  premium: number;
                  thread: string;
                  user_id: string;
                  vpos: number;
              };
          } | {})[]

  • legacyOwner: {
        comments: ((i) => i is string);
    }
    • comments: ((i) => i is string)
        • (i): i is string
        • Parameters

          • i: unknown

          Returns i is string

  • nicoScript: {
        range: {
            target: ((i) => i is "コメ" | "投コメ" | "全");
        };
        replace: {
            condition: ((i) => i is "部分一致" | "完全一致");
            range: ((i) => i is "全" | "単");
            target: ((i) => i is "コメ" | "投コメ" | "全" | "含まない" | "含む");
        };
    }
    • range: {
          target: ((i) => i is "コメ" | "投コメ" | "全");
      }
      • target: ((i) => i is "コメ" | "投コメ" | "全")
          • (i): i is "コメ" | "投コメ" | "全"
          • Parameters

            • i: unknown

            Returns i is "コメ" | "投コメ" | "全"

    • replace: {
          condition: ((i) => i is "部分一致" | "完全一致");
          range: ((i) => i is "全" | "単");
          target: ((i) => i is "コメ" | "投コメ" | "全" | "含まない" | "含む");
      }
      • condition: ((i) => i is "部分一致" | "完全一致")
          • (i): i is "部分一致" | "完全一致"
          • Parameters

            • i: unknown

            Returns i is "部分一致" | "完全一致"

      • range: ((i) => i is "全" | "単")
          • (i): i is "全" | "単"
          • Parameters

            • i: unknown

            Returns i is "全" | "単"

      • target: ((i) => i is "コメ" | "投コメ" | "全" | "含まない" | "含む")
          • (i): i is "コメ" | "投コメ" | "全" | "含まない" | "含む"
          • Parameters

            • i: unknown

            Returns i is "コメ" | "投コメ" | "全" | "含まない" | "含む"

  • owner: {
        comment: ((i) => i is {
            command: string;
            comment: string;
            time: string;
        });
        comments: ((i) => i is {
            command: string;
            comment: string;
            time: string;
        }[]);
    }
    • comment: ((i) => i is {
          command: string;
          comment: string;
          time: string;
      })
        • (i): i is {
              command: string;
              comment: string;
              time: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              command: string;
              comment: string;
              time: string;
          }

    • comments: ((i) => i is {
          command: string;
          comment: string;
          time: string;
      }[])
        • (i): i is {
              command: string;
              comment: string;
              time: string;
          }[]
        • Parameters

          • i: unknown

          Returns i is {
              command: string;
              comment: string;
              time: string;
          }[]

  • v1: {
        comment: ((i) => i is {
            body: string;
            commands: string[];
            id: string;
            isMyPost: boolean;
            isPremium: boolean;
            nicoruCount: number;
            nicoruId: null | string;
            no: number;
            postedAt: string;
            score: number;
            source: string;
            userId: string;
            vposMs: number;
        });
        comments: ((i) => i is {
            body: string;
            commands: string[];
            id: string;
            isMyPost: boolean;
            isPremium: boolean;
            nicoruCount: number;
            nicoruId: null | string;
            no: number;
            postedAt: string;
            score: number;
            source: string;
            userId: string;
            vposMs: number;
        }[]);
        thread: ((i) => i is {
            commentCount: number;
            comments: {
                body: string;
                commands: string[];
                id: string;
                isMyPost: boolean;
                isPremium: boolean;
                nicoruCount: number;
                nicoruId: null | string;
                no: number;
                postedAt: string;
                score: number;
                source: string;
                userId: string;
                vposMs: number;
            }[];
            fork: string;
            id: unknown;
        });
        threads: ((i) => i is {
            commentCount: number;
            comments: {
                body: string;
                commands: string[];
                id: string;
                isMyPost: boolean;
                isPremium: boolean;
                nicoruCount: number;
                nicoruId: null | string;
                no: number;
                postedAt: string;
                score: number;
                source: string;
                userId: string;
                vposMs: number;
            }[];
            fork: string;
            id: unknown;
        }[]);
    }
    • comment: ((i) => i is {
          body: string;
          commands: string[];
          id: string;
          isMyPost: boolean;
          isPremium: boolean;
          nicoruCount: number;
          nicoruId: null | string;
          no: number;
          postedAt: string;
          score: number;
          source: string;
          userId: string;
          vposMs: number;
      })
        • (i): i is {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }
        • Parameters

          • i: unknown

          Returns i is {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }

    • comments: ((i) => i is {
          body: string;
          commands: string[];
          id: string;
          isMyPost: boolean;
          isPremium: boolean;
          nicoruCount: number;
          nicoruId: null | string;
          no: number;
          postedAt: string;
          score: number;
          source: string;
          userId: string;
          vposMs: number;
      }[])
        • (i): i is {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }[]
        • Parameters

          • i: unknown

          Returns i is {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }[]

    • thread: ((i) => i is {
          commentCount: number;
          comments: {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }[];
          fork: string;
          id: unknown;
      })
        • (i): i is {
              commentCount: number;
              comments: {
                  body: string;
                  commands: string[];
                  id: string;
                  isMyPost: boolean;
                  isPremium: boolean;
                  nicoruCount: number;
                  nicoruId: null | string;
                  no: number;
                  postedAt: string;
                  score: number;
                  source: string;
                  userId: string;
                  vposMs: number;
              }[];
              fork: string;
              id: unknown;
          }
        • Parameters

          • i: unknown

          Returns i is {
              commentCount: number;
              comments: {
                  body: string;
                  commands: string[];
                  id: string;
                  isMyPost: boolean;
                  isPremium: boolean;
                  nicoruCount: number;
                  nicoruId: null | string;
                  no: number;
                  postedAt: string;
                  score: number;
                  source: string;
                  userId: string;
                  vposMs: number;
              }[];
              fork: string;
              id: unknown;
          }

    • threads: ((i) => i is {
          commentCount: number;
          comments: {
              body: string;
              commands: string[];
              id: string;
              isMyPost: boolean;
              isPremium: boolean;
              nicoruCount: number;
              nicoruId: null | string;
              no: number;
              postedAt: string;
              score: number;
              source: string;
              userId: string;
              vposMs: number;
          }[];
          fork: string;
          id: unknown;
      }[])
        • (i): i is {
              commentCount: number;
              comments: {
                  body: string;
                  commands: string[];
                  id: string;
                  isMyPost: boolean;
                  isPremium: boolean;
                  nicoruCount: number;
                  nicoruId: null | string;
                  no: number;
                  postedAt: string;
                  score: number;
                  source: string;
                  userId: string;
                  vposMs: number;
              }[];
              fork: string;
              id: unknown;
          }[]
        • Parameters

          • i: unknown

          Returns i is {
              commentCount: number;
              comments: {
                  body: string;
                  commands: string[];
                  id: string;
                  isMyPost: boolean;
                  isPremium: boolean;
                  nicoruCount: number;
                  nicoruId: null | string;
                  no: number;
                  postedAt: string;
                  score: number;
                  source: string;
                  userId: string;
                  vposMs: number;
              }[];
              fork: string;
              id: unknown;
          }[]

  • xml2js: {
        chat: ((i) => i is {
            chat: {
                $: {
                    date: string;
                    date_usec: string;
                    mail: string;
                    no?: string;
                    owner: string;
                    premium: string;
                    user_id?: string;
                    vpos: string;
                };
                _: string;
            }[];
        });
        chatItem: ((i) => i is {
            $: {
                date: string;
                date_usec: string;
                mail: string;
                no?: string;
                owner: string;
                premium: string;
                user_id?: string;
                vpos: string;
            };
            _: string;
        });
        packet: ((i) => i is {
            packet: {
                chat: {
                    $: {
                        date: string;
                        date_usec: string;
                        mail: string;
                        no?: string;
                        owner: string;
                        premium: string;
                        user_id?: string;
                        vpos: string;
                    };
                    _: string;
                }[];
            };
        });
    }
    • chat: ((i) => i is {
          chat: {
              $: {
                  date: string;
                  date_usec: string;
                  mail: string;
                  no?: string;
                  owner: string;
                  premium: string;
                  user_id?: string;
                  vpos: string;
              };
              _: string;
          }[];
      })
        • (i): i is {
              chat: {
                  $: {
                      date: string;
                      date_usec: string;
                      mail: string;
                      no?: string;
                      owner: string;
                      premium: string;
                      user_id?: string;
                      vpos: string;
                  };
                  _: string;
              }[];
          }
        • Parameters

          • i: unknown

          Returns i is {
              chat: {
                  $: {
                      date: string;
                      date_usec: string;
                      mail: string;
                      no?: string;
                      owner: string;
                      premium: string;
                      user_id?: string;
                      vpos: string;
                  };
                  _: string;
              }[];
          }

    • chatItem: ((i) => i is {
          $: {
              date: string;
              date_usec: string;
              mail: string;
              no?: string;
              owner: string;
              premium: string;
              user_id?: string;
              vpos: string;
          };
          _: string;
      })
        • (i): i is {
              $: {
                  date: string;
                  date_usec: string;
                  mail: string;
                  no?: string;
                  owner: string;
                  premium: string;
                  user_id?: string;
                  vpos: string;
              };
              _: string;
          }
        • Parameters

          • i: unknown

          Returns i is {
              $: {
                  date: string;
                  date_usec: string;
                  mail: string;
                  no?: string;
                  owner: string;
                  premium: string;
                  user_id?: string;
                  vpos: string;
              };
              _: string;
          }

    • packet: ((i) => i is {
          packet: {
              chat: {
                  $: {
                      date: string;
                      date_usec: string;
                      mail: string;
                      no?: string;
                      owner: string;
                      premium: string;
                      user_id?: string;
                      vpos: string;
                  };
                  _: string;
              }[];
          };
      })
        • (i): i is {
              packet: {
                  chat: {
                      $: {
                          date: string;
                          date_usec: string;
                          mail: string;
                          no?: string;
                          owner: string;
                          premium: string;
                          user_id?: string;
                          vpos: string;
                      };
                      _: string;
                  }[];
              };
          }
        • Parameters

          • i: unknown

          Returns i is {
              packet: {
                  chat: {
                      $: {
                          date: string;
                          date_usec: string;
                          mail: string;
                          no?: string;
                          owner: string;
                          premium: string;
                          user_id?: string;
                          vpos: string;
                      };
                      _: string;
                  }[];
              };
          }

  • xmlDocument: ((i) => i is XMLDocument)
      • (i): i is XMLDocument
      • Parameters

        • i: unknown

        Returns i is XMLDocument

Accessors

Methods

  • 当たり判定を描画する

    Parameters

    • vpos: number

      vpos

    Returns void

  • 描画されたコメント数を描画する

    Parameters

    • Optional count: number

      コメント描画数

    Returns void

  • コメントを描画する

    Parameters

    • timelineRange: undefined | IComment[]

      指定されたvposに存在するコメント

    • vpos: number

      vpos

    • Optional cursor: Position

      カーソルの位置

    Returns void

  • FPSを描画する

    Parameters

    • drawCanvasStart: number

      処理を開始した時間(ms)

    Returns void

  • 背景動画が設定されている場合に描画する

    Returns void

  • 動的にコメント追加する ※すでに存在するコメントの位置はvposに関係なく更新されません

    Parameters

    • Rest ...rawComments: {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          is_my_post: boolean;
          layer: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          user_id: number;
          vpos: number;
      }[]

      コメントデータ

    Returns void

  • キャンバスを消去する

    Returns void

  • @ボタンの呼び出し用

    Parameters

    • vpos: number

      再生位置

    • pos: Position

      カーソルの位置

    Returns void

  • キャンバスを描画する

    Parameters

    • vpos: number

      動画の現在位置の100倍 ニコニコから吐き出されるコメントの位置情報は主にこれ

    • forceRendering: boolean = false

      キャッシュを使用せずに再描画を強制するか

    • Optional cursor: Position

      カーソルの位置

    Returns boolean

    再描画されたか

  • 計算された描画サイズをもとに各コメントの配置位置を決定する

    Parameters

    • data: IComment[]

      コメントデータ

    • end: number

      終了インデックス

    • lazy: boolean = false

      遅延処理を行うか

    Returns void

  • 事前に当たり判定を考慮してコメントの描画場所を決定する

    Parameters

    • _rawData: {
          content: string;
          date: number;
          date_usec: number;
          id: number;
          is_my_post: boolean;
          layer: number;
          mail: string[];
          owner: boolean;
          premium: boolean;
          user_id: number;
          vpos: number;
      }[]

      コメントデータ

    Returns IComment[]

    コメントのインスタンス配列

  • 投稿者コメントを前に移動

    Returns void