24 lines
566 B
JavaScript
24 lines
566 B
JavaScript
class TestPlane extends Entity {
|
|
constructor() {
|
|
super();
|
|
|
|
this.position = this.add(POSITION);
|
|
this.position.setLocalPosition(-10.0, 0.0, -10.0);
|
|
this.position.setLocalScale(20.0, 1.0, 20.0);
|
|
|
|
this.physics = this.add(PHYSICS);
|
|
this.physics.setBodyType(PHYSICS_BODY_STATIC);
|
|
this.physics.setShape(PHYSICS_SHAPE_PLANE, 0.0, 1.0, 0.0, 0.0);
|
|
|
|
this.renderable = this.add(RENDERABLE);
|
|
this.renderable.setMesh(0, MESH_PLANE);
|
|
this.renderable.setColor(128, 128, 128, 255);
|
|
}
|
|
|
|
dispose() {
|
|
|
|
}
|
|
}
|
|
|
|
module.exports = TestPlane;
|