[{"data":1,"prerenderedAt":1324},["ShallowReactive",2],{"navigation":3,"/api/abstractions/merged":498,"/api/abstractions/merged-surround":1319},[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":77,"body":500,"description":1313,"extension":1314,"links":1315,"meta":1316,"navigation":629,"path":78,"seo":1317,"stem":79,"__hash__":1318},"docs/2.api/1.abstractions/merged.md",{"type":501,"value":502,"toc":1307},"minimark",[503,509,525,533,537,540,810,813,1105,1115,1119,1128,1199,1202,1206,1219,1223,1286,1292,1303],[504,505,506],"scene-controls-wrapper",{},[507,508],"abstractions-merged",{},[510,511,512,516,517,520,521,524],"p",{},[513,514,515],"code",{},"\u003CMerged />"," takes a ",[513,518,519],{},"{ name: mesh }"," map and builds one instanced batch per entry. Any descendant,\nat any depth and in any component, joins one by key with ",[513,522,523],{},"\u003CInstance batch=\"...\" />",".",[510,526,527,528,532],{},"That is what makes repeating a whole model cheap: a robot made of two meshes drawn 49 times is\n",[529,530,531],"strong",{},"two"," drawcalls, not 98.",[534,535,15],"h2",{"id":536},"usage",[510,538,539],{},"The model becomes its own component, and knows nothing about the batches beyond their names:",[541,542,548],"pre",{"className":543,"code":544,"filename":545,"language":546,"meta":547,"style":547},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport { Instance } from '@tresjs/cientos'\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CTresGroup>\n    \u003CInstance batch=\"Body\" :position=\"[0, 0.6, 0]\" />\n    \u003CInstance batch=\"Body\" :position=\"[0, 1.6, 0]\" :scale=\"0.6\" />\n    \u003CInstance batch=\"Eye\" :position=\"[-0.18, 1.7, 0.32]\" />\n    \u003CInstance batch=\"Eye\" :position=\"[0.18, 1.7, 0.32]\" />\n  \u003C/TresGroup>\n\u003C/template>\n","Robot.vue","vue","",[513,549,550,585,614,624,631,641,652,688,730,761,791,801],{"__ignoreMap":547},[551,552,555,559,563,567,570,573,576,580,582],"span",{"class":553,"line":554},"line",1,[551,556,558],{"class":557},"sMK4o","\u003C",[551,560,562],{"class":561},"swJcz","script",[551,564,566],{"class":565},"spNyl"," setup",[551,568,569],{"class":565}," lang",[551,571,572],{"class":557},"=",[551,574,575],{"class":557},"\"",[551,577,579],{"class":578},"sfazB","ts",[551,581,575],{"class":557},[551,583,584],{"class":557},">\n",[551,586,588,592,595,599,602,605,608,611],{"class":553,"line":587},2,[551,589,591],{"class":590},"s7zQu","import",[551,593,594],{"class":557}," {",[551,596,598],{"class":597},"sTEyZ"," Instance",[551,600,601],{"class":557}," }",[551,603,604],{"class":590}," from",[551,606,607],{"class":557}," '",[551,609,610],{"class":578},"@tresjs/cientos",[551,612,613],{"class":557},"'\n",[551,615,617,620,622],{"class":553,"line":616},3,[551,618,619],{"class":557},"\u003C/",[551,621,562],{"class":561},[551,623,584],{"class":557},[551,625,627],{"class":553,"line":626},4,[551,628,630],{"emptyLinePlaceholder":629},true,"\n",[551,632,634,636,639],{"class":553,"line":633},5,[551,635,558],{"class":557},[551,637,638],{"class":561},"template",[551,640,584],{"class":557},[551,642,644,647,650],{"class":553,"line":643},6,[551,645,646],{"class":557},"  \u003C",[551,648,649],{"class":561},"TresGroup",[551,651,584],{"class":557},[551,653,655,658,661,664,666,668,671,673,676,678,680,683,685],{"class":553,"line":654},7,[551,656,657],{"class":557},"    \u003C",[551,659,660],{"class":561},"Instance",[551,662,663],{"class":565}," batch",[551,665,572],{"class":557},[551,667,575],{"class":557},[551,669,670],{"class":578},"Body",[551,672,575],{"class":557},[551,674,675],{"class":565}," :position",[551,677,572],{"class":557},[551,679,575],{"class":557},[551,681,682],{"class":578},"[0, 0.6, 0]",[551,684,575],{"class":557},[551,686,687],{"class":557}," />\n",[551,689,691,693,695,697,699,701,703,705,707,709,711,714,716,719,721,723,726,728],{"class":553,"line":690},8,[551,692,657],{"class":557},[551,694,660],{"class":561},[551,696,663],{"class":565},[551,698,572],{"class":557},[551,700,575],{"class":557},[551,702,670],{"class":578},[551,704,575],{"class":557},[551,706,675],{"class":565},[551,708,572],{"class":557},[551,710,575],{"class":557},[551,712,713],{"class":578},"[0, 1.6, 0]",[551,715,575],{"class":557},[551,717,718],{"class":565}," :scale",[551,720,572],{"class":557},[551,722,575],{"class":557},[551,724,725],{"class":578},"0.6",[551,727,575],{"class":557},[551,729,687],{"class":557},[551,731,733,735,737,739,741,743,746,748,750,752,754,757,759],{"class":553,"line":732},9,[551,734,657],{"class":557},[551,736,660],{"class":561},[551,738,663],{"class":565},[551,740,572],{"class":557},[551,742,575],{"class":557},[551,744,745],{"class":578},"Eye",[551,747,575],{"class":557},[551,749,675],{"class":565},[551,751,572],{"class":557},[551,753,575],{"class":557},[551,755,756],{"class":578},"[-0.18, 1.7, 0.32]",[551,758,575],{"class":557},[551,760,687],{"class":557},[551,762,764,766,768,770,772,774,776,778,780,782,784,787,789],{"class":553,"line":763},10,[551,765,657],{"class":557},[551,767,660],{"class":561},[551,769,663],{"class":565},[551,771,572],{"class":557},[551,773,575],{"class":557},[551,775,745],{"class":578},[551,777,575],{"class":557},[551,779,675],{"class":565},[551,781,572],{"class":557},[551,783,575],{"class":557},[551,785,786],{"class":578},"[0.18, 1.7, 0.32]",[551,788,575],{"class":557},[551,790,687],{"class":557},[551,792,794,797,799],{"class":553,"line":793},11,[551,795,796],{"class":557},"  \u003C/",[551,798,649],{"class":561},[551,800,584],{"class":557},[551,802,804,806,808],{"class":553,"line":803},12,[551,805,619],{"class":557},[551,807,638],{"class":561},[551,809,584],{"class":557},[510,811,812],{},"The provider hands over the meshes and renders as many copies as it likes:",[541,814,823],{"className":543,"code":815,"highlights":816,"language":546,"meta":547,"style":547},"\u003Cscript setup lang=\"ts\">\nimport { TresCanvas } from '@tresjs/core'\nimport { Merged, useGLTF } from '@tresjs/cientos'\nimport Robot from './Robot.vue'\n\nconst { nodes } = useGLTF('/robot.glb')\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CTresCanvas>\n    \u003CTresPerspectiveCamera :position=\"[12, 9, 12]\" />\n    \u003CMerged :meshes=\"{ Body: nodes.Body, Eye: nodes.Eye }\">\n      \u003CRobot :position=\"[-2, 0, 0]\" />\n      \u003CRobot :position=\"[0, 0, 0]\" />\n      \u003CRobot :position=\"[2, 0, 0]\" />\n    \u003C/Merged>\n  \u003C/TresCanvas>\n\u003C/template>\n",[803,817,818,819,820,821,822],13,14,15,16,17,18,[513,824,825,845,865,890,907,911,944,952,956,964,973,993,1015,1037,1057,1077,1087,1096],{"__ignoreMap":547},[551,826,827,829,831,833,835,837,839,841,843],{"class":553,"line":554},[551,828,558],{"class":557},[551,830,562],{"class":561},[551,832,566],{"class":565},[551,834,569],{"class":565},[551,836,572],{"class":557},[551,838,575],{"class":557},[551,840,579],{"class":578},[551,842,575],{"class":557},[551,844,584],{"class":557},[551,846,847,849,851,854,856,858,860,863],{"class":553,"line":587},[551,848,591],{"class":590},[551,850,594],{"class":557},[551,852,853],{"class":597}," TresCanvas",[551,855,601],{"class":557},[551,857,604],{"class":590},[551,859,607],{"class":557},[551,861,862],{"class":578},"@tresjs/core",[551,864,613],{"class":557},[551,866,867,869,871,874,877,880,882,884,886,888],{"class":553,"line":616},[551,868,591],{"class":590},[551,870,594],{"class":557},[551,872,873],{"class":597}," Merged",[551,875,876],{"class":557},",",[551,878,879],{"class":597}," useGLTF",[551,881,601],{"class":557},[551,883,604],{"class":590},[551,885,607],{"class":557},[551,887,610],{"class":578},[551,889,613],{"class":557},[551,891,892,894,897,900,902,905],{"class":553,"line":626},[551,893,591],{"class":590},[551,895,896],{"class":597}," Robot ",[551,898,899],{"class":590},"from",[551,901,607],{"class":557},[551,903,904],{"class":578},"./Robot.vue",[551,906,613],{"class":557},[551,908,909],{"class":553,"line":633},[551,910,630],{"emptyLinePlaceholder":629},[551,912,913,916,918,921,924,927,930,933,936,939,941],{"class":553,"line":643},[551,914,915],{"class":565},"const",[551,917,594],{"class":557},[551,919,920],{"class":597}," nodes ",[551,922,923],{"class":557},"}",[551,925,926],{"class":557}," =",[551,928,879],{"class":929},"s2Zo4",[551,931,932],{"class":597},"(",[551,934,935],{"class":557},"'",[551,937,938],{"class":578},"/robot.glb",[551,940,935],{"class":557},[551,942,943],{"class":597},")\n",[551,945,946,948,950],{"class":553,"line":654},[551,947,619],{"class":557},[551,949,562],{"class":561},[551,951,584],{"class":557},[551,953,954],{"class":553,"line":690},[551,955,630],{"emptyLinePlaceholder":629},[551,957,958,960,962],{"class":553,"line":732},[551,959,558],{"class":557},[551,961,638],{"class":561},[551,963,584],{"class":557},[551,965,966,968,971],{"class":553,"line":763},[551,967,646],{"class":557},[551,969,970],{"class":561},"TresCanvas",[551,972,584],{"class":557},[551,974,975,977,980,982,984,986,989,991],{"class":553,"line":793},[551,976,657],{"class":557},[551,978,979],{"class":561},"TresPerspectiveCamera",[551,981,675],{"class":565},[551,983,572],{"class":557},[551,985,575],{"class":557},[551,987,988],{"class":578},"[12, 9, 12]",[551,990,575],{"class":557},[551,992,687],{"class":557},[551,994,997,999,1001,1004,1006,1008,1011,1013],{"class":995,"line":803},[553,996],"highlight",[551,998,657],{"class":557},[551,1000,77],{"class":561},[551,1002,1003],{"class":565}," :meshes",[551,1005,572],{"class":557},[551,1007,575],{"class":557},[551,1009,1010],{"class":578},"{ Body: nodes.Body, Eye: nodes.Eye }",[551,1012,575],{"class":557},[551,1014,584],{"class":557},[551,1016,1018,1021,1024,1026,1028,1030,1033,1035],{"class":1017,"line":817},[553,996],[551,1019,1020],{"class":557},"      \u003C",[551,1022,1023],{"class":561},"Robot",[551,1025,675],{"class":565},[551,1027,572],{"class":557},[551,1029,575],{"class":557},[551,1031,1032],{"class":578},"[-2, 0, 0]",[551,1034,575],{"class":557},[551,1036,687],{"class":557},[551,1038,1040,1042,1044,1046,1048,1050,1053,1055],{"class":1039,"line":818},[553,996],[551,1041,1020],{"class":557},[551,1043,1023],{"class":561},[551,1045,675],{"class":565},[551,1047,572],{"class":557},[551,1049,575],{"class":557},[551,1051,1052],{"class":578},"[0, 0, 0]",[551,1054,575],{"class":557},[551,1056,687],{"class":557},[551,1058,1060,1062,1064,1066,1068,1070,1073,1075],{"class":1059,"line":819},[553,996],[551,1061,1020],{"class":557},[551,1063,1023],{"class":561},[551,1065,675],{"class":565},[551,1067,572],{"class":557},[551,1069,575],{"class":557},[551,1071,1072],{"class":578},"[2, 0, 0]",[551,1074,575],{"class":557},[551,1076,687],{"class":557},[551,1078,1080,1083,1085],{"class":1079,"line":820},[553,996],[551,1081,1082],{"class":557},"    \u003C/",[551,1084,77],{"class":561},[551,1086,584],{"class":557},[551,1088,1090,1092,1094],{"class":1089,"line":821},[553,996],[551,1091,796],{"class":557},[551,1093,970],{"class":561},[551,1095,584],{"class":557},[551,1097,1099,1101,1103],{"class":1098,"line":822},[553,996],[551,1100,619],{"class":557},[551,1102,638],{"class":561},[551,1104,584],{"class":557},[1106,1107,1108],"prose-note",{},[510,1109,1110,1111,1114],{},"Nothing needs to be threaded through props or slots: the batches are provided, so an ",[513,1112,1113],{},"\u003CInstance />","\nfinds the one it names no matter how deep it sits or how many components stand between them.",[534,1116,1118],{"id":1117},"instancing-a-whole-gltf","Instancing a whole glTF",[510,1120,1121,1123,1124,1127],{},[513,1122,133],{}," gives you ",[513,1125,1126],{},"nodes",", so instancing every repeated mesh of a model is a matter of picking the\nones worth batching:",[541,1129,1131],{"className":543,"code":1130,"language":546,"meta":547,"style":547},"\u003CMerged :meshes=\"{ Screw: nodes.Screw, Bolt: nodes.Bolt }\">\n  \u003CMachine v-for=\"i in 20\" :key=\"i\" :position=\"layout[i]\" />\n\u003C/Merged>\n",[513,1132,1133,1186,1191],{"__ignoreMap":547},[551,1134,1135,1137,1139,1142,1145,1147,1149,1152,1155,1158,1161,1163,1166,1168,1171,1173,1175,1177,1180,1182,1184],{"class":553,"line":554},[551,1136,558],{"class":557},[551,1138,77],{"class":561},[551,1140,1141],{"class":557}," :",[551,1143,1144],{"class":565},"meshes",[551,1146,572],{"class":557},[551,1148,575],{"class":557},[551,1150,1151],{"class":557},"{",[551,1153,1154],{"class":561}," Screw",[551,1156,1157],{"class":557},":",[551,1159,1160],{"class":597}," nodes",[551,1162,524],{"class":557},[551,1164,1165],{"class":597},"Screw",[551,1167,876],{"class":557},[551,1169,1170],{"class":561}," Bolt",[551,1172,1157],{"class":557},[551,1174,1160],{"class":597},[551,1176,524],{"class":557},[551,1178,1179],{"class":597},"Bolt ",[551,1181,923],{"class":557},[551,1183,575],{"class":557},[551,1185,584],{"class":557},[551,1187,1188],{"class":553,"line":587},[551,1189,1190],{"class":597},"  \u003CMachine v-for=\"i in 20\" :key=\"i\" :position=\"layout[i]\" />\n",[551,1192,1193,1195,1197],{"class":553,"line":616},[551,1194,619],{"class":557},[551,1196,77],{"class":561},[551,1198,584],{"class":557},[510,1200,1201],{},"The payoff is across models, not within one: twenty machines sharing two batches is two drawcalls.",[534,1203,1205],{"id":1204},"opting-a-node-out","Opting a node out",[510,1207,1208,1209,1211,1212,1215,1216,1218],{},"An ",[513,1210,1113],{}," is all-or-nothing per node: it uses the batch's geometry and material. When one\nnode needs its own material, a different geometry, or its own shader, render a normal ",[513,1213,1214],{},"\u003CTresMesh />","\ninstead of an ",[513,1217,1113],{},". You trade one drawcall for full control over that node, and every\nother node stays batched.",[534,1220,1222],{"id":1221},"props","Props",[1224,1225,1226,1243],"table",{},[1227,1228,1229],"thead",{},[1230,1231,1232,1237,1240],"tr",{},[1233,1234,1236],"th",{"align":1235},"left","Prop",[1233,1238,1239],{"align":1235},"Description",[1233,1241,1242],{},"Default",[1244,1245,1246,1265],"tbody",{},[1230,1247,1248,1253,1259],{},[1249,1250,1251],"td",{"align":1235},[513,1252,1144],{},[1249,1254,1255,1256,1258],{"align":1235},"One batch per entry, keyed by what ",[513,1257,523],{}," joins.",[1249,1260,1261],{},[1262,1263,1264],"em",{},"required",[1230,1266,1267,1272,1281],{},[1249,1268,1269],{"align":1235},[513,1270,1271],{},"limit",[1249,1273,1274,1275,1277,1278,524],{"align":1235},"Initial buffer allocation per batch. One batch per entry in ",[513,1276,1144],{},", so it defaults lower than ",[513,1279,1280],{},"\u003CInstances />",[1249,1282,1283],{},[513,1284,1285],{},"100",[510,1287,1288,1289,524],{},"Exposes the named batch registry through ",[513,1290,1291],{},"instances",[1293,1294,1295],"read-more",{"to":66},[510,1296,1297,1298,1300,1301,524],{},"Per-instance colors, pointer events, visibility and the ",[513,1299,1271],{}," growth behaviour are documented on ",[513,1302,1280],{},[1304,1305,1306],"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 .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);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":547,"searchDepth":554,"depth":587,"links":1308},[1309,1310,1311,1312],{"id":536,"depth":587,"text":15},{"id":1117,"depth":587,"text":1118},{"id":1204,"depth":587,"text":1205},{"id":1221,"depth":587,"text":1222},"One instanced batch per mesh, shared across your whole component tree.","md",null,{},{"title":77,"description":1313},"C2ZYlA8AWc0pX47Tdp8yJPJh6JofaryewUtJVMvgXZw",[1320,1322],{"title":73,"path":74,"stem":75,"description":1321,"children":-1},"Cut out areas of the screen using the stencil buffer.",{"title":81,"path":82,"stem":83,"description":1323,"children":-1},"Create inverted-hull outlines using parent geometry.",1786965204792]