Skip to content

Commit

Permalink
Sync branch v2.1.2 to v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cocos-robot authored Jun 24, 2019
2 parents c08ee98 + aac1474 commit e43e730
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 84 deletions.
167 changes: 97 additions & 70 deletions assets/cases/05_scripting/01_properties/ReferenceType.fire
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"url": "",
"_native": "",
"scene": {
"__id__": 1
Expand Down Expand Up @@ -41,18 +42,17 @@
},
"_scale": {
"__type__": "cc.Vec3",
"x": 0.5697916666666667,
"y": 0.5697916666666667,
"x": 1,
"y": 1,
"z": 1
},
"_quat": {
"__type__": "cc.Quat",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0,
"w": 1
"z": 0
},
"_zIndex": 0,
"_is3DNode": true,
"groupIndex": 0,
"autoReleaseAssets": true,
"_id": "14c69a8b-0ace-4629-9691-9c9f00a55e48"
Expand Down Expand Up @@ -128,19 +128,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "00585n+9KFBobjeB+/TNFrL",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "00585n+9KFBobjeB+/TNFrL"
},
{
"__type__": "cc.Node",
Expand Down Expand Up @@ -188,19 +188,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "aay65lrpBMEJMaCsbSZtz1",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "aay65lrpBMEJMaCsbSZtz1"
},
{
"__type__": "cc.Camera",
Expand All @@ -222,6 +222,19 @@
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 0.1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_id": "b7doWXUyhOd7pzvkznLZ/6"
},
{
Expand Down Expand Up @@ -302,19 +315,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "51e91yItU5LZZqbTJnQuLbC",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "51e91yItU5LZZqbTJnQuLbC"
},
{
"__type__": "cc.Sprite",
Expand All @@ -324,6 +337,11 @@
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
Expand All @@ -340,7 +358,6 @@
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_state": 0,
"_atlas": null,
"_id": "fajaJR7y1HTafvvptHRUNk"
},
Expand Down Expand Up @@ -390,19 +407,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "79cc1QkJEVMAZwPVWV9GQ3J",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "79cc1QkJEVMAZwPVWV9GQ3J"
},
{
"__type__": "e4f88adp3hERoJ48DZ2PSAl",
Expand All @@ -412,8 +429,11 @@
"__id__": 9
},
"_enabled": true,
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
Expand All @@ -423,10 +443,12 @@
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_N$textKey": "",
"_id": "2c5i0JMQVB2KrNCM9yn0Gg"
},
Expand Down Expand Up @@ -472,19 +494,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "b68bfqwZ9RDg45dGh6PglYv",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "b68bfqwZ9RDg45dGh6PglYv"
},
{
"__type__": "cc.Node",
Expand Down Expand Up @@ -513,7 +535,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 360,
"height": 40
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
Expand All @@ -532,19 +554,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "08bbfHISm1KeZvcFMh5AxmS",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "08bbfHISm1KeZvcFMh5AxmS"
},
{
"__type__": "e4f88adp3hERoJ48DZ2PSAl",
Expand All @@ -554,8 +576,11 @@
"__id__": 12
},
"_enabled": true,
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "这个例子不包括运行时演示",
"_N$string": "这个例子不包括运行时演示",
Expand All @@ -565,10 +590,12 @@
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$textKey": "cases/05_scripting/01_properties/ReferenceType.fire.11",
"_id": "d9xMqVdXVPwqyHw2YI4brR"
},
Expand Down Expand Up @@ -618,19 +645,19 @@
"y": 1,
"z": 1
},
"_rotationX": 0,
"_rotationY": 0,
"_skewX": 0,
"_skewY": 0,
"_zIndex": 0,
"groupIndex": 0,
"_id": "b8db6ZQTdBBcIY7rIN3P/q6",
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"groupIndex": 0,
"_rotationX": 0,
"_rotationY": 0,
"_id": "b8db6ZQTdBBcIY7rIN3P/q6"
},
{
"__type__": "6b8baEpLuxACIMNlIL2vw2W",
Expand Down Expand Up @@ -690,7 +717,7 @@
"__uuid__": "421a1a75-016f-4896-b926-e767fffbc6f8"
},
"myAudioClip": {
"__uuid__": "4ca2f387-388d-46e8-85c7-3ae536f5db9a"
"__uuid__": "a3d9e2db-49b2-4f91-ab2b-ecaa3e985fe0"
},
"_id": "880Q+A1upGOo0gwlr0SUZ9"
}
Expand Down
2 changes: 1 addition & 1 deletion assets/cases/06_rendering/01_custom_ia/ColorRect.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ let ColorRect = cc.Class({

// LIFE-CYCLE CALLBACKS:
onLoad () {
this.setMaterial(0, cc.Material.getBuiltinMaterial('sprite'));
this.setMaterial(0, cc.Material.getBuiltinMaterial('2d-base'));

this._createIA();
},
Expand Down
17 changes: 5 additions & 12 deletions assets/cases/06_rendering/custom_material/custom_material.effect
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ uniform mat4 cc_matViewProj;
attribute vec3 a_position;
attribute lowp vec4 a_color;

#if USE_TEXTURE
attribute mediump vec2 a_uv0;
varying mediump vec2 v_uv0;
#endif
attribute mediump vec2 a_uv0;
varying mediump vec2 v_uv0;

varying lowp vec4 v_color;

Expand All @@ -60,10 +58,7 @@ void main () {
mvp = cc_matViewProj;
#endif

#if USE_TEXTURE
v_uv0 = a_uv0;
#endif

v_uv0 = a_uv0;
v_color = a_color;

gl_Position = mvp * vec4(a_position, 1);
Expand All @@ -75,10 +70,8 @@ void main () {

precision highp float;

#if USE_TEXTURE
uniform sampler2D texture;
varying mediump vec2 v_uv0;
#endif
uniform sampler2D texture;
varying mediump vec2 v_uv0;

uniform float time;

Expand Down
Binary file added assets/resources/audio/ding.mp3
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ver": "2.0.0",
"uuid": "4ca2f387-388d-46e8-85c7-3ae536f5db9a",
"uuid": "a3d9e2db-49b2-4f91-ab2b-ecaa3e985fe0",
"downloadMode": 0,
"subMetas": {}
}
Binary file removed assets/resources/audio/ding.wav
Binary file not shown.

0 comments on commit e43e730

Please sign in to comment.