Esempio n. 1
0
 /**
  * Init <a-camera>
  *
  * The camera primitive places the user somewhere within the scene. It is an entity that prescribes the camera
  * component with mappings to controls-related components.
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->child()->entity()->component('Camera');
     $this->active(false);
     $this->lookControls(true);
     $this->wasdControls(true);
 }
Esempio n. 2
0
 /**
  * Init <a-torus>
  *
  * The torus primitive creates a donut or circular tube shape. It is an entity that prescribes the geometry with
  * its
  * geometric primitive set to torus.
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     /* Load defaults */
     $this->component('Geometry')->primitive('torus');
     $this->radius();
     $this->radiusTubular();
     $this->segmentsRadial();
     $this->segmentsTubular();
     $this->arc();
 }
Esempio n. 3
0
 /**
  * Reset <a-ring>
  *
  * The ring primitive creates a ring or disc shape. It is an entity that prescribes the geometry with its geometric
  * primitive set to ring.
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Geometry')->primitive('ring');
     $this->radiusInner(0.8);
     $this->radiusOuter(1.2);
     $this->segmentsPhi(10);
     $this->segmentsTheta(32);
     $this->thetaLength(360);
     $this->thetaStart(0);
 }
Esempio n. 4
0
 /**
  * Init <a-video>
  *
  * The video primitive displays a video on a flat plane as a texture. It is an entity that prescribes the geometry
  * with its geometric primitive set to plane.
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Material')->shader('flat');
     $this->color('#FFF');
     $this->component('Material')->side('double');
     $this->component('Material')->transparent(true);
     $this->component('Geometry')->primitive('plane');
     $this->height(1.75);
     $this->width(3);
 }
Esempio n. 5
0
 /**
  * <a-cursor>
  *
  * The cursor primitive places a reticle or crosshair to add clicking and interactivity with the scene. It is an
  * entity that prescribes the cursor component and a default ring-shaped geometry. The cursor is usually placed as
  * a child of the camera.
  * 
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Geometry')->primitive('ring');
     $this->component('Geometry')->radiusOuter(0.016);
     $this->component('Geometry')->radiusInner(0.01);
     $this->component('Geometry')->segmentsTheta(64);
     $this->component('Material')->shader('flat');
     $this->color('#000');
     $this->component('Material')->opacity(0.8);
     $this->position(0, 0, -1);
     $this->component('Cursor')->fuse(true);
     $this->component('Raycaster')->far(1000);
     $this->component('Cursor')->fuseTimeout(1500);
 }
Esempio n. 6
0
 /**
  * <a-cylinder>
  *
  * The cylinder primitive is an entity that prescribes the geometry with its geometric primitive set to cylinder.
  * It can be used to create tubes and curved surfaces.
  * 
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Material');
     $this->component('Geometry')->primitive('cylinder');
 }
Esempio n. 7
0
 /**
  * Create entity DOMElement
  *
  * Created entity and append it to scene
  *
  * @param Entity $entity            
  * @return void
  */
 public function appendEntity(Entity $entity)
 {
     $this->appendFormatComment('scene', "\n");
     $this->scene->appendChild($entity->domElement($this->docObj));
 }
Esempio n. 8
0
 /**
  * Init <a-circle>
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Geometry')->primitive('circle');
 }
Esempio n. 9
0
 /**
  * Init <a-collada-model>
  *
  * The COLLADA model primitive displays a 3D COLLADA model created from a 3D modeling program or downloaded from
  * the web. It is an entity that maps the src attribute to the collada-model component.
  *
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->child()->entity()->component('ColladaModel');
 }
Esempio n. 10
0
 /**
  * Init <a-obj-model>
  *
  * The obj-model component loads a 3D model and material using a Wavefront (.OBJ) file and a .MTL file.
  * 
  * @return void
  */
 public function reset()
 {
     parent::reset();
 }
Esempio n. 11
0
 /**
  * Init <a-light>
  *
  * The light primitive adjusts the lighting setup of the scene. It is an entity that maps attributes to properties
  * of the light component.
  * 
  * @return void
  */
 public function reset()
 {
     parent::reset();
     $this->component('Light');
 }