10/29 São Paulo, Brazil Google Developer Day Brazil HTML5, Installable Web Apps, Google Chrome Extensions, Chrome Web Store, Google Chrome Developer Tools, Native Client, Google Chrome Frame Eric Bidelman, Ernest DelgadoPosted by Brian Kennish, Developer Advocate
The Google Chrome team is hitting the road. From now through October, we’re giving 21 talks about HTML5 and related Google Chrome topics at 16 events, in 16 cities and 9 countries, and on 4 continents. Phew!
Check out our schedule below. Registration for almost all these events is open, so come say hi and learn a thing or two about HTML5.
Date Locations Event Topics Speakers 9/24 Atlanta, United States Web Directions USA HTML5 Michael Mahemoff 9/25 San Francisco, United States TechCrunch Disrupt Hack Day Chrome Web Store Seth Ladd 9/26 Berlin, Germany JSConf EU HTML5 Paul Irish 9/28 Tokyo, Japan; Kyoto, Japan Google Developer Day Japan (Japanese)Installable Web Apps, Google Chrome Extensions, Google Chrome Developer Tools Eiji Kitamura, Mikhail Naganov, Alexei Masterov 9/29 New York, United States NYC GTUG Meetup Chrome Web Store Jan Kleinert 10/1 Taipei City, Taiwan Google DevFest Taiwan HTML5 Arne Roomann-Kurrik 10/2 New York, United States Open Video Conference HTML5 Paul Irish 10/5 Hong Kong Island, Hong Kong Google DevFest Hong Kong HTML5 Arne Roomann-Kurrik 10/8 Amsterdam, Netherlands Fronteers Conference HTML5 Paul Irish 10/8 Jakarta, Indonesia Google DevFest Indonesia HTML5 Arne Roomann-Kurrik 10/9 Hilversum, Netherlands; San Francisco, United States HTML5 Game Jam HTML5 Marcin Wichary, Paul Irish 10/9 Los Altos Hills, United States Silicon Valley Code Camp HTML5, Installable Web Apps, Google Chrome Extensions, Chrome Web Store, Native Client Eric Bidelman, Ernest Delgado 10/10 Bangkok, Thailand Google DevFest Thailand HTML5 Arne Roomann-Kurrik 10/15 Aizu-Wakamatsu City, Japan Aizu IT Forum (Japanese)HTML5 Eiji Kitamura 10/16 Boston, United States jQuery Boston Conference HTML5 Paul Irish 10/29 São Paulo, Brazil Google Developer Day Brazil HTML5, Installable Web Apps, Google Chrome Extensions, Chrome Web Store, Google Chrome Developer Tools, Native Client, Google Chrome Frame Eric Bidelman, Ernest Delgado
Posted by Brian Kennish, Developer Advocate
Since our previous post , we've made good progress on 2D graphics performance: 2D canvas acceleration is now available in trunk and the canary build by using the --enable-accelerated-2d-canvas command-line switch (coming to the developer channel shortly). We’ve also been hard at work improving our 3D graphics stack. Today, we’re excited to release a set of WebGL demos to help highlight what you can do with the API. Chromium’s 2D canvas acceleration uses the same GPU process infrastructure as the compositor, which is designed to maintain the same stability and security Chromium has always had. In addition, this system picks the best graphics API to use on each OS that Chromium supports: Windows XP/Vista/7, Mac OS and Linux. We haven’t finished implementing accelerated 2D canvas support – there’s no Mac support and some functions are not accelerated yet – but Chromium already achieves some impressive gains on the recent IE9 Platform Preview Test Drive 2D canvas demos: These early numbers show up to 60x speed improvement over the current version of Google Chrome. With Google Chrome’s fast release cycles , we expect to be able to get these enhancements to users quickly and add new performance improvements over time. We’re excited to give developers fast 2D graphics, but we think truly hardware accelerating graphics on the web means giving developers access to a programmable 3D graphics pipeline with WebGL. Even with accelerated 2D canvas and SVG, it’s still not possible to achieve many graphics effects with these APIs. (To read more about the progression from dynamic 2D to CSS Transforms and WebGL, check out our recent blog post ). With WebGL and 3D CSS, developers can create modern games, impressive photo galleries, 3D data visualizations, virtual environments, and whatever else they can dream up. To give you a taste for what WebGL can do, we’ve worked with a number of talented artists and developers to create the first round of a series of demos, ranging from a realistic aquarium to a 3D wall of photos. We hope these demos help demonstrate even more immersive experiences made possible with these APIs. So check out our demo gallery with an up-to-date canary build or Chromium build and have some fun with using your GPU in the browser! For a quick peek at some of these demos, you can watch our playlist of preview videos:Posted by James Robinson, Software Engineer and Gregg Tavares, Software Engineer
<?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path style="stroke-width:1; fill:rgb(246,127,0); stroke:none" d="M204.33 13..."/> <path style="stroke-width:1; fill:rgb(0,0,0); stroke:none" d="M203.62 139.62..." /> <path style="stroke-width:1; fill:rgb(255,246,227); stroke:none" d="M363.73 85.73 C359.27 86.29 355.23 86.73..."/> </svg> *note: ellipses replace many more pointsd = document.getElementById("c"); c = d.getContext("2d"); ... i = 25; while (i--) { c.beginPath(); ... q = (R / r - 1) * t; // create hypotrochoid from current mouse position, and setup variables (see: http://en.wikipedia.org/wiki/Hypotrochoid) x = (R - r) * C(t) + D * C(q) + ... y = (R - r) * S(t) - D * S(q) + ... if (a) { // draw once two points are set c.moveTo(a, b); c.lineTo(x, y) } c.strokeStyle = "hsla(" + (U % 360) + ",100%,50%,0.75)"; // draw rainbow hypotrochoid c.stroke(); ... } *note: ellipses replace code The images above were created with SVG and canvas, but as you can see from the code, they approach graphics in a very different way: SVG allows you to provide markup that describes an image, whereas canvas allows you to describe a set of sequential steps that draw an image in JavaScript. These approaches mean that a developer changes an image that’s already been drawn, such as when animating an image, in different ways. Because the browser keeps a full representation of an SVG image, changing just a parameter in the image is enough to cause the browser to redraw the image correctly. With canvas, on the other hand, the developer must clear the image and specify all the steps to draw it again with the desired changes.
Today, modern browsers, including Firefox, Safari, Opera and Google Chrome support creating 2D graphics with these technologies, and Internet Explorer is adding support for them in the upcoming version 9 release.
CSS Transforms: easy to use 2D and 3D effects Even today, people primarily use apps that don’t strictly require advanced graphics, but eye candy like 3D transforms, transitions and reflections still help improve the experience of everyday tasks. While canvas could be used to create many of these effects, it can’t render them efficiently, and it would be hard to integrate with the other content on the page.
CSS transforms and animations, which first appeared in WebKit in 2007, allow developers to achieve commonly used effects easily by specifying parameters in CSS that are applied to content in the DOM. In 2009, WebKit began adding 3D CSS transforms and effects, which takes flat content on the page and makes it appear as if it were in 3D space.
/* CUBE */ #transitions #cube { -webkit-transform-style: preserve-3d; width: 600px; height: 400px; position: absolute; } #transitions #cube.active { -webkit-animation-duration: 1s; -webkit-animation-iteration-count: 1; -webkit-animation-name: cubedemo; -webkit-transform: rotateX(-90deg); } #transitions #cube .face { position: absolute; width: 600px; height: 400px; display: block; overflow: hidden; } #transitions #cube .front { -webkit-transform: scale3d(.835,.835,.835) translateZ(200px); } #transitions #cube .back { -webkit-transform: scale3d(.835,.835,.835) rotateY(180deg) translateZ(200px); } #transitions #cube .top { -webkit-transform: scale3d(.835,.835,.835) rotateX(90deg) translateZ(200px); } @-webkit-keyframes cubedemo { 0% {-webkit-transform: rotateX(0); -webkit-animation-timing-function: linear; } 50% {-webkit-transform: rotateX(-92deg);-webkit-animation-timing-function: ease-in; } 70% {-webkit-transform: rotateX(-84deg); -webkit-animation-timing-function: ease-in; } 80% {-webkit-transform: rotateX(-90deg); -webkit-animation-timing-function: ease-in; } 95% {-webkit-transform: rotateX(-88deg); -webkit-animation-timing-function: ease-in; } 100% { -webkit-transform: rotateX(-90deg); } }As you can see from this example, 3D CSS transforms and animations make it easy to add polished 3D effects to your app. Now that we support hardware compositing in Chromium, it’s easy to perform these transforms on the GPU and display it quickly on screen, so we’ve enabled them along with the compositor. Currently, this functionality is only available in Safari and Google Chrome but Firefox is
working on an implementation as well, making it a great option to add impressive effects to your app in the future.
WebGL: Low-level dynamic 3D While 3D CSS makes it easy to display 2D content so that it looks like it’s in a 3D space, it’s not designed for writing true 3D applications like CAD software or modern games. WebGL, on the other hand, provides access to all the functionality of OpenGL ES 2.0 from JavaScript, and is designed with exactly these types of applications in mind.
(link requires a WebGL-enabled browser)
(link requires a WebGL-enabled browser)
With WebGL you can navigate 3D environments, rotate around objects with volume, add realistic lighting, and render shadows and reflections like those above. Creating a scene like this just wouldn’t be possible in real-time with 3D CSS, let alone a 2D canvas or SVG. To achieve these effects, you need direct access to graphics hardware – which is exactly what WebGL provides.
With power comes complexity, so there is definitely a learning curve to using WebGL. The good news is that because it’s based on OpenGL ES 2.0, it should be familiar to people with graphics programming experience. A number of JavaScript libraries that make WebGL more accessible are already available, for example, the examples above use two frameworks: SpiderGL and the WebGL implementation of O3D . As the technology matures, expect to see other tools and libraries emerge to make it even easier to author content. A popular blog in the community, Learning WebGL has done a great job of keeping up with the latest libraries, tools and demos and has a substantial archive of WebGL resources. Mozilla, Apple, Opera and Google are all working on putting the finishing touches on the WebGL spec in a Khronos working group, which is expected to hit v1.0 by the end of the year, but we’ve turned it on by default to get early feedback on Chromium’s implementation.
Thanks for reading to the end, we hope this helps explain the current state of graphics on the Web!
Posted by Henry Bridge, Product Manager
Recently, we posted about the work we’re doing to re-architect Chromium’s graphics stack and use the GPU to accelerate rendering. As we mentioned last time, this work will help ensure that developers can take full advantage of emerging graphics standards like 3D CSS and WebGL in Chromium. To get more feedback about these cool new features, we’re enabling hardware compositing along with 3D CSS transforms and WebGL on the trunk (coming soon to the dev channel). These new capabilities are major additions to the web platform, so we wanted to take the time to provide some background information and explain how these new capabilities fit into the web.SVG and canvas: dynamic 2D Until recently, it wasn’t possible to create any dynamic (i.e. non-image) graphics on the web without a plug-in. Starting in 2005, this began to change as browsers began to add Scalable Vector Graphics (SVG) and HTML 2D canvas element support. Both SVG and 2D canvas allow you to compose a 2D image at run time and manipulate it to achieve animation effects, but they vary greatly in their approach to specifying how you draw an image. <?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path style="stroke-width:1; fill:rgb(246,127,0); stroke:none" d="M204.33 13..."/> <path style="stroke-width:1; fill:rgb(0,0,0); stroke:none" d="M203.62 139.62..." /> <path style="stroke-width:1; fill:rgb(255,246,227); stroke:none" d="M363.73 85.73 C359.27 86.29 355.23 86.73..."/> </svg> *note: ellipses replace many more pointsd = document.getElementById("c"); c = d.getContext("2d"); ... i = 25; while (i--) { c.beginPath(); ... q = (R / r - 1) * t; // create hypotrochoid from current mouse position, and setup variables (see: http://en.wikipedia.org/wiki/Hypotrochoid) x = (R - r) * C(t) + D * C(q) + ... y = (R - r) * S(t) - D * S(q) + ... if (a) { // draw once two points are set c.moveTo(a, b); c.lineTo(x, y) } c.strokeStyle = "hsla(" + (U % 360) + ",100%,50%,0.75)"; // draw rainbow hypotrochoid c.stroke(); ... } *note: ellipses replace code The images above were created with SVG and canvas, but as you can see from the code, they approach graphics in a very different way: SVG allows you to provide markup that describes an image, whereas canvas allows you to describe a set of sequential steps that draw an image in JavaScript. These approaches mean that a developer changes an image that’s already been drawn, such as when animating an image, in different ways. Because the browser keeps a full representation of an SVG image, changing just a parameter in the image is enough to cause the browser to redraw the image correctly. With canvas, on the other hand, the developer must clear the image and specify all the steps to draw it again with the desired changes. Today, modern browsers, including Firefox, Safari, Opera and Google Chrome support creating 2D graphics with these technologies, and Internet Explorer is adding support for them in the upcoming version 9 release.CSS Transforms: easy to use 2D and 3D effects Even today, people primarily use apps that don’t strictly require advanced graphics, but eye candy like 3D transforms, transitions and reflections still help improve the experience of everyday tasks. While canvas could be used to create many of these effects, it can’t render them efficiently, and it would be hard to integrate with the other content on the page. CSS transforms and animations, which first appeared in WebKit in 2007, allow developers to achieve commonly used effects easily by specifying parameters in CSS that are applied to content in the DOM. In 2009, WebKit began adding 3D CSS transforms and effects, which takes flat content on the page and makes it appear as if it were in 3D space. /* CUBE */ #transitions #cube { -webkit-transform-style: preserve-3d; width: 600px; height: 400px; position: absolute; } #transitions #cube.active { -webkit-animation-duration: 1s; -webkit-animation-iteration-count: 1; -webkit-animation-name: cubedemo; -webkit-transform: rotateX(-90deg); } #transitions #cube .face { position: absolute; width: 600px; height: 400px; display: block; overflow: hidden; } #transitions #cube .front { -webkit-transform: scale3d(.835,.835,.835) translateZ(200px); } #transitions #cube .back { -webkit-transform: scale3d(.835,.835,.835) rotateY(180deg) translateZ(200px); } #transitions #cube .top { -webkit-transform: scale3d(.835,.835,.835) rotateX(90deg) translateZ(200px); } @-webkit-keyframes cubedemo { 0% {-webkit-transform: rotateX(0); -webkit-animation-timing-function: linear; } 50% {-webkit-transform: rotateX(-92deg);-webkit-animation-timing-function: ease-in; } 70% {-webkit-transform: rotateX(-84deg); -webkit-animation-timing-function: ease-in; } 80% {-webkit-transform: rotateX(-90deg); -webkit-animation-timing-function: ease-in; } 95% {-webkit-transform: rotateX(-88deg); -webkit-animation-timing-function: ease-in; } 100% { -webkit-transform: rotateX(-90deg); } } As you can see from this example, 3D CSS transforms and animations make it easy to add polished 3D effects to your app. Now that we support hardware compositing in Chromium, it’s easy to perform these transforms on the GPU and display it quickly on screen, so we’ve enabled them along with the compositor. Currently, this functionality is only available in Safari and Google Chrome but Firefox is working on an implementation as well, making it a great option to add impressive effects to your app in the future.WebGL: Low-level dynamic 3D While 3D CSS makes it easy to display 2D content so that it looks like it’s in a 3D space, it’s not designed for writing true 3D applications like CAD software or modern games. WebGL, on the other hand, provides access to all the functionality of OpenGL ES 2.0 from JavaScript, and is designed with exactly these types of applications in mind.(link requires a WebGL-enabled browser)
(link requires a WebGL-enabled browser)
With WebGL you can navigate 3D environments, rotate around objects with volume, add realistic lighting, and render shadows and reflections like those above. Creating a scene like this just wouldn’t be possible in real-time with 3D CSS, let alone a 2D canvas or SVG. To achieve these effects, you need direct access to graphics hardware – which is exactly what WebGL provides.
With power comes complexity, so there is definitely a learning curve to using WebGL. The good news is that because it’s based on OpenGL ES 2.0, it should be familiar to people with graphics programming experience. A number of JavaScript libraries that make WebGL more accessible are already available, for example, the examples above use two frameworks: SpiderGL and the WebGL implementation of O3D . As the technology matures, expect to see other tools and libraries emerge to make it even easier to author content. A popular blog in the community, Learning WebGL has done a great job of keeping up with the latest libraries, tools and demos and has a substantial archive of WebGL resources. Mozilla, Apple, Opera and Google are all working on putting the finishing touches on the WebGL spec in a Khronos working group, which is expected to hit v1.0 by the end of the year, but we’ve turned it on by default to get early feedback on Chromium’s implementation.
Thanks for reading to the end, we hope this helps explain the current state of graphics on the Web!
Posted by Henry Bridge, Product Manager
If you’re using the Google Chrome Extensions Gallery to publish your extensions, we just added support for Google Analytics , which can help you better understand how many people visit your extension pages, where they’re coming from and more. Starting today, you can specify a Google Analytics profile for each of your extensions. This will start tracking the extension’s page in your Google Analytics account as if that page was part of your own site. See these instructions for more information on how to set this up. You can also use Google Analytics to track the usage of your extension once it’s installed. Check out this tutorial that explains how to integrate Google Analytics such that you can analyze how users interact with the features of your extensions. For questions about this new feature, we encourage you to visit our developer discussion group and share your feedback with us.Posted by Qian Huang, Software Engineer
We recently released a developer preview of the Chrome Web Store , which included new documentation about our upcoming payments and licensing API. With this blog post, we wanted to share a quick overview and some tips about this API so that you can start developing your apps with it. The Chrome Web Store will offer a built-in payments system that allows you to charge for apps, making it easy for users to pay without leaving the store. If you want to work with this payments system in your apps, you can use the Chrome Web Store Licensing API to verify whether a given user has paid and should have access to your app. Here’s how the API works: The Licensing API has two inputs: the app ID and the user ID. The app ID is a unique identifier that’s assigned to each item uploaded to the store. You can see it most easily in the URL of your detail page—for example, .../detail/aihcahmgecmbnbcchbopgniflfhgnkff. The user ID is the OpenID URL corresponding to the user’s Google Account. You can get the OpenID URL for the current user either by using Google App Engine’s built-in OpenID support or by using a standard OpenID library and Google’s OpenID endpoint . Given the app ID and the user ID, you make Licensing API requests using this URI: https://www.googleapis.com/chromewebstore/v1/licenses/<appID>/<userID> When your app makes an HTTP request to the Licensing API, the app needs to be authenticated. The app is authenticated by matching your Google Account that uploaded the app to the Google Account used to call the API. There are a few ways the app can indicate the Google Account used to make the API call. For the Chrome Web Store Licensing API, we highly recommend the use of OAuth for Web Applications . In this approach, OAuth access tokens are used to identify the Google Account calling the API. You can obtain the necessary token via the Chrome Developer Dashboard by clicking the “AuthToken” link for your app. (This link appears only if your app uses Chrome Web Store Payments.) You’ll need this OAuth token to sign the HTTP requests to call the Licensing API. The best way to sign your requests is with a standard OAuth library . The OAuth tokens that the Chrome Developer Dashboard provides are limited in scope, which means that they can only be used to make Licensing API calls. They can’t be used to make calls to other authenticated Google APIs or for anything else. Once you’re ready to make authenticated calls, give the API a try by making your first request. For more information read the Licensing API docs , try out the Getting Started tutorial , check out the samples , and watch the video below: Note that current version of the Licensing API is a stub, which means that it doesn’t return live data that’s based on purchases just yet. Instead, it returns dummy responses that you can use to verify the various scenarios of your implementation. However the protocol, response format, and URL endpoints of the API are all final, so your implementation shouldn’t need to change before the final launch of the store. We look forward to receiving your feedback on the current Licensing API implementation at our developer discussion group .Posted by Munjal Doshi, Software Engineer