1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
"use strict";(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[121],{3905:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return f}});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=s(n),f=i,h=u["".concat(c,".").concat(f)]||u[f]||p[f]||a;return n?r.createElement(h,o(o({ref:t},d),{},{components:n})):r.createElement(h,o({ref:t},d))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=u;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:i,o[1]=l;for(var s=2;s<a;s++)o[s]=n[s];return r.createElement.apply(null,o)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},5661:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return l},contentTitle:function(){return c},metadata:function(){return s},toc:function(){return d},default:function(){return u}});var r=n(7462),i=n(3366),a=(n(7294),n(3905)),o=["components"],l={sidebar_position:1},c="InputHandler",s={unversionedId:"stardust-protocol/server/types/input/InputHandler",id:"stardust-protocol/server/types/input/InputHandler",isDocsHomePage:!1,title:"InputHandler",description:"Derived from Spatial (scalable: false)",source:"@site/docs/stardust-protocol/server/types/input/InputHandler.md",sourceDirName:"stardust-protocol/server/types/input",slug:"/stardust-protocol/server/types/input/InputHandler",permalink:"/docs/stardust-protocol/server/types/input/InputHandler",editUrl:"https://github.com/StardustXR/website/edit/main/docs/stardust-protocol/server/types/input/InputHandler.md",version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"SphereField",permalink:"/docs/stardust-protocol/server/types/field/SphereField"},next:{title:"InputMethod",permalink:"/docs/stardust-protocol/server/types/input/InputMethod"}},d=[{value:"Derived from Spatial (<code>scalable: false</code>)",id:"derived-from-spatial-scalable-false",children:[]},{value:"Methods",id:"methods",children:[{value:"<code>setField(string field)</code>",id:"setfieldstring-field",children:[]},{value:"<code>setCallback(string callbackPath, string callbackMethod)</code>",id:"setcallbackstring-callbackpath-string-callbackmethod",children:[]},{value:"<code>setActions(Vector<String> actions)</code>",id:"setactionsvectorstring-actions",children:[]},{value:"<code>Vector<String> getActions(null)</code>",id:"vectorstring-getactionsnull",children:[]},{value:"<code>setActions(Vector<String> actions)</code>",id:"setactionsvectorstring-actions-1",children:[]},{value:"<code>runAction(String actionName)</code>",id:"runactionstring-actionname",children:[]}]}],p={toc:d};function u(e){var t=e.components,n=(0,i.Z)(e,o);return(0,a.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"inputhandler"},"InputHandler"),(0,a.kt)("h2",{id:"derived-from-spatial-scalable-false"},"Derived from ",(0,a.kt)("a",{parentName:"h2",href:"../Spatial"},"Spatial")," (",(0,a.kt)("inlineCode",{parentName:"h2"},"scalable: false"),")"),(0,a.kt)("p",null,"A handler to allow clients to recieve input. Won't send input through the callback if disabled."),(0,a.kt)("h2",{id:"methods"},"Methods"),(0,a.kt)("h3",{id:"setfieldstring-field"},(0,a.kt)("inlineCode",{parentName:"h3"},"setField(string field)")),(0,a.kt)("p",null,"Sets the field this input handler will use."),(0,a.kt)("h3",{id:"setcallbackstring-callbackpath-string-callbackmethod"},(0,a.kt)("inlineCode",{parentName:"h3"},"setCallback(string callbackPath, string callbackMethod)")),(0,a.kt)("p",null,"Sets the callback this input handler will use."),(0,a.kt)("h3",{id:"setactionsvectorstring-actions"},(0,a.kt)("inlineCode",{parentName:"h3"},"setActions(Vector<String> actions)")),(0,a.kt)("p",null,"Specify all compatible action names (human-readable)."),(0,a.kt)("h3",{id:"vectorstring-getactionsnull"},(0,a.kt)("inlineCode",{parentName:"h3"},"Vector<String> getActions(null)")),(0,a.kt)("p",null,"Get a list of all action names (human-readable)."),(0,a.kt)("h3",{id:"setactionsvectorstring-actions-1"},(0,a.kt)("inlineCode",{parentName:"h3"},"setActions(Vector<String> actions)")),(0,a.kt)("p",null,"Set all the objects on this input handler to ",(0,a.kt)("inlineCode",{parentName:"p"},"actions"),"."),(0,a.kt)("h3",{id:"runactionstring-actionname"},(0,a.kt)("inlineCode",{parentName:"h3"},"runAction(String actionName)")),(0,a.kt)("p",null,"Runs the action specififed by ",(0,a.kt)("inlineCode",{parentName:"p"},"actionName"),"."))}u.isMDXComponent=!0}}]); |