File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed 
examples/boilerplate/ar-hello-world Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>  
2+ < html > 
3+   < head > 
4+     < meta  charset ="utf-8 "> 
5+     < title > Hello, World! • A-Frame</ title > 
6+     < meta  name ="description " content ="Hello, World! • A-Frame "> 
7+     < script  src ="../../../dist/aframe-master.js "> </ script > 
8+     < script > 
9+       AFRAME . registerComponent ( 'follow-shadow' ,  { 
10+         schema : { type : 'selector' } , 
11+         init ( )  { this . el . object3D . renderOrder  =  - 1 ; } , 
12+         tick ( )  {  
13+           if  ( this . data )  { 
14+             this . el . object3D . position . copy ( this . data . object3D . position ) ;  
15+             this . el . object3D . position . y -= 0.001 ;  // stop z-fighting 
16+           } 
17+         } 
18+       } ) ; 
19+     </ script > 
20+   </ head > 
21+   < body > 
22+     < a-scene 
23+       reflection ="directionalLight:a-light[type=directional] "
24+       ar-hit-test ="target:#objects; "
25+     > 
26+       < a-light  type ="directional " light ="castShadow:true; " position ="1 1 1 " intensity ="0.5 " auto-shadow-cam ="#objects "> </ a-light > 
27+       < a-camera  position ="0 0.4 0 " wasd-controls ="acceleration:10; "> </ a-camera > 
28+       < a-entity  id ="objects " scale ="0.2 0.2 0.2 " position ="0 0 -1 " shadow > 
29+         < a-box  position ="-1 0.5 1 " rotation ="0 45 0 " color ="#4CC3D9 "> </ a-box > 
30+         < a-sphere  position ="0 1.25 -1 " radius ="1.25 " color ="#EF2D5E "> </ a-sphere > 
31+         < a-cylinder  position ="1 0.75 1 " radius ="0.5 " height ="1.5 " color ="#FFC65D "> </ a-cylinder > 
32+       </ a-entity > 
33+       < a-plane  follow-shadow ="#objects " material ="shader:shadow " shadow ="cast:false; " rotation ="-90 0 0 " width ="2 " height ="2 "> </ a-plane > 
34+       < a-sky  color ="#ECECEC " hide-on-enter-ar > </ a-sky > 
35+     </ a-scene > 
36+   </ body > 
37+ </ html > 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments