Replicad Examples
Replicad model reference with runtime setup and source samples.
A Replicad model is a TypeScript module whose default export returns a shape:
export const modelCode = `
import { makeBaseBox } from 'replicad';
export default () => makeBaseBox(30, 20, 10).fillet(2);
`;This setup renders such models with the replicad kernel:
STATIC REFERENCE
Replicad runtime setup
Live model previews are being moved to this standalone site. The runtime setup remains available here without requiring WebGPU.
import { createRuntimeClient } from '@taucad/runtime';
import { defineRuntime } from '@taucad/runtime/worker';
import { inProcessTransport } from '@taucad/runtime/transport/in-process';
import { fromMemoryFs } from '@taucad/runtime/filesystem';
import { replicad } from '@taucad/replicad';
import { esbuild } from '@taucad/esbuild';
const runtime = defineRuntime({ plugins: [replicad(), esbuild()] });
const client = createRuntimeClient({
runtime,
transport: inProcessTransport({ runtime, fileSystem: fromMemoryFs() }),
});Related
- Quick Start -- Render your first model with Replicad
- Choose a Kernel -- Compare Replicad with other kernels
- API: Kernels -- Replicad factory function and options