diff --git a/docs/package.md b/docs/package.md index bd2a416..ded9f7a 100644 --- a/docs/package.md +++ b/docs/package.md @@ -11,7 +11,6 @@ new Package({ assetFile: yourAssetFile, // read details after this code block assetName: 'model.gltf', // the AR asset filename, including the file extension assetParam: { - isValid: true, // whether the scale/size parameters are correct or not (if you don't know what this is, set to true) scale: 1.0, // scale of the asset size: { // sizes of the asset, unused width: 1.0, @@ -88,7 +87,6 @@ const package = new Package({ assetFile: base64Asset, assetName: file.name, assetParam: { - isValid: true, scale: 1.0 }, markerPatt: textPatt diff --git a/src/modules/package/Package.js b/src/modules/package/Package.js index c72f927..bf9fb1f 100644 --- a/src/modules/package/Package.js +++ b/src/modules/package/Package.js @@ -23,13 +23,11 @@ export const PACKAGE_GITHUB = 'github'; /** * @typedef AssetParam - * @property {boolean} isValid * @property {Number} scale * @property {{width: Number, height: Number, depth: Number}} size * @property {Array<{latitude: Number, longitude: Number}>} locations - an array of latitude/longitude locations, for location based AR */ const defaultAssetParam = { - isValid: true, scale: 1.0, size: { width: 1.0, @@ -56,11 +54,7 @@ export class Package { this.assetFile = config.assetFile; this.assetName = config.assetName; this.assetParam = config.assetParam || defaultAssetParam; - - if (!this.assetParam.isValid) { - throw new Error('Asset parameters are not valid'); - } - + this.config = config; }