playcanvas
Version:
PlayCanvas WebGL game engine
79 lines (78 loc) • 1.99 kB
TypeScript
/**
* @import { Scene } from '../scene.js'
*/
/**
* Implementation of the sky.
*
* @category Graphics
*/
export class Sky {
/**
* Constructs a new sky.
*
* @param {Scene} scene - The scene owning the sky.
* @ignore
*/
constructor(scene: Scene);
/**
* The type of the sky. One of the SKYMESH_* constants.
*
* @type {string}
* @private
*/
private _type;
/**
* The center of the sky.
*
* @type {Vec3}
* @private
*/
private _center;
/**
* The sky mesh of the scene.
*
* @type {SkyMesh|null}
* @ignore
*/
skyMesh: SkyMesh | null;
/**
* A graph node with a transform used to render the sky mesh. Adjust the position, rotation and
* scale of this node to orient the sky mesh. Ignored for {@link SKYTYPE_INFINITE}.
*
* @type {GraphNode}
* @readonly
*/
readonly node: GraphNode;
device: import("../../index.js").GraphicsDevice;
scene: Scene;
/**
* The center of the sky. Ignored for {@link SKYTYPE_INFINITE}. Typically only the y-coordinate
* is used, representing the tripod height. Defaults to (0, 1, 0).
*
* @type {Vec3}
*/
set center(value: Vec3);
get center(): Vec3;
centerArray: Float32Array<ArrayBuffer>;
projectedSkydomeCenterId: import("../../index.js").ScopeId;
applySettings(render: any): void;
/**
* The type of the sky. One of the SKYMESH_* constants. Defaults to {@link SKYTYPE_INFINITE}.
* Can be:
*
* - {@link SKYTYPE_INFINITE}
* - {@link SKYTYPE_BOX}
* - {@link SKYTYPE_DOME}
*
* @type {string}
*/
set type(value: string);
get type(): string;
updateSkyMesh(): void;
resetSkyMesh(): void;
update(): void;
}
import { SkyMesh } from './sky-mesh.js';
import { GraphNode } from '../graph-node.js';
import type { Scene } from '../scene.js';
import { Vec3 } from '../../core/math/vec3.js';