更新打包配置,完善组件入参模式,新增事件总线
This commit is contained in:
@@ -5,6 +5,7 @@ import { Viewer } from './Viewer';
|
||||
import { PMREMGenerator3 } from './PMREMGenerator2';
|
||||
import type { PhysicalMaterialRecord, TextureTableRecord } from 'webcad_ue4_api';
|
||||
import { MaterialEditorCameraControl } from './MaterialMouseControl';
|
||||
import { GetConfig } from '../lib/libOutputConfig';
|
||||
|
||||
async function textureRenderUpdate(textureRecord:TextureTableRecord){
|
||||
const texture = textureRecord['texture'] as Texture;
|
||||
@@ -81,11 +82,6 @@ export class MaterialEditor extends Singleton
|
||||
this.Viewer.UpdateRender();
|
||||
this.Viewer.Fov = 90;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Canvas.appendChild(document);
|
||||
}
|
||||
|
||||
}
|
||||
SetViewer(canvas: HTMLElement)
|
||||
{
|
||||
@@ -119,8 +115,8 @@ export class MaterialEditor extends Singleton
|
||||
|
||||
return new Promise(async (res, rej) =>
|
||||
{
|
||||
let urls = ['right.webp', 'left.webp', 'top.webp', 'bottom.webp', 'front.webp', 'back.webp'];
|
||||
new CubeTextureLoader().setPath('./')
|
||||
let urls = [...GetConfig().envTextureSrc];
|
||||
new CubeTextureLoader()
|
||||
.load(urls, (t) =>
|
||||
{
|
||||
t.encoding = sRGBEncoding;
|
||||
@@ -148,8 +144,8 @@ export class MaterialEditor extends Singleton
|
||||
|
||||
this.exrPromise = new Promise<Texture>((res, rej) =>
|
||||
{
|
||||
let urls = ['right-gray.webp', 'left-gray.webp', 'top-gray.webp', 'bottom-gray.webp', 'front-gray.webp', 'back-gray.webp'];
|
||||
new CubeTextureLoader().setPath('./')
|
||||
let urls = [...GetConfig().grayEnvTextureSrc];
|
||||
new CubeTextureLoader()
|
||||
.load(urls, (t) =>
|
||||
{
|
||||
t.encoding = sRGBEncoding;
|
||||
|
Reference in New Issue
Block a user