You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Welcome to the React Unity WebGL Documentation! My name is Jeffrey and I'm here
56
56
-[Tracking the loading progression](#tracking-the-loading-progression)
57
57
-[Handeling on when the Application is loaded](#handeling-on-when-the-application-is-loaded)
58
58
-[Entering or Leaving Fullscreen](#entering-or-leaving-fullscreen)
59
-
-[Setting the Canvas's Height and Width](#setting-the-canvass-height-and-width)
59
+
-[Adding Styles to the Canvas Component](#adding-styles-to-the-canvas-component)
60
60
-[Setting the Canvas's ClassName](#setting-the-canvass-classname)
61
61
-[Device Pixel Ratio and Retina Support](#device-pixel-ratio-and-retina-support)
62
62
-[Tab Index and Keyboard Capturing](#tab-index-and-keyboard-capturing)
@@ -397,16 +397,16 @@ const App = () => {
397
397
};
398
398
```
399
399
400
-
## Setting the Canvas's Height and Width
400
+
## Adding Styles to the Canvas Component
401
401
402
-
> Available since version 5.6.0
402
+
> Available since version 8.2.0
403
403
404
-
The default size is 800px width to 600px height. You can easily overrule them by passing the following props. The height and width properties are used to set the height and width of the wrapper element.
404
+
The style tag allows for adding inline CSS for styling the component. The style's properties will be assigned directly onto the actual canvas.
405
405
406
-
The height and width can be set to auto (Means that the browser calculates the height and width), or be specified in length values, like px, cm, etc., or in percent of the containing block. Note that the height and width properties do not include padding, borders, or margins; they set the height/width of the area inside the padding, border, and margin of the element!
406
+
The style attribute accepts a JavaScript object with camelCased properties rather than a CSS string. This is consistent with the DOM style JavaScript property, is more efficient, and prevents XSS security holes. React will automatically append a “px” suffix to certain numeric inline style properties. If you want to use units other than “px”, specify the value as a string with the desired unit.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "react-unity-webgl",
3
-
"version": "8.1.7",
3
+
"version": "8.2.0",
4
4
"description": "React Unity WebGL provides an easy solution for embedding Unity WebGL builds in your React application, with two-way communication between your React and Unity application with advanced API's.",
0 commit comments