1 line
7.0 KiB
JavaScript
1 line
7.0 KiB
JavaScript
(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[121],{3905:function(e,t,n){"use strict";n.d(t,{Zo:function(){return d},kt:function(){return h}});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 o(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(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={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[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):a(a({},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,o=e.originalType,c=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=s(n),h=i,f=u["".concat(c,".").concat(h)]||u[h]||p[h]||o;return n?r.createElement(f,a(a({ref:t},d),{},{components:n})):r.createElement(f,a({ref:t},d))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[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,a[1]=l;for(var s=2;s<o;s++)a[s]=n[s];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}u.displayName="MDXCreateElement"},5661:function(e,t,n){"use strict";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(2122),i=n(9756),o=(n(7294),n(3905)),a=["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>setOrigin(Vector3 origin)</code>",id:"setoriginvector3-origin",children:[]},{value:"<code>setOrientation(Quat orientation)</code>",id:"setorientationquat-orientation",children:[]},{value:"<code>setPose(Vector3 origin, Quat orientation)</code>",id:"setposevector3-origin-quat-orientation",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,a);return(0,o.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"inputhandler"},"InputHandler"),(0,o.kt)("h2",{id:"derived-from-spatial-scalable-false"},"Derived from ",(0,o.kt)("a",{parentName:"h2",href:"../Spatial"},"Spatial")," (",(0,o.kt)("inlineCode",{parentName:"h2"},"scalable: false"),")"),(0,o.kt)("p",null,"A handler to allow clients to recieve input."),(0,o.kt)("h2",{id:"methods"},"Methods"),(0,o.kt)("h3",{id:"setoriginvector3-origin"},(0,o.kt)("inlineCode",{parentName:"h3"},"setOrigin(Vector3 origin)")),(0,o.kt)("p",null,"Sets the origin to ",(0,o.kt)("inlineCode",{parentName:"p"},"origin"),". "),(0,o.kt)("h3",{id:"setorientationquat-orientation"},(0,o.kt)("inlineCode",{parentName:"h3"},"setOrientation(Quat orientation)")),(0,o.kt)("p",null,"Sets the orientation to ",(0,o.kt)("inlineCode",{parentName:"p"},"orientation"),". "),(0,o.kt)("h3",{id:"setposevector3-origin-quat-orientation"},(0,o.kt)("inlineCode",{parentName:"h3"},"setPose(Vector3 origin, Quat orientation)")),(0,o.kt)("p",null,"Sets the pose using ",(0,o.kt)("inlineCode",{parentName:"p"},"origin")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"orientation")," relative to the pose's space."),(0,o.kt)("h3",{id:"setfieldstring-field"},(0,o.kt)("inlineCode",{parentName:"h3"},"setField(string field)")),(0,o.kt)("p",null,"Sets the field this input handler will use."),(0,o.kt)("h3",{id:"setcallbackstring-callbackpath-string-callbackmethod"},(0,o.kt)("inlineCode",{parentName:"h3"},"setCallback(string callbackPath, string callbackMethod)")),(0,o.kt)("p",null,"Sets the callback this input handler will use."),(0,o.kt)("h3",{id:"setactionsvectorstring-actions"},(0,o.kt)("inlineCode",{parentName:"h3"},"setActions(Vector<String> actions)")),(0,o.kt)("p",null,"Specify all compatible action names (human-readable)."),(0,o.kt)("h3",{id:"vectorstring-getactionsnull"},(0,o.kt)("inlineCode",{parentName:"h3"},"Vector<String> getActions(null)")),(0,o.kt)("p",null,"Get a list of all action names (human-readable)."),(0,o.kt)("h3",{id:"setactionsvectorstring-actions-1"},(0,o.kt)("inlineCode",{parentName:"h3"},"setActions(Vector<String> actions)")),(0,o.kt)("p",null,"Set all the objects on this input handler to ",(0,o.kt)("inlineCode",{parentName:"p"},"actions"),"."),(0,o.kt)("h3",{id:"runactionstring-actionname"},(0,o.kt)("inlineCode",{parentName:"h3"},"runAction(String actionName)")),(0,o.kt)("p",null,"Runs the action specififed by ",(0,o.kt)("inlineCode",{parentName:"p"},"actionName"),"."))}u.isMDXComponent=!0}}]); |