mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
add HemisphereLight
This commit is contained in:
parent
57faa3a4b6
commit
c476728322
16
src/lights/HemisphereLight.js
Normal file
16
src/lights/HemisphereLight.js
Normal file
@ -0,0 +1,16 @@
|
||||
import { HemisphereLight } from 'three';
|
||||
import Light from './Light.js';
|
||||
import { bindProp } from '../tools.js';
|
||||
|
||||
export default {
|
||||
extends: Light,
|
||||
props: {
|
||||
groundColor: { type: String, default: '#ffffff' },
|
||||
},
|
||||
created() {
|
||||
this.light = new HemisphereLight(this.color, this.groundColor, this.intensity);
|
||||
bindProp(this, 'groundColor', this.light);
|
||||
this.initLight();
|
||||
},
|
||||
__hmrId: 'HemisphereLight',
|
||||
};
|
@ -1,5 +1,6 @@
|
||||
export { default as AmbientLight } from './AmbientLight.js';
|
||||
export { default as DirectionalLight } from './DirectionalLight.js';
|
||||
export { default as HemisphereLight } from './HemisphereLight.js';
|
||||
export { default as PointLight } from './PointLight.js';
|
||||
export { default as RectAreaLight } from './RectAreaLight.js';
|
||||
export { default as SpotLight } from './SpotLight.js';
|
||||
|
@ -29,6 +29,7 @@ export const TroisJSVuePlugin = {
|
||||
|
||||
'AmbientLight',
|
||||
'DirectionalLight',
|
||||
'HemisphereLight',
|
||||
'PointLight',
|
||||
'RectAreaLight',
|
||||
'SpotLight',
|
||||
|
Loading…
Reference in New Issue
Block a user