Set Up SnapEngine Core

This direct setup is intended for interaction-tool and asset authors, or for advanced applications that need custom behavior at the engine level. Most application developers should start with SnapSort.

Installation

The SnapEngine project is split into multiple packages, so you only need to install the ones you require. SnapEngine Core is available as @snap-engine/core:

npm install @snap-engine/core

SnapEngine Core and its interaction tools are TypeScript-based, so the package includes the necessary type definitions.

Importing

Import the modules you need from the @snap-engine/core package:

import { Engine } from "@snap-engine/core";

Additional modules are available as subpath imports:

import { DebugRenderer } from "@snap-engine/core/debug";
import { AnimationObject, SequenceObject } from "@snap-engine/core/animation";
import { CollisionEngine, RectCollider, CircleCollider } from "@snap-engine/core/collision";