Skip to content

Commit

Permalink
- fix: remove parameter assetParam.isValid
Browse files Browse the repository at this point in the history
  • Loading branch information
le0m committed Jun 3, 2020
1 parent 627236e commit bef9cad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions docs/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -88,7 +87,6 @@ const package = new Package({
assetFile: base64Asset,
assetName: file.name,
assetParam: {
isValid: true,
scale: 1.0
},
markerPatt: textPatt
Expand Down
8 changes: 1 addition & 7 deletions src/modules/package/Package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}

Expand Down

0 comments on commit bef9cad

Please sign in to comment.