polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
68 lines (67 loc) • 3.73 kB
TypeScript
/**
* Creates a THREE.Scene.
*
* @remarks
* By default, all objects created will be added under the same master scene. This is enough in most cases, but there might be times where you want to use a custom one. For instance:
*
* - you would like to change the background color or the environment.
* - you would like to have a fog.
* - You may also use multiple scenes, if you want to switch from one to the other.
*
* For those situtation, you can parent the objects under a scene node, and set your camera scene parameter to point to it. The camera will then render this scene instead of the master one.
*
*
*/
import { TypedObjNode } from './_Base';
import { Scene } from 'three/src/scenes/Scene';
import { Fog } from 'three/src/scenes/Fog';
import { FogExp2 } from 'three/src/scenes/FogExp2';
import { HierarchyController } from './utils/HierarchyController';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
declare class SceneObjParamConfig extends NodeParamsConfig {
/** @param autoUpdate */
autoUpdate: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param set background mode (none, color or texture) */
backgroundMode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>;
/** @param background color */
bgColor: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.COLOR>;
/** @param background texture */
bgTexture: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.OPERATOR_PATH>;
/** @param toggle on to use an environment map */
useEnvironment: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param environment map */
environment: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.OPERATOR_PATH>;
/** @param toggle on to use fog */
useFog: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param fog type */
fogType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>;
/** @param fog color */
fogColor: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.COLOR>;
/** @param fog near */
fogNear: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>;
/** @param fog far */
fogFar: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>;
/** @param fog density */
fogDensity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>;
/** @param toggle on to override all materials */
useOverrideMaterial: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param material */
overrideMaterial: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.OPERATOR_PATH>;
}
export declare class SceneObjNode extends TypedObjNode<Scene, SceneObjParamConfig> {
params_config: SceneObjParamConfig;
static type(): Readonly<'scene'>;
readonly hierarchy_controller: HierarchyController;
private _fog;
private _fog_exp2;
create_object(): Scene;
initializeNode(): void;
cook(): void;
private _update_background;
private _update_fog;
get fog(): Fog;
get fog_exp2(): FogExp2;
private _update_enviromment;
private _update_material_override;
}
export {};