[{"data":1,"prerenderedAt":1674},["ShallowReactive",2],{"navigation":3,"/api/loaders/use-gltf":490,"/api/loaders/use-gltf-surround":1669},[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":125,"body":492,"description":1663,"extension":1664,"links":1665,"meta":1666,"navigation":601,"path":126,"seo":1667,"stem":127,"__hash__":1668},"docs/2.api/3.loaders/1.use-gltf.md",{"type":493,"value":494,"toc":1655},"minimark",[495,501,510,514,974,992,1072,1076,1223,1227,1300,1304,1307,1403,1406,1410,1427,1591,1601,1605,1614,1645,1651],[496,497,498],"scene-wrapper",{},[499,500],"loaders-gltf",{},[502,503,504,505,509],"p",{},"A composable that allows you to easily load glb/glTF models into your ",[506,507,508],"strong",{},"TresJS"," scene.",[511,512,15],"h2",{"id":513},"usage",[515,516,517,724],"code-group",{},[518,519,528],"pre",{"className":520,"code":521,"filename":522,"highlights":523,"language":526,"meta":527,"style":527},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nimport { useGLTF } from '@tresjs/cientos'\n\nconst path = './blender-cube.glb'\nconst { state, nodes, materials } = useGLTF(path)\n\u003C/script>\n\n\u003Ctemplate>\n  \u003Cprimitive v-if=\"state\" :object=\"state?.scene\" />\n\u003C/template>\n","TheModel.vue",[524,525],2,5,"vue","",[529,530,531,566,596,603,621,654,664,669,679,715],"code",{"__ignoreMap":527},[532,533,536,540,544,548,551,554,557,561,563],"span",{"class":534,"line":535},"line",1,[532,537,539],{"class":538},"sMK4o","\u003C",[532,541,543],{"class":542},"swJcz","script",[532,545,547],{"class":546},"spNyl"," setup",[532,549,550],{"class":546}," lang",[532,552,553],{"class":538},"=",[532,555,556],{"class":538},"\"",[532,558,560],{"class":559},"sfazB","ts",[532,562,556],{"class":538},[532,564,565],{"class":538},">\n",[532,567,570,574,577,581,584,587,590,593],{"class":568,"line":524},[534,569],"highlight",[532,571,573],{"class":572},"s7zQu","import",[532,575,576],{"class":538}," {",[532,578,580],{"class":579},"sTEyZ"," useGLTF",[532,582,583],{"class":538}," }",[532,585,586],{"class":572}," from",[532,588,589],{"class":538}," '",[532,591,592],{"class":559},"@tresjs/cientos",[532,594,595],{"class":538},"'\n",[532,597,599],{"class":534,"line":598},3,[532,600,602],{"emptyLinePlaceholder":601},true,"\n",[532,604,606,609,612,614,616,619],{"class":534,"line":605},4,[532,607,608],{"class":546},"const",[532,610,611],{"class":579}," path ",[532,613,553],{"class":538},[532,615,589],{"class":538},[532,617,618],{"class":559},"./blender-cube.glb",[532,620,595],{"class":538},[532,622,624,626,628,631,634,637,639,642,645,648,651],{"class":623,"line":525},[534,569],[532,625,608],{"class":546},[532,627,576],{"class":538},[532,629,630],{"class":579}," state",[532,632,633],{"class":538},",",[532,635,636],{"class":579}," nodes",[532,638,633],{"class":538},[532,640,641],{"class":579}," materials ",[532,643,644],{"class":538},"}",[532,646,647],{"class":538}," =",[532,649,580],{"class":650},"s2Zo4",[532,652,653],{"class":579},"(path)\n",[532,655,657,660,662],{"class":534,"line":656},6,[532,658,659],{"class":538},"\u003C/",[532,661,543],{"class":542},[532,663,565],{"class":538},[532,665,667],{"class":534,"line":666},7,[532,668,602],{"emptyLinePlaceholder":601},[532,670,672,674,677],{"class":534,"line":671},8,[532,673,539],{"class":538},[532,675,676],{"class":542},"template",[532,678,565],{"class":538},[532,680,682,685,688,691,693,695,698,700,703,705,707,710,712],{"class":534,"line":681},9,[532,683,684],{"class":538},"  \u003C",[532,686,687],{"class":542},"primitive",[532,689,690],{"class":546}," v-if",[532,692,553],{"class":538},[532,694,556],{"class":538},[532,696,697],{"class":559},"state",[532,699,556],{"class":538},[532,701,702],{"class":546}," :object",[532,704,553],{"class":538},[532,706,556],{"class":538},[532,708,709],{"class":559},"state?.scene",[532,711,556],{"class":538},[532,713,714],{"class":538}," />\n",[532,716,718,720,722],{"class":534,"line":717},10,[532,719,659],{"class":538},[532,721,676],{"class":542},[532,723,565],{"class":538},[518,725,728],{"className":520,"code":726,"filename":727,"language":526,"meta":527,"style":527},"\u003Cscript setup lang=\"ts\">\nimport { OrbitControls } from '@tresjs/cientos'\nimport { TresCanvas } from '@tresjs/core'\nimport TheModel from './TheModel.vue'\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CTresCanvas clear-color=\"#F78B3D\">\n    \u003CTresPerspectiveCamera :position=\"[3, 2, 5]\" />\n    \u003COrbitControls />\n    \u003CTheModel />\n    \u003CTresDirectionalLight\n      :intensity=\"2\"\n      :position=\"[3, 3, 3]\"\n    />\n    \u003CTresAmbientLight :intensity=\"1\" />\n  \u003C/TresCanvas>\n\u003C/template>\n","app.vue",[529,729,730,750,769,789,806,814,818,826,847,869,878,888,896,912,927,933,955,965],{"__ignoreMap":527},[532,731,732,734,736,738,740,742,744,746,748],{"class":534,"line":535},[532,733,539],{"class":538},[532,735,543],{"class":542},[532,737,547],{"class":546},[532,739,550],{"class":546},[532,741,553],{"class":538},[532,743,556],{"class":538},[532,745,560],{"class":559},[532,747,556],{"class":538},[532,749,565],{"class":538},[532,751,752,754,756,759,761,763,765,767],{"class":534,"line":524},[532,753,573],{"class":572},[532,755,576],{"class":538},[532,757,758],{"class":579}," OrbitControls",[532,760,583],{"class":538},[532,762,586],{"class":572},[532,764,589],{"class":538},[532,766,592],{"class":559},[532,768,595],{"class":538},[532,770,771,773,775,778,780,782,784,787],{"class":534,"line":598},[532,772,573],{"class":572},[532,774,576],{"class":538},[532,776,777],{"class":579}," TresCanvas",[532,779,583],{"class":538},[532,781,586],{"class":572},[532,783,589],{"class":538},[532,785,786],{"class":559},"@tresjs/core",[532,788,595],{"class":538},[532,790,791,793,796,799,801,804],{"class":534,"line":605},[532,792,573],{"class":572},[532,794,795],{"class":579}," TheModel ",[532,797,798],{"class":572},"from",[532,800,589],{"class":538},[532,802,803],{"class":559},"./TheModel.vue",[532,805,595],{"class":538},[532,807,808,810,812],{"class":534,"line":525},[532,809,659],{"class":538},[532,811,543],{"class":542},[532,813,565],{"class":538},[532,815,816],{"class":534,"line":656},[532,817,602],{"emptyLinePlaceholder":601},[532,819,820,822,824],{"class":534,"line":666},[532,821,539],{"class":538},[532,823,676],{"class":542},[532,825,565],{"class":538},[532,827,828,830,833,836,838,840,843,845],{"class":534,"line":671},[532,829,684],{"class":538},[532,831,832],{"class":542},"TresCanvas",[532,834,835],{"class":546}," clear-color",[532,837,553],{"class":538},[532,839,556],{"class":538},[532,841,842],{"class":559},"#F78B3D",[532,844,556],{"class":538},[532,846,565],{"class":538},[532,848,849,852,855,858,860,862,865,867],{"class":534,"line":681},[532,850,851],{"class":538},"    \u003C",[532,853,854],{"class":542},"TresPerspectiveCamera",[532,856,857],{"class":546}," :position",[532,859,553],{"class":538},[532,861,556],{"class":538},[532,863,864],{"class":559},"[3, 2, 5]",[532,866,556],{"class":538},[532,868,714],{"class":538},[532,870,871,873,876],{"class":534,"line":717},[532,872,851],{"class":538},[532,874,875],{"class":542},"OrbitControls",[532,877,714],{"class":538},[532,879,881,883,886],{"class":534,"line":880},11,[532,882,851],{"class":538},[532,884,885],{"class":542},"TheModel",[532,887,714],{"class":538},[532,889,891,893],{"class":534,"line":890},12,[532,892,851],{"class":538},[532,894,895],{"class":542},"TresDirectionalLight\n",[532,897,899,902,904,906,909],{"class":534,"line":898},13,[532,900,901],{"class":546},"      :intensity",[532,903,553],{"class":538},[532,905,556],{"class":538},[532,907,908],{"class":559},"2",[532,910,911],{"class":538},"\"\n",[532,913,915,918,920,922,925],{"class":534,"line":914},14,[532,916,917],{"class":546},"      :position",[532,919,553],{"class":538},[532,921,556],{"class":538},[532,923,924],{"class":559},"[3, 3, 3]",[532,926,911],{"class":538},[532,928,930],{"class":534,"line":929},15,[532,931,932],{"class":538},"    />\n",[532,934,936,938,941,944,946,948,951,953],{"class":534,"line":935},16,[532,937,851],{"class":538},[532,939,940],{"class":542},"TresAmbientLight",[532,942,943],{"class":546}," :intensity",[532,945,553],{"class":538},[532,947,556],{"class":538},[532,949,950],{"class":559},"1",[532,952,556],{"class":538},[532,954,714],{"class":538},[532,956,958,961,963],{"class":534,"line":957},17,[532,959,960],{"class":538},"  \u003C/",[532,962,832],{"class":542},[532,964,565],{"class":538},[532,966,968,970,972],{"class":534,"line":967},18,[532,969,659],{"class":538},[532,971,676],{"class":542},[532,973,565],{"class":538},[502,975,976,977,979,980,983,984,991],{},"An advantage of using ",[529,978,125],{}," is that you can pass a ",[529,981,982],{},"draco"," prop to enable ",[985,986,990],"a",{"href":987,"rel":988},"https://threejs.org/docs/index.html?q=drac#examples/en/loaders/DRACOLoader",[989],"nofollow","Draco compression"," for the model. This will reduce the size of the model and improve performance.",[518,993,996],{"className":994,"code":995,"language":560,"meta":527,"style":527},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { useGLTF } from '@tresjs/cientos'\n\nconst { state, nodes, materials } = useGLTF('/models/AkuAku.gltf', { draco: true })\n",[529,997,998,1016,1020],{"__ignoreMap":527},[532,999,1000,1002,1004,1006,1008,1010,1012,1014],{"class":534,"line":535},[532,1001,573],{"class":572},[532,1003,576],{"class":538},[532,1005,580],{"class":579},[532,1007,583],{"class":538},[532,1009,586],{"class":572},[532,1011,589],{"class":538},[532,1013,592],{"class":559},[532,1015,595],{"class":538},[532,1017,1018],{"class":534,"line":524},[532,1019,602],{"emptyLinePlaceholder":601},[532,1021,1022,1024,1026,1028,1030,1032,1034,1036,1038,1040,1042,1045,1048,1051,1053,1055,1057,1060,1063,1067,1069],{"class":534,"line":598},[532,1023,608],{"class":546},[532,1025,576],{"class":538},[532,1027,630],{"class":579},[532,1029,633],{"class":538},[532,1031,636],{"class":579},[532,1033,633],{"class":538},[532,1035,641],{"class":579},[532,1037,644],{"class":538},[532,1039,647],{"class":538},[532,1041,580],{"class":650},[532,1043,1044],{"class":579},"(",[532,1046,1047],{"class":538},"'",[532,1049,1050],{"class":559},"/models/AkuAku.gltf",[532,1052,1047],{"class":538},[532,1054,633],{"class":538},[532,1056,576],{"class":538},[532,1058,1059],{"class":542}," draco",[532,1061,1062],{"class":538},":",[532,1064,1066],{"class":1065},"sfNiH"," true",[532,1068,583],{"class":538},[532,1070,1071],{"class":579},")\n",[511,1073,1075],{"id":1074},"return-values","Return Values",[1077,1078,1079,1096],"table",{},[1080,1081,1082],"thead",{},[1083,1084,1085,1090,1093],"tr",{},[1086,1087,1089],"th",{"align":1088},"left","Name",[1086,1091,1092],{},"Type",[1086,1094,1095],{},"Description",[1097,1098,1099,1118,1133,1148,1163,1178,1193,1208],"tbody",{},[1083,1100,1101,1106,1111],{},[1102,1103,1104],"td",{"align":1088},[506,1105,697],{},[1102,1107,1108],{},[529,1109,1110],{},"Ref\u003CGLTF | null>",[1102,1112,1113,1114,1117],{},"The loaded GLTF, or ",[529,1115,1116],{},"null"," until it arrives",[1083,1119,1120,1125,1130],{},[1102,1121,1122],{"align":1088},[506,1123,1124],{},"nodes",[1102,1126,1127],{},[529,1128,1129],{},"ComputedRef\u003CTNodes>",[1102,1131,1132],{},"All nodes in the scene, keyed by name",[1083,1134,1135,1140,1145],{},[1102,1136,1137],{"align":1088},[506,1138,1139],{},"materials",[1102,1141,1142],{},[529,1143,1144],{},"ComputedRef\u003CTMaterials>",[1102,1146,1147],{},"All materials in the scene, keyed by name",[1083,1149,1150,1155,1160],{},[1102,1151,1152],{"align":1088},[506,1153,1154],{},"isLoading",[1102,1156,1157],{},[529,1158,1159],{},"Ref\u003Cboolean>",[1102,1161,1162],{},"Whether the model is currently loading",[1083,1164,1165,1170,1175],{},[1102,1166,1167],{"align":1088},[506,1168,1169],{},"error",[1102,1171,1172],{},[529,1173,1174],{},"Ref\u003Cunknown>",[1102,1176,1177],{},"Whatever the loader threw, if anything",[1083,1179,1180,1185,1190],{},[1102,1181,1182],{"align":1088},[506,1183,1184],{},"progress",[1102,1186,1187],{},[529,1188,1189],{},"{ loaded: number, total: number, percentage: number }",[1102,1191,1192],{},"Progress of the current load",[1083,1194,1195,1200,1205],{},[1102,1196,1197],{"align":1088},[506,1198,1199],{},"load",[1102,1201,1202],{},[529,1203,1204],{},"(path: string) => void",[1102,1206,1207],{},"Load a different model into the same state",[1083,1209,1210,1215,1220],{},[1102,1211,1212],{"align":1088},[506,1213,1214],{},"execute",[1102,1216,1217],{},[529,1218,1219],{},"(delay?: number) => Promise\u003CGLTF>",[1102,1221,1222],{},"Re-run the load",[511,1224,1226],{"id":1225},"options","Options",[1077,1228,1229,1242],{},[1080,1230,1231],{},[1083,1232,1233,1235,1237,1240],{},[1086,1234,1089],{"align":1088},[1086,1236,1092],{},[1086,1238,1239],{},"Default",[1086,1241,1095],{},[1097,1243,1244,1263,1283],{},[1083,1245,1246,1250,1255,1260],{},[1102,1247,1248],{"align":1088},[506,1249,982],{},[1102,1251,1252],{},[529,1253,1254],{},"boolean",[1102,1256,1257],{},[529,1258,1259],{},"false",[1102,1261,1262],{},"Whether to enable Draco compression.",[1083,1264,1265,1270,1275,1280],{},[1102,1266,1267],{"align":1088},[506,1268,1269],{},"decoderPath",[1102,1271,1272],{},[529,1273,1274],{},"string",[1102,1276,1277],{},[529,1278,1279],{},"'https://www.gstatic.com/draco/versioned/decoders/1.5.6/'",[1102,1281,1282],{},"Path to the Draco decoder.",[1083,1284,1285,1290,1295,1297],{},[1102,1286,1287],{"align":1088},[506,1288,1289],{},"traverse",[1102,1291,1292],{},[529,1293,1294],{},"Function",[1102,1296],{},[1102,1298,1299],{},"A traverse function applied to the scene upon loading the model.",[511,1301,1303],{"id":1302},"accessing-nodes-and-materials","Accessing Nodes and Materials",[502,1305,1306],{},"The composable provides computed properties to easily access nodes and materials in your scene:",[518,1308,1310],{"className":994,"code":1309,"language":560,"meta":527,"style":527},"const { nodes, materials } = useGLTF('/model.glb')\n\n// Access a specific node\nconst mesh = nodes.value.MeshName\n\n// Access a specific material\nconst material = materials.value.MaterialName\n",[529,1311,1312,1341,1345,1351,1373,1377,1382],{"__ignoreMap":527},[532,1313,1314,1316,1318,1320,1322,1324,1326,1328,1330,1332,1334,1337,1339],{"class":534,"line":535},[532,1315,608],{"class":546},[532,1317,576],{"class":538},[532,1319,636],{"class":579},[532,1321,633],{"class":538},[532,1323,641],{"class":579},[532,1325,644],{"class":538},[532,1327,647],{"class":538},[532,1329,580],{"class":650},[532,1331,1044],{"class":579},[532,1333,1047],{"class":538},[532,1335,1336],{"class":559},"/model.glb",[532,1338,1047],{"class":538},[532,1340,1071],{"class":579},[532,1342,1343],{"class":534,"line":524},[532,1344,602],{"emptyLinePlaceholder":601},[532,1346,1347],{"class":534,"line":598},[532,1348,1350],{"class":1349},"sHwdD","// Access a specific node\n",[532,1352,1353,1355,1358,1360,1362,1365,1368,1370],{"class":534,"line":605},[532,1354,608],{"class":546},[532,1356,1357],{"class":579}," mesh ",[532,1359,553],{"class":538},[532,1361,636],{"class":579},[532,1363,1364],{"class":538},".",[532,1366,1367],{"class":579},"value",[532,1369,1364],{"class":538},[532,1371,1372],{"class":579},"MeshName\n",[532,1374,1375],{"class":534,"line":525},[532,1376,602],{"emptyLinePlaceholder":601},[532,1378,1379],{"class":534,"line":656},[532,1380,1381],{"class":1349},"// Access a specific material\n",[532,1383,1384,1386,1389,1391,1394,1396,1398,1400],{"class":534,"line":666},[532,1385,608],{"class":546},[532,1387,1388],{"class":579}," material ",[532,1390,553],{"class":538},[532,1392,1393],{"class":579}," materials",[532,1395,1364],{"class":538},[532,1397,1367],{"class":579},[532,1399,1364],{"class":538},[532,1401,1402],{"class":579},"MaterialName\n",[502,1404,1405],{},"This makes it easier to manipulate specific parts of your model or apply materials programmatically.",[511,1407,1409],{"id":1408},"typing-nodes-and-materials","Typing Nodes and Materials",[502,1411,1412,1413,1415,1416,1418,1419,1422,1423,1426],{},"The keys of ",[529,1414,1124],{}," and ",[529,1417,1139],{}," come from the file, so by default both are a loose record and\n",[529,1420,1421],{},"nodes.value.Body"," is an ",[529,1424,1425],{},"any",". Pass the shape of your model as generics to get them typed:",[518,1428,1430],{"className":994,"code":1429,"language":560,"meta":527,"style":527},"import type { Mesh, MeshStandardMaterial } from 'three'\nimport { useGLTF } from '@tresjs/cientos'\n\ninterface ModelNodes { Body: Mesh }\ninterface ModelMaterials { Skin: MeshStandardMaterial }\n\nconst { nodes, materials } = useGLTF\u003CModelNodes, ModelMaterials>('/models/robot.glb')\n\nnodes.value.Body.geometry // Mesh, not any\n",[529,1431,1432,1460,1478,1482,1503,1521,1525,1566,1570],{"__ignoreMap":527},[532,1433,1434,1436,1439,1441,1444,1446,1449,1451,1453,1455,1458],{"class":534,"line":535},[532,1435,573],{"class":572},[532,1437,1438],{"class":572}," type",[532,1440,576],{"class":538},[532,1442,1443],{"class":579}," Mesh",[532,1445,633],{"class":538},[532,1447,1448],{"class":579}," MeshStandardMaterial",[532,1450,583],{"class":538},[532,1452,586],{"class":572},[532,1454,589],{"class":538},[532,1456,1457],{"class":559},"three",[532,1459,595],{"class":538},[532,1461,1462,1464,1466,1468,1470,1472,1474,1476],{"class":534,"line":524},[532,1463,573],{"class":572},[532,1465,576],{"class":538},[532,1467,580],{"class":579},[532,1469,583],{"class":538},[532,1471,586],{"class":572},[532,1473,589],{"class":538},[532,1475,592],{"class":559},[532,1477,595],{"class":538},[532,1479,1480],{"class":534,"line":598},[532,1481,602],{"emptyLinePlaceholder":601},[532,1483,1484,1487,1491,1493,1496,1498,1500],{"class":534,"line":605},[532,1485,1486],{"class":546},"interface",[532,1488,1490],{"class":1489},"sBMFI"," ModelNodes",[532,1492,576],{"class":538},[532,1494,1495],{"class":542}," Body",[532,1497,1062],{"class":538},[532,1499,1443],{"class":1489},[532,1501,1502],{"class":538}," }\n",[532,1504,1505,1507,1510,1512,1515,1517,1519],{"class":534,"line":525},[532,1506,1486],{"class":546},[532,1508,1509],{"class":1489}," ModelMaterials",[532,1511,576],{"class":538},[532,1513,1514],{"class":542}," Skin",[532,1516,1062],{"class":538},[532,1518,1448],{"class":1489},[532,1520,1502],{"class":538},[532,1522,1523],{"class":534,"line":656},[532,1524,602],{"emptyLinePlaceholder":601},[532,1526,1527,1529,1531,1533,1535,1537,1539,1541,1543,1545,1548,1550,1552,1555,1557,1559,1562,1564],{"class":534,"line":666},[532,1528,608],{"class":546},[532,1530,576],{"class":538},[532,1532,636],{"class":579},[532,1534,633],{"class":538},[532,1536,641],{"class":579},[532,1538,644],{"class":538},[532,1540,647],{"class":538},[532,1542,580],{"class":650},[532,1544,539],{"class":538},[532,1546,1547],{"class":1489},"ModelNodes",[532,1549,633],{"class":538},[532,1551,1509],{"class":1489},[532,1553,1554],{"class":538},">",[532,1556,1044],{"class":579},[532,1558,1047],{"class":538},[532,1560,1561],{"class":559},"/models/robot.glb",[532,1563,1047],{"class":538},[532,1565,1071],{"class":579},[532,1567,1568],{"class":534,"line":671},[532,1569,602],{"emptyLinePlaceholder":601},[532,1571,1572,1574,1576,1578,1580,1583,1585,1588],{"class":534,"line":681},[532,1573,1124],{"class":579},[532,1575,1364],{"class":538},[532,1577,1367],{"class":579},[532,1579,1364],{"class":538},[532,1581,1582],{"class":579},"Body",[532,1584,1364],{"class":538},[532,1586,1587],{"class":579},"geometry ",[532,1589,1590],{"class":1349},"// Mesh, not any\n",[1592,1593,1594],"prose-note",{},[502,1595,1596,1597,1600],{},"These interfaces are a claim about the model, not a proof: nothing checks them against the file at\nruntime. ",[529,1598,1599],{},"tres gltf"," reads them off the model and writes them for you, which is the only version\nof this that cannot drift.",[511,1602,1604],{"id":1603},"generating-a-component-instead","Generating a Component Instead",[502,1606,1607,1608,1613],{},"For a whole model, writing an element per node by hand does not scale. The\n",[985,1609,1612],{"href":1610,"rel":1611},"https://docs.tresjs.org/cli/gltf",[989],"TresJS CLI"," generates that component from the model itself,\ntyped, with a slot for every node so your overrides survive the next export:",[518,1615,1619],{"className":1616,"code":1617,"language":1618,"meta":527,"style":527},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx @tresjs/cli gltf public/models/robot.glb\n# ✔ src/models/Robot.gen.vue\n#   3 slots: Head, Body, Base\n","bash",[529,1620,1621,1635,1640],{"__ignoreMap":527},[532,1622,1623,1626,1629,1632],{"class":534,"line":535},[532,1624,1625],{"class":1489},"npx",[532,1627,1628],{"class":559}," @tresjs/cli",[532,1630,1631],{"class":559}," gltf",[532,1633,1634],{"class":559}," public/models/robot.glb\n",[532,1636,1637],{"class":534,"line":524},[532,1638,1639],{"class":1349},"# ✔ src/models/Robot.gen.vue\n",[532,1641,1642],{"class":534,"line":598},[532,1643,1644],{"class":1349},"#   3 slots: Head, Body, Base\n",[1646,1647,1648],"read-more",{"to":20},[502,1649,1650],{},"The three ways to load a model, and when to reach for each one.",[1652,1653,1654],"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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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 pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":527,"searchDepth":535,"depth":524,"links":1656},[1657,1658,1659,1660,1661,1662],{"id":513,"depth":524,"text":15},{"id":1074,"depth":524,"text":1075},{"id":1225,"depth":524,"text":1226},{"id":1302,"depth":524,"text":1303},{"id":1408,"depth":524,"text":1409},{"id":1603,"depth":524,"text":1604},"A composable to load GLTF models in TresJS scenes.","md",null,{},{"title":125,"description":1663},"mVv2TZo5-pqLqIwJ-gYXHQx7OoCZ9HEO3CnPATpAwMA",[1670,1672],{"title":119,"path":120,"stem":121,"description":1671,"children":-1},"Asset loading composables for TresJS scenes.",{"title":129,"path":130,"stem":131,"description":1673,"children":-1},"A component based on useGLTF to load models in TresJS scenes.",1785417270587]