Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up skybox #2661

Merged
merged 40 commits into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
efcddb0
core-common
pmconne Nov 6, 2021
cd1d73a
DisplayStyle3dSettings has an Environment member.
pmconne Nov 6, 2021
2547d3c
...
pmconne Nov 6, 2021
42c2cfb
Comment out stuff to get core-frontend compiling.
pmconne Nov 6, 2021
1d3dcfd
Remove texture image provider.
pmconne Nov 7, 2021
31dd284
EnvironmentDecorations.
pmconne Nov 7, 2021
59e3f59
Load skybox; image url is just a string.
pmconne Nov 7, 2021
983a58a
Image from URL; cache sky cube textures.
pmconne Nov 7, 2021
91b34e1
Hook up decorations; move EnvironmentDecorations to separate file.
pmconne Nov 7, 2021
f6a9a6c
adjust frontend-devtools.
pmconne Nov 7, 2021
5876777
adjust backend
pmconne Nov 7, 2021
9242ff2
wheee...
pmconne Nov 7, 2021
21527f2
WIP EnvironmentEditor is bad.
pmconne Nov 7, 2021
4fef347
fix.
pmconne Nov 7, 2021
6ac400a
adjust tests.
pmconne Nov 7, 2021
95a9f1c
docs.
pmconne Nov 7, 2021
4c98d63
fix core-common tests.
pmconne Nov 7, 2021
a0b0d26
detachFromViewport must call super.
pmconne Nov 7, 2021
828dc2f
adjust core-full-stack-tests.
pmconne Nov 7, 2021
1004215
extract-api
pmconne Nov 7, 2021
d73c28f
lint
pmconne Nov 7, 2021
5647678
NextVersion.md
pmconne Nov 7, 2021
cbdad13
fix md table layout
pmconne Nov 7, 2021
339579f
fix md table layout
pmconne Nov 7, 2021
3b21b93
Merge branch 'fix-skybox-apis-and-loading' of https://github.com/iTwi…
pmconne Nov 7, 2021
b6e19cb
remove empty test file
pmconne Nov 7, 2021
818558b
extract-api...
pmconne Nov 7, 2021
75195e3
fix doc links.
pmconne Nov 7, 2021
758d07f
Merge branch 'master' into fix-skybox-apis-and-loading
pmconne Nov 7, 2021
3d40116
merge cleanup.
pmconne Nov 7, 2021
0077835
Revert "remove empty test file"
pmconne Nov 8, 2021
7765d82
WIP tests.
pmconne Nov 8, 2021
39dbee1
tests
pmconne Nov 8, 2021
8bcecf4
tests.
pmconne Nov 8, 2021
d4726e3
Finish tests.
pmconne Nov 8, 2021
561ea25
lint, api
pmconne Nov 8, 2021
f4cb968
keyins for setting sky sphere/cube.
pmconne Nov 8, 2021
f6ee750
extract-api
pmconne Nov 8, 2021
c6018f7
document constraints on sky cube images.
pmconne Nov 8, 2021
ba21cfc
clean up types used to create graphics from skybox.
pmconne Nov 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 136 additions & 26 deletions common/api/core-common.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2068,9 +2068,8 @@ export class DisplayStyle3dSettings extends DisplayStyleSettings {
// @internal
applyOverrides(overrides: DisplayStyle3dSettingsProps): void;
clearSunTime(): void;
// @internal (undocumented)
get environment(): EnvironmentProps;
set environment(environment: EnvironmentProps);
get environment(): Environment;
set environment(environment: Environment);
getPlanProjectionSettings(modelId: Id64String): PlanProjectionSettings | undefined;
get hiddenLineSettings(): HiddenLine.Settings;
set hiddenLineSettings(hline: HiddenLine.Settings);
Expand All @@ -2087,6 +2086,8 @@ export class DisplayStyle3dSettings extends DisplayStyleSettings {
get sunTime(): number | undefined;
get thematic(): ThematicDisplay;
set thematic(thematic: ThematicDisplay);
toggleGroundPlane(display?: boolean): void;
toggleSkyBox(display?: boolean): void;
// @internal (undocumented)
toJSON(): DisplayStyle3dSettingsProps;
// @internal (undocumented)
Expand Down Expand Up @@ -2193,7 +2194,7 @@ export class DisplayStyleSettings {
readonly onBackgroundColorChanged: BeEvent<(newColor: ColorDef) => void>;
readonly onBackgroundMapChanged: BeEvent<(newMap: BackgroundMapSettings) => void>;
readonly onClipStyleChanged: BeEvent<(newStyle: ClipStyle) => void>;
readonly onEnvironmentChanged: BeEvent<(newProps: Readonly<EnvironmentProps>) => void>;
readonly onEnvironmentChanged: BeEvent<(newEnv: Readonly<Environment>) => void>;
readonly onExcludedElementsChanged: BeEvent<() => void>;
readonly onHiddenLineSettingsChanged: BeEvent<(newSettings: HiddenLine.Settings) => void>;
readonly onLightsChanged: BeEvent<(newLights: LightSettings) => void>;
Expand Down Expand Up @@ -2816,11 +2817,30 @@ export interface EntityQueryParams {
where?: string;
}

// @public
export class Environment {
protected constructor(props?: Partial<EnvironmentProperties>);
clone(changedProps?: Partial<EnvironmentProperties>): Environment;
static create(props?: Partial<EnvironmentProperties>): Environment;
static readonly defaults: Environment;
readonly displayGround: boolean;
readonly displaySky: boolean;
static fromJSON(props?: EnvironmentProps): Environment;
readonly ground: GroundPlane;
readonly sky: SkyBox;
toJSON(): EnvironmentProps;
withDisplay(display: {
sky?: boolean;
ground?: boolean;
}): Environment;
}

// @public
export type EnvironmentProperties = NonFunctionPropertiesOf<Environment>;

// @public
export interface EnvironmentProps {
// (undocumented)
ground?: GroundPlaneProps;
// (undocumented)
sky?: SkyBoxProps;
}

Expand Down Expand Up @@ -4016,17 +4036,20 @@ export enum GridOrientationType {

// @public
export class GroundPlane {
constructor(ground?: GroundPlaneProps);
aboveColor: ColorDef;
belowColor: ColorDef;
display: boolean;
elevation: number;
// @internal
getGroundPlaneGradient(aboveGround: boolean): Gradient.Symb;
// (undocumented)
toJSON(): GroundPlaneProps;
protected constructor(props: Partial<GroundPlaneProperties>);
readonly aboveColor: ColorDef;
readonly belowColor: ColorDef;
clone(changedProps?: Partial<GroundPlaneProperties>): GroundPlane;
static create(props?: Partial<GroundPlaneProperties>): GroundPlane;
static readonly defaults: GroundPlane;
readonly elevation: number;
static fromJSON(props?: GroundPlaneProps): GroundPlane;
toJSON(display?: boolean): GroundPlaneProps;
}

// @public
export type GroundPlaneProperties = NonFunctionPropertiesOf<GroundPlane>;

// @public
export interface GroundPlaneProps {
aboveColor?: ColorDefProps;
Expand Down Expand Up @@ -7983,18 +8006,29 @@ export class SilhouetteEdgeArgs extends EdgeArgs {
}

// @public
export interface SkyBoxImageProps {
texture?: Id64String;
textures?: SkyCubeProps;
type?: SkyBoxImageType;
export class SkyBox {
protected constructor(gradient: SkyGradient);
static createGradient(gradient?: SkyGradient): SkyBox;
static readonly defaults: SkyBox;
static fromJSON(props?: SkyBoxProps): SkyBox;
readonly gradient: SkyGradient;
// @internal (undocumented)
get textureIds(): Iterable<Id64String>;
toJSON(display?: boolean): SkyBoxProps;
}

// @public
export type SkyBoxImageProps = SkySphereImageProps | SkyCubeImageProps | {
type?: SkyBoxImageType;
texture?: never;
textures?: never;
};

// @public
export enum SkyBoxImageType {
Cube = 3,
// @internal
Cylindrical = 2,
// (undocumented)
None = 0,
Spherical = 1
}
Expand All @@ -8012,14 +8046,87 @@ export interface SkyBoxProps {
zenithColor?: ColorDefProps;
}

// @public
export class SkyCube extends SkyBox {
constructor(images: SkyCubeProps, gradient?: SkyGradient);
readonly images: SkyCubeProps;
// @internal (undocumented)
get textureIds(): Iterable<Id64String>;
// @internal
toJSON(display?: boolean): SkyBoxProps;
}

// @public
export interface SkyCubeImageProps {
// @internal (undocumented)
texture?: never;
// (undocumented)
textures: SkyCubeProps;
// (undocumented)
type: SkyBoxImageType.Cube;
}

// @public
export interface SkyCubeProps {
back?: Id64String;
bottom?: Id64String;
front?: Id64String;
left?: Id64String;
right?: Id64String;
top?: Id64String;
// (undocumented)
back: TextureImageSpec;
// (undocumented)
bottom: TextureImageSpec;
// (undocumented)
front: TextureImageSpec;
// (undocumented)
left: TextureImageSpec;
// (undocumented)
right: TextureImageSpec;
// (undocumented)
top: TextureImageSpec;
}

// @public
export class SkyGradient {
clone(changedProps: SkyGradientProperties): SkyGradient;
static create(props?: Partial<SkyGradientProperties>): SkyGradient;
static readonly defaults: SkyGradient;
equals(other: SkyGradient): boolean;
static fromJSON(props?: SkyBoxProps): SkyGradient;
// (undocumented)
readonly groundColor: ColorDef;
// (undocumented)
readonly groundExponent: number;
// (undocumented)
readonly nadirColor: ColorDef;
// (undocumented)
readonly skyColor: ColorDef;
// (undocumented)
readonly skyExponent: number;
toJSON(): SkyBoxProps;
// (undocumented)
readonly twoColor: boolean;
// (undocumented)
readonly zenithColor: ColorDef;
}

// @public
export type SkyGradientProperties = NonFunctionPropertiesOf<SkyGradient>;

// @public
export class SkySphere extends SkyBox {
constructor(image: TextureImageSpec, gradient?: SkyGradient);
readonly image: TextureImageSpec;
// @internal (undocumented)
get textureIds(): Iterable<Id64String>;
// @internal
toJSON(display?: boolean): SkyBoxProps;
}

// @public
export interface SkySphereImageProps {
// (undocumented)
texture: TextureImageSpec;
// @internal (undocumented)
textures?: never;
// (undocumented)
type: SkyBoxImageType.Spherical;
}

// @internal
Expand Down Expand Up @@ -8459,6 +8566,9 @@ export interface TextureData {
width: number;
}

// @public
export type TextureImageSpec = Id64String | string;

// @public
export interface TextureLoadProps {
maxTextureSize?: number;
Expand Down
Loading