[{"data":1,"prerenderedAt":507},["ShallowReactive",2],{"doc-global_essentials\u002Fcharacters\u002Fspine_characters":3},{"id":4,"title":5,"body":6,"description":17,"extension":498,"meta":499,"navigation":247,"path":503,"seo":504,"stem":505,"__hash__":506},"docs\u002Fdocs\u002Fglobal_essentials\u002Fcharacters\u002Fspine_characters.md","Spine Characters",{"type":7,"value":8,"toc":488},"minimark",[9,14,18,21,26,34,72,79,81,85,92,147,150,152,156,161,172,182,197,201,362,364,368,455,457,461,464,484],[10,11,13],"h1",{"id":12},"spine-character-dolls","Spine Character Dolls",[15,16,17],"p",{},"Characters can use Spine skeletal animations instead of static layered images. This provides smooth idle animations, dynamic poses, and attribute-driven skin swapping – all baked into the Spine file.",[19,20],"hr",{},[22,23,25],"h2",{"id":24},"setting-up","Setting Up",[15,27,28,29,33],{},"In the engine editor, open a character template and fill in the ",[30,31,32],"strong",{},"Spine"," section:",[35,36,37,49,62],"ul",{},[38,39,40,43,44,48],"li",{},[30,41,42],{},"Atlas"," – the ",[45,46,47],"code",{},".atlas"," file",[38,50,51,43,54,57,58,61],{},[30,52,53],{},"Skeleton",[45,55,56],{},".json"," or ",[45,59,60],{},".skel"," skeleton file",[38,63,64,67,68,71],{},[30,65,66],{},"Default Animation"," – animation name to play on creation (e.g., ",[45,69,70],{},"idle",")",[15,73,74,75,78],{},"When a character has spine configured, ",[45,76,77],{},"CharacterDoll"," component automatically renders the Spine animation instead of static image layers.",[19,80],{},[22,82,84],{"id":83},"skin-mapping-convention-based","Skin Mapping (Convention-Based)",[15,86,87,88,91],{},"Character ",[30,89,90],{},"attributes"," drive which Spine skins are active. Each attribute's current value is used directly as a Spine skin name. Multiple attributes combine into a multi-skin.",[93,94,95,111],"table",{},[96,97,98],"thead",{},[99,100,101,105,108],"tr",{},[102,103,104],"th",{},"Attribute",[102,106,107],{},"Value",[102,109,110],{},"Spine skin activated",[112,113,114,131],"tbody",{},[99,115,116,122,127],{},[117,118,119],"td",{},[45,120,121],{},"outfit",[117,123,124],{},[45,125,126],{},"leather",[117,128,129],{},[45,130,126],{},[99,132,133,138,143],{},[117,134,135],{},[45,136,137],{},"hair",[117,139,140],{},[45,141,142],{},"red_ponytail",[117,144,145],{},[45,146,142],{},[15,148,149],{},"The artist names Spine skins to match the attribute values defined in the engine editor. Attribute values that don't match any Spine skin are silently ignored.",[19,151],{},[22,153,155],{"id":154},"changing-animations","Changing Animations",[157,158,160],"h3",{"id":159},"from-content-no-code","From Content (No Code)",[15,162,163,164,167,168,171],{},"Use the ",[45,165,166],{},"char"," action with the ",[45,169,170],{},"animation"," type:",[173,174,179],"pre",{"className":175,"code":177,"language":178},[176],"language-text","{char: \"mc.animation=idle\"}\n","text",[45,180,177],{"__ignoreMap":181},"",[15,183,184,185,188,189,192,193,196],{},"Animations are driven by character attributes. Name spine animations using ",[45,186,187],{},"attributeKey_value"," convention (e.g. ",[45,190,191],{},"belly_0",", ",[45,194,195],{},"face_ahegao","). When the attribute changes, the matching animation plays automatically on its own track.",[157,198,200],{"id":199},"from-scripts","From Scripts",[173,202,206],{"className":203,"code":204,"language":205,"meta":181,"style":181},"language-javascript shiki shiki-themes github-light github-dark","const mc = game.getCharacter('mc');\n\n\u002F\u002F Change belly animation (plays belly_2 on its dedicated track)\nmc.setAttribute('belly', '2');\n\n\u002F\u002F Change face expression (plays face_ahegao on its dedicated track)\nmc.setAttribute('face', 'ahegao');\n\n\u002F\u002F Check if animation exists\nif (mc.hasSpineAnimation('belly_2')) {\n  mc.setAttribute('belly', '2');\n}\n","javascript",[45,207,208,242,249,256,277,282,288,307,312,318,338,356],{"__ignoreMap":181},[209,210,213,217,221,224,228,232,235,239],"span",{"class":211,"line":212},"line",1,[209,214,216],{"class":215},"szBVR","const",[209,218,220],{"class":219},"sj4cs"," mc",[209,222,223],{"class":215}," =",[209,225,227],{"class":226},"sVt8B"," game.",[209,229,231],{"class":230},"sScJk","getCharacter",[209,233,234],{"class":226},"(",[209,236,238],{"class":237},"sZZnC","'mc'",[209,240,241],{"class":226},");\n",[209,243,245],{"class":211,"line":244},2,[209,246,248],{"emptyLinePlaceholder":247},true,"\n",[209,250,252],{"class":211,"line":251},3,[209,253,255],{"class":254},"sJ8bj","\u002F\u002F Change belly animation (plays belly_2 on its dedicated track)\n",[209,257,259,262,265,267,270,272,275],{"class":211,"line":258},4,[209,260,261],{"class":226},"mc.",[209,263,264],{"class":230},"setAttribute",[209,266,234],{"class":226},[209,268,269],{"class":237},"'belly'",[209,271,192],{"class":226},[209,273,274],{"class":237},"'2'",[209,276,241],{"class":226},[209,278,280],{"class":211,"line":279},5,[209,281,248],{"emptyLinePlaceholder":247},[209,283,285],{"class":211,"line":284},6,[209,286,287],{"class":254},"\u002F\u002F Change face expression (plays face_ahegao on its dedicated track)\n",[209,289,291,293,295,297,300,302,305],{"class":211,"line":290},7,[209,292,261],{"class":226},[209,294,264],{"class":230},[209,296,234],{"class":226},[209,298,299],{"class":237},"'face'",[209,301,192],{"class":226},[209,303,304],{"class":237},"'ahegao'",[209,306,241],{"class":226},[209,308,310],{"class":211,"line":309},8,[209,311,248],{"emptyLinePlaceholder":247},[209,313,315],{"class":211,"line":314},9,[209,316,317],{"class":254},"\u002F\u002F Check if animation exists\n",[209,319,321,324,327,330,332,335],{"class":211,"line":320},10,[209,322,323],{"class":215},"if",[209,325,326],{"class":226}," (mc.",[209,328,329],{"class":230},"hasSpineAnimation",[209,331,234],{"class":226},[209,333,334],{"class":237},"'belly_2'",[209,336,337],{"class":226},")) {\n",[209,339,341,344,346,348,350,352,354],{"class":211,"line":340},11,[209,342,343],{"class":226},"  mc.",[209,345,264],{"class":230},[209,347,234],{"class":226},[209,349,269],{"class":237},[209,351,192],{"class":226},[209,353,274],{"class":237},[209,355,241],{"class":226},[209,357,359],{"class":211,"line":358},12,[209,360,361],{"class":226},"}\n",[19,363],{},[22,365,367],{"id":366},"api-reference","API Reference",[93,369,370,380],{},[96,371,372],{},[99,373,374,377],{},[102,375,376],{},"Method \u002F Property",[102,378,379],{},"Description",[112,381,382,396,411,421,435,445],{},[99,383,384,389],{},[117,385,386],{},[45,387,388],{},"character.isSpineCharacter()",[117,390,391,392,395],{},"Returns ",[45,393,394],{},"true"," if spine atlas and skeleton are configured",[99,397,398,403],{},[117,399,400],{},[45,401,402],{},"character.isSpineForView(view)",[117,404,391,405,407,408,71],{},[45,406,394],{}," if spine exists for the given view (e.g. ",[45,409,410],{},"\"back\"",[99,412,413,418],{},[117,414,415],{},[45,416,417],{},"character.getSpineTrackAnimations(view?)",[117,419,420],{},"Get current track-to-animation map based on attributes",[99,422,423,428],{},[117,424,425],{},[45,426,427],{},"character.hasSpineAnimation(name, view?)",[117,429,430,431,434],{},"Check if animation exists in the skeleton. Returns ",[45,432,433],{},"false"," if not loaded yet",[99,436,437,442],{},[117,438,439],{},[45,440,441],{},"character.getSpineSkins()",[117,443,444],{},"Returns array of Spine skin names from current attributes",[99,446,447,452],{},[117,448,449],{},[45,450,451],{},"character.setAvailableSpineAnimations(view, names)",[117,453,454],{},"Register animation names and build groups (called by engine on load)",[19,456],{},[22,458,460],{"id":459},"editor-support","Editor Support",[15,462,463],{},"All three character editor popups support spine preview:",[35,465,466,472,478],{},[38,467,468,471],{},[30,469,470],{},"Art Manager"," (face picker) – position the face crop rectangle on the animated spine",[38,473,474,477],{},[30,475,476],{},"Item Slot Picker"," – drag item slot positions onto the spine character",[38,479,480,483],{},[30,481,482],{},"Scene Slot Editor"," – preview spine characters with scene transforms and animations",[485,486,487],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":181,"searchDepth":244,"depth":244,"links":489},[490,491,492,496,497],{"id":24,"depth":244,"text":25},{"id":83,"depth":244,"text":84},{"id":154,"depth":244,"text":155,"children":493},[494,495],{"id":159,"depth":251,"text":160},{"id":199,"depth":251,"text":200},{"id":366,"depth":244,"text":367},{"id":459,"depth":244,"text":460},"md",{"plugin":500,"category":501,"page":502},"global_essentials","characters","spine_characters","\u002Fdocs\u002Fglobal_essentials\u002Fcharacters\u002Fspine_characters",{"title":5,"description":17},"docs\u002Fglobal_essentials\u002Fcharacters\u002Fspine_characters","Alda_oOzCyPgs8eKu2ovi7ScHu6QEh8vuoMGMQ6QhxI",1779582261209]