|
@@ -0,0 +1,23 @@
|
|
|
+import VectorType from '../enum/VectorType.js'
|
|
|
+import Geometry from './Geometry'
|
|
|
+
|
|
|
+export default class Image extends Geometry {
|
|
|
+ constructor(src,vectorId, floor) {
|
|
|
+ super()
|
|
|
+ this.src = src?src:'https://4dkk.4dage.com/scene_view_data/SS-t-J49UDqjqbl/images/tiles/4k/0_skybox3.jpg';
|
|
|
+ //this.src = src;
|
|
|
+ this.image = null;
|
|
|
+ this.floor = floor?floor:0
|
|
|
+ this.geoType = VectorType.Image
|
|
|
+ this.setId(vectorId)
|
|
|
+ }
|
|
|
+
|
|
|
+ setSrc(src){
|
|
|
+ this.src = src
|
|
|
+ var img = new Image()
|
|
|
+ img.src = src;
|
|
|
+ img.crossOrigin=""
|
|
|
+ img.onload = function () {}
|
|
|
+ this.image = img;
|
|
|
+ }
|
|
|
+}
|