The toymaker has branched out into cartoons and video games and is looking to fuse its building bricks with the digital world.