Files
website/assets/js/86790a84.27827b1b.js
2022-02-14 21:45:01 -05:00

1 line
5.8 KiB
JavaScript

"use strict";(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[74],{3905:function(t,e,a){a.d(e,{Zo:function(){return p},kt:function(){return b}});var r=a(7294);function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function i(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?o(Object(a),!0).forEach((function(e){n(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function s(t,e){if(null==t)return{};var a,r,n=function(t,e){if(null==t)return{};var a,r,n={},o=Object.keys(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)>=0||(n[a]=t[a]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)a=o[r],e.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}var l=r.createContext({}),c=function(t){var e=r.useContext(l),a=e;return t&&(a="function"==typeof t?t(e):i(i({},e),t)),a},p=function(t){var e=c(t.components);return r.createElement(l.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return r.createElement(r.Fragment,{},e)}},d=r.forwardRef((function(t,e){var a=t.components,n=t.mdxType,o=t.originalType,l=t.parentName,p=s(t,["components","mdxType","originalType","parentName"]),d=c(a),b=n,m=d["".concat(l,".").concat(b)]||d[b]||u[b]||o;return a?r.createElement(m,i(i({ref:e},p),{},{components:a})):r.createElement(m,i({ref:e},p))}));function b(t,e){var a=arguments,n=e&&e.mdxType;if("string"==typeof t||n){var o=a.length,i=new Array(o);i[0]=d;var s={};for(var l in e)hasOwnProperty.call(e,l)&&(s[l]=e[l]);s.originalType=t,s.mdxType="string"==typeof t?t:n,i[1]=s;for(var c=2;c<o;c++)i[c]=a[c];return r.createElement.apply(null,i)}return r.createElement.apply(null,a)}d.displayName="MDXCreateElement"},1507:function(t,e,a){a.r(e),a.d(e,{frontMatter:function(){return s},contentTitle:function(){return l},metadata:function(){return c},toc:function(){return p},default:function(){return d}});var r=a(7462),n=a(3366),o=(a(7294),a(3905)),i=["components"],s={},l="/spatial",c={unversionedId:"stardust-protocol/server/objects/spatial",id:"stardust-protocol/server/objects/spatial",isDocsHomePage:!1,title:"/spatial",description:"Object managing spatial objects and spatial manipulation.",source:"@site/docs/stardust-protocol/server/objects/spatial.md",sourceDirName:"stardust-protocol/server/objects",slug:"/stardust-protocol/server/objects/spatial",permalink:"/docs/stardust-protocol/server/objects/spatial",editUrl:"https://github.com/StardustXR/website/edit/main/docs/stardust-protocol/server/objects/spatial.md",version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"/",permalink:"/docs/stardust-protocol/server/objects/root"}},p=[{value:"Signals",id:"signals",children:[{value:"<code>createSpatial(string name, string spacePath, Vector3 origin, Quat orientation, Vector3 scale, bool translatable, bool rotatable, bool scalable)</code>",id:"createspatialstring-name-string-spacepath-vector3-origin-quat-orientation-vector3-scale-bool-translatable-bool-rotatable-bool-scalable",children:[]},{value:"<code>createZone(string name, string fieldPath, string spacePath, Vector3 origin, Quat orientation, string callbackPath, string callbackMethod)</code>",id:"createzonestring-name-string-fieldpath-string-spacepath-vector3-origin-quat-orientation-string-callbackpath-string-callbackmethod",children:[]}]}],u={toc:p};function d(t){var e=t.components,a=(0,n.Z)(t,i);return(0,o.kt)("wrapper",(0,r.Z)({},u,a,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"spatial"},"/spatial"),(0,o.kt)("p",null,"Object managing spatial objects and spatial manipulation."),(0,o.kt)("h2",{id:"signals"},"Signals"),(0,o.kt)("h3",{id:"createspatialstring-name-string-spacepath-vector3-origin-quat-orientation-vector3-scale-bool-translatable-bool-rotatable-bool-scalable"},(0,o.kt)("inlineCode",{parentName:"h3"},"createSpatial(string name, string spacePath, Vector3 origin, Quat orientation, Vector3 scale, bool translatable, bool rotatable, bool scalable)")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("a",{parentName:"p",href:"/docs/stardust-protocol/server/types/Spatial"},"Spatial")," at ",(0,o.kt)("inlineCode",{parentName:"p"},"/spatial/spatial/[name]")," with parent at ",(0,o.kt)("inlineCode",{parentName:"p"},"spacePath"),"."),(0,o.kt)("h3",{id:"createzonestring-name-string-fieldpath-string-spacepath-vector3-origin-quat-orientation-string-callbackpath-string-callbackmethod"},(0,o.kt)("inlineCode",{parentName:"h3"},"createZone(string name, string fieldPath, string spacePath, Vector3 origin, Quat orientation, string callbackPath, string callbackMethod)")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("a",{parentName:"p",href:"/docs/stardust-protocol/server/types/Zone"},"Zone")," at ",(0,o.kt)("inlineCode",{parentName:"p"},"/spatial/zone/[name]")," with parent at ",(0,o.kt)("inlineCode",{parentName:"p"},"spacePath")," and field at ",(0,o.kt)("inlineCode",{parentName:"p"},"fieldPath"),". The arguments ",(0,o.kt)("inlineCode",{parentName:"p"},"callbackPath")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"callbackMethod")," refer to a callback method accepting a ",(0,o.kt)("inlineCode",{parentName:"p"},"Vector")," of 2 ",(0,o.kt)("inlineCode",{parentName:"p"},"TypedVector"),"s, the first being a list of names of nodes that have just entered the field and the second being names of nodes that left (as ",(0,o.kt)("inlineCode",{parentName:"p"},"string"),")."))}d.isMDXComponent=!0}}]);