Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
OnPointerUp
} from 'decentraland-ecs/src'
const _scene = new Entity("_scene");
engine.addEntity(_scene);
const transform = new Transform({
position: new Vector3(0, 0, 0),
rotation: new Quaternion(0, 0, 0, 1),
scale: new Vector3(1, 1, 1)
});
_scene.addComponentOrReplace(transform);
const entity = new Entity("entity");
engine.addEntity(entity);
entity.setParent(_scene);
const gltfShape = new GLTFShape(
"models/FloorBaseGrass_01/FloorBaseGrass_01.glb"
);
gltfShape.withCollisions = true;
gltfShape.visible = true;
entity.addComponentOrReplace(gltfShape);
const transform2 = new Transform({
position: new Vector3(8, 0, 8),
rotation: new Quaternion(0, 0, 0, 1),
scale: new Vector3(1, 1, 1)
});
entity.addComponentOrReplace(transform2);
const cornerStoneBrickWall = new Entity("cornerStoneBrickWall");
engine.addEntity(cornerStoneBrickWall);
cornerStoneBrickWall.setParent(_scene);
const transform3 = new Transform({
import { Entity, GLTFShape, engine, Vector3, Transform } from 'decentraland-ecs/src'
const entity = new Entity()
entity.addComponent(new GLTFShape('models/Tree_Scene.glb'))
entity.addComponent(new Transform({ position: new Vector3(8, 0, 8) }))
engine.addEntity(entity)
import { Entity, GLTFShape, engine, Vector3, Transform } from 'decentraland-ecs/src'
const entity = new Entity()
entity.addComponent(new GLTFShape('models/Tree_Scene.glb'))
entity.addComponent(new Transform({ position: new Vector3(8, 0, 8) }))
engine.addEntity(entity)
import { Entity, GLTFShape, engine, Vector3, Transform } from 'decentraland-ecs/src'
const entity = new Entity()
entity.addComponent(new GLTFShape('models/Tree_Scene.glb'))
entity.addComponent(new Transform({ position: new Vector3(8, 0, 8) }))
engine.addEntity(entity)