[{"data":1,"prerenderedAt":1222},["ShallowReactive",2],{"navigation":3,"/api/materials/mesh-portal-material":486,"/api/materials/mesh-portal-material-surround":1217},[4,22],{"title":5,"path":6,"stem":7,"children":8},"Getting Started","/getting-started","1.getting-started/1.index",[9,10,14,18],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"Installation Guide","/getting-started/installation","1.getting-started/2.installation",{"title":15,"path":16,"stem":17},"Usage","/getting-started/usage","1.getting-started/3.usage",{"title":19,"path":20,"stem":21},"Upgrade Guide","/getting-started/upgrade-guide","1.getting-started/4.upgrade-guide",{"title":23,"path":24,"stem":25,"children":26},"Api","/api","2.api",[27,30,84,114,156,198,296,322,356,406,452],{"title":28,"path":24,"stem":29},"All","2.api/index",{"title":31,"path":32,"stem":33,"children":34},"Abstractions","/api/abstractions","2.api/1.abstractions/index",[35,36,40,44,48,52,56,60,64,68,72,76,80],{"title":31,"path":32,"stem":33},{"title":37,"path":38,"stem":39},"Align","/api/abstractions/align","2.api/1.abstractions/align",{"title":41,"path":42,"stem":43},"Billboard","/api/abstractions/billboard","2.api/1.abstractions/billboard",{"title":45,"path":46,"stem":47},"Camera Shake","/api/abstractions/camera-shake","2.api/1.abstractions/camera-shake",{"title":49,"path":50,"stem":51},"Decal","/api/abstractions/decal","2.api/1.abstractions/decal",{"title":53,"path":54,"stem":55},"Edges","/api/abstractions/edges","2.api/1.abstractions/edges",{"title":57,"path":58,"stem":59},"Fit","/api/abstractions/fit","2.api/1.abstractions/fit",{"title":61,"path":62,"stem":63},"Levioso (Float)","/api/abstractions/levioso","2.api/1.abstractions/levioso",{"title":65,"path":66,"stem":67},"Mask","/api/abstractions/mask","2.api/1.abstractions/mask",{"title":69,"path":70,"stem":71},"Outline","/api/abstractions/outline","2.api/1.abstractions/outline",{"title":73,"path":74,"stem":75},"Sampler","/api/abstractions/sampler","2.api/1.abstractions/sampler",{"title":77,"path":78,"stem":79},"ScreenSizer","/api/abstractions/screen-sizer","2.api/1.abstractions/screen-sizer",{"title":81,"path":82,"stem":83},"ScreenSpace","/api/abstractions/screen-space","2.api/1.abstractions/screen-space",{"title":85,"path":86,"stem":87,"children":88},"Controls","/api/controls","2.api/2.controls/index",[89,90,94,98,102,106,110],{"title":85,"path":86,"stem":87},{"title":91,"path":92,"stem":93},"Camera Controls","/api/controls/camera-controls","2.api/2.controls/camera-controls",{"title":95,"path":96,"stem":97},"Keyboard Controls","/api/controls/keyboard-controls","2.api/2.controls/keyboard-controls",{"title":99,"path":100,"stem":101},"Map Controls","/api/controls/map-controls","2.api/2.controls/map-controls",{"title":103,"path":104,"stem":105},"Orbit Controls","/api/controls/orbit-controls","2.api/2.controls/orbit-controls",{"title":107,"path":108,"stem":109},"PointerLock Controls","/api/controls/pointer-lock-controls","2.api/2.controls/pointer-lock-controls",{"title":111,"path":112,"stem":113},"Transform Controls","/api/controls/transform-controls","2.api/2.controls/transform-controls",{"title":115,"path":116,"stem":117,"children":118},"Loaders","/api/loaders","2.api/3.loaders/index",[119,120,124,128,132,136,140,144,148,152],{"title":115,"path":116,"stem":117},{"title":121,"path":122,"stem":123},"useGLTF","/api/loaders/use-gltf","2.api/3.loaders/1.use-gltf",{"title":125,"path":126,"stem":127},"GLTFModel","/api/loaders/gltf-model","2.api/3.loaders/2.gltf-model",{"title":129,"path":130,"stem":131},"useFBX","/api/loaders/use-fbx","2.api/3.loaders/3.use-fbx",{"title":133,"path":134,"stem":135},"FBXModel","/api/loaders/fbx-model","2.api/3.loaders/4.fbx-model",{"title":137,"path":138,"stem":139},"useTexture","/api/loaders/use-texture","2.api/3.loaders/5.use-texture",{"title":141,"path":142,"stem":143},"useTextures","/api/loaders/use-textures","2.api/3.loaders/6.use-textures",{"title":145,"path":146,"stem":147},"useSVG","/api/loaders/use-svg","2.api/3.loaders/7.use-svg",{"title":149,"path":150,"stem":151},"useProgress","/api/loaders/use-progress","2.api/3.loaders/use-progress",{"title":153,"path":154,"stem":155},"useVideoTexture","/api/loaders/use-video-texture","2.api/3.loaders/use-video-texture",{"title":157,"path":158,"stem":159,"children":160},"Materials","/api/materials","2.api/4.materials/index",[161,162,166,170,174,178,182,186,190,194],{"title":157,"path":158,"stem":159},{"title":163,"path":164,"stem":165},"Custom Shader Material","/api/materials/custom-shader-material","2.api/4.materials/custom-shader-material",{"title":167,"path":168,"stem":169},"Mesh Glass Material","/api/materials/glass-material","2.api/4.materials/glass-material",{"title":171,"path":172,"stem":173},"Holographic Material","/api/materials/holographic-material","2.api/4.materials/holographic-material",{"title":175,"path":176,"stem":177},"Mesh Discard Material","/api/materials/mesh-discard-material","2.api/4.materials/mesh-discard-material",{"title":179,"path":180,"stem":181},"Mesh Portal Material","/api/materials/mesh-portal-material","2.api/4.materials/mesh-portal-material",{"title":183,"path":184,"stem":185},"Mesh Reflection Material","/api/materials/mesh-reflection-material","2.api/4.materials/mesh-reflection-material",{"title":187,"path":188,"stem":189},"Mesh Transmission Material","/api/materials/mesh-transmission-material","2.api/4.materials/mesh-transmission-material",{"title":191,"path":192,"stem":193},"Point Material","/api/materials/point-material","2.api/4.materials/point-material",{"title":195,"path":196,"stem":197},"Wobble Material","/api/materials/wobble-material","2.api/4.materials/wobble-material",{"title":199,"path":200,"stem":201,"children":202},"Shapes","/api/shapes","2.api/5.shapes/index",[203,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292],{"title":199,"path":200,"stem":201},{"title":205,"path":206,"stem":207},"Box","/api/shapes/box","2.api/5.shapes/box",{"title":209,"path":210,"stem":211},"CatmullRomCurve3","/api/shapes/catmullromcurve3","2.api/5.shapes/catmullromcurve3",{"title":213,"path":214,"stem":215},"Circle","/api/shapes/circle","2.api/5.shapes/circle",{"title":217,"path":218,"stem":219},"Cone","/api/shapes/cone","2.api/5.shapes/cone",{"title":221,"path":222,"stem":223},"Cubic Bezier Line","/api/shapes/cubic-bezier-line","2.api/5.shapes/cubic-bezier-line",{"title":225,"path":226,"stem":227},"Cylinder","/api/shapes/cylinder","2.api/5.shapes/cylinder",{"title":229,"path":230,"stem":231},"Dodecahedron","/api/shapes/dodecahedron","2.api/5.shapes/dodecahedron",{"title":233,"path":234,"stem":235},"Grid","/api/shapes/grid","2.api/5.shapes/grid",{"title":237,"path":238,"stem":239},"Icosahedron","/api/shapes/icosahedron","2.api/5.shapes/icosahedron",{"title":241,"path":242,"stem":243},"Line2","/api/shapes/line2","2.api/5.shapes/line2",{"title":245,"path":246,"stem":247},"Octahedron","/api/shapes/octahedron","2.api/5.shapes/octahedron",{"title":249,"path":250,"stem":251},"Plane","/api/shapes/plane","2.api/5.shapes/plane",{"title":253,"path":254,"stem":255},"Quadratic Bezier Line","/api/shapes/quadratic-bezier-line","2.api/5.shapes/quadratic-bezier-line",{"title":257,"path":258,"stem":259},"Ring","/api/shapes/ring","2.api/5.shapes/ring",{"title":261,"path":262,"stem":263},"Rounded Box","/api/shapes/rounded-box","2.api/5.shapes/rounded-box",{"title":265,"path":266,"stem":267},"Rounded Plane","/api/shapes/rounded-plane","2.api/5.shapes/rounded-plane",{"title":269,"path":270,"stem":271},"Screen Quad","/api/shapes/screen-quad","2.api/5.shapes/screen-quad",{"title":273,"path":274,"stem":275},"Sphere","/api/shapes/sphere","2.api/5.shapes/sphere",{"title":277,"path":278,"stem":279},"Superformula","/api/shapes/superformula","2.api/5.shapes/superformula",{"title":281,"path":282,"stem":283},"Tetrahedron","/api/shapes/tetrahedron","2.api/5.shapes/tetrahedron",{"title":285,"path":286,"stem":287},"Torus","/api/shapes/torus","2.api/5.shapes/torus",{"title":289,"path":290,"stem":291},"Torus Knot","/api/shapes/torus-knot","2.api/5.shapes/torus-knot",{"title":293,"path":294,"stem":295},"Tube","/api/shapes/tube","2.api/5.shapes/tube",{"title":297,"path":298,"stem":299,"children":300},"Debug/Performance","/api/debug-performance","2.api/6.debug-performance/index",[301,302,306,310,314,318],{"title":297,"path":298,"stem":299},{"title":303,"path":304,"stem":305},"Helper","/api/debug-performance/helper","2.api/6.debug-performance/helper",{"title":307,"path":308,"stem":309},"LOD","/api/debug-performance/lod","2.api/6.debug-performance/lod",{"title":311,"path":312,"stem":313},"Stats","/api/debug-performance/stats","2.api/6.debug-performance/stats",{"title":315,"path":316,"stem":317},"StatsGl","/api/debug-performance/stats-gl","2.api/6.debug-performance/stats-gl",{"title":319,"path":320,"stem":321},"useBVH","/api/debug-performance/use-bvh","2.api/6.debug-performance/use-bvh",{"title":323,"path":324,"stem":325,"children":326},"Light/Shadow","/api/light-shadow","2.api/7.light-shadow/index",[327,328,332,336,340,344,348,352],{"title":323,"path":324,"stem":325},{"title":329,"path":330,"stem":331},"Accumulative Shadows","/api/light-shadow/accumulative-shadows","2.api/7.light-shadow/accumulative-shadows",{"title":333,"path":334,"stem":335},"Bake Shadows","/api/light-shadow/bake-shadows","2.api/7.light-shadow/bake-shadows",{"title":337,"path":338,"stem":339},"Circle Shadow","/api/light-shadow/circle-shadow","2.api/7.light-shadow/circle-shadow",{"title":341,"path":342,"stem":343},"Contact Shadows","/api/light-shadow/contact-shadows","2.api/7.light-shadow/contact-shadows",{"title":345,"path":346,"stem":347},"Lensflare","/api/light-shadow/lensflare","2.api/7.light-shadow/lensflare",{"title":349,"path":350,"stem":351},"Randomized Lights","/api/light-shadow/randomized-lights","2.api/7.light-shadow/randomized-lights",{"title":353,"path":354,"stem":355},"Soft Shadows","/api/light-shadow/soft-shadows","2.api/7.light-shadow/soft-shadows",{"title":357,"path":358,"stem":359,"children":360},"Staging","/api/staging","2.api/8.staging/index",[361,362,366,370,374,378,382,386,390,394,398,402],{"title":357,"path":358,"stem":359},{"title":363,"path":364,"stem":365},"Environment","/api/staging/environment","2.api/8.staging/1.environment",{"title":367,"path":368,"stem":369},"useEnvironment","/api/staging/use-environment","2.api/8.staging/2.use-environment",{"title":371,"path":372,"stem":373},"Lightformer","/api/staging/lightformer","2.api/8.staging/3.lightformer",{"title":375,"path":376,"stem":377},"Backdrop","/api/staging/backdrop","2.api/8.staging/backdrop",{"title":379,"path":380,"stem":381},"Ocean","/api/staging/ocean","2.api/8.staging/ocean",{"title":383,"path":384,"stem":385},"Precipitation","/api/staging/precipitation","2.api/8.staging/precipitation",{"title":387,"path":388,"stem":389},"Sky","/api/staging/sky","2.api/8.staging/sky",{"title":391,"path":392,"stem":393},"Smoke","/api/staging/smoke","2.api/8.staging/smoke",{"title":395,"path":396,"stem":397},"Sparkles","/api/staging/sparkles","2.api/8.staging/sparkles",{"title":399,"path":400,"stem":401},"Stage","/api/staging/stage","2.api/8.staging/stage",{"title":403,"path":404,"stem":405},"Stars","/api/staging/stars","2.api/8.staging/stars",{"title":407,"path":408,"stem":409,"children":410},"Objects","/api/objects","2.api/9.objects/index",[411,412,416,420,424,428,432,436,440,444,448],{"title":407,"path":408,"stem":409},{"title":413,"path":414,"stem":415},"AnimatedSprite","/api/objects/animated-sprite","2.api/9.objects/animated-sprite",{"title":417,"path":418,"stem":419},"CubeCamera","/api/objects/cube-camera","2.api/9.objects/cube-camera",{"title":421,"path":422,"stem":423},"Fbo","/api/objects/fbo","2.api/9.objects/fbo",{"title":425,"path":426,"stem":427},"GradientTexture","/api/objects/gradient-texture","2.api/9.objects/gradient-texture",{"title":429,"path":430,"stem":431},"HTML","/api/objects/html","2.api/9.objects/html",{"title":433,"path":434,"stem":435},"Image","/api/objects/image","2.api/9.objects/image",{"title":437,"path":438,"stem":439},"MarchingCubes","/api/objects/marching-cubes","2.api/9.objects/marching-cubes",{"title":441,"path":442,"stem":443},"Reflector","/api/objects/reflector","2.api/9.objects/reflector",{"title":445,"path":446,"stem":447},"Refractor","/api/objects/refractor","2.api/9.objects/refractor",{"title":449,"path":450,"stem":451},"Text3D","/api/objects/text-3d","2.api/9.objects/text-3d",{"title":453,"path":454,"stem":455,"children":456},"Miscellaneous","/api/miscellaneous","2.api/miscellaneous/index",[457,458,462,466,470,474,478,482],{"title":453,"path":454,"stem":455},{"title":459,"path":460,"stem":461},"Bounds","/api/miscellaneous/bounds","2.api/miscellaneous/bounds",{"title":463,"path":464,"stem":465},"GlobalAudio","/api/miscellaneous/global-audio","2.api/miscellaneous/global-audio",{"title":467,"path":468,"stem":469},"MouseParallax","/api/miscellaneous/mouse-parallax","2.api/miscellaneous/mouse-parallax",{"title":471,"path":472,"stem":473},"PositionalAudio","/api/miscellaneous/positional-audio","2.api/miscellaneous/positional-audio",{"title":475,"path":476,"stem":477},"useAnimations","/api/miscellaneous/use-animations","2.api/miscellaneous/use-animations",{"title":479,"path":480,"stem":481},"useGLTFExporter","/api/miscellaneous/use-gltf-exporter","2.api/miscellaneous/use-gltf-exporter",{"title":483,"path":484,"stem":485},"useIntersect","/api/miscellaneous/use-intersect","2.api/miscellaneous/use-intersect",{"id":487,"title":179,"body":488,"description":1211,"extension":1212,"links":1213,"meta":1214,"navigation":664,"path":180,"seo":1215,"stem":181,"__hash__":1216},"docs/2.api/4.materials/mesh-portal-material.md",{"type":489,"value":490,"toc":1206},"minimark",[491,497,510,530,545,549,918,922,1028,1032,1042,1119,1165,1190,1202],[492,493,494],"scene-controls-wrapper",{},[495,496],"materials-mesh-portal-material",{},[498,499,500,501,505,506,509],"p",{},"The ",[502,503,504],"code",{},"cientos"," package provides a ",[502,507,508],{},"\u003CMeshPortalMaterial />"," component that renders its\ndeclarative children into a private off-main scene and projects that scene onto the\nhost mesh as a perspective-correct window.",[498,511,512,513,517,518,521,522,525,526,529],{},"Children declared inside the component render into the ",[514,515,516],"strong",{},"portal scene",", not the main\nscene. The portal scene is rendered to a frame buffer each frame using the active\ncamera, so contents sit in world-space (move the camera and you get parallax through\nthe surface, not a flat decal). The mesh geometry masks the result, and ",[502,519,520],{},"blend","\ncross-fades between the world (",[502,523,524],{},"0",") and the portal (",[502,527,528],{},"1",").",[531,532,533],"prose-note",{},[498,534,535,536,544],{},"This component is a port of the ",[537,538,543],"a",{"href":539,"rel":540,"target":542},"https://drei.docs.pmnd.rs/portals/mesh-portal-material",[541],"nofollow","_blank","drei MeshPortalMaterial",". All credit goes to the original authors.",[546,547,15],"h2",{"id":548},"usage",[550,551,556],"pre",{"className":552,"code":553,"language":554,"meta":555,"style":555},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport { TresCanvas } from '@tresjs/core'\nimport { MeshPortalMaterial, OrbitControls } from '@tresjs/cientos'\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CTresCanvas>\n    \u003CTresPerspectiveCamera :position=\"[0, 0, 6]\" />\n    \u003COrbitControls />\n    \u003CTresMesh>\n      \u003CTresPlaneGeometry :args=\"[3, 4]\" />\n      \u003CMeshPortalMaterial :blend=\"0\">\n        \u003C!-- children render INTO the portal scene -->\n        \u003CTresAmbientLight :intensity=\"0.5\" />\n        \u003CTresMesh :position=\"[0, 0, -1]\">\n          \u003CTresTorusKnotGeometry :args=\"[0.6, 0.25, 128, 32]\" />\n          \u003CTresMeshStandardMaterial color=\"#fbb03b\" />\n        \u003C/TresMesh>\n      \u003C/MeshPortalMaterial>\n    \u003C/TresMesh>\n  \u003C/TresCanvas>\n\u003C/template>\n","vue","",[502,557,558,593,622,649,659,666,676,687,711,721,731,754,775,782,805,825,847,869,879,889,899,909],{"__ignoreMap":555},[559,560,563,567,571,575,578,581,584,588,590],"span",{"class":561,"line":562},"line",1,[559,564,566],{"class":565},"sMK4o","\u003C",[559,568,570],{"class":569},"swJcz","script",[559,572,574],{"class":573},"spNyl"," setup",[559,576,577],{"class":573}," lang",[559,579,580],{"class":565},"=",[559,582,583],{"class":565},"\"",[559,585,587],{"class":586},"sfazB","ts",[559,589,583],{"class":565},[559,591,592],{"class":565},">\n",[559,594,596,600,603,607,610,613,616,619],{"class":561,"line":595},2,[559,597,599],{"class":598},"s7zQu","import",[559,601,602],{"class":565}," {",[559,604,606],{"class":605},"sTEyZ"," TresCanvas",[559,608,609],{"class":565}," }",[559,611,612],{"class":598}," from",[559,614,615],{"class":565}," '",[559,617,618],{"class":586},"@tresjs/core",[559,620,621],{"class":565},"'\n",[559,623,625,627,629,632,635,638,640,642,644,647],{"class":561,"line":624},3,[559,626,599],{"class":598},[559,628,602],{"class":565},[559,630,631],{"class":605}," MeshPortalMaterial",[559,633,634],{"class":565},",",[559,636,637],{"class":605}," OrbitControls",[559,639,609],{"class":565},[559,641,612],{"class":598},[559,643,615],{"class":565},[559,645,646],{"class":586},"@tresjs/cientos",[559,648,621],{"class":565},[559,650,652,655,657],{"class":561,"line":651},4,[559,653,654],{"class":565},"\u003C/",[559,656,570],{"class":569},[559,658,592],{"class":565},[559,660,662],{"class":561,"line":661},5,[559,663,665],{"emptyLinePlaceholder":664},true,"\n",[559,667,669,671,674],{"class":561,"line":668},6,[559,670,566],{"class":565},[559,672,673],{"class":569},"template",[559,675,592],{"class":565},[559,677,679,682,685],{"class":561,"line":678},7,[559,680,681],{"class":565},"  \u003C",[559,683,684],{"class":569},"TresCanvas",[559,686,592],{"class":565},[559,688,690,693,696,699,701,703,706,708],{"class":561,"line":689},8,[559,691,692],{"class":565},"    \u003C",[559,694,695],{"class":569},"TresPerspectiveCamera",[559,697,698],{"class":573}," :position",[559,700,580],{"class":565},[559,702,583],{"class":565},[559,704,705],{"class":586},"[0, 0, 6]",[559,707,583],{"class":565},[559,709,710],{"class":565}," />\n",[559,712,714,716,719],{"class":561,"line":713},9,[559,715,692],{"class":565},[559,717,718],{"class":569},"OrbitControls",[559,720,710],{"class":565},[559,722,724,726,729],{"class":561,"line":723},10,[559,725,692],{"class":565},[559,727,728],{"class":569},"TresMesh",[559,730,592],{"class":565},[559,732,734,737,740,743,745,747,750,752],{"class":561,"line":733},11,[559,735,736],{"class":565},"      \u003C",[559,738,739],{"class":569},"TresPlaneGeometry",[559,741,742],{"class":573}," :args",[559,744,580],{"class":565},[559,746,583],{"class":565},[559,748,749],{"class":586},"[3, 4]",[559,751,583],{"class":565},[559,753,710],{"class":565},[559,755,757,759,762,765,767,769,771,773],{"class":561,"line":756},12,[559,758,736],{"class":565},[559,760,761],{"class":569},"MeshPortalMaterial",[559,763,764],{"class":573}," :blend",[559,766,580],{"class":565},[559,768,583],{"class":565},[559,770,524],{"class":586},[559,772,583],{"class":565},[559,774,592],{"class":565},[559,776,778],{"class":561,"line":777},13,[559,779,781],{"class":780},"sHwdD","        \u003C!-- children render INTO the portal scene -->\n",[559,783,785,788,791,794,796,798,801,803],{"class":561,"line":784},14,[559,786,787],{"class":565},"        \u003C",[559,789,790],{"class":569},"TresAmbientLight",[559,792,793],{"class":573}," :intensity",[559,795,580],{"class":565},[559,797,583],{"class":565},[559,799,800],{"class":586},"0.5",[559,802,583],{"class":565},[559,804,710],{"class":565},[559,806,808,810,812,814,816,818,821,823],{"class":561,"line":807},15,[559,809,787],{"class":565},[559,811,728],{"class":569},[559,813,698],{"class":573},[559,815,580],{"class":565},[559,817,583],{"class":565},[559,819,820],{"class":586},"[0, 0, -1]",[559,822,583],{"class":565},[559,824,592],{"class":565},[559,826,828,831,834,836,838,840,843,845],{"class":561,"line":827},16,[559,829,830],{"class":565},"          \u003C",[559,832,833],{"class":569},"TresTorusKnotGeometry",[559,835,742],{"class":573},[559,837,580],{"class":565},[559,839,583],{"class":565},[559,841,842],{"class":586},"[0.6, 0.25, 128, 32]",[559,844,583],{"class":565},[559,846,710],{"class":565},[559,848,850,852,855,858,860,862,865,867],{"class":561,"line":849},17,[559,851,830],{"class":565},[559,853,854],{"class":569},"TresMeshStandardMaterial",[559,856,857],{"class":573}," color",[559,859,580],{"class":565},[559,861,583],{"class":565},[559,863,864],{"class":586},"#fbb03b",[559,866,583],{"class":565},[559,868,710],{"class":565},[559,870,872,875,877],{"class":561,"line":871},18,[559,873,874],{"class":565},"        \u003C/",[559,876,728],{"class":569},[559,878,592],{"class":565},[559,880,882,885,887],{"class":561,"line":881},19,[559,883,884],{"class":565},"      \u003C/",[559,886,761],{"class":569},[559,888,592],{"class":565},[559,890,892,895,897],{"class":561,"line":891},20,[559,893,894],{"class":565},"    \u003C/",[559,896,728],{"class":569},[559,898,592],{"class":565},[559,900,902,905,907],{"class":561,"line":901},21,[559,903,904],{"class":565},"  \u003C/",[559,906,684],{"class":569},[559,908,592],{"class":565},[559,910,912,914,916],{"class":561,"line":911},22,[559,913,654],{"class":565},[559,915,673],{"class":569},[559,917,592],{"class":565},[546,919,921],{"id":920},"props","Props",[923,924,925,944],"table",{},[926,927,928],"thead",{},[929,930,931,935,938,941],"tr",{},[932,933,934],"th",{},"Prop",[932,936,937],{},"Type",[932,939,940],{},"Default",[932,942,943],{},"Description",[945,946,947,971,990,1010],"tbody",{},[929,948,949,954,959,963],{},[950,951,952],"td",{},[502,953,520],{},[950,955,956],{},[502,957,958],{},"number",[950,960,961],{},[502,962,524],{},[950,964,965,967,968,970],{},[502,966,524],{}," = world only, ",[502,969,528],{}," = portal only; cross-fades between.",[929,972,973,978,982,987],{},[950,974,975],{},[502,976,977],{},"resolution",[950,979,980],{},[502,981,958],{},[950,983,984],{},[502,985,986],{},"512",[950,988,989],{},"Frame buffer resolution for the portal render.",[929,991,992,997,1002,1007],{},[950,993,994],{},[502,995,996],{},"worldUnits",[950,998,999],{},[502,1000,1001],{},"boolean",[950,1003,1004],{},[502,1005,1006],{},"false",[950,1008,1009],{},"Keep portal contents in world units instead of host-relative.",[929,1011,1012,1017,1021,1025],{},[950,1013,1014],{},[502,1015,1016],{},"renderPriority",[950,1018,1019],{},[502,1020,958],{},[950,1022,1023],{},[502,1024,524],{},[950,1026,1027],{},"Render-loop priority for the blend takeover. Applied at mount — changing it later requires a remount.",[546,1029,1031],{"id":1030},"setting-the-portals-background-or-environment","Setting the portal's background or environment",[498,1033,1034,1037,1038,1041],{},[502,1035,1036],{},"\u003CMeshPortalMaterial>"," overrides the injected scene context for its children, so\nhelpers that target \"the scene\" affect the ",[514,1039,1040],{},"portal"," scene, not the world. Both of\nthese give the portal its own look, independent of the main scene:",[550,1043,1045],{"className":552,"code":1044,"language":554,"meta":555,"style":555},"\u003CMeshPortalMaterial :blend=\"blend\">\n  \u003C!-- Imperative helper — works because the injected scene is the portal scene -->\n  \u003CSuspense>\n    \u003CEnvironment preset=\"dawn\" :background=\"true\" />\n  \u003C/Suspense>\n\n  \u003C!-- Or declarative attach (also lands on the portal scene) -->\n  \u003CTresColor attach=\"background\" :args=\"[0.1, 0.1, 0.18]\" />\n\n  \u003C!-- ...portal scene contents... -->\n\u003C/MeshPortalMaterial>\n",[502,1046,1047,1068,1073,1078,1083,1088,1092,1097,1102,1106,1111],{"__ignoreMap":555},[559,1048,1049,1051,1053,1056,1058,1060,1062,1064,1066],{"class":561,"line":562},[559,1050,566],{"class":565},[559,1052,761],{"class":569},[559,1054,1055],{"class":565}," :",[559,1057,520],{"class":573},[559,1059,580],{"class":565},[559,1061,583],{"class":565},[559,1063,520],{"class":605},[559,1065,583],{"class":565},[559,1067,592],{"class":565},[559,1069,1070],{"class":561,"line":595},[559,1071,1072],{"class":605},"  \u003C!-- Imperative helper — works because the injected scene is the portal scene -->\n",[559,1074,1075],{"class":561,"line":624},[559,1076,1077],{"class":605},"  \u003CSuspense>\n",[559,1079,1080],{"class":561,"line":651},[559,1081,1082],{"class":605},"    \u003CEnvironment preset=\"dawn\" :background=\"true\" />\n",[559,1084,1085],{"class":561,"line":661},[559,1086,1087],{"class":605},"  \u003C/Suspense>\n",[559,1089,1090],{"class":561,"line":668},[559,1091,665],{"emptyLinePlaceholder":664},[559,1093,1094],{"class":561,"line":678},[559,1095,1096],{"class":605},"  \u003C!-- Or declarative attach (also lands on the portal scene) -->\n",[559,1098,1099],{"class":561,"line":689},[559,1100,1101],{"class":605},"  \u003CTresColor attach=\"background\" :args=\"[0.1, 0.1, 0.18]\" />\n",[559,1103,1104],{"class":561,"line":713},[559,1105,665],{"emptyLinePlaceholder":664},[559,1107,1108],{"class":561,"line":723},[559,1109,1110],{"class":605},"  \u003C!-- ...portal scene contents... -->\n",[559,1112,1113,1115,1117],{"class":561,"line":733},[559,1114,654],{"class":565},[559,1116,761],{"class":569},[559,1118,592],{"class":565},[531,1120,1121],{},[498,1122,1123,1126,1127,1130,1131,1134,1135,1138,1139,1142,1143,1138,1146,1149,1150,1153,1154,1157,1158,1161,1162,1164],{},[514,1124,1125],{},"How it works:"," the component ",[502,1128,1129],{},"provide()","s a context whose ",[502,1132,1133],{},"scene"," points at the\nprivate portal scene. Vue's ",[502,1136,1137],{},"provide","/",[502,1140,1141],{},"inject"," follows the mounted tree (it reaches\nslot content through the internal ",[502,1144,1145],{},"\u003CTresPortal>",[502,1147,1148],{},"\u003CTeleport>","), so both imperative\nhelpers (",[502,1151,1152],{},"useTres().scene",", e.g. ",[502,1155,1156],{},"\u003CEnvironment>",") and declarative ",[502,1159,1160],{},"attach"," configure\nthe portal scene. Only the ",[502,1163,1133],{}," is swapped — renderer, camera and sizes are shared.",[1166,1167,1168],"prose-warning",{},[498,1169,1170,1173,1174,1176,1177,1180,1181,1183,1184,1189],{},[514,1171,1172],{},"On-demand rendering:"," the portal renders its scene to a frame buffer on every\nframe so the window keeps tracking animated contents and the ",[502,1175,520],{}," takeover stays\nin sync. To do this it calls ",[502,1178,1179],{},"invalidate()"," each frame, which keeps the render loop\nrunning continuously — a mesh using ",[502,1182,1036],{}," effectively opts out of\n",[537,1185,1188],{"href":1186,"rel":1187,"target":542},"https://docs.tresjs.org/api/advanced/performance#mode-on-demand",[541],"on-demand rendering"," while mounted.",[531,1191,1192],{},[498,1193,1194,1197,1198,1201],{},[514,1195,1196],{},"Limitations (MVP):"," ",[502,1199,1200],{},"blur"," (edge fade) and pointer-event forwarding into the\nportal scene are not yet implemented. WebGPU is not yet supported.",[1203,1204,1205],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":555,"searchDepth":562,"depth":595,"links":1207},[1208,1209,1210],{"id":548,"depth":595,"text":15},{"id":920,"depth":595,"text":921},{"id":1030,"depth":595,"text":1031},"Render a separate child scene into a portal surface, perspective-correct and masked by the mesh. Ported from drei.","md",null,{},{"title":179,"description":1211},"ohfbKC7GzCyDLCAu6PE_RcaQcHLETnumKwxeb3qJ82E",[1218,1220],{"title":175,"path":176,"stem":177,"description":1219,"children":-1},"Hides the object it's attached to while keeping shadows and children visible.",{"title":183,"path":184,"stem":185,"description":1221,"children":-1},"Makes floors or walls that reflect the objects in your Scene.",1782892878430]