dcl-scene-writer
Version:
Programmatically write DCL scenes
24 lines (23 loc) • 1.41 kB
TypeScript
import * as DCL from 'decentraland-ecs';
import { ComponentMap } from './ComponentMap';
export declare class SceneWriter {
protected entities: Map<string, DCL.Entity>;
private DCL;
private map;
constructor(dcl: any, map?: any);
addEntity(name: string, entity: DCL.Entity): void;
emitCode(): string;
protected writeEntity(entity: DCL.Entity, componentMap: ComponentMap): string;
protected stepPrologue(): string;
protected stepStartEntity(_: DCL.Entity, name: string): string;
protected stepSetEntityParent(_: DCL.Entity, name: string, parent?: DCL.IEntity): string;
protected stepWriteComponentDeclaration(entity: DCL.Entity, component: DCL.ComponentLike, componentName: string, componentCode: string): string;
protected stepSetComponentParent(_: DCL.Entity, entityName: string, componentName: string, component: any): string;
protected getConstructorName(component: DCL.ObservableComponent): string | undefined;
protected writeComponent(instanceName: string, constructorName: string, component: DCL.ObservableComponent): string;
protected getEntityName(entity: DCL.IEntity): string;
protected getConstructorValues(constructor: string, data: any): string;
protected getConstructorParameters(name: string): string[];
protected getReadOnlyProperties(name: string): string[];
protected getTransformComponentData(data: any): string;
}