@drincs/pixi-vn-storymate
Version:
Pixi'VN gives you the ability to write your own narrative using StoryMate
1 lines • 457 B
JavaScript
async function p(t){return {labels:await n(t.nodesData)}}async function n(t){let o={},r=t.map(async e=>{let i=[];i.push({dialogue:e.text,choices:e.choicesText.map(a=>({text:a.choiceText,label:s(a.id),type:"jump",props:{}})),labelToOpen:e.choicesText.length===0&&e.childrenIds.length>0?{label:s(e.childrenIds[0]),type:"jump",props:{}}:void 0}),o[s(e.id)]=i;});return await Promise.all(r),o}function s(t){return `storymate-${t}`}export{p as convertStoryMate};