Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Dec 6, 2023
1 parent 6540cfc commit 4dc3d95
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_demo_player.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ jobs:
- name: 📦 Upload Demo Player
uses: actions/upload-artifact@v3
with:
name: Build
name: Demo
path: build/WebGL/WebGL
6 changes: 4 additions & 2 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ jobs:
- name: 🚚 Checkout
uses: actions/checkout@v4

- name: ⚙️Setup matrix
- name: ⚙️Setup Build Matrix
id: matrix
run: echo "matrix=$(jq -c . < ./Documentation/metadata.json)" | tee $GITHUB_OUTPUT
run: |
matrix=`jq -c '{ include: .versions }' ./Documentation/metadata.json`
echo matrix="${matrix}" | tee -a $GITHUB_OUTPUT $GITHUB_STEP_SUMMARY
build:
name: 📘 Build Documentation
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
- develop
tags:
- "!*"
paths-ignore:
- "*.md"
pull_request:
types:
- opened
Expand Down
40 changes: 34 additions & 6 deletions Assets/Demos/Readme/ConpositeCanvasRenderer_Readme.unity
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,14 @@ PrefabInstance:
- target: {fileID: 3544989262036967841, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
propertyPath: m_Text
value: Fill color
value: 'Apply
Effect'
objectReference: {fileID: 0}
- target: {fileID: 3544989262036967841, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
propertyPath: m_FontData.m_LineSpacing
value: 0.79
objectReference: {fileID: 0}
- target: {fileID: 3544989262161273494, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
Expand Down Expand Up @@ -1202,7 +1209,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 170, y: 170}
m_SizeDelta: {x: 150, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &618448916
MonoBehaviour:
Expand Down Expand Up @@ -1750,6 +1757,11 @@ PrefabInstance:
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2410690387891825491, guid: 95fbf783609f447f8aeb4da4a9e4a5ca,
type: 3}
propertyPath: m_Material
value:
objectReference: {fileID: 2100000, guid: fab97af5ccbdc4e62a25b0be2f8b448b, type: 2}
- target: {fileID: 2410690387891825491, guid: 95fbf783609f447f8aeb4da4a9e4a5ca,
type: 3}
propertyPath: m_BlendType
Expand Down Expand Up @@ -1780,6 +1792,11 @@ PrefabInstance:
propertyPath: m_ShowSourceGraphics
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2410690388034007341, guid: 95fbf783609f447f8aeb4da4a9e4a5ca,
type: 3}
propertyPath: m_Text
value: Result
objectReference: {fileID: 0}
- target: {fileID: 2410690388284480313, guid: 95fbf783609f447f8aeb4da4a9e4a5ca,
type: 3}
propertyPath: m_Name
Expand Down Expand Up @@ -1925,14 +1942,15 @@ MonoBehaviour:
m_GameObject: {fileID: 1205407286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc6e0799055824aff8d0cade369fa23d, type: 3}
m_Script: {fileID: 11500000, guid: b6cfeb4696a7c477e9ec6dae014c1b28, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Blur: 1
m_Iteration: 10
m_Blur: 0.5
m_Iteration: 5
m_Power: 1
m_Multiplier: 1
m_Limit: 1
m_EffectDistance: {x: 5, y: -10}
--- !u!1001 &1226433175
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2960,7 +2978,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 600, y: 0}
m_SizeDelta: {x: 550, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1628504224
MonoBehaviour:
Expand Down Expand Up @@ -3743,6 +3761,16 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1543791181}
m_Modifications:
- target: {fileID: 3544989262036967841, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
propertyPath: m_Text
value: "Bake\n & Blur"
objectReference: {fileID: 0}
- target: {fileID: 3544989262036967841, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
propertyPath: m_FontData.m_LineSpacing
value: 0.79
objectReference: {fileID: 0}
- target: {fileID: 3544989262161273494, guid: 1071d44cdaf214a24b03765881634e74,
type: 3}
propertyPath: m_Pivot.x
Expand Down
105 changes: 105 additions & 0 deletions Assets/Demos/Readme/UI-Wave-Fill-Additive.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI-Wave-Fill-Additive
m_Shader: {fileID: 4800000, guid: b0bf655e949c44179be80f397d04532d, type: 3}
m_ShaderKeywords: COLOR_MODE_FILL ENABLE_UV_ANIMATION
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UvTex:
m_Texture: {fileID: 2800000, guid: 6d50cd6b25f794229912604ade851a94, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- Color_Mode: 3
- _BumpScale: 1
- _ColorMask: 15
- _ColorMode: 0
- _Cutoff: 0.5
- _DETAIL: 0
- _DetailNormalMapScale: 1
- _DstBlend: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _MASK: 0
- _MaskThreshold: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UV_ANIMATION: 1
- _UseUIAlphaClip: 0
- _UvModifier: 0.075
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _MaskSpeed: {r: 0, g: 0, b: 0, a: 0}
- _UvSpeed: {r: 0.1, g: 0.1, b: 0, a: 0}
8 changes: 8 additions & 0 deletions Assets/Demos/Readme/UI-Wave-Fill-Additive.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Documentation/custom/styles/version-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(function () {
function generateVersionSelector(metadata) {
if (!metadata) return;

metadata.include.forEach(v => {
metadata.versions.forEach(v => {
$('#version-select-ul').append($(`
<a style="color:#000;" href="${v.url}">
<li class="component-select__option" style='justify-content:space-between;'>
Expand Down
22 changes: 7 additions & 15 deletions Documentation/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,19 @@
"versions": [
{
"ref": "develop",
"version": "4.0.0",
"unity": "2021.1",
"version": "1.0.0",
"unity": "2019.4",
"dest": "_site",
"appTitle": "Composite Canvas Renderer 4.0.0",
"appTitle": "Composite Canvas Renderer 1.0.0",
"url": "https://mob-sakai.github.io/CompositeCanvasRenderer"
},
{
"ref": "develop",
"version": "2.0.0",
"unity": "2020.3",
"dest": "_site/2.0.0",
"appTitle": "Composite Canvas Renderer 2.0.0",
"url": "https://mob-sakai.github.io/CompositeCanvasRenderer/2.0.0"
},
{
"ref": "develop",
"version": "1.0.0",
"version": "1.0.0-preview.2",
"unity": "2019.4",
"dest": "_site/1.0.0",
"appTitle": "Composite Canvas Renderer 1.0.0",
"url": "https://mob-sakai.github.io/CompositeCanvasRenderer/1.0.0"
"dest": "_site/1.0.0-preview.2",
"appTitle": "Composite Canvas Renderer 1.0.0-preview.2",
"url": "https://mob-sakai.github.io/CompositeCanvasRenderer/1.0.0-preview.2"
}
]
}
2 changes: 1 addition & 1 deletion Documentation/src/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
redirect_url: manual/overview.html
redirect_url: manual/
---
11 changes: 8 additions & 3 deletions Packages/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ It also supports additional material modification, mesh modification, and baking

Let's enjoy a wide range of effects that were previously challenging to achieve with standard UI shaders!

<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/03245b0d-ed4d-464c-8cda-6b3f4f129135" width=600/>
<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/28a3cab1-d939-4161-8ef5-d24c760c5d49" width="600/">

#### Features

Expand Down Expand Up @@ -124,15 +124,20 @@ To update the package, change suffix `#{version}` to the target version.
## 🚀 Usage

1. Create a GameObject with the `CompositeCanvasRenderer` component.

2. Add UI elements such as Image, RawImage, Text, TextMeshProUGUI, etc., to the GameObject.
<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/571dd4ed-2ab7-49fd-be88-d176728fdcb8" width=300/>

3. The baking area is determined by the `RectTransform.size` and the `Expands` option. In the scene view, the baking area is displayed as a magenta rectangle.
<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/c614e39d-f3f4-4178-a870-6198a71fbf01" width=300/>

4. Adjust the `CompositeCanvasRenderer` settings in the inspector.
<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/8369b4e2-4463-4469-af1c-e7ac81959d03" width=400/>
1. Select an effect in the inspector and fine-tune its settings.

5. Select an effect in the inspector and fine-tune its settings.
<img src="https://github.com/mob-sakai/mob-sakai/assets/12690315/569d59ac-8bf5-421f-baaa-8487967f15a1" width=400/>
1. Enjoy!

6. Enjoy!

<br><br>

Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ PlayerSettings:
webGLTemplate: APPLICATION:Default
webGLAnalyzeBuildSize: 0
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 1
webGLCompressionFormat: 2
webGLLinkerTarget: 1
webGLThreadsSupport: 0
webGLWasmStreaming: 0
Expand Down

0 comments on commit 4dc3d95

Please sign in to comment.