1.1.3 • Published 4 years ago

@digitalmasterpieces/arctic-core v1.1.3

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
4 years ago

@digitalmasterpieces/

arctic-core

npm npm License npm bundle size Libraries.io dependency status for latest release, scoped npm package Type declarations

Processes visual media using WebGL 2 and applies operations based on Visual Computing Assets.

Installing

You can install the ArcticCore using NPM or Yarn to get the latest version of our library.

npm install @digitalmasterpieces/arctic-core

For usage from a CDN we recommend using Skypack CDN. The ArcticCore package is accessable at the following URL:

https://cdn.skypack.dev/@digitalmasterpieces/arctic-core


Usage

The arctic-core package can be used directly in scripts. However it is strongly advised to use it as processing core together with the @digitalmasterpieces/web-processor package, since it gives more abstraction and therefore provides a simpler and more intuitive interface.

The following shows one possible approach to use the package in a browser script:

(async () => {
	const createCore = await import(/* webpackIgnore: true */ "/arctic-core/index.js");
	const canvas = document.createElement("canvas");
	const { WebProcessorCore, FS, GL } = await createCore.default({ canvas });

	console.log({ WebProcessorCore, FS, GL });
})();

The JavaScript "glue code" gets imported dynamically from an URL. The comment in the import statement is related to Webpack. By removing this comment Webpack would try to find the scripts as a module rather than from an URL where the file is actually served.

To serve the arctic-core module from an URL with Webpack one possible approach would be using the CopyWebpackPlugin in your webpack.config.js:

const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
	/* ... */
	plugins: [
		new CopyWebpackPlugin({
			patterns: [
				{
					from: "../../node_modules/@digitalmasterpieces/arctic-core/lib",
					to: "./arctic-core",
				},
			],
		}),
	],
	/* ... */
};

The full documentation with some usage examples is available here.

To learn more about the Stylization SDK visit our homepage at https://saas.digitalmasterpieces.com.

Get your own API key here.

Try our demo application here.

License

MIT

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago