---
title: "PixiJS 3D Model: Separate Viewer vs Shared Canvas Guide"
description: "Decide when a PixiJS 3D model belongs in a standalone viewer or a shared canvas. Test labels, depth occlusion, bent 2D charts, hit testing, and export paths."
lang: "en"
canonical: "https://cohub.live/guides/pixijs-3d-models"
image: "https://cohub.live/_seo/covers/pixijs-3d-models/og.webp"
updated: "2026-12-02"
---

# When to render a PixiJS 3D model on a shared canvas instead of a separate viewer

Turn the buoy on the dial. The orange tag follows its wind sensor; the grey tag stays on the box. Which one does your 2D editor need? A box label can live outside the viewer. A sensor label needs a position from inside the model.

- **Who:** Frontend engineers adding a model to an existing PixiJS editor or chart.
- **When:** A GLB already opens in a viewer, but the design also shows annotations on the canvas around it.
- **Why:** The two tags on the same buoy let you check where the boundary between viewer and editor belongs.

![An orange buoy with a lattice mast stands in a channel cut through layers of cream and gray-green paper.](https://cohub.live/_seo/covers/pixijs-3d-models/hero.webp)

![Viewer canvas handed to a Pixi texture, compared with a stage renderer branching into card and object modes.](https://cohub.live/_seo/covers/pixijs-3d-models/flow-en.svg)

Previously the viewer drew into its own canvas and Pixi updated the texture on each viewer repaint. The Board now supplies the renderer: a card keeps its own model view, while an object puts its geometry in the Board depth scene.

Keep a PixiJS 3D model inside a standalone viewer box whenever users only orbit, zoom, and pick inside that rectangle—or when an outer tooltip just needs projected screen coordinates. Move the model onto a shared PixiJS renderer and depth scene only when 2D canvas items must pass behind parts of the model, resolve mutual occlusion, or tilt with the whole board. Two live Cohub Board examples below—a buoy turntable and a folding sea chart—let you test where that line sits.

## Test the boundary with two labels on one buoy

[Open the buoy turntable](https://cohub.live/bangwu/northwind-coastal-instruments/w/buoy-turntable) and drag the dark jog strip beneath the dial. Watch the orange tag track the tip of the wind sensor arm while the grey tag stays fixed at the box edge. Each label solves a different job: one names the outer container, and the other pins directly to a moving part.

![NW-06 on a tilted dial, with an orange tag beside the mast, a grey tag at the box edge and a separate model card on the left](https://cohub.live/_seo/img/pixijs-3d-models/buoy-turntable-desktop-1440-tilted-pitch32-v59.webp)

Desktop: drag the strip right, then click Tilt camera. The Board camera tilts the whole board into perspective; the buoy stands above the dial.

If your editor only promises "inspect this asset," hand the viewer a rectangle and let it own orbit, zoom, and part labels internally. Even if the editor owns an external tooltip, exporting the sensor's projected position from the viewer is cheaper than unifying renderers. The flat-rectangle boundary breaks once another 2D canvas element must pass *between the buoy and its sensor arm*—a rendered bitmap gives the editor no depth information to decide which pixels belong in front.

## Trace one frame across three rendering paths

| Mode | Where the model draws | Camera & depth behavior |
|---|---|---|
| Previous interactive card | Separate Three.js canvas handed back via `context.present(target)` | Pixi wraps the canvas in an `ImageSource` and texture once, then runs `source.update()` and redraws on later callbacks. The stage only receives a flat picture (this neither creates a new texture per repaint nor implies CPU pixel readback). |
| Built-in model card | Reuses the Pixi stage renderer with 3D support enabled and inserts the card scene's `view` into the card display tree | Removes the per-repaint canvas handoff while keeping the card's own isolated model camera—orbiting inside the rectangle does not turn surrounding board items. |
| Dial object (`display: "object"`) | Attaches the model root directly to the Board depth scene | Raised Board surfaces and model geometry occlude one another. Sharing a renderer is enough for a card; sharing depth requires placing geometry in the depth scene. |

## Deform a 2D sea chart without building a GLB

[Open Folding Sea Charts](https://cohub.live/bangwu/northwind-coastal-instruments/w/folding-sea-charts), start in Flat, and select Wave. Follow any contour line to the paper edge: the stroke curves with the sheet. Switching to Tilt view shifts your vantage point and reveals the cast shadow, whereas Cloth and Curl change the paper deformation itself.

![Northwind Sound depth contours on a rippled sheet above a dark dotted field; Wave is selected in the dock](https://cohub.live/_seo/img/pixijs-3d-models/folding-sea-charts-wave-tilt-desktop-1440-r2.webp)

The chart opens in Flat. Click Wave, then Tilt view: Wave bends the paper, and the tilted view reveals its shadow.

There is no 3D chart GLB behind this effect. Board renders the ordinary 2D frame and its contents into a texture, maps that texture onto a subdivided mesh, and moves vertices with bend functions. Station labels and depth contours stay anchored to their UV texture coordinates, so they bend smoothly with the sheet. Cloth is strictly a vertex deformation—it runs neither fabric physics nor collision simulation. To read the reverse legend, reopen the chart in Flat and click **Turn over**, which displays a separate back face independent of Wave.

## Separate node anchors, clip sampling, and camera control

On the turntable, the orange tag binds with `"attach": {"item": "obj", "node": "sensor_wind"}`. Here `obj` is the buoy item on the dial and `sensor_wind` is a named node inside its glTF hierarchy. Board reads the node's world **position** and converts it into Board coordinates without inheriting the node's rotation or scale. If you maintain separate renderers, design the same contract: emit projected anchor coordinates after both the model pose and camera update, rather than guessing a fixed offset from the viewer's corner.

![Portrait turntable with the tagged buoy above a jog strip, scrub bar and Level camera control](https://cohub.live/_seo/img/pixijs-3d-models/buoy-turntable-mobile-390-tilted-v59.webp)

Phone: swipe the jog strip right, then tap Tilt camera below the scrub bar. The whole board tilts with the camera. Tap Level camera to return overhead.

Keep the three motion controls distinct:
- **Heading:** dragging the jog strip rotates the buoy itself.
- **Board perspective:** **Tilt camera** changes the Board's `pitch`, while `bearing` sets the horizontal viewing direction around the board center.
- **Animation pose:** pausing and dragging the scrub bar picks a frame from the buoy's `swell` clip. Clips can advance on the Board timeline or sample an exact millisecond via `props.model.time`. For annotated playback, always sample the pose first, then read the node position for that timestamp.

During viewing or playback, a Board script can direct perspective with `ctx.present("camera", …)`. Keep camera ownership explicit so interactive panning can take over while editing returns to a flat working view, and test card-internal orbit separately from tilting the whole board.

## Four checks before retiring a standalone viewer

- **Test production formats and covers.** Board accepts GLB, glTF, and STL; keep a viewer or conversion step if you must preview OBJ files as-is. A glTF referencing external buffers or textures can render and produce a still, yet Board does not store a persistent reusable cover for it—choose self-contained GLB when reliable covers matter. Never treat a visible cover image as proof that the interactive model has loaded.
- **Verify hit testing separately from occlusion.** On a bent surface, a pointer ray intersects the mesh and maps its UV coordinates back to the 2D item. On a model object, Board approximates hits using a projected outline and center depth. Click through the empty gap under the sensor arm and across two overlapping objects before promising per-part picking.
- **Check the actual export backend.** Browser WebGL export can reuse the Board renderer and assemble an export scene at the sampled time—objects keep their geometry while model cards export as stills. Pure Node/canvas falls back to a cover or placeholder and cannot follow a live joint. CLI export may invoke a browser depending on backend, and a standalone viewer runs its own application, so never infer export or cover output from interactive card behavior.
- **Measure frame times in your real scene.** Architecture trade-offs depend on workload. The official [PixiJS Bunny Mark](https://pixijs.io/bunny-mark/) ([Bunny Mark README](https://github.com/pixijs/bunny-mark)) exists to sanity-check Pixi releases and branches—it neither reflects editor workloads nor compares these two Board paths. Replay the exact same drag and scrub gesture with fixed assets, device, browser, and viewport, keeping cold model load separate from post-load frame-time traces.

## Verify the behavior in both playable Boards

1. [Turn the NW-06 buoy](https://cohub.live/bangwu/northwind-coastal-instruments/w/buoy-turntable): drag the strip right, compare how the orange sensor tag tracks the mast while the grey tag stays on the box, then toggle **Tilt camera** and **Level camera**.
2. [Fold the sea chart](https://cohub.live/bangwu/northwind-coastal-instruments/w/folding-sea-charts): start in **Flat**, select **Wave**, **Tilt view**, and **Top view** (the sheet stays bent overhead), then reopen in Flat and click **Turn over** to inspect the back legend.

![Portrait chart with its front face visible, Wave highlighted and Top view available below the paper](https://cohub.live/_seo/img/pixijs-3d-models/folding-sea-charts-wave-tilt-mobile-390-r2.webp)

Phone: starting in Flat, tap Wave and then Tilt view. Tap Top view to return overhead with Wave still selected.

Both links open live playable Boards rather than pre-recorded video. All gestures above were verified in signed-out desktop and 390-pixel-wide browser viewports; a narrow desktop browser view does not replace physical-device testing.

## Reference in the docs

**This page:** Which parts of a 2D editor need to know about a model, from the first visible frame to the exported image.

- [Apps](https://cohub.live/docs/create/apps): how a Board file becomes a playable App
- [CLI](https://cohub.live/docs/developers/cli): Board commands for inspecting a document and exporting it

## Related

- [How to publish a running app from an AI sandbox as a live link](https://cohub.live/use-cases/publish-app-from-ai-sandbox): To publish a running app from an AI sandbox in Cohub, run one CLI command, or use the Publish dialog, to point an App at the port your dev server listens on; static output can go out as a folder or a single HTML file instead.
- [What changed in Cohub in November 2026](https://cohub.live/updates/november-2026): Releases v2.89 to v2.103 (November 2–17, 2026) gave your Spaces, Apps and scheduled prompts one Library, moved Space links to your username, added Chat archiving and read aloud, let one Chat wait for another Space's answer, opened Board Apps in play mode, and brought 3D models and video editing to Boards.

## Sources

- [Cohub docs: CLI (Boards: get, attach, animation, export)](https://cohub.live/docs/developers/cli)

Updated Dec 2, 2026
