@@ -12,58 +12,22 @@ document.addEventListener('DOMContentLoaded', async () => {
1212
1313    // Create container for buttons 
1414    const  container  =  document . createElement ( 'div' ) ; 
15-     Object . assign ( container . style ,  { 
16-         position : 'absolute' , 
17-         bottom : 'max(16px, env(safe-area-inset-bottom))' , 
18-         right : 'max(16px, env(safe-area-inset-right))' , 
19-         display : 'flex' , 
20-         gap : '8px' 
21-     } ) ; 
15+     container . classList . add ( 'example-button-container' ) ; 
2216
2317    function  createButton ( {  icon,  title,  onClick } )  { 
2418        const  button  =  document . createElement ( 'button' ) ; 
2519        button . innerHTML  =  icon ; 
2620        button . title  =  title ; 
21+         button . classList . add ( 'example-button' ) ; 
2722
28-         Object . assign ( button . style ,  { 
29-             display : 'flex' , 
30-             position : 'relative' , 
31-             width : '40px' , 
32-             height : '40px' , 
33-             background : 'rgba(255, 255, 255, 0.9)' , 
34-             border : '1px solid #ddd' , 
35-             borderRadius : '8px' , 
36-             cursor : 'pointer' , 
37-             alignItems : 'center' , 
38-             justifyContent : 'center' , 
39-             padding : '0' , 
40-             margin : '0' , 
41-             backdropFilter : 'blur(8px)' , 
42-             WebkitBackdropFilter : 'blur(8px)' , 
43-             transition : 'background-color 0.2s' , 
44-             color : '#2c3e50' 
45-         } ) ; 
46- 
47-         const  svg  =  button . querySelector ( 'svg' ) ; 
48-         if  ( svg )  { 
49-             svg . style . display  =  'block' ; 
50-             svg . style . margin  =  'auto' ; 
23+         if  ( onClick )  { 
24+             button . onclick  =  onClick ; 
5125        } 
5226
53-         button . onmouseenter  =  ( )  =>  { 
54-             button . style . background  =  'rgba(255, 255, 255, 1)' ; 
55-         } ; 
56- 
57-         button . onmouseleave  =  ( )  =>  { 
58-             button . style . background  =  'rgba(255, 255, 255, 0.9)' ; 
59-         } ; 
60- 
61-         if  ( onClick )  button . onclick  =  onClick ; 
62- 
6327        return  button ; 
6428    } 
6529
66-     /** @type  {import('../../dist/pwc.mjs').CameraComponentElement*/ 
30+     /** @type  {import('../../dist/pwc.mjs').CameraComponentElement }  */ 
6731    const  cameraElement  =  await  document . querySelector ( 'pc-camera' ) . ready ( ) ; 
6832    const  clearColor  =  new  Color ( ) ; 
6933    let  originalSkyType  =  null ; 
0 commit comments