1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
"use strict";(self.webpackChunkstardust_website=self.webpackChunkstardust_website||[]).push([[172],{3905:function(e,t,r){r.d(t,{Zo:function(){return p},kt:function(){return m}});var n=r(7294);function a(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 i(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){a(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 s(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(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)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.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,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(r),m=a,h=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return r?n.createElement(h,i(i({ref:t},p),{},{components:r})):n.createElement(h,i({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var c=2;c<o;c++)i[c]=r[c];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}u.displayName="MDXCreateElement"},6098:function(e,t,r){r.r(t),r.d(t,{frontMatter:function(){return s},contentTitle:function(){return l},metadata:function(){return c},toc:function(){return p},default:function(){return u}});var n=r(7462),a=r(3366),o=(r(7294),r(3905)),i=["components"],s={},l="/drawable",c={unversionedId:"stardust-protocol/server/objects/drawable",id:"stardust-protocol/server/objects/drawable",isDocsHomePage:!1,title:"/drawable",description:"Object managing anything drawable, from the skytex to models.",source:"@site/docs/stardust-protocol/server/objects/drawable.md",sourceDirName:"stardust-protocol/server/objects",slug:"/stardust-protocol/server/objects/drawable",permalink:"/docs/stardust-protocol/server/objects/drawable",editUrl:"https://github.com/StardustXR/website/edit/main/docs/stardust-protocol/server/objects/drawable.md",version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Zone",permalink:"/docs/stardust-protocol/server/types/Zone"},next:{title:"/field",permalink:"/docs/stardust-protocol/server/objects/field"}},p=[{value:"Signals",id:"signals",children:[{value:"<code>createModelFromFile(string name, string spacePath, string path)</code>",id:"createmodelfromfilestring-name-string-spacepath-string-path",children:[]},{value:"<code>setSkytex(string path)</code>",id:"setskytexstring-path",children:[]},{value:"<code>setSkylight(string path)</code>",id:"setskylightstring-path",children:[]}]}],d={toc:p};function u(e){var t=e.components,r=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"drawable"},"/drawable"),(0,o.kt)("p",null,"Object managing anything drawable, from the skytex to models."),(0,o.kt)("h2",{id:"signals"},"Signals"),(0,o.kt)("h3",{id:"createmodelfromfilestring-name-string-spacepath-string-path"},(0,o.kt)("inlineCode",{parentName:"h3"},"createModelFromFile(string name, string spacePath, string path)")),(0,o.kt)("p",null,"Creates a new ",(0,o.kt)("a",{parentName:"p",href:"/docs/stardust-protocol/server/types/Model"},"Model")," at ",(0,o.kt)("inlineCode",{parentName:"p"},"/model/[name]")," with parent at ",(0,o.kt)("inlineCode",{parentName:"p"},"spacePath"),"."),(0,o.kt)("h3",{id:"setskytexstring-path"},(0,o.kt)("inlineCode",{parentName:"h3"},"setSkytex(string path)")),(0,o.kt)("p",null,"Sets the sky texture to be the image (HDR) at the absolute ",(0,o.kt)("inlineCode",{parentName:"p"},"path"),"."),(0,o.kt)("h3",{id:"setskylightstring-path"},(0,o.kt)("inlineCode",{parentName:"h3"},"setSkylight(string path)")),(0,o.kt)("p",null,"Sets the ambient lighting (using spherical harmonics) to the HDR at the absolute ",(0,o.kt)("inlineCode",{parentName:"p"},"path"),"."))}u.isMDXComponent=!0}}]); |