tinyjs-plugin-mars
Version:
The Tiny.js plugin for Mars
35 lines (34 loc) • 1.34 kB
TypeScript
import { MarsContainer } from './MarsContainer';
import { MarsPlayerPlayOptions, RI } from '@alipay/mars-player';
import { MarsContainerDelegate } from './module';
import * as Tiny from '@alipay/tiny.js';
import type { WebGLState } from '@ali/mars-render-interface/dist/src/webgl/WebGLState';
import type { MarsMaterial } from '@ali/mars-render-interface/dist/src/render/MarsMaterial';
export interface MarsContainerOptions extends MarsPlayerPlayOptions {
interactive?: boolean;
fixCamera?: boolean;
blend?: boolean;
delegate?: MarsContainerDelegate;
clearDepth?: boolean;
directDowngrade: string;
}
declare class Player {
readonly containers: MarsContainer[];
readonly renderState: WebGLState;
readonly defaultMtl: MarsMaterial;
readonly gpu: RI.GPUCapability;
private mp;
private directDowngrade;
private readonly gl;
readonly renderer: Tiny.Renderer;
readonly emptyTexture: WebGLTexture;
constructor(renderer: Tiny.Renderer);
generateContainer(scene: any, opts: MarsContainerOptions): MarsContainer | undefined;
generateContainerAsync(scene: any, opts: MarsContainerOptions): Promise<MarsContainer>;
get playing(): boolean;
private player;
generateHolder(directDowngrade: any): any;
destroy(): void;
private destroyContainers;
}
export { Player };