@zappar/mattercraft-farm-plugin
v0.3.1
Published
Farm plugin for building Mattercraft projects
Readme
@zappar/mattercraft-farm-plugin
A Farm plugin for building Mattercraft projects outside of the Mattercraft editor. Useful for integrating Mattercraft content into your own Farm-based apps or CI/CD pipelines.
Mattercraft is a browser-based 3D content development environment for building interactive AR, VR, WebXR and 3D web experiences. Built on Three.js, it lets you create and publish rich 3D content with a visual editor and seamless scripting.
Installation
npm install @zappar/mattercraft-farm-pluginSetup
Add the plugin to your Farm config:
import { defineConfig } from '@farmfe/core';
import mattercraft from '@zappar/mattercraft-farm-plugin';
export default defineConfig({
plugins: [mattercraft()],
compilation: {
input: {
index: './index.html',
},
output: {
path: 'dist',
},
script: {
target: 'esnext',
},
presetEnv: false,
},
});That's it. Farm will now handle Mattercraft project files automatically.
Note: presetEnv: false is required to prevent Farm from injecting core-js polyfills that conflict with Mattercraft's dependencies.
Requirements
- Farm 1 or later
- Node 24 or later
License
Proprietary - Zappar Limited
