instanced-mesh

Examples

Here are some examples of what can be done using A-Frame Instanced Mesh…

1000 x 12-part GLTF models in a single scene, rendered with just 14 draw calls - View Example

image-20221205162651198

An example showing Instanced Mesh in combination with A-Frame animation component, shadows, an environment map, and mirrors - View Example

image-20221205162817201

Example showing raycasting, member coloring & member deletion - View Example

image-20221206143328870

An example showing Instancing + Physics, using either the Ammo driver or Cannon driver from aframe-physics-system

image-20221206125351164

For examples of A-Frame Instanced Mesh in production, see our Showcase

Tests of individual features

A wide range of examples have been developed to test individual features. To some extent these are in place of Unit Tests (which we don’t have yet, but will hopefully add at some point).

They may also be useful as examples to show how to use the various options.

Basic examples…

Basic Example (Blocks)

Basic Example (Spheres)

Basic Example (different colored blocks - one mesh per color)

3D Models

Specific capabilities of the component…

Adding and Removing Objects

Movement

Frustum Culling

Multiple Layers

Non-visible elements

Positioning (handling diverse frames of reference)

Positioning, with “auto” update mode

Different Scale Attributes

Scaling capabilities of instanced meshes…

Adding and Removing Objects at High Scale

Rotation at High Scale

Rotation at High Scale, with “auto” update mode

Capacity Updates

Examples with Multi-mesh GLTF models

3D Models Multi-mesh

Movement Multi-mesh

Add & Remove Multi-mesh

Capacity Updates Multi-mesh

Examples with Textures and other shader maps

Flat textures

PBR (normal, displacement, ambient occlusion)

Env-Map

Raycasting & Physics

Raycasting

Physics w/ Ammo Driver

Physics w/ Cannon Driver

Per-member coloring

Multi-color spheres

Different colored blocks in a single Instanced Mesh

Multi-color PBR