mediamande / angular-three-sixty Goto Github PK
View Code? Open in Web Editor NEWAngular 360° component using the three-sixty library https://github.com/mediamanDE/three-sixty.
License: MIT License
Angular 360° component using the three-sixty library https://github.com/mediamanDE/three-sixty.
License: MIT License
Hi
I tried out the below sample code to start with a basic example.
You need to import the module in your application:
import { NgModule } from '@angular/core';
import { ThreeSixtyModule } from '@mediaman/angular-three-sixty';
@NgModule({
imports: [ThreeSixtyModule]
});
export class AppModule {
}
import { Component } from '@angular/core';
@Component({
selector: 'product-page',
template: `<mm-three-sixty [width]="1280"
[height]="720"
[angles]="36"
[anglesPerImage]="6"
[images]="threeSixtyImages"
[preload]="true"></mm-three-sixty>`
})
export class ProductPageComponent {
public threeSixtyImages: string[] = [
'/assets/360/my-image-0.jpg',
'/assets/360/my-image-1.jpg',
'/assets/360/my-image-2.jpg',
'/assets/360/my-image-3.jpg',
'/assets/360/my-image-4.jpg',
'/assets/360/my-image-5.jpg',
];
}
But I ran into the following error:
ERROR Error: "Uncaught (in promise): TypeError: this.images.forEach is not a function
./node_modules/@mediaman/three-sixty/dist/three-sixty.es5.js/ThreeSixty.prototype.preload/...
I imported the Module correctly and i am pretty sure I've done it right.
Could you fix this bug or help me if I'm doing something wrong?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.