@holotope/three
v0.0.4
Published
three.js adapter for Holotope: renders projected N-dimensional geometry as three.js objects.
Readme
@holotope/three
three.js adapter for @holotope/core:
turns explicit projections and cross-sections of N-dimensional geometry into
ordinary three.js objects.
Picking remains connected to the source through RepresentationHitN and the
representationHitFrom* adapters. Projected products return exact source-cell
identity without claiming an inverse point; affine slices return exact ambient
points; sampled and raymarched fields declare their approximation and
first-hit policies.
ProjectedEdges3D— the projected 1-skeleton asLineSegmentsProjectedSurface3D— the projected 2-faces as a translucentMeshSlicedComplex3D— the exact 4D cross-section, with per-triangle picking provenanceSampledSlicedField3D— deterministic implicit-field sampling plus an inspectable approximate meshDragRotation4D— pointer controls for rotating through hidden planes@holotope/three/webgpu—ProjectedEdgesGPU(vertex-shader 4D projection) andSlicedComplexGPU(WGSL compute-shader slicing),QuaternionJuliaGPUandBicomplexJuliaGPU(packed-point field evaluation), plusRaymarchedQuaternionJulia3DandRaymarchedBicomplexJulia3D(adaptive fragment-stage slicing) forWebGPURenderer
three (≥0.185 <0.186) is a peer dependency.
Live showcase · Repository & docs
import { PerspectiveProjection, TransformN, createHypercube, rotationFromPlanes } from '@holotope/core';
import { ProjectedEdges3D } from '@holotope/three';
const edges = new ProjectedEdges3D(
createHypercube({ dim: 4, size: 2 }),
new PerspectiveProjection({ fromDim: 4, viewDistance: 4 })
);
scene.add(edges.object);
// per frame:
edges.update(new TransformN(4, rotationFromPlanes(4, [{ i: 0, j: 3, angle: t }])));MIT © Nikolay Petrov
