ShadowSettings.re.ts 448 B

12345678910111213141516171819202122
  1. import * as RE from 'rogue-engine';
  2. import * as THREE from 'three';
  3. export default class ShadowSettings extends RE.Component {
  4. private _normalBias = 0;
  5. get shadow() {
  6. return this.object3d["shadow"];
  7. }
  8. @RE.props.num()
  9. get normalBias() {
  10. return this._normalBias;
  11. }
  12. set normalBias(value: number) {
  13. this._normalBias = value;
  14. if (this.shadow) this.shadow.normalBias = value;
  15. }
  16. }
  17. RE.registerComponent(ShadowSettings);