change LoadOptions & SkinViewerOptions to interface

This commit is contained in:
Haowei Wen 2020-09-16 22:39:42 +08:00
parent 798a111ade
commit a5a70d13c7
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export class FXAASkinViewer extends SkinViewer {
* Note: FXAA doesn't work well with transparent backgrounds. * Note: FXAA doesn't work well with transparent backgrounds.
* It's recommended to use an opaque background and set `options.alpha` to false. * It's recommended to use an opaque background and set `options.alpha` to false.
*/ */
constructor(options: SkinViewerOptions = {}) { constructor(options?: SkinViewerOptions) {
super(options); super(options);
this.composer = new EffectComposer(this.renderer); this.composer = new EffectComposer(this.renderer);
this.renderPass = new RenderPass(this.scene, this.camera); this.renderPass = new RenderPass(this.scene, this.camera);

View File

@ -3,14 +3,14 @@ import { NearestFilter, PerspectiveCamera, Scene, Texture, Vector2, WebGLRendere
import { RootAnimation } from "./animation.js"; import { RootAnimation } from "./animation.js";
import { PlayerObject } from "./model.js"; import { PlayerObject } from "./model.js";
export type LoadOptions = { export interface LoadOptions {
/** /**
* Whether to make the object visible after the texture is loaded. Default is true. * Whether to make the object visible after the texture is loaded. Default is true.
*/ */
makeVisible?: boolean; makeVisible?: boolean;
} }
export type SkinViewerOptions = { export interface SkinViewerOptions {
width?: number; width?: number;
height?: number; height?: number;
skin?: RemoteImage | TextureSource; skin?: RemoteImage | TextureSource;