mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-02-01 16:08:17 +00:00
修复使用视频当贴图bug。
This commit is contained in:
parent
52fe81661e
commit
dcfb84d38e
@ -22,6 +22,7 @@ Supported Languages: 中文 / [繁體中文](README-tw.md) / [English](README-en
|
||||
11. 修复贴图路径为blob:http://,导致加载场景,模型显示黑色bug。
|
||||
12. 服务端国际化完成。
|
||||
13. 发布新版演示程序:[GitHub](https://tengge1.github.io/ShadowEditor-examples/) [Gitee](http://tengge1.gitee.io/shadoweditor-examples/)
|
||||
14. 修复使用视频当贴图bug。
|
||||
|
||||
## v0.3.2更新
|
||||
|
||||
|
||||
@ -92,6 +92,17 @@ class TextureProperty extends React.Component {
|
||||
texture.sourceFile = name;
|
||||
onChange && onChange(texture, this.props.name, data);
|
||||
});
|
||||
} else if (type === 'video') {
|
||||
let video = document.createElement('video');
|
||||
video.setAttribute('src', data.Url);
|
||||
video.setAttribute('autoplay', 'autoplay');
|
||||
|
||||
let texture = new THREE.VideoTexture(video);
|
||||
texture.minFilter = THREE.LinearFilter;
|
||||
texture.magFilter = THREE.LinearFilter;
|
||||
texture.format = THREE.RGBFormat;
|
||||
|
||||
onChange && onChange(texture, this.props.name, data);
|
||||
} else {
|
||||
const loader = new THREE.TextureLoader();
|
||||
loader.load(url, obj => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user