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