11/* eslint-disable @typescript-eslint/no-namespace */
22import * as BABYLON from "@babylonjs/core" ;
33import { Base } from "./base-inputs" ;
4- import { SkyMaterial } from "@babylonjs/materials" ;
4+ import * as MATERIALS from "@babylonjs/materials" ;
55
66// tslint:disable-next-line: no-namespace
77export namespace BabylonMaterial {
@@ -97,14 +97,14 @@ export namespace BabylonMaterial {
9797 material : BABYLON . PBRMetallicRoughnessMaterial ;
9898 }
9999 export class SkyMaterialPropDto {
100- constructor ( skyMaterial ?: SkyMaterial ) {
100+ constructor ( skyMaterial ?: MATERIALS . SkyMaterial ) {
101101 if ( skyMaterial !== undefined ) { this . skyMaterial = skyMaterial ; }
102102 }
103103 /**
104104 * Material to investigate
105105 * @default undefined
106106 */
107- skyMaterial : SkyMaterial ;
107+ skyMaterial : MATERIALS . SkyMaterial ;
108108 }
109109 export class MetallicDto {
110110 constructor ( material ?: BABYLON . PBRMetallicRoughnessMaterial , metallic ?: number ) {
@@ -312,15 +312,15 @@ export namespace BabylonMaterial {
312312 dithering = false ;
313313 }
314314 export class LuminanceDto {
315- constructor ( material ?: SkyMaterial , luminance ?: number ) {
315+ constructor ( material ?: MATERIALS . SkyMaterial , luminance ?: number ) {
316316 if ( material !== undefined ) { this . material = material ; }
317317 if ( luminance !== undefined ) { this . luminance = luminance ; }
318318 }
319319 /**
320320 * Material to update
321321 * @default undefined
322322 */
323- material : SkyMaterial ;
323+ material : MATERIALS . SkyMaterial ;
324324 /**
325325 * Defines the overall luminance of sky in interval ]0, 1[.
326326 * @default 1
@@ -331,15 +331,15 @@ export namespace BabylonMaterial {
331331 luminance ?: number ;
332332 }
333333 export class TurbidityDto {
334- constructor ( material ?: SkyMaterial , turbidity ?: number ) {
334+ constructor ( material ?: MATERIALS . SkyMaterial , turbidity ?: number ) {
335335 if ( material !== undefined ) { this . material = material ; }
336336 if ( turbidity !== undefined ) { this . turbidity = turbidity ; }
337337 }
338338 /**
339339 * Material to update
340340 * @default undefined
341341 */
342- material : SkyMaterial ;
342+ material : MATERIALS . SkyMaterial ;
343343 /**
344344 * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
345345 * @default 10
@@ -350,15 +350,15 @@ export namespace BabylonMaterial {
350350 turbidity ?: number ;
351351 }
352352 export class RayleighDto {
353- constructor ( material ?: SkyMaterial , rayleigh ?: number ) {
353+ constructor ( material ?: MATERIALS . SkyMaterial , rayleigh ?: number ) {
354354 if ( material !== undefined ) { this . material = material ; }
355355 if ( rayleigh !== undefined ) { this . rayleigh = rayleigh ; }
356356 }
357357 /**
358358 * Material to update
359359 * @default undefined
360360 */
361- material : SkyMaterial ;
361+ material : MATERIALS . SkyMaterial ;
362362 /**
363363 * Defines the sky appearance (light intensity).
364364 * @default 2
@@ -369,15 +369,15 @@ export namespace BabylonMaterial {
369369 rayleigh ?: number ;
370370 }
371371 export class MieCoefficientDto {
372- constructor ( material ?: SkyMaterial , mieCoefficient ?: number ) {
372+ constructor ( material ?: MATERIALS . SkyMaterial , mieCoefficient ?: number ) {
373373 if ( material !== undefined ) { this . material = material ; }
374374 if ( mieCoefficient !== undefined ) { this . mieCoefficient = mieCoefficient ; }
375375 }
376376 /**
377377 * Material to update
378378 * @default undefined
379379 */
380- material : SkyMaterial ;
380+ material : MATERIALS . SkyMaterial ;
381381 /**
382382 * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
383383 * @default 0.005
@@ -388,15 +388,15 @@ export namespace BabylonMaterial {
388388 mieCoefficient ?: number ;
389389 }
390390 export class MieDirectionalGDto {
391- constructor ( material ?: SkyMaterial , mieDirectionalG ?: number ) {
391+ constructor ( material ?: MATERIALS . SkyMaterial , mieDirectionalG ?: number ) {
392392 if ( material !== undefined ) { this . material = material ; }
393393 if ( mieDirectionalG !== undefined ) { this . mieDirectionalG = mieDirectionalG ; }
394394 }
395395 /**
396396 * Material to update
397397 * @default undefined
398398 */
399- material : SkyMaterial ;
399+ material : MATERIALS . SkyMaterial ;
400400 /**
401401 * Defines the amount of haze particles following the Mie scattering theory.
402402 * @default 0.8
@@ -407,15 +407,15 @@ export namespace BabylonMaterial {
407407 mieDirectionalG ?: number ;
408408 }
409409 export class DistanceDto {
410- constructor ( material ?: SkyMaterial , distance ?: number ) {
410+ constructor ( material ?: MATERIALS . SkyMaterial , distance ?: number ) {
411411 if ( material !== undefined ) { this . material = material ; }
412412 if ( distance !== undefined ) { this . distance = distance ; }
413413 }
414414 /**
415415 * Material to update
416416 * @default undefined
417417 */
418- material : SkyMaterial ;
418+ material : MATERIALS . SkyMaterial ;
419419 /**
420420 * Defines the distance of the sun according to the active scene camera.
421421 * @default 500
@@ -426,15 +426,15 @@ export namespace BabylonMaterial {
426426 distance ?: number ;
427427 }
428428 export class InclinationDto {
429- constructor ( material ?: SkyMaterial , inclination ?: number ) {
429+ constructor ( material ?: MATERIALS . SkyMaterial , inclination ?: number ) {
430430 if ( material !== undefined ) { this . material = material ; }
431431 if ( inclination !== undefined ) { this . inclination = inclination ; }
432432 }
433433 /**
434434 * Material to update
435435 * @default undefined
436436 */
437- material : SkyMaterial ;
437+ material : MATERIALS . SkyMaterial ;
438438 /**
439439 * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
440440 * "inclined".
@@ -446,15 +446,15 @@ export namespace BabylonMaterial {
446446 inclination ?: number ;
447447 }
448448 export class AzimuthDto {
449- constructor ( material ?: SkyMaterial , azimuth ?: number ) {
449+ constructor ( material ?: MATERIALS . SkyMaterial , azimuth ?: number ) {
450450 if ( material !== undefined ) { this . material = material ; }
451451 if ( azimuth !== undefined ) { this . azimuth = azimuth ; }
452452 }
453453 /**
454454 * Material to update
455455 * @default undefined
456456 */
457- material : SkyMaterial ;
457+ material : MATERIALS . SkyMaterial ;
458458 /**
459459 * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
460460 * an object direction and a reference direction.
@@ -466,15 +466,15 @@ export namespace BabylonMaterial {
466466 azimuth ?: number ;
467467 }
468468 export class SunPositionDto {
469- constructor ( material ?: SkyMaterial , sunPosition ?: Base . Vector3 ) {
469+ constructor ( material ?: MATERIALS . SkyMaterial , sunPosition ?: Base . Vector3 ) {
470470 if ( material !== undefined ) { this . material = material ; }
471471 if ( sunPosition !== undefined ) { this . sunPosition = sunPosition ; }
472472 }
473473 /**
474474 * Material to update
475475 * @default undefined
476476 */
477- material : SkyMaterial ;
477+ material : MATERIALS . SkyMaterial ;
478478 /**
479479 * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
480480 * the property is overridden by the inclination and the azimuth and can be read at any moment.
@@ -483,15 +483,15 @@ export namespace BabylonMaterial {
483483 sunPosition ?: Base . Vector3 ;
484484 }
485485 export class UseSunPositionDto {
486- constructor ( material ?: SkyMaterial , useSunPosition ?: boolean ) {
486+ constructor ( material ?: MATERIALS . SkyMaterial , useSunPosition ?: boolean ) {
487487 if ( material !== undefined ) { this . material = material ; }
488488 if ( useSunPosition !== undefined ) { this . useSunPosition = useSunPosition ; }
489489 }
490490 /**
491491 * Material to update
492492 * @default undefined
493493 */
494- material : SkyMaterial ;
494+ material : MATERIALS . SkyMaterial ;
495495 /**
496496 * Defines if the sun position should be computed (inclination and azimuth) according to the given
497497 * .sunPosition property.
@@ -500,15 +500,15 @@ export namespace BabylonMaterial {
500500 useSunPosition ?: boolean ;
501501 }
502502 export class CameraOffsetDto {
503- constructor ( material ?: SkyMaterial , cameraOffset ?: Base . Vector3 ) {
503+ constructor ( material ?: MATERIALS . SkyMaterial , cameraOffset ?: Base . Vector3 ) {
504504 if ( material !== undefined ) { this . material = material ; }
505505 if ( cameraOffset !== undefined ) { this . cameraOffset = cameraOffset ; }
506506 }
507507 /**
508508 * Material to update
509509 * @default undefined
510510 */
511- material : SkyMaterial ;
511+ material : MATERIALS . SkyMaterial ;
512512 /**
513513 * Defines an offset vector used to get a horizon offset.
514514 * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
@@ -517,31 +517,31 @@ export namespace BabylonMaterial {
517517 cameraOffset ?: Base . Vector3 ;
518518 }
519519 export class UpDto {
520- constructor ( material ?: SkyMaterial , up ?: Base . Vector3 ) {
520+ constructor ( material ?: MATERIALS . SkyMaterial , up ?: Base . Vector3 ) {
521521 if ( material !== undefined ) { this . material = material ; }
522522 if ( up !== undefined ) { this . up = up ; }
523523 }
524524 /**
525525 * Material to update
526526 * @default undefined
527527 */
528- material : SkyMaterial ;
528+ material : MATERIALS . SkyMaterial ;
529529 /**
530530 * Defines the vector the skyMaterial should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up())
531531 * @default undefined
532532 */
533533 up ?: Base . Vector3 ;
534534 }
535535 export class DitheringDto {
536- constructor ( material ?: SkyMaterial , dithering ?: boolean ) {
536+ constructor ( material ?: MATERIALS . SkyMaterial , dithering ?: boolean ) {
537537 if ( material !== undefined ) { this . material = material ; }
538538 if ( dithering !== undefined ) { this . dithering = dithering ; }
539539 }
540540 /**
541541 * Material to update
542542 * @default undefined
543543 */
544- material : SkyMaterial ;
544+ material : MATERIALS . SkyMaterial ;
545545 /**
546546 * Defines if sky should be dithered.
547547 * @default false
0 commit comments