added scenefactory.js.
reimplement using SceneFactory.