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