THREE.JS / FOUNDATIONS 192

Touch the field.

Follow the official XR marching-cubes loop: controller pivots become normalized field points, selectstart deposits more points, and reset() → addBall() → update() rebuilds one organic surface.

Initializing Preparing renderer

Preparing WebGLRenderer, MarchingCubes field, controller pivots, and XR session entry point...

mode
-
controllers
-
selecting
-
points
-
resolution
-
vertices
-
updates
-
events
-
draws
-
frames
-
Desktop controller harnesssame XR gestures

Connect a virtual controller, selectstart to deposit a trail of field points, then selectend to stop adding points.

Event sequencewaiting
No controller events yet.
left / right selecting-
field point modelnormalized 0…1
surface pipelineidle

The log records controller lifecycle and field-rebuild actions.

MarchingCubes contractaddon boundary
new MarchingCubes(resolution, material, ...)allocate field
reset()clear scalar field
addBall(x, y, z, strength, subtract)deposit metaball
update()polygonize surface
count / geometry.drawRangeread generated vertices

Controller world positions are transformed into the normalized field domain before each ball is added. The desktop trail is bounded so repeated testing cannot grow without limit.

Capability boundaryprobing
WebXR API-
immersive VR-
XRButton-
reference space-

Desktop simulation verifies controller-to-field mapping and dynamic geometry; physical controller pose, XR frame timing, and device performance still require a headset.

This study follows the official WebGLRenderer example. Use the XR button for a real session; desktop controller paths are explicitly simulated.

THREE.JS FOUNDATIONS LAB