MeshCache

View source

ExtendsMap

Provides the renderer’s mesh-to-GPU-value cache resource.

Examples

import { MeshCache } from '@wimaengine/render-webgl'

// WebglRendererPlugin installs and populates this resource.
const meshes = world.getResource(MeshCache)
const gpuMesh = meshes.get(meshHandle.id())

// The lookup can be empty until the mesh queue processes the asset event.
if (gpuMesh) gl.bindVertexArray(gpuMesh)

Constructor


constructor<T>()

View source

Type Parameters

T

Type Parameters

T

Parameters

NameDescriptionDefault
entries?——

Type Parameters

T

Type Parameters

T

Parameters

NameDescriptionDefault
iterable?——