Hey guys
I’m trying to use LottieLoader to add new things to my project.
So first I simply copy the sample code;
import { RoundedBoxGeometry } from '../../node_modules/three/examples/jsm/geometries/RoundedBoxGeometry.js';
import { LottieLoader } from '../../node_modules/three/examples/jsm/loaders/LottieLoader.js';
const Lottieloader = new LottieLoader();
Lottieloader.setQuality( 2 );
Lottieloader.load( "../models/animationLottie.json", function ( texture ) {
// setupControls( texture.animation );
// let texture = new THREE.TextureLoader().load( '../models/uv_grid_directx.jpg' );
const geometry = new RoundedBoxGeometry( 10, 10, 10, 7, 0.2 );
const material = new THREE.MeshStandardMaterial( { roughness: 0.1,map: texture } );
let mesh = new THREE.Mesh( geometry, material );
mesh.position.y = 20;
scene.add( mesh );
});
I did import necessary things.
But there is an error I can’t deal with. It said that length is undefined.
My project is based on
vue/cli 4.5.15
three 135
I will be appreciated if someone can help me!