iv-3d-lib
Version:
A reusable ThreeJS library providing features for Ivee 3D Editor.
34 lines (26 loc) • 794 B
text/typescript
import * as THREE from 'three';
import { WglUtil } from './wgl-util';
import { SimpleDictionary } from './models/simple-dictionary';
import { Timeline } from './models/timeline';
import { DataModel } from './models/data-model';
import { ITimelinePlugin } from './i-timeline-plugin';
export class SkyBoxPlugin implements ITimelinePlugin {
config: SimpleDictionary<any>;
timeline: Timeline;
data: DataModel;
w: WglUtil;
mainGroup: THREE.Group;
init() {
}
load() {
this.addSkyBox();
}
update(time?: number) {
}
private addSkyBox() {
let cfg = {
srcFile: this.config['srcFile'], size: this.config['size']
};
this.w.addSkyBoxFromFile(cfg, this.mainGroup);
}
}