There are two ways to create a new script, from the Assets Panel and with the Scripting tool.
Creating a Script from the Assets Panel
In the Assets Panel, click the + button.
Choose Script and select the Protocol (type of script) you’d like to create.
Creating a Script with the Scripts Tool
Select the dropdown icon next to the Script button in the Toolbar
Select the Protocol (type of script) you’d like to create.
New scripts are saved as Assets and can be found in the Assets Panel.
Use PascalCase for script names and update the script’s type name accordingly.Example: If the script is named MyConverter, the main type should also be named MyConverter.
Adding Scripts to your scene
To run Node and Layout scripts, they need to be added to the scene.
Right-click the artboard you’d like to add your script to and select your script from the menu
Position the script object, keeping in mind that the script’s position will determine where it’s rendered
Make sure your script returns a function that returns a table with at least an init and draw function.
Compiling scripts
When you edit a script, its tab in the viewport shows a dot until the change is compiled. Hover the dot to see Not Compiled. Until then, the stage keeps running the last compiled version of the script.Rive compiles all of the file’s scripts when you stop a playing state machine and when you run tests from the Testing tab.
Exporting scripts
Not every script in your file ships in the exported .riv. Select a script in the Assets Panel and check Runtime export in the Inspector to see whether it ships, and why:
Exported: Something in the file uses the script, such as a scripted object on an artboard, or a script that ships requires it.
Exported (always): The script’s Behavior is set to Force Export.
Stripped (unreferenced): Nothing in the file uses the script, and no shipped script requires it.
Stripped (test script):Test scripts only run in the editor.
Stripped (prevent export): The script’s Behavior is set to Prevent Export.
Use Behavior to override the result. Force Export ships the script even when nothing uses it, including a test script. Prevent Export always strips it, even when a shipped script requires it.
Fixing missing required scripts
If a stripped script is required by scripts that ship, the Inspector lists them under Required by. Those scripts fail at runtime because the script they require isn’t in the .riv. To fix this, change the stripped script’s Behavior: from Prevent Export to Automatic, or to Force Export for a test script. You can also remove the require from the scripts that use it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rive","colors":{"primary":"#ffa41c","light":"#ffa41c","dark":"#ffa41c"},"logo":{"light":"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_black.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=e09b8659935986a837947ae7c3b104e0","dark":"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_white.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=d2ccc2c4dec459d584f578475de89248","href":"https://rive.app?utm_source=docs\u0026utm_medium=header_nav"},"favicon":"https://mintcdn.com/rive/IGEy4oJSivuQmjey/favicon_black.png?fit=max\u0026auto=format\u0026n=IGEy4oJSivuQmjey\u0026q=85\u0026s=986c81e5b82e1138420d773296030a3a","appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"/tutorials/learn-rive","label":"Learn"},{"href":"/community/support","label":"Support"}],"primary":{"type":"button","label":"Get Rive","href":"https://rive.app/downloads?utm_source=docs\u0026utm_medium=header_nav"}},"footer":{"socials":{"youtube":"https://www.youtube.com/channel/UCPal2R1FxwRTPylhP_7ofEg","x":"https://twitter.com/rive_app","instagram":"https://www.instagram.com/rive.app","github":"https://github.com/rive-app","discord":"https://discord.gg/rive-app"},"links":[{"header":"Resources","items":[{"label":"Community","href":"https://community.rive.app?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Blog","href":"https://rive.app/blog?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Case Studies","href":"https://rive.app/blog/case-studies?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Marketplace","href":"https://rive.app/marketplace?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Feature Requests","href":"https://community.rive.app/c/feature-requests"}]},{"header":"Company","items":[{"label":"Careers","href":"https://rive.app/careers?utm_source=docs\u0026utm_medium=footer_nav"},{"label":"Terms of Service","href":"/docs/legal/terms-of-service"},{"label":"Acceptable Use Policy","href":"/docs/legal/acceptable-use-policy"},{"label":"Privacy Policy","href":"/docs/legal/privacy-policy"},{"label":"Data Protection Addendum","href":"/docs/legal/data-protection-addendum"},{"label":"Your Privacy Choices","href":"https://rive.app/?cookie-settings"}]}]},"fonts":{"heading":{"family":"Tomorrow Placeholder","weight":500,"source":"https://framerusercontent.com/assets/nCpxWS6DaPlPe0lHzStXAPCo3lw.woff2","format":"woff2"}},"integrations":{"amplitude":{"apiKey":"38803036884a752b104ee4bf501e0945"},"cookies":{"key":"rive_analytics","value":"granted"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"variables":{"runtimeCurrentNameApple":"New Runtime","runtimeLegacyNameApple":"Legacy Runtime","monthlyCreditsVoyager":"$20","monthlyCreditsEnterprise":"$40","pricingCadetMonthly":"$17","pricingCadetYearly":"$108","pricingVoyagerMonthly":"$49","pricingVoyagerYearly":"$384","pricingEnterpriseYearly":"$1,440","cliAllowanceFree":"50","cliAllowanceCadet":"500","cliAllowanceVoyager":"5,000","versionWeb":"2.40.1","versionReact":"4.33.0","versionApple":"6.24.0","versionAndroid":"11.9.2","versionReactNative":"0.5.5","versionFlutter":"0.14.11","versionDevFlutter":"0.15.0-dev.4","versionUnity":"0.4.5","versionUnreal":"0.4.25","supportForm":"https://forms.rive.app/support?utm_medium=support_page","supportFormEducational":"https://forms.rive.app/education?utm_medium=support_page"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rive","hasAudioNarration":false,"actualSubdomain":"rive","customDomains":["rive.app"],"gitSource":{"type":"github","owner":"rive-app","repo":"rive-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b074bfd7d7712efd4a844b3","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Runtimes","count":291},{"language":"default","tag":"Scripting","count":194},{"language":"default","tag":"Scripting API","count":171},{"language":"default","tag":"Editor","count":108},{"language":"default","tag":"Fundamentals","count":94},{"language":"default","tag":"GPU","count":45},{"language":"default","tag":"Design","count":39},{"language":"default","tag":"Artboards","count":27},{"language":"default","tag":"Interfaces","count":26},{"language":"default","tag":"React Native","count":20}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"p{font-size:14px}ul li{font-size:14px}ol li{font-size:14px}.signature .code-block{border:none}.signature .code-block [data-floating-buttons=\"true\"]{display:none}.signature .code-block [data-component-part=\"code-block-root\"]{background:none;padding:0}.dark .card{background-color:var(--background-dark)!important;border-color:rgb(255 255 255 / 0.1)!important}.dark .card:hover{border-color:var(--primary-light)!important}.prose tbody th[scope=\"row\"]{padding:0.5714286em 0.5714286em 0.5714286em 0;vertical-align:baseline;font-weight:600;color:var(--tw-prose-headings)}#footer a{max-width:none}"}]}
{"page":{"pagePath":"scripting/creating-scripts","slug":"/scripting/creating-scripts","pageMetadata":{"title":"Creating Scripts","description":null,"href":"/scripting/creating-scripts"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,OptimizedImage,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`There are two ways to create a new script, from the Assets Panel and with the Scripting tool.`}),`\n`,_jsx(Heading,{level:`3`,id:`creating-a-script-from-the-assets-panel`,children:`Creating a Script from the Assets Panel`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Assets Panel, click the `,_jsx(_components.code,{children:`+`}),` button.`]}),`\n`,_jsxs(_components.li,{children:[`Choose `,_jsx(_components.strong,{children:`Script`}),` and select the `,_jsx(_components.a,{href:`/scripting/protocols/overview`,children:`Protocol`}),` (type of script) you’d like to create.`]}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=cd2bcbad98ab57600bc5010dda8df139`,alt:`Create Script from Assets Panel`,\"data-og-width\":`629`,width:`629`,\"data-og-height\":`377`,height:`377`,\"data-path\":`images/scripting/assets-panel-create-script.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=280\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=ef0366a079f98d03681c7b7ae21d5b9d 280w, https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=560\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=cd3795ffffc03bd94ae0fd7b0a59ec06 560w, https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=840\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=9763267085e6e2675776ddf1fbd0a177 840w, https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=1100\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=2ecc6fe6048fe95bc76b1e478e17abe3 1100w, https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=1650\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=d8d817aa94a24654f541f439b2597fea 1650w, https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/assets-panel-create-script.png?w=2500\u0026fit=max\u0026auto=format\u0026n=IWvsXMpf9ofEUOAP\u0026q=85\u0026s=ee96c984f8efabcf3397c889f20a8eb1 2500w`}),`\n`,_jsx(Heading,{level:`3`,id:`creating-a-script-with-the-scripts-tool`,children:`Creating a Script with the Scripts Tool`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Select the dropdown icon next to the Script button in the Toolbar`}),`\n`,_jsxs(_components.li,{children:[`Select the `,_jsx(_components.a,{href:`/scripting/protocols/overview`,children:`Protocol`}),` (type of script) you’d like to create.`]}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=64d1afce289816d22946c8a12f881bcd`,alt:`Create Script from Assets Panel`,\"data-og-width\":`604`,width:`604`,\"data-og-height\":`253`,height:`253`,\"data-path\":`images/scripting/script-tool-create-script.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=280\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=35e2db591f99e5cb2e1ef360ca3fe3f0 280w, https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=560\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=52342d61ebca3e974e59c2fa40f9144a 560w, https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=840\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=9218b97f92cb0a7ebec9b6b36d80915a 840w, https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=1100\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=4158f996332407d61ea15d2053847169 1100w, https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=1650\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=7735d4226cfbad4bb2e850c72557b104 1650w, https://mintcdn.com/rive/PNFYxEcCteEOymSI/images/scripting/script-tool-create-script.png?w=2500\u0026fit=max\u0026auto=format\u0026n=PNFYxEcCteEOymSI\u0026q=85\u0026s=fe24cf6146a42bd629037192d118ddd1 2500w`}),`\n`,_jsx(_components.p,{children:`New scripts are saved as Assets and can be found in the Assets Panel.`}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`Use `,_jsx(_components.strong,{children:`PascalCase`}),` for script names and update the script’s type name accordingly.`]}),_jsxs(_components.p,{children:[`Example: If the script is named `,_jsx(_components.code,{children:`MyConverter`}),`, the main type should also be named `,_jsx(_components.code,{children:`MyConverter`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-scripts-to-your-scene`,children:`Adding Scripts to your scene`}),`\n`,_jsxs(_components.p,{children:[`To run `,_jsx(_components.a,{href:`/scripting/protocols/node-scripts`,children:`Node`}),` and `,_jsx(_components.a,{href:`/scripting/protocols/layout-scripts`,children:`Layout`}),` scripts, they need to be added to the scene.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Right-click the artboard you’d like to add your script to and select your script from the menu`}),`\n`,_jsx(_components.li,{children:`Position the script object, keeping in mind that the script’s position will determine where it’s rendered`}),`\n`,_jsxs(_components.li,{children:[`Select the group to set inputs (See `,_jsx(_components.a,{href:`/scripting/script-inputs`,children:`Script Inputs`}),`)`]}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/rive/IWvsXMpf9ofEUOAP/images/scripting/add-script-to-artboard.gif?s=aff79a3097a5df14fa1ae942c1d12801`,alt:`Create Script from Assets Panel`,\"data-og-width\":`480`,width:`480`,\"data-og-height\":`322`,height:`322`,\"data-path\":`images/scripting/add-script-to-artboard.gif`,\"data-optimize\":`true`,\"data-opv\":`3`}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Troubleshooting: If you don’t see your script in the list:`})}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Make sure your script is in the Assets Panel.`}),`\n`,_jsxs(_components.li,{children:[`Check the `,_jsx(_components.a,{href:`/scripting/debugging/debug-panel#problems`,children:`Problems Panel`}),` for issues.`]}),`\n`,_jsxs(_components.li,{children:[`Make sure your script returns a function that returns a table with at least an `,_jsx(_components.code,{children:`init`}),` and `,_jsx(_components.code,{children:`draw`}),` function.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`compiling-scripts`,children:`Compiling scripts`}),`\n`,_jsxs(_components.p,{children:[`When you edit a script, its tab in the viewport shows a dot until the change is compiled. Hover the dot to see `,_jsx(_components.strong,{children:`Not Compiled`}),`. Until then, the stage keeps running the last compiled version of the script.`]}),`\n`,_jsxs(_components.p,{children:[`Rive compiles all of the file’s scripts when you stop a playing state machine and when you run tests from the `,_jsx(_components.a,{href:`/scripting/debugging/unit-testing#running-tests`,children:`Testing`}),` tab.`]}),`\n`,_jsx(Heading,{level:`2`,id:`exporting-scripts`,children:`Exporting scripts`}),`\n`,_jsxs(_components.p,{children:[`Not every script in your file ships in the exported `,_jsx(_components.code,{children:`.riv`}),`. Select a script in the Assets Panel and check `,_jsx(_components.strong,{children:`Runtime export`}),` in the Inspector to see whether it ships, and why:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exported:`}),` Something in the file uses the script, such as a scripted object on an artboard, or a script that ships requires it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exported (always):`}),` The script’s `,_jsx(_components.strong,{children:`Behavior`}),` is set to `,_jsx(_components.strong,{children:`Force Export`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stripped (unreferenced):`}),` Nothing in the file uses the script, and no shipped script requires it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stripped (test script):`}),` `,_jsx(_components.a,{href:`/scripting/protocols/test-scripts`,children:`Test scripts`}),` only run in the editor.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stripped (prevent export):`}),` The script’s `,_jsx(_components.strong,{children:`Behavior`}),` is set to `,_jsx(_components.strong,{children:`Prevent Export`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.strong,{children:`Behavior`}),` to override the result. `,_jsx(_components.strong,{children:`Force Export`}),` ships the script even when nothing uses it, including a test script. `,_jsx(_components.strong,{children:`Prevent Export`}),` always strips it, even when a shipped script requires it.`]}),`\n`,_jsx(Heading,{level:`3`,id:`fixing-missing-required-scripts`,children:`Fixing missing required scripts`}),`\n`,_jsxs(_components.p,{children:[`If a stripped script is required by scripts that ship, the Inspector lists them under `,_jsx(_components.strong,{children:`Required by`}),`. Those scripts fail at runtime because the script they require isn’t in the `,_jsx(_components.code,{children:`.riv`}),`. To fix this, change the stripped script’s `,_jsx(_components.strong,{children:`Behavior`}),`: from `,_jsx(_components.strong,{children:`Prevent Export`}),` to `,_jsx(_components.strong,{children:`Automatic`}),`, or to `,_jsx(_components.strong,{children:`Force Export`}),` for a test script. You can also remove the `,_jsx(_components.code,{children:`require`}),` from the scripts that use it.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Creating Scripts","description":null,"href":"/scripting/creating-scripts"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Creating a Script from the Assets Panel","slug":"creating-a-script-from-the-assets-panel","depth":3,"children":[]},{"title":"Creating a Script with the Scripts Tool","slug":"creating-a-script-with-the-scripts-tool","depth":3,"children":[]},{"title":"Adding Scripts to your scene","slug":"adding-scripts-to-your-scene","depth":2,"children":[]},{"title":"Compiling scripts","slug":"compiling-scripts","depth":2,"children":[]},{"title":"Exporting scripts","slug":"exporting-scripts","depth":2,"children":[{"title":"Fixing missing required scripts","slug":"fixing-missing-required-scripts","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/rive/6157a238f0df2356/rive-init.js","/docs/_mintlify/custom/rive/c97753ebb7d5aae6/rive-consent.js"],"subdomain":"rive","siteName":"Rive","title":"Creating Scripts - Rive","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T20:37:59.811Z","originalFileLocation":"scripting/creating-scripts.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Rive\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Creating Scripts - Rive\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rive\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://rive.app/docs/scripting/creating-scripts\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rive.mintlify.site/docs/_mintlify/api/og/v2?division=+\u0026amp;title=Creating+Scripts\u0026amp;theme=2e225578d6f0bf137ea455bc\u0026amp;signature=759a6de7c48bc2a21d833614a087ba446d66af11097768657251f15bceea1319\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Creating Scripts - Rive\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rive.mintlify.site/docs/_mintlify/api/og/v2?division=+\u0026amp;title=Creating+Scripts\u0026amp;theme=2e225578d6f0bf137ea455bc\u0026amp;signature=759a6de7c48bc2a21d833614a087ba446d66af11097768657251f15bceea1319\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/rive/QOppeg00QlFTw5Bu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rive\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ffa41c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://rive.app/docs/scripting/creating-scripts\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/scripting/creating-scripts.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://rive.app/#organization\",\"name\":\"Rive\",\"url\":\"https://rive.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rive/tBktbqSaEr9ZwywZ/logo/rive_top_logo_black.svg?fit=max\u0026auto=format\u0026n=tBktbqSaEr9ZwywZ\u0026q=85\u0026s=e09b8659935986a837947ae7c3b104e0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://rive.app/docs#website\",\"name\":\"Rive\",\"url\":\"https://rive.app/docs\",\"publisher\":{\"@id\":\"https://rive.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://rive.app/docs/scripting/creating-scripts#webpage\",\"url\":\"https://rive.app/docs/scripting/creating-scripts\",\"name\":\"Creating Scripts\",\"dateModified\":\"2026-11-24T20:37:59.811Z\",\"isPartOf\":{\"@id\":\"https://rive.app/docs#website\"},\"breadcrumb\":{\"@id\":\"https://rive.app/docs/scripting/creating-scripts#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://rive.app/docs/scripting/creating-scripts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\" \",\"item\":\"https://rive.app/docs/scripting/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating Scripts\",\"item\":\"https://rive.app/docs/scripting/creating-scripts\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://rive.app/docs/scripting/creating-scripts#article\",\"headline\":\"Creating Scripts\",\"name\":\"Creating Scripts\",\"url\":\"https://rive.app/docs/scripting/creating-scripts\",\"mainEntityOfPage\":{\"@id\":\"https://rive.app/docs/scripting/creating-scripts#webpage\"},\"dateModified\":\"2026-11-24T20:37:59.811Z\",\"publisher\":{\"@id\":\"https://rive.app/#organization\"},\"isPartOf\":{\"@id\":\"https://rive.app/docs#website\"}}]}\u003c/script>","agentPointerHref":"/docs/scripting/creating-scripts.md","siteName":"Rive","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/getting-started/introduction"}]},{"tab":"Editor","pages":[{"title":"Editor","href":"/editor/get-rive"}]},{"tab":"Scripting","groups":[{"group":" ","pages":[{"title":"Getting Started","href":"/scripting/getting-started"},{"title":"Scripting Demos","sidebarTitle":"Demos","description":null,"mode":"wide","href":"/scripting/demos"},{"title":"Creating Scripts","href":"/scripting/creating-scripts"},{"group":"Protocols (Script Types)","pages":[{"title":"Protocols","sidebarTitle":"Overview","description":null,"href":"/scripting/protocols/overview"},{"title":"Node Scripts","href":"/scripting/protocols/node-scripts"},{"title":"Layout Scripts","href":"/scripting/protocols/layout-scripts"},{"title":"Converter Scripts","href":"/scripting/protocols/converter-scripts"},{"title":"Path Effect Scripts","href":"/scripting/protocols/path-effect-scripts"},{"title":"Transition Condition Scripts","href":"/scripting/protocols/transition-condition-scripts"},{"title":"Transition Scripts","href":"/scripting/protocols/transition-scripts"},{"title":"Listener Action Scripts","href":"/scripting/protocols/listener-action-scripts"},{"title":"WGSL Shaders","href":"/scripting/wgsl-shaders"},{"title":"Blank Scripts","href":"/scripting/protocols/util-scripts"},{"title":"Test Scripts","href":"/scripting/protocols/test-scripts"}]},{"title":"Script Inputs","sidebarTitle":"Script Inputs","href":"/scripting/script-inputs"},{"title":"Custom Properties","href":"/scripting/custom-properties"},{"title":"Data Binding","href":"/scripting/data-binding"},{"title":"Pointer Events","href":"/scripting/pointer-events"},{"group":"Debugging","pages":[{"title":"Debug Panel","href":"/scripting/debugging/debug-panel"},{"title":"Unit Testing","href":"/scripting/debugging/unit-testing"}]},{"title":"Configuration","href":"/scripting/configuration"},{"title":"Keyboard Shortcuts","href":"/scripting/keyboard-shortcuts"},{"title":"Scripting Security","sidebarTitle":"Security","href":"/scripting/security"}]},{"group":"Scripting API","pages":[{"group":"@luau","pages":[{"title":"DateTypeArg","href":"/scripting/api-reference/luau/date-type-arg"},{"title":"DateTypeResult","href":"/scripting/api-reference/luau/date-type-result"},{"title":"vector","href":"/scripting/api-reference/luau/vector"}]},{"group":"Artboards","pages":[{"title":"Animation","href":"/scripting/api-reference/artboards/animation"},{"title":"Artboard","href":"/scripting/api-reference/artboards/artboard"},{"title":"ArtboardView","href":"/scripting/api-reference/artboards/artboard-view"},{"title":"Drawable","href":"/scripting/api-reference/artboards/drawable"},{"title":"DrawableProperty","href":"/scripting/api-reference/artboards/drawable-property"},{"title":"DrawablePropertyKind","href":"/scripting/api-reference/artboards/drawable-property-kind"},{"title":"FocusEvent","href":"/scripting/api-reference/artboards/focus-event"},{"title":"GamepadConnected","href":"/scripting/api-reference/artboards/gamepad-connected"},{"title":"GamepadDisconnected","href":"/scripting/api-reference/artboards/gamepad-disconnected"},{"title":"GamepadEvent","href":"/scripting/api-reference/artboards/gamepad-event"},{"title":"GamepadMappingKind","href":"/scripting/api-reference/artboards/gamepad-mapping-kind"},{"title":"KeyPhase","href":"/scripting/api-reference/artboards/key-phase"},{"title":"KeyboardEvent","href":"/scripting/api-reference/artboards/keyboard-event"},{"title":"ListenerContext","href":"/scripting/api-reference/artboards/listener-context"},{"title":"NodeData","href":"/scripting/api-reference/artboards/node-data"},{"title":"NodeReadData","href":"/scripting/api-reference/artboards/node-read-data"},{"title":"NodeRef","href":"/scripting/api-reference/artboards/node-ref"},{"title":"NoneEvent","href":"/scripting/api-reference/artboards/none-event"},{"title":"PointerEvent","href":"/scripting/api-reference/artboards/pointer-event"},{"title":"PointerType","href":"/scripting/api-reference/artboards/pointer-type"},{"title":"PropertyKey","href":"/scripting/api-reference/artboards/property-key"},{"title":"ReportedEvent","href":"/scripting/api-reference/artboards/reported-event"},{"title":"ScrollEvent","href":"/scripting/api-reference/artboards/scroll-event"},{"title":"ScrollPhase","href":"/scripting/api-reference/artboards/scroll-phase"},{"title":"TextInput","href":"/scripting/api-reference/artboards/text-input"},{"title":"ViewModel","href":"/scripting/api-reference/artboards/view-model"},{"title":"ViewModelChange","href":"/scripting/api-reference/artboards/view-model-change"}]},{"group":"Color","pages":[{"title":"Color","href":"/scripting/api-reference/color/color"}]},{"group":"DataValue","pages":[{"title":"DataValue","href":"/scripting/api-reference/data-value/data-value"},{"title":"DataValueBoolean","href":"/scripting/api-reference/data-value/data-value-boolean"},{"title":"DataValueColor","href":"/scripting/api-reference/data-value/data-value-color"},{"title":"DataValueNumber","href":"/scripting/api-reference/data-value/data-value-number"},{"title":"DataValueString","href":"/scripting/api-reference/data-value/data-value-string"},{"title":"Listener","href":"/scripting/api-reference/data-value/listener"},{"title":"Property","href":"/scripting/api-reference/data-value/property"},{"title":"PropertyTrigger","href":"/scripting/api-reference/data-value/property-trigger"}]},{"group":"FileFormat","pages":[{"title":"FileFormat","href":"/scripting/api-reference/file-format/file-format"},{"title":"EditorContext","href":"/scripting/api-reference/file-format/editor-context"},{"title":"EditorScroll","href":"/scripting/api-reference/file-format/editor-scroll"},{"title":"EditorTheme","href":"/scripting/api-reference/file-format/editor-theme"},{"title":"EditorThemeStyle","href":"/scripting/api-reference/file-format/editor-theme-style"},{"title":"FormatCompletion","href":"/scripting/api-reference/file-format/format-completion"},{"title":"FormatDiagnostic","href":"/scripting/api-reference/file-format/format-diagnostic"},{"title":"FormatDocument","href":"/scripting/api-reference/file-format/format-document"},{"title":"FormatHover","href":"/scripting/api-reference/file-format/format-hover"},{"title":"FormatScope","href":"/scripting/api-reference/file-format/format-scope"},{"title":"FormatSurface","href":"/scripting/api-reference/file-format/format-surface"},{"title":"FormatToken","href":"/scripting/api-reference/file-format/format-token"},{"title":"FormatView","href":"/scripting/api-reference/file-format/format-view"},{"title":"TextFileFormat","href":"/scripting/api-reference/file-format/text-file-format"}]},{"group":"GPU","pages":[{"title":"BindGroupDesc","href":"/scripting/api-reference/gpu/bind-group-desc"},{"title":"BindGroupLayoutDesc","href":"/scripting/api-reference/gpu/bind-group-layout-desc"},{"title":"BlendFactor","href":"/scripting/api-reference/gpu/blend-factor"},{"title":"BlendOp","href":"/scripting/api-reference/gpu/blend-op"},{"title":"BlendState","href":"/scripting/api-reference/gpu/blend-state"},{"title":"BufferUsage","href":"/scripting/api-reference/gpu/buffer-usage"},{"title":"BufferUsageArg","href":"/scripting/api-reference/gpu/buffer-usage-arg"},{"title":"Canvas","href":"/scripting/api-reference/gpu/canvas"},{"title":"ColorAttachment","href":"/scripting/api-reference/gpu/color-attachment"},{"title":"ColorTarget","href":"/scripting/api-reference/gpu/color-target"},{"title":"CompareFunction","href":"/scripting/api-reference/gpu/compare-function"},{"title":"CullMode","href":"/scripting/api-reference/gpu/cull-mode"},{"title":"DepthStencilAttachment","href":"/scripting/api-reference/gpu/depth-stencil-attachment"},{"title":"DepthStencilState","href":"/scripting/api-reference/gpu/depth-stencil-state"},{"title":"FaceWinding","href":"/scripting/api-reference/gpu/face-winding"},{"title":"Filter","href":"/scripting/api-reference/gpu/filter"},{"title":"GPUBindGroup","href":"/scripting/api-reference/gpu/gpu-bind-group"},{"title":"GPUBindGroupLayout","href":"/scripting/api-reference/gpu/gpu-bind-group-layout"},{"title":"GPUBuffer","href":"/scripting/api-reference/gpu/gpu-buffer"},{"title":"GPUBufferDesc","href":"/scripting/api-reference/gpu/gpu-buffer-desc"},{"title":"GPUCanvas","href":"/scripting/api-reference/gpu/gpu-canvas"},{"title":"GPUColor","href":"/scripting/api-reference/gpu/gpu-color"},{"title":"GPUFeatures","href":"/scripting/api-reference/gpu/gpu-features"},{"title":"GPUPipeline","href":"/scripting/api-reference/gpu/gpu-pipeline"},{"title":"GPURenderPass","href":"/scripting/api-reference/gpu/gpu-render-pass"},{"title":"GPUSampler","href":"/scripting/api-reference/gpu/gpu-sampler"},{"title":"GPUTarget","href":"/scripting/api-reference/gpu/gpu-target"},{"title":"GPUTexture","href":"/scripting/api-reference/gpu/gpu-texture"},{"title":"LoadOp","href":"/scripting/api-reference/gpu/load-op"},{"title":"PipelineStage","href":"/scripting/api-reference/gpu/pipeline-stage"},{"title":"PrimitiveTopology","href":"/scripting/api-reference/gpu/primitive-topology"},{"title":"RenderPassDesc","href":"/scripting/api-reference/gpu/render-pass-desc"},{"title":"SamplerEntry","href":"/scripting/api-reference/gpu/sampler-entry"},{"title":"Shader","href":"/scripting/api-reference/gpu/shader"},{"title":"StencilFaceState","href":"/scripting/api-reference/gpu/stencil-face-state"},{"title":"StencilOp","href":"/scripting/api-reference/gpu/stencil-op"},{"title":"StoreOp","href":"/scripting/api-reference/gpu/store-op"},{"title":"TextureAspect","href":"/scripting/api-reference/gpu/texture-aspect"},{"title":"TextureEntry","href":"/scripting/api-reference/gpu/texture-entry"},{"title":"TextureType","href":"/scripting/api-reference/gpu/texture-type"},{"title":"UBOEntry","href":"/scripting/api-reference/gpu/ubo-entry"},{"title":"VertexAttribute","href":"/scripting/api-reference/gpu/vertex-attribute"},{"title":"VertexBufferLayout","href":"/scripting/api-reference/gpu/vertex-buffer-layout"},{"title":"VertexFormat","href":"/scripting/api-reference/gpu/vertex-format"},{"title":"WrapMode","href":"/scripting/api-reference/gpu/wrap-mode"}]},{"group":"GPU Types","pages":[{"title":"ColorFormat","href":"/scripting/api-reference/gpu_types/color-format"},{"title":"CompressedFormat","href":"/scripting/api-reference/gpu_types/compressed-format"},{"title":"DepthFormat","href":"/scripting/api-reference/gpu_types/depth-format"},{"title":"GPUTextureView","href":"/scripting/api-reference/gpu_types/gpu-texture-view"},{"title":"TextureFormat","href":"/scripting/api-reference/gpu_types/texture-format"}]},{"group":"Gradient","pages":[{"title":"Gradient","href":"/scripting/api-reference/gradient/gradient"},{"title":"GradientStop","href":"/scripting/api-reference/gradient/gradient-stop"}]},{"group":"Image","pages":[{"title":"Image","href":"/scripting/api-reference/image/image"},{"title":"ImageFilter","href":"/scripting/api-reference/image/image-filter"},{"title":"ImageSampler","href":"/scripting/api-reference/image/image-sampler"},{"title":"ImageWrap","href":"/scripting/api-reference/image/image-wrap"}]},{"group":"Interfaces","pages":[{"title":"AudioSound","href":"/scripting/api-reference/interfaces/audio-sound"},{"title":"AudioSource","href":"/scripting/api-reference/interfaces/audio-source"},{"title":"BindableArtboard","href":"/scripting/api-reference/interfaces/bindable-artboard"},{"title":"Blob","href":"/scripting/api-reference/interfaces/blob"},{"title":"Context","href":"/scripting/api-reference/interfaces/context"},{"title":"Converter","href":"/scripting/api-reference/interfaces/converter"},{"title":"Data","href":"/scripting/api-reference/interfaces/data"},{"title":"DataContext","href":"/scripting/api-reference/interfaces/data-context"},{"title":"DecodedImage","href":"/scripting/api-reference/interfaces/decoded-image"},{"title":"EnumValues","href":"/scripting/api-reference/interfaces/enum-values"},{"title":"Input","href":"/scripting/api-reference/interfaces/input"},{"title":"Interpolator","href":"/scripting/api-reference/interfaces/interpolator"},{"title":"Layout","href":"/scripting/api-reference/interfaces/layout"},{"title":"ListenerAction","href":"/scripting/api-reference/interfaces/listener-action"},{"title":"Node","href":"/scripting/api-reference/interfaces/node"},{"title":"Output","href":"/scripting/api-reference/interfaces/output"},{"title":"PathEffect","href":"/scripting/api-reference/interfaces/path-effect"},{"title":"PropertyEnum","href":"/scripting/api-reference/interfaces/property-enum"},{"title":"PropertyList","href":"/scripting/api-reference/interfaces/property-list"},{"title":"PropertyViewModel","href":"/scripting/api-reference/interfaces/property-view-model"},{"title":"RiveFile","href":"/scripting/api-reference/interfaces/rive-file"},{"title":"Transition","href":"/scripting/api-reference/interfaces/transition"},{"title":"TransitionChild","href":"/scripting/api-reference/interfaces/transition-child"},{"title":"TransitionCondition","href":"/scripting/api-reference/interfaces/transition-condition"},{"title":"Trigger","href":"/scripting/api-reference/interfaces/trigger"},{"title":"ViewModel","href":"/scripting/api-reference/interfaces/view-model"}]},{"group":"Mat2d","pages":[{"title":"Mat2D","href":"/scripting/api-reference/mat2d/mat2d"}]},{"group":"Mat4","pages":[{"title":"Mat4","href":"/scripting/api-reference/mat4/mat4"}]},{"group":"Mesh","pages":[{"title":"MeshInstances","href":"/scripting/api-reference/mesh/mesh-instances"},{"title":"TriangleBuffer","href":"/scripting/api-reference/mesh/triangle-buffer"},{"title":"VertexBuffer","href":"/scripting/api-reference/mesh/vertex-buffer"}]},{"group":"Paint","pages":[{"title":"Paint","href":"/scripting/api-reference/paint/paint"},{"title":"BlendMode","href":"/scripting/api-reference/paint/blend-mode"},{"title":"PaintDefinition","href":"/scripting/api-reference/paint/paint-definition"},{"title":"PaintStyle","href":"/scripting/api-reference/paint/paint-style"},{"title":"StrokeCap","href":"/scripting/api-reference/paint/stroke-cap"},{"title":"StrokeJoin","href":"/scripting/api-reference/paint/stroke-join"}]},{"group":"Path","pages":[{"title":"Path","href":"/scripting/api-reference/path/path"},{"title":"CommandType","href":"/scripting/api-reference/path/command-type"},{"title":"ContourMeasure","href":"/scripting/api-reference/path/contour-measure"},{"title":"PathCommand","href":"/scripting/api-reference/path/path-command"},{"title":"PathData","href":"/scripting/api-reference/path/path-data"},{"title":"PathMeasure","href":"/scripting/api-reference/path/path-measure"}]},{"group":"Promise","pages":[{"title":"Promise","href":"/scripting/api-reference/promise/promise"}]},{"group":"Renderer","pages":[{"title":"Renderer","href":"/scripting/api-reference/renderer/renderer"}]},{"group":"Testing","pages":[{"title":"Expectation","href":"/scripting/api-reference/testing/expectation"},{"title":"Tester","href":"/scripting/api-reference/testing/tester"},{"title":"Tests","href":"/scripting/api-reference/testing/tests"}]},{"group":"Text","pages":[{"title":"Text","href":"/scripting/api-reference/text/text"},{"title":"Font","href":"/scripting/api-reference/text/font"},{"title":"FontAxis","href":"/scripting/api-reference/text/font-axis"},{"title":"Glyph","href":"/scripting/api-reference/text/glyph"},{"title":"TextAlign","href":"/scripting/api-reference/text/text-align"},{"title":"TextDirection","href":"/scripting/api-reference/text/text-direction"},{"title":"TextLine","href":"/scripting/api-reference/text/text-line"},{"title":"TextOrigin","href":"/scripting/api-reference/text/text-origin"},{"title":"TextOverflow","href":"/scripting/api-reference/text/text-overflow"},{"title":"TextRunStyle","href":"/scripting/api-reference/text/text-run-style"},{"title":"TextSizing","href":"/scripting/api-reference/text/text-sizing"},{"title":"TextWordBreak","href":"/scripting/api-reference/text/text-word-break"},{"title":"TextWrap","href":"/scripting/api-reference/text/text-wrap"}]},{"group":"Vector","pages":[{"title":"Vector","href":"/scripting/api-reference/vector/vector"}]}]}]},{"tab":"Runtimes","pages":[{"title":"Runtimes","href":"/runtimes/getting-started"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":" ","pages":[{"title":" ","href":"/tutorials/learn-rive"}]},{"tab":" ","pages":[{"title":" ","href":"/community/support"}]}]},"basePath":"","title":"Creating Scripts - Rive","deploymentId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","buildId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-DtmbjtKl.js","lightbox-handle-r17bVUz3.js"]}