server/src/game/physical.object.ts

26 lines
516 B
TypeScript

import { ObjectProperty } from 'src/types/property.decorator';
import { Color } from 'three';
import { GameObject3D } from './game-object';
export class PhysicalObject extends GameObject3D {
private texturePath?: string;
@ObjectProperty()
public color = new Color(0xffffff);
@ObjectProperty()
public transparency = 0;
@ObjectProperty()
get texture() {
return this.texturePath;
}
set texture(path: string | undefined) {
this.texturePath = path;
}
constructor() {
super();
}
}