Skip to content

Commit

Permalink
remove lottie-web dependency (#4132)
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish authored Feb 16, 2023
1 parent 84f3b19 commit fc61c5d
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 60 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 9 additions & 16 deletions packages/model-viewer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions packages/model-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-polyfill": "^3.0.0",
"rollup-plugin-terser": "^7.0.2",
"typescript": "4.8.4",
"lottie-web": "5.9.6"
"typescript": "4.8.4"
},
"publishConfig": {
"access": "public"
}
}
}
7 changes: 4 additions & 3 deletions packages/model-viewer/src/features/scene-graph/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {AnimationItem} from 'lottie-web';

import {AlphaMode, MagFilter, MinFilter, WrapMode} from '../../three-components/gltf-instance/gltf-2.0.js';

Expand Down Expand Up @@ -324,9 +323,11 @@ export declare interface Image {
readonly element?: HTMLVideoElement|HTMLCanvasElement;

/**
* The Lottie animation object, if this is a Lottie texture.
* The Lottie animation object, if this is a Lottie texture. You may wish to
* do image.animation as import('lottie-web').AnimationItem; to get its type
* info.
*/
readonly animation?: AnimationItem;
readonly animation?: any;

/**
* A method to create an object URL of this image at the desired
Expand Down
3 changes: 1 addition & 2 deletions packages/model-viewer/src/features/scene-graph/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* limitations under the License.
*/

import type {AnimationItem} from 'lottie-web';
import {Mesh, MeshBasicMaterial, OrthographicCamera, PlaneGeometry, Scene, Texture as ThreeTexture, WebGLRenderTarget} from 'three';

import {blobCanvas} from '../../model-viewer-base.js';
Expand Down Expand Up @@ -76,7 +75,7 @@ export class Image extends ThreeDOMElement implements ImageInterface {
return;
}

get animation(): AnimationItem|undefined {
get animation(): any|undefined {
const texture = this[$threeTexture] as any;
if (texture && texture.isCanvasTexture && texture.animation) {
return texture.animation;
Expand Down
36 changes: 18 additions & 18 deletions packages/render-fidelity-tools/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions packages/space-opera/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc61c5d

Please sign in to comment.