change LoadOptions & SkinViewerOptions to interface
This commit is contained in:
parent
798a111ade
commit
a5a70d13c7
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue