PageSourceSearch

https://excaliburjs.com/assets/js/9193a895.9c59e018.js

js excaliburjs.com collected 2026-10-02 10:52:42 UTC 35,837 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunksite=globalThis.webpackChunksite||[]).push([[3052],{63970(s,l,e){e.r(l),e.d(l,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>n,toc:()=>t});const n=JSON.parse('{"id":"actions/06.1-actions","title":"Actions","description":"Actions","source":"@site/docs/07-actions/06.1-actions.mdx","sourceDirName":"07-actions","slug":"/actions","permalink":"/docs/actions","draft":false,"unlisted":false,"editUrl":"https://github.com/excaliburjs/Excalibur/tree/main/site/docs/07-actions/06.1-actions.mdx","tags":[],"version":"current","frontMatter":{"title":"Actions","slug":"/actions","section":"Actions"},"sidebar":"learnSidebar","previous":{"title":"Actions","permalink":"/docs/category/actions"},"next":{"title":"Blink","permalink":"/docs/actions-blink"}}');var c=e(74848),o=e(28453);const r={title:"Actions",slug:"/actions",section:"Actions"},i=void 0,a={},t=[{value:"Actions",id:"actions",level:2},{value:"Chaining Actions",id:"chaining-actions",level:3},{value:"Example: Follow a Path",id:"example-follow-a-path",level:3},{value:"Custom Actions",id:"custom-actions",level:3},{value:"Future Plans",id:"future-plans",level:3}];function d(s){const l={a:"a",code:"code",div:"div",h2:"h2",h3:"h3",p:"p",pre:"pre",span:"span",...(0,o.R)(),...s.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.h2,{id:"actions",children:"Actions"}),"\n",(0,c.jsx)(l.p,{children:"Actions can be chained together and can be set to repeat,\nor can be interrupted to change."}),"\n",(0,c.jsxs)(l.p,{children:["Actor actions are available off of ",(0,c.jsx)(l.a,{href:"/api/class/Actor#actions",title:"View 'actions'",className:"tsdoc-link",children:"Actor.actions"}),"."]}),"\n",(0,c.jsx)(l.h3,{id:"chaining-actions",children:"Chaining Actions"}),"\n",(0,c.jsxs)(l.p,{children:["You can chain actions to create a script because the action\nmethods return the context, allowing you to build a queue of\nactions that get executed as part of an ",(0,c.jsx)(l.a,{href:"/api/class/ActionQueue",title:"View 'ActionQueue'",className:"tsdoc-link",children:"ActionQueue"}),"."]}),"\n",(0,c.jsxs)(l.div,{className:"shiki-twoslash-fragment",children:[(0,c.jsxs)(l.pre,{className:"shiki github-light",style:{backgroundColor:"#ffffff",color:"#24292f"},children:[(0,c.jsx)(l.div,{className:"language-id",children:"ts"}),(0,c.jsx)(l.div,{className:"code-container",children:(0,c.jsxs)(l.code,{children:[(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"class"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"Enemy"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"extends"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"ex"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"."}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"Actor"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"  "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"public"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"patrol"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"() {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// clear existing queue"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"clearActions"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"()"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// guard a choke point"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// move to 100, 100 and take 1.2s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// wait for 3s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// move back to 0, 100 and take 1.2s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// wait for 3s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// repeat"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"repeatForever"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"(("}
1),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"ctx"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:") "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"=>"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      ctx."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"1200"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"delay"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"3000"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"1200"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"delay"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"3000"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:")"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    })"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"  }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"}"})})]})})]}),"\n",(0,c.jsxs)(l.pre,{className:"shiki github-dark",style:{backgroundColor:"#0d1117",color:"#c9d1d9"},children:[(0,c.jsx)(l.div,{className:"language-id",children:"ts"}),(0,c.jsx)(l.div,{className:"code-container",children:(0,c.jsxs)(l.code,{children:[(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"class"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"Enemy"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"extends"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"ex"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"."}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"Actor"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"  "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"public"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"patrol"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"() {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// clear existing queue"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"clearActions"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"()"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// guard a choke point"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// move to 100, 100 and take 1.2s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// wait for 3s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// move back to 0, 100 and take 1.2s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// wait for 3s"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// repeat"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"repeatForever"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"(("}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"ctx"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:") "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"=>"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      ctx."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"1200"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"delay"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"3000"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"100"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"1200"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:")."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"delay"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"3000"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:")"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    })"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"  }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"}"})})]})})]})]}),"\n",(0,c.jsx)(l.h3,{id:"example-follow-a-path",children:"Example: Follow a Path"}),"\n",(0,c.jsxs)(l.p,{children:["You can use ",(0,c.jsx)(l.a,{href:"/api/class/ActionContext#moveTo",title:"View 'moveTo'",className:"tsdoc-link tsdoc-link--aliased",children:"Actor.actions.moveTo"})," to move to a specific point,\nallowing you to chain together actions to form a path."]}),"\n",(0,c.jsxs)(l.p,{children:["This example has a ",(0,c.jsx)(l.code,{children:"Ship"})," follow a path that it guards by\nspawning at the start point, moving to the end, then reversing\nitself and repeating that forever."]}),"\n",(0,c.jsxs)(l.div,{className:"shiki-twoslash-fragment",children:[(0,c.jsxs)(l.pre,{className:"shiki github-light",style:{backgroundColor:"#ffffff",color:"#24292f"},children:[(0,c.jsx)(l.div,{className:"language-id",children:"ts"}),(0,c.jsx)(l.div,{className:"code-container",children:(0,c.jsxs)(l.code,{children:[(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"public "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"class"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}
1),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"Ship"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"extends"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"ex"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"."}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"Actor"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"  "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"public"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"onInitialize"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"() {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"const"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"path"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ["})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"20"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"20"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"50"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"40"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"25"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"30"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"75"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"80"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:")"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    ];"})}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// spawn at start point"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"repeatForever"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"("}
1),(0,c.jsx)(l.span,{style:{color:"#953800"},children:"ctx"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"=>"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:".x "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" path["}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"].x;"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:".y "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" path["}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"].y;"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// create action queue"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// forward path (skip first spawn point)"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"for"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ("}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"let"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" i "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"1"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"; i "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"<"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" path."}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"length"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"; i"}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"++"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:") {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"        ctx."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"(path[i].x, path[i].y, "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"300"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:");"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      }"})}),(0,c.jsx)(l.div,{className:"line"}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#6E7781"},children:"// reverse path (skip last point)"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"for"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" ("}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"let"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" i "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" path."}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"length"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"-"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"2"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"; i "}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:">="}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"; i"}),(0,c.jsx)(l.span,{style:{color:"#CF222E"},children:"--"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:") {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"        ctx."}),(0,c.jsx)(l.span,{style:{color:"#8250DF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"(path[i].x, path[i].y, "}),(0,c.jsx)(l.span,{style:{color:"#0550AE"},children:"300"}),(0,c.jsx)(l.span,{style:{color:"#24292F"},children:");"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"      }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"    });"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"  }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#24292F"},children:"}"})})]})})]}),"\n",(0,c.jsxs)(l.pre,{className:"shiki github-dark",style:{backgroundColor:"#0d1117",color:"#c9d1d9"},children:[(0,c.jsx)(l.div,{className:"language-id",children:"ts"}),(0,c.jsx)(l.div,{className:"code-container",children:(0,c.jsxs)(l.code,{children:[(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"public "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"class"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"Ship"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"extends"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"ex"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"."}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"Actor"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"  "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"public"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"onInitialize"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"}
1,children:"() {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"const"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"path"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ["})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"20"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"20"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"50"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"40"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"25"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"30"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"),"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"new"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ex."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"Vector"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"75"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:", "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"80"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:")"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    ];"})}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// spawn at start point"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:".actions."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"repeatForever"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"("}),(0,c.jsx)(l.span,{style:{color:"#FFA657"},children:"ctx"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"=>"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:".x "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" path["}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"].x;"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"this"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:".y "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" path["}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"].y;"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// create action queue"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// forward path (skip first spawn point)"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"for"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ("}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"let"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" i "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"1"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"; i "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"<"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" path."}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"length"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"; i"}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"++"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:") {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"        ctx."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"(path[i].x, path[i].y, "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"300"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:");"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      }"})}),(0,c.jsx)(l.div,{className:"line"}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#8B949E"},children:"// reverse path (skip last point)"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"for"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" ("}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"let"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" i "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" path."}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"length"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"-"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"2"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"; i "}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:">="}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:" "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"0"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"; i"}),(0,c.jsx)(l.span,{style:{color:"#FF7B72"},children:"--"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:") {"})]}),(0,c.jsxs)(l.div,{className:"line",children:[(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"        ctx."}),(0,c.jsx)(l.span,{style:{color:"#D2A8FF"},children:"moveTo"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"(path[i].x, path[i].y, "}),(0,c.jsx)(l.span,{style:{color:"#79C0FF"},children:"300"}),(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:");"})]}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"      }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"    });"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"  }"})}),(0,c.jsx)(l.div,{className:"line",children:(0,c.jsx)(l.span,{style:{color:"#C9D1D9"},children:"}"})})]})})]})]}),"\n",(0,c.jsxs)(l.p,{children:["While this is a trivial example, the Action API allows complex\nroutines to be programmed for Actors. For example, using the\n",(0,c.jsx)(l.a,{href:"http://mapeditor.org",children:"Tiled Map Editor"})," you can create a map that\nuses polylines to create paths, load in the JSON using a\n",(0,c.jsx)(l.a,{href:"/api/class/Resource",title:"View 'Resource'",className:"tsdoc-link tsdoc-link--aliased",children:"Generic Resource"}),", create a ",(0,c.jsx)(l.a,{href:"/api/class/TileMap",title:"View 'TileMap'",className:"tsdoc-link",children:"TileMap"}),",\nand spawn ships programmatically while utilizing the polylines\nto automatically generate the actions needed to do pathing."]}),"\n",(0,c.jsx)(l.h3,{id:"custom-actions",children:"Custom Actions"}),"\n",(0,c.jsxs)(l.p,{children:["The API does allow you to implement new actions by implementing the ",(0,c.jsx)(l.a,{href:"/api/interface/Action",title:"View 'Action'",className:"tsdoc-link",children:"Action"}),"\ninterface, but this will be improved in future versions as right now it\nis meant for the Excalibur team and can be advanced to implement."]}),"\n",(0,c.jsxs)(l.p,{children:["You can manually manipulate an Actor's ",(0,c.jsx)(l.a,{href:"/api/class/ActionQueue",title:"View 'ActionQueue'",className:"tsdoc-link",children:"ActionQueue"})," using\n",(0,c.jsx)(l.a,{href:"",title:"Could not resolve link to 'Actor.actionQueue'",className:"tsdoc-link tsdoc-link--missing",children:"Actor.actionQueue"}),". For example, using ",(0,c.jsx)(l.a,{href:"/api/class/ActionQueue#add",t
1itle:"View 'add'",className:"tsdoc-link",children:"ActionQueue.add"})," for\ncustom actions."]}),"\n",(0,c.jsx)(l.h3,{id:"future-plans",children:"Future Plans"}),"\n",(0,c.jsx)(l.p,{children:"The Excalibur team is working on extending and rebuilding the Action API\nin future versions to support multiple timelines/scripts, better eventing,\nand a more robust API to allow for complex and customized actions."})]})}function h(s={}){const{wrapper:l}={...(0,o.R)(),...s.components};return l?(0,c.jsx)(l,{...s,children:(0,c.jsx)(d,{...s})}):d(s)}},28453(s,l,e){e.d(l,{R:()=>r,x:()=>i});var n=e(96540);const c={},o=n.createContext(c);function r(s){const l=n.useContext(o);return n.useMemo(function(){return"function"==typeof s?s(l):{...l,...s}},[l,s])}function i(s){let l;return l=s.disableParentContext?"function"==typeof s.components?s.components(c):s.components||c:r(s.components),n.createElement(o.Provider,{value:l},s.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.