1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[121],{3905:function(e,t,r){"use strict";r.d(t,{Zo:function(){return p},kt:function(){return f}});var n=r(7294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(r),f=i,h=u["".concat(s,".").concat(f)]||u[f]||d[f]||o;return r?n.createElement(h,a(a({ref:t},p),{},{components:r})):n.createElement(h,a({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:i,a[1]=l;for(var c=2;c<o;c++)a[c]=r[c];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},5661:function(e,t,r){"use strict";r.r(t),r.d(t,{frontMatter:function(){return l},contentTitle:function(){return s},metadata:function(){return c},toc:function(){return p},default:function(){return u}});var n=r(2122),i=r(9756),o=(r(7294),r(3905)),a=["components"],l={sidebar_position:1},s="InputHandler",c={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"}},p=[{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:[]}]}],d={toc:p};function u(e){var t=e.components,r=(0,i.Z)(e,a);return(0,o.kt)("wrapper",(0,n.Z)({},d,r,{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."))}u.isMDXComponent=!0}}]); |