--- /dev/null
+{
+ "accessors" : [
+ {
+ "bufferView" : 0,
+ "componentType" : 5125,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 1,
+ "componentType" : 5122,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 2,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 3,
+ "componentType" : 5120,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 4,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 5,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 6,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 7,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 8,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 9,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 10,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 11,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 12,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 13,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 14,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 15,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 16,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 17,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 18,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 19,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 20,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 21,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 22,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 23,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 24,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 25,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 26,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 27,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 28,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 29,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 30,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 31,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 32,
+ "componentType" : 5126,
+ "count" : 24,
+ "max" : [
+ 1,
+ 1,
+ 1
+ ],
+ "min" : [
+ -1,
+ -1,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 33,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 34,
+ "componentType" : 5126,
+ "count" : 24,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 35,
+ "componentType" : 5121,
+ "count" : 36,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 36,
+ "componentType" : 5126,
+ "count" : 4,
+ "max" : [
+ 1,
+ 0,
+ 1
+ ],
+ "min" : [
+ -1,
+ 0,
+ -1
+ ],
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 37,
+ "componentType" : 5126,
+ "count" : 4,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 38,
+ "componentType" : 5126,
+ "count" : 4,
+ "type" : "VEC2"
+ },
+ {
+ "bufferView" : 39,
+ "componentType" : 5121,
+ "count" : 6,
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 40,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.6666666666666667
+ ],
+ "min" : [
+ 0.041666666666666664
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 41,
+ "componentType" : 5126,
+ "count" : 5,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 42,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.6666666666666667
+ ],
+ "min" : [
+ 0.041666666666666664
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 43,
+ "componentType" : 5126,
+ "count" : 15,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 44,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.6666666666666667
+ ],
+ "min" : [
+ 0.041666666666666664
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 45,
+ "componentType" : 5126,
+ "count" : 15,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 46,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.7083333333333333
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 47,
+ "componentType" : 5126,
+ "count" : 5,
+ "type" : "VEC4"
+ },
+ {
+ "bufferView" : 48,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.7083333333333333
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 49,
+ "componentType" : 5126,
+ "count" : 15,
+ "type" : "VEC4"
+ },
+ {
+ "bufferView" : 50,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.7083333333333333
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 51,
+ "componentType" : 5126,
+ "count" : 5,
+ "type" : "VEC4"
+ },
+ {
+ "bufferView" : 52,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.7083333333333333
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 53,
+ "componentType" : 5126,
+ "count" : 5,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 54,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.6666666666666667
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 55,
+ "componentType" : 5126,
+ "count" : 15,
+ "type" : "VEC3"
+ },
+ {
+ "bufferView" : 56,
+ "componentType" : 5126,
+ "count" : 5,
+ "max" : [
+ 1.6666666666666667
+ ],
+ "min" : [
+ 0
+ ],
+ "type" : "SCALAR"
+ },
+ {
+ "bufferView" : 57,
+ "componentType" : 5126,
+ "count" : 5,
+ "type" : "VEC3"
+ }
+ ],
+ "animations" : [
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 0,
+ "path" : "scale"
+ }
+ }
+ ],
+ "name" : "Step Scale",
+ "samplers" : [
+ {
+ "input" : 40,
+ "interpolation" : "STEP",
+ "output" : 41
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 3,
+ "path" : "scale"
+ }
+ }
+ ],
+ "name" : "Linear Scale",
+ "samplers" : [
+ {
+ "input" : 40,
+ "interpolation" : "LINEAR",
+ "output" : 41
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 4,
+ "path" : "scale"
+ }
+ }
+ ],
+ "name" : "CubicSpline Scale",
+ "samplers" : [
+ {
+ "input" : 44,
+ "interpolation" : "CUBICSPLINE",
+ "output" : 45
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 5,
+ "path" : "rotation"
+ }
+ }
+ ],
+ "name" : "Step Rotation",
+ "samplers" : [
+ {
+ "input" : 46,
+ "interpolation" : "STEP",
+ "output" : 47
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 6,
+ "path" : "rotation"
+ }
+ }
+ ],
+ "name" : "CubicSpline Rotation",
+ "samplers" : [
+ {
+ "input" : 48,
+ "interpolation" : "CUBICSPLINE",
+ "output" : 49
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 7,
+ "path" : "rotation"
+ }
+ }
+ ],
+ "name" : "Linear Rotation",
+ "samplers" : [
+ {
+ "input" : 50,
+ "interpolation" : "LINEAR",
+ "output" : 51
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 8,
+ "path" : "translation"
+ }
+ }
+ ],
+ "name" : "Step Translation",
+ "samplers" : [
+ {
+ "input" : 52,
+ "interpolation" : "STEP",
+ "output" : 53
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 9,
+ "path" : "translation"
+ }
+ }
+ ],
+ "name" : "CubicSpline Translation",
+ "samplers" : [
+ {
+ "input" : 54,
+ "interpolation" : "CUBICSPLINE",
+ "output" : 55
+ }
+ ]
+ },
+ {
+ "channels" : [
+ {
+ "sampler" : 0,
+ "target" : {
+ "node" : 10,
+ "path" : "translation"
+ }
+ }
+ ],
+ "name" : "Linear Translation",
+ "samplers" : [
+ {
+ "input" : 56,
+ "interpolation" : "LINEAR",
+ "output" : 57
+ }
+ ]
+ }
+ ],
+ "asset" : {
+ "generator" : "Khronos Blender glTF 2.0 I/O",
+ "version" : "2.0"
+ },
+ "bufferViews" : [
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 0
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 288
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 576
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 768
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 804
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 1092
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 1380
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 1572
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 1608
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 1896
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 2184
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 2376
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 2412
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 2700
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 2988
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 3180
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 3216
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 3504
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 3792
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 3984
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 4020
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 4308
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 4596
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 4788
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 4824
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 5112
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 5400
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 5592
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 5628
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 5916
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 6204
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 6396
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 6432
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 288,
+ "byteOffset" : 6720
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 192,
+ "byteOffset" : 7008
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 36,
+ "byteOffset" : 7200
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 48,
+ "byteOffset" : 7236
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 48,
+ "byteOffset" : 7284
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 32,
+ "byteOffset" : 7332
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 6,
+ "byteOffset" : 7364
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 7372
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 60,
+ "byteOffset" : 7392
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 7452
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 180,
+ "byteOffset" : 7472
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 7652
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 180,
+ "byteOffset" : 7672
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 7852
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 80,
+ "byteOffset" : 7872
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 7952
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 240,
+ "byteOffset" : 7972
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 8212
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 80,
+ "byteOffset" : 8232
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 8312
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 60,
+ "byteOffset" : 8332
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 8392
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 180,
+ "byteOffset" : 8412
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 20,
+ "byteOffset" : 8592
+ },
+ {
+ "buffer" : 0,
+ "byteLength" : 60,
+ "byteOffset" : 8612
+ }
+ ],
+ "buffers" : [
+ {
+ "byteLength" : 8672,
+ "uri" : "interpolation.bin"
+ }
+ ],
+ "extensions" : {},
+ "images" : [
+ {
+ "mimeType" : "image/jpeg",
+ "name" : "l.jpg",
+ "uri" : "l.jpg"
+ }
+ ],
+ "materials" : [
+ {
+ "name" : "Material",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.001",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.002",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.007",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.006",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.008",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.004",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.005",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.003",
+ "pbrMetallicRoughness" : {
+ "baseColorFactor" : [
+ 0.800000011920929,
+ 0.800000011920929,
+ 0.800000011920929,
+ 1
+ ],
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ },
+ {
+ "name" : "Material.009",
+ "pbrMetallicRoughness" : {
+ "baseColorTexture" : {
+ "index" : 0,
+ "texCoord" : 0
+ },
+ "metallicFactor" : 0,
+ "roughnessFactor" : 0.5
+ }
+ }
+ ],
+ "meshes" : [
+ {
+ "name" : "Cube",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 1,
+ "POSITION" : 0,
+ "TEXCOORD_0" : 2
+ },
+ "indices" : 3,
+ "material" : 0
+ }
+ ]
+ },
+ {
+ "name" : "Cube.001",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 5,
+ "POSITION" : 4,
+ "TEXCOORD_0" : 6
+ },
+ "indices" : 7,
+ "material" : 1
+ }
+ ]
+ },
+ {
+ "name" : "Cube.002",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 9,
+ "POSITION" : 8,
+ "TEXCOORD_0" : 10
+ },
+ "indices" : 11,
+ "material" : 2
+ }
+ ]
+ },
+ {
+ "name" : "Cube.003",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 13,
+ "POSITION" : 12,
+ "TEXCOORD_0" : 14
+ },
+ "indices" : 15,
+ "material" : 3
+ }
+ ]
+ },
+ {
+ "name" : "Cube.004",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 17,
+ "POSITION" : 16,
+ "TEXCOORD_0" : 18
+ },
+ "indices" : 19,
+ "material" : 4
+ }
+ ]
+ },
+ {
+ "name" : "Cube.005",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 21,
+ "POSITION" : 20,
+ "TEXCOORD_0" : 22
+ },
+ "indices" : 23,
+ "material" : 5
+ }
+ ]
+ },
+ {
+ "name" : "Cube.006",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 25,
+ "POSITION" : 24,
+ "TEXCOORD_0" : 26
+ },
+ "indices" : 27,
+ "material" : 6
+ }
+ ]
+ },
+ {
+ "name" : "Cube.008",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 29,
+ "POSITION" : 28,
+ "TEXCOORD_0" : 30
+ },
+ "indices" : 31,
+ "material" : 7
+ }
+ ]
+ },
+ {
+ "name" : "Cube.009",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 33,
+ "POSITION" : 32,
+ "TEXCOORD_0" : 34
+ },
+ "indices" : 35,
+ "material" : 8
+ }
+ ]
+ },
+ {
+ "name" : "Plane.001",
+ "primitives" : [
+ {
+ "attributes" : {
+ "NORMAL" : 37,
+ "POSITION" : 36,
+ "TEXCOORD_0" : 38
+ },
+ "indices" : 39,
+ "material" : 9
+ }
+ ]
+ }
+ ],
+ "nodes" : [
+ {
+ "mesh" : 0,
+ "name" : "Cube"
+ },
+ {
+ "name" : "Light",
+ "rotation" : [
+ 0.16907575726509094,
+ 0.7558802962303162,
+ -0.27217137813568115,
+ 0.570947527885437
+ ],
+ "scale" : [
+ 1,
+ 1,
+ 0.9999999403953552
+ ],
+ "translation" : [
+ 0.18540644645690918,
+ 5.903861999511719,
+ 8.732584953308105
+ ]
+ },
+ {
+ "name" : "Camera",
+ "rotation" : [
+ 0.6819981932640076,
+ 0,
+ 0,
+ 0.7313538193702698
+ ],
+ "scale" : [
+ 1,
+ 0.39365354180336,
+ 1
+ ],
+ "translation" : [
+ 0.31374117732048035,
+ 4.958309173583984,
+ 29.236623764038086
+ ]
+ },
+ {
+ "mesh" : 1,
+ "name" : "Cube.001",
+ "translation" : [
+ -3.2963297367095947,
+ 0,
+ 6.461143493652344e-05
+ ]
+ },
+ {
+ "mesh" : 2,
+ "name" : "Cube.002",
+ "translation" : [
+ 3.3401193618774414,
+ 0,
+ 0.008944988250732422
+ ]
+ },
+ {
+ "mesh" : 3,
+ "name" : "Cube.003",
+ "translation" : [
+ 0,
+ 3.356412410736084,
+ 0
+ ]
+ },
+ {
+ "mesh" : 4,
+ "name" : "Cube.004",
+ "rotation" : [
+ 0,
+ 0,
+ -0.006683696992695332,
+ 0.9999777674674988
+ ],
+ "translation" : [
+ 3.33506178855896,
+ 3.356412410736084,
+ 0
+ ]
+ },
+ {
+ "mesh" : 5,
+ "name" : "Cube.005",
+ "rotation" : [
+ 0,
+ 0,
+ -0.03925982117652893,
+ 0.9992290735244751
+ ],
+ "scale" : [
+ 0.9999999403953552,
+ 0.9999999403953552,
+ 1
+ ],
+ "translation" : [
+ -3.311399221420288,
+ 3.356412410736084,
+ 0
+ ]
+ },
+ {
+ "mesh" : 6,
+ "name" : "Cube.006",
+ "translation" : [
+ 0,
+ 6.665226459503174,
+ 0
+ ]
+ },
+ {
+ "mesh" : 7,
+ "name" : "Cube.008",
+ "translation" : [
+ 3.3051798343658447,
+ 6.734194278717041,
+ 0
+ ]
+ },
+ {
+ "mesh" : 8,
+ "name" : "Cube.009",
+ "translation" : [
+ -3.2975807189941406,
+ 6.958913326263428,
+ 0
+ ]
+ },
+ {
+ "mesh" : 9,
+ "name" : "Plane",
+ "rotation" : [
+ 0.7071068286895752,
+ 0,
+ 0,
+ 0.7071068286895752
+ ],
+ "scale" : [
+ 4.218648433685303,
+ 1,
+ 0.3652837574481964
+ ],
+ "translation" : [
+ 0,
+ -1.7941787242889404,
+ 1.0036747455596924
+ ]
+ }
+ ],
+ "scene" : 0,
+ "scenes" : [
+ {
+ "name" : "Scene",
+ "nodes" : [
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9,
+ 10,
+ 11
+ ]
+ }
+ ],
+ "textures" : [
+ {
+ "source" : 0
+ }
+ ]
+}
utc-Dali-ConfirmationPopup.cpp
utc-Dali-CubeTransitionEffect.cpp
utc-Dali-EffectsView.cpp
- utc-Dali-Fade.cpp
+ utc-Dali-FadeTransition.cpp
utc-Dali-FlexContainer.cpp
utc-Dali-FlexNode.cpp
utc-Dali-GaussianBlurView.cpp
}
else
{
- mGl.BufferData(GetTarget(), size, &memory[0], GL_STATIC_DRAW); //@todo Query - do we need other usages?
+ mGl.BufferData(GetTarget(), GLsizeiptr(size), &memory[0], GL_STATIC_DRAW); //@todo Query - do we need other usages?
mCreated = true;
}
}
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
#include <dali-toolkit/public-api/transition/transition-set.h>
#include <dali-toolkit/public-api/transition/transition-base.h>
-#include <dali-toolkit/public-api/transition/fade.h>
+#include <dali-toolkit/public-api/transition/fade-transition.h>
using namespace Dali;
using namespace Dali::Toolkit;
bool& mSignalReceived; // owned by individual tests
};
-int UtcDaliFadeSetGetProperty(void)
+int UtcDaliFadeTransitionSetGetProperty(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliFadeSetGetProperty");
+ tet_infoline("UtcDaliFadeTransitionSetGetProperty");
Control control = Control::New();
- Fade fade = Fade::New(control, 0.5, TimePeriod(-0.5f, -0.5f));
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(-0.5f, -0.5f));
TimePeriod timePeriod = fade.GetTimePeriod();
DALI_TEST_EQUALS(0.0f, timePeriod.delaySeconds, TEST_LOCATION);
END_TEST;
}
-int UtcDaliFadeWithOffScene(void)
+int UtcDaliFadeTransitionWithOffScene(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliFadeWithOffScene");
+ tet_infoline("UtcDaliFadeTransitionWithOffScene");
Control control = Control::New();
control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
- Fade fade = Fade::New(control, 0.5, TimePeriod(0.5f));
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(0.5f));
fade.SetAppearingTransition(false); // set fade out
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(fade);
END_TEST;
}
-int UtcDaliFadeOut(void)
+int UtcDaliFadeTransitionDisappearing(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliFadeOut");
+ tet_infoline("UtcDaliFadeTransitionOut");
Control control = Control::New();
control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
- Fade fade = Fade::New(control, 0.5, TimePeriod(0.5f));
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(0.5f));
fade.SetAppearingTransition(false); // set fade out
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(fade);
END_TEST;
}
-int UtcDaliFadeIn(void)
+int UtcDaliFadeTransitionAppearing(void)
{
ToolkitTestApplication application;
- tet_infoline("UtcDaliFadeIn");
+ tet_infoline("UtcDaliFadeTransitionIn");
Control control = Control::New();
control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
- Fade fade = Fade::New(control, 0.5, TimePeriod(0.5f));
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(0.5f));
fade.SetAppearingTransition(true); // set fade in
TransitionSet transitionSet = TransitionSet::New();
transitionSet.AddTransition(fade);
END_TEST;
}
+
+
+int UtcDaliFadeTransitionAppearingWithDelay(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliFadeTransitionIn");
+
+ Control control = Control::New();
+ control.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ control.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ control.SetProperty(Actor::Property::POSITION, Vector3(100, 200, 0));
+ control.SetProperty(Actor::Property::SIZE, Vector3(150, 150, 0));
+ control.SetProperty(Actor::Property::OPACITY, 1.0f);
+ Property::Map controlProperty;
+ controlProperty.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR);
+ controlProperty.Insert(Toolkit::ColorVisual::Property::MIX_COLOR, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+ control.SetProperty(Toolkit::Control::Property::BACKGROUND, controlProperty);
+
+ application.GetScene().Add(control);
+
+ application.SendNotification();
+ application.Render(20);
+
+ DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ FadeTransition fade = FadeTransition::New(control, 0.5, TimePeriod(0.5f, 0.5f));
+ fade.SetAppearingTransition(true); // set fade in
+ TransitionSet transitionSet = TransitionSet::New();
+ transitionSet.AddTransition(fade);
+ transitionSet.Play();
+
+ bool signalReceived(false);
+ TransitionFinishCheck finishCheck(signalReceived);
+ transitionSet.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(400);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ float currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity <= 0.01f);
+
+ application.SendNotification();
+ application.Render(500);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+
+ currentOpacity = control.GetCurrentProperty<float>(Actor::Property::OPACITY);
+ DALI_TEST_CHECK(currentOpacity <= 1.0 && currentOpacity >= 0.8);
+
+ application.SendNotification();
+ application.Render(200);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+
+ application.SendNotification();
+ application.Render(20);
+
+ DALI_TEST_EQUALS(1.0f, control.GetCurrentProperty<float>(Actor::Property::OPACITY), TEST_LOCATION);
+
+ END_TEST;
+}
* Take from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AnimatedCube
*/
const char* TEST_GLTF_FILE_NAME[] = {TEST_RESOURCE_DIR "/AnimatedCube.gltf",
- TEST_RESOURCE_DIR "/InterpolationTest.gltf"};
+ TEST_RESOURCE_DIR "/InterpolationTest.gltf",
+ TEST_RESOURCE_DIR "/coverageTest.gltf"};
/**
* For the diffuse and specular cube map texture.
* These textures are based off version of Wave engine sample
static bool gSelectionChangedCallbackCalled;
static uint32_t oldSelectionStart;
static uint32_t oldSelectionEnd;
+static bool gSelectionClearedCallbackCalled;
static bool gAnchorClickedCallBackCalled;
static bool gAnchorClickedCallBackNotCalled;
static bool gTextChangedCallBackCalled;
bool* mCallbackFlag;
};
+static void TestSelectionClearedCallback(TextEditor control)
+{
+ tet_infoline(" TestSelectionClearedCallback");
+
+ gSelectionClearedCallbackCalled = true;
+}
+
static void TestSelectionChangedCallback(TextEditor control, uint32_t oldStart, uint32_t oldEnd)
{
tet_infoline(" TestSelectionChangedCallback");
END_TEST;
}
+int utcDaliTextEditorSelectionClearedSignal(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" utcDaliTextEditorSelectionClearedSignal");
+
+ TextEditor editor = TextEditor::New();
+ DALI_TEST_CHECK( editor );
+
+ application.GetScene().Add( editor );
+
+ // connect to the selection changed signal.
+ ConnectionTracker* testTracker = new ConnectionTracker();
+ DevelTextEditor::SelectionClearedSignal(editor).Connect(&TestSelectionClearedCallback);
+ bool selectionClearedSignal = false;
+ editor.ConnectSignal( testTracker, "selectionCleared", CallbackFunctor(&selectionClearedSignal) );
+
+ editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
+ editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+ // Avoid a crash when core load gl resources.
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Tap on the text editor
+ TestGenerateTap( application, 3.0f, 25.0f );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Move to second line of the text & Select some text in the right of the current cursor position
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // remove selection
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Tap on the text editor
+ TestGenerateTap( application, 3.0f, 25.0f );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Move to second line of the text & select.
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ //remove selection
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Move to second line of the text & select.
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // replace C with selected text
+ application.ProcessEvent( GenerateKey( "c", "", "c", KEY_C_CODE, 0, 0, Integration::KeyEvent::DOWN, "c", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DevelTextEditor::SelectText( editor ,1, 3 );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ editor.SetProperty( DevelTextEditor::Property::PRIMARY_CURSOR_POSITION, 3);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ DevelTextEditor::SelectText( editor ,1, 3 );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // select none
+ DevelTextEditor::SelectNone(editor);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ END_TEST;
+}
+
int utcDaliTextEditorSelectionChangedSignal(void)
{
ToolkitTestApplication application;
static bool gSelectionChangedCallbackCalled;
static uint32_t oldSelectionStart;
static uint32_t oldSelectionEnd;
+static bool gSelectionClearedCallbackCalled;
static bool gAnchorClickedCallBackCalled;
static bool gAnchorClickedCallBackNotCalled;
static bool gTextChangedCallBackCalled;
bool* mCallbackFlag;
};
+static void TestSelectionClearedCallback(TextField control)
+{
+ tet_infoline(" TestSelectionClearedCallback");
+
+ gSelectionClearedCallbackCalled = true;
+}
+
static void TestSelectionChangedCallback(TextField control, uint32_t oldStart, uint32_t oldEnd)
{
tet_infoline(" TestSelectionChangedCallback");
END_TEST;
}
+int utcDaliTextFieldSelectionClearedSignal(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" utcDaliTextFieldSelectionClearedSignal");
+
+ TextField field = TextField::New();
+ DALI_TEST_CHECK( field );
+
+ application.GetScene().Add( field );
+
+ // connect to the selection changed signal.
+ ConnectionTracker* testTracker = new ConnectionTracker();
+ DevelTextField::SelectionClearedSignal(field).Connect(&TestSelectionClearedCallback);
+ bool selectionClearedSignal = false;
+ field.ConnectSignal( testTracker, "selectionCleared", CallbackFunctor(&selectionClearedSignal) );
+
+ field.SetProperty( TextField::Property::TEXT, "Hello\nworld\nHello world" );
+ field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+
+ // Avoid a crash when core load gl resources.
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Tap on the text editor
+ TestGenerateTap( application, 3.0f, 25.0f );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Move to second line of the text & Select some text in the right of the current cursor position
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // remove selection
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::UP, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Tap on the text editor
+ TestGenerateTap( application, 3.0f, 25.0f );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Move to second line of the text & select.
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ //remove selection
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // Move to second line of the text & select.
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, KEY_SHIFT_MODIFIER, 0, Integration::KeyEvent::DOWN, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // replace D with selected text
+ application.ProcessEvent( GenerateKey( "D", "", "D", KEY_D_CODE, 0, 0, Integration::KeyEvent::DOWN, "D", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DevelTextField::SelectText( field ,1, 3 );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ field.SetProperty( DevelTextField::Property::PRIMARY_CURSOR_POSITION, 3);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ gSelectionClearedCallbackCalled = false;
+
+ DevelTextField::SelectText( field ,1, 3 );
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ // select none
+ DevelTextField::SelectNone(field);
+
+ // Render and notify
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK(gSelectionClearedCallbackCalled);
+
+ END_TEST;
+}
+
int utcDaliTextFieldSelectionChangedSignal(void)
{
ToolkitTestApplication application;
DALI_TEST_EQUALS(startWorldPosition, control2.GetCurrentProperty<Vector3>(Actor::Property::POSITION), TEST_LOCATION);
-
application.SendNotification();
application.Render(400);
#include <dali-toolkit/public-api/text/text-enumerations.h>
-#include <dali-toolkit/public-api/transition/fade.h>
+#include <dali-toolkit/public-api/transition/fade-transition.h>
#include <dali-toolkit/public-api/transition/transition.h>
#include <dali-toolkit/public-api/transition/transition-set.h>
return GetImpl(textEditor).SelectionChangedSignal();
}
+SelectionClearedSignalType& SelectionClearedSignal(TextEditor textEditor)
+{
+ return GetImpl(textEditor).SelectionClearedSignal();
+}
+
void SelectWholeText(TextEditor textEditor)
{
GetImpl(textEditor).SelectWholeText();
DALI_TOOLKIT_API SelectionChangedSignalType& SelectionChangedSignal(TextEditor textEditor);
/**
+ * @brief selection cleared signal type.
+ */
+using SelectionClearedSignalType = Signal<void(TextEditor)>;
+
+/**
+ * @brief This signal is emitted when the selection has been cleared.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( TextEditor textEditor);
+ * @endcode
+ * @param[in] textEditor The instance of TextEditor.
+ * @return The signal to connect to
+ */
+DALI_TOOLKIT_API SelectionClearedSignalType& SelectionClearedSignal(TextEditor textEditor);
+
+/**
* @brief Select the whole text of TextEditor.
*
* @param[in] textEditor The instance of TextEditor.
return GetImpl(textField).SelectionChangedSignal();
}
+SelectionClearedSignalType& SelectionClearedSignal(TextField textField)
+{
+ return GetImpl(textField).SelectionClearedSignal();
+}
+
void SelectWholeText(TextField textField)
{
GetImpl(textField).SelectWholeText();
DALI_TOOLKIT_API SelectionChangedSignalType& SelectionChangedSignal(TextField textField);
/**
+ * @brief selection cleared signal type.
+ */
+using SelectionClearedSignalType = Signal<void(TextField)>;
+
+/**
+ * @brief This signal is emitted when the selection has been cleared.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( TextField textField);
+ * @endcode
+ * @param[in] textField The instance of TextField.
+ * @return The signal to connect to
+ */
+DALI_TOOLKIT_API SelectionClearedSignalType& SelectionClearedSignal(TextField textField);
+
+/**
* @brief Select the whole text of TextField.
*
* @param[in] textField The instance of TextField.
template<typename T>
bool ReadBinFile(Vector<T>& dataBuffer, std::string url, int32_t offset, int32_t count)
{
+ size_t readCount = 0;
Dali::FileStream fileStream(url, FileStream::READ | FileStream::BINARY);
FILE* fp = fileStream.GetFile();
- if(!fp)
+ if(fp)
{
- return false;
- }
-
- dataBuffer.Resize(count);
- ssize_t result = -1;
- if(!fseek(fp, offset, SEEK_SET))
- {
- result = fread(&dataBuffer[0], sizeof(T), count, fp);
+ dataBuffer.Resize(count);
+ if(!fseek(fp, offset, SEEK_SET))
+ {
+ readCount = fread(&dataBuffer[0], sizeof(T), count, fp);
+ dataBuffer.Resize(readCount);
+ }
}
- return (result >= 0);
+ return (readCount > 0);
}
template<typename T>
if(accessor.componentType == 5120)
{
Dali::Vector<int8_t> inputBufferData;
- ReadBinFile<int8_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<int8_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
else if(accessor.componentType == 5121)
{
Dali::Vector<uint8_t> inputBufferData;
- ReadBinFile<uint8_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<uint8_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
else if(accessor.componentType == 5122)
{
Dali::Vector<int16_t> inputBufferData;
- ReadBinFile<int16_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<int16_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
else if(accessor.componentType == 5123)
{
Dali::Vector<uint16_t> inputBufferData;
- ReadBinFile<uint16_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<uint16_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
else if(accessor.componentType == 5125)
{
Dali::Vector<uint32_t> inputBufferData;
- ReadBinFile<uint32_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<uint32_t>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
else if(accessor.componentType == 5126)
{
Dali::Vector<float> inputBufferData;
- ReadBinFile<float>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count);
- FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ if(ReadBinFile<float>(inputBufferData, path + load_uri, bufferView.byteOffset + accessor.byteOffset, elementNumOfByteStride * accessor.count))
+ {
+ FitBuffer(bufferData, inputBufferData, accessor.count, elementNumOfByteStride, accessor.normalized);
+ }
}
}
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "inputFiltered", SIGNAL_INPUT_FILTERED )
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "cursorPositionChanged", SIGNAL_CURSOR_POSITION_CHANGED)
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "selectionChanged", SIGNAL_SELECTION_CHANGED )
+DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "selectionCleared", SIGNAL_SELECTION_CLEARED )
DALI_TYPE_REGISTRATION_END()
// clang-format on
return mSelectionChangedSignal;
}
+DevelTextEditor::SelectionClearedSignalType& TextEditor::SelectionClearedSignal()
+{
+ return mSelectionClearedSignal;
+}
+
Text::ControllerPtr TextEditor::GetTextController()
{
return mController;
editorImpl.SelectionChangedSignal().Connect(tracker, functor);
}
}
+ else if(0 == strcmp(signalName.c_str(), SIGNAL_SELECTION_CLEARED))
+ {
+ if(editor)
+ {
+ Internal::TextEditor& editorImpl(GetImpl(editor));
+ editorImpl.SelectionClearedSignal().Connect(tracker, functor);
+ }
+ }
else
{
// signalName does not match any signal
// Forward input events to controller
EnableGestureDetection(static_cast<GestureType::Value>(GestureType::TAP | GestureType::PAN | GestureType::LONG_PRESS));
GetTapGestureDetector().SetMaximumTapsRequired(2);
+ GetTapGestureDetector().ReceiveAllTapEvents(true);
self.TouchedSignal().Connect(this, &TextEditor::OnTouched);
EmitSelectionChangedSignal();
}
+ if(mSelectionCleared)
+ {
+ EmitSelectionClearedSignal();
+ }
+
// The text-editor emits signals when the input style changes. These changes of style are
// detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals
// can't be emitted during the size negotiation as the callbacks may update the UI.
mSelectionChanged = false;
}
+void TextEditor::EmitSelectionClearedSignal()
+{
+ Dali::Toolkit::TextEditor handle(GetOwner());
+ mSelectionClearedSignal.Emit(handle);
+ mSelectionCleared = false;
+}
+
void TextEditor::SelectionChanged(uint32_t oldStart, uint32_t oldEnd, uint32_t newStart, uint32_t newEnd)
{
if(((oldStart != newStart) || (oldEnd != newEnd)) && !mSelectionChanged)
{
+ if(newStart == newEnd)
+ {
+ mSelectionCleared = true;
+ }
+
mSelectionChanged = true;
mOldSelectionStart = oldStart;
mOldSelectionEnd = oldEnd;
mScrollStarted(false),
mTextChanged(false),
mCursorPositionChanged(false),
- mSelectionChanged(false)
+ mSelectionChanged(false),
+ mSelectionCleared(false)
{
}
DevelTextEditor::SelectionChangedSignalType& SelectionChangedSignal();
/**
+ * @copydoc Dali::Toollkit::TextEditor::SelectionClearedSignal()
+ */
+ DevelTextEditor::SelectionClearedSignalType& SelectionClearedSignal();
+
+ /**
* Connects a callback function with the object's signals.
* @param[in] object The object providing the signal.
* @param[in] tracker Used to disconnect the signal.
void EmitSelectionChangedSignal();
/**
+ * @brief Emits SelectionCleared signal.
+ */
+ void EmitSelectionClearedSignal();
+
+ /**
* @brief set RenderActor's position with new scrollPosition
*
* Apply updated scroll position or start scroll animation if VerticalScrollAnimation is enabled
Toolkit::DevelTextEditor::InputFilteredSignalType mInputFilteredSignal;
Toolkit::DevelTextEditor::CursorPositionChangedSignalType mCursorPositionChangedSignal;
Toolkit::DevelTextEditor::SelectionChangedSignalType mSelectionChangedSignal;
+ Toolkit::DevelTextEditor::SelectionClearedSignalType mSelectionClearedSignal;
InputMethodContext mInputMethodContext;
Text::ControllerPtr mController;
bool mTextChanged : 1; ///< If true, emits TextChangedSignal in next OnRelayout().
bool mCursorPositionChanged : 1; ///< If true, emits CursorPositionChangedSignal at the end of OnRelayout().
bool mSelectionChanged : 1; ///< If true, emits SelectionChangedSignal at the end of OnRelayout().
+ bool mSelectionCleared : 1; ///< If true, emits SelectionClearedSignal at the end of OnRelayout().
//args for cursor PositionChanged event
unsigned int mOldPosition;
DALI_SIGNAL_REGISTRATION(Toolkit, TextField, "inputFiltered", SIGNAL_INPUT_FILTERED )
DALI_SIGNAL_REGISTRATION(Toolkit, TextField, "cursorPositionChanged", SIGNAL_CURSOR_POSITION_CHANGED)
DALI_SIGNAL_REGISTRATION(Toolkit, TextField, "selectionChanged", SIGNAL_SELECTION_CHANGED )
+DALI_SIGNAL_REGISTRATION(Toolkit, TextField, "selectionCleared", SIGNAL_SELECTION_CLEARED )
DALI_TYPE_REGISTRATION_END()
// clang-format on
fieldImpl.SelectionChangedSignal().Connect(tracker, functor);
}
}
+ else if(0 == strcmp(signalName.c_str(), SIGNAL_SELECTION_CLEARED))
+ {
+ if(field)
+ {
+ Internal::TextField& fieldImpl(GetImpl(field));
+ fieldImpl.SelectionClearedSignal().Connect(tracker, functor);
+ }
+ }
else
{
// signalName does not match any signal
return mSelectionChangedSignal;
}
+DevelTextField::SelectionClearedSignalType& TextField::SelectionClearedSignal()
+{
+ return mSelectionClearedSignal;
+}
+
void TextField::OnInitialize()
{
Actor self = Self();
// Forward input events to controller
EnableGestureDetection(static_cast<GestureType::Value>(GestureType::TAP | GestureType::PAN | GestureType::LONG_PRESS));
GetTapGestureDetector().SetMaximumTapsRequired(2);
+ GetTapGestureDetector().ReceiveAllTapEvents(true);
self.TouchedSignal().Connect(this, &TextField::OnTouched);
EmitSelectionChangedSignal();
}
+ if(mSelectionCleared)
+ {
+ EmitSelectionClearedSignal();
+ }
+
// The text-field emits signals when the input style changes. These changes of style are
// detected during the relayout process (size negotiation), i.e after the cursor has been moved. Signals
// can't be emitted during the size negotiation as the callbacks may update the UI.
mSelectionChanged = false;
}
+void TextField::EmitSelectionClearedSignal()
+{
+ Dali::Toolkit::TextField handle(GetOwner());
+ mSelectionClearedSignal.Emit(handle);
+ mSelectionCleared = false;
+}
+
void TextField::SelectionChanged(uint32_t oldStart, uint32_t oldEnd, uint32_t newStart, uint32_t newEnd)
{
if(((oldStart != newStart) || (oldEnd != newEnd)) && !mSelectionChanged)
{
+ if(newStart == newEnd)
+ {
+ mSelectionCleared = true;
+ }
+
mSelectionChanged = true;
mOldSelectionStart = oldStart;
mOldSelectionEnd = oldEnd;
mHasBeenStaged(false),
mTextChanged(false),
mCursorPositionChanged(false),
- mSelectionChanged(false)
+ mSelectionChanged(false),
+ mSelectionCleared(false)
{
}
*/
DevelTextField::SelectionChangedSignalType& SelectionChangedSignal();
+ /**
+ * @copydoc TextField::SelectionClearedSignal()
+ */
+ DevelTextField::SelectionClearedSignalType& SelectionClearedSignal();
+
private: // From Control
/**
* @copydoc Control::OnInitialize()
void EmitSelectionChangedSignal();
/**
+ * @brief Emits SelectionCleared signal.
+ */
+ void EmitSelectionClearedSignal();
+
+ /**
* @brief Callback function for when the layout is changed.
* @param[in] actor The actor whose layoutDirection is changed.
* @param[in] type The layoutDirection.
Toolkit::DevelTextField::InputFilteredSignalType mInputFilteredSignal;
Toolkit::DevelTextField::CursorPositionChangedSignalType mCursorPositionChangedSignal;
Toolkit::DevelTextField::SelectionChangedSignalType mSelectionChangedSignal;
+ Toolkit::DevelTextField::SelectionClearedSignalType mSelectionClearedSignal;
InputMethodContext mInputMethodContext;
Text::ControllerPtr mController;
bool mTextChanged : 1; ///< If true, emits TextChangedSignal in next OnRelayout().
bool mCursorPositionChanged : 1; ///< If true, emits CursorPositionChangedSignal at the end of OnRelayout().
bool mSelectionChanged : 1; ///< If true, emits SelectionChangedSignal at the end of OnRelayout().
+ bool mSelectionCleared : 1; ///< If true, emits SelectionClearedSignal at the end of OnRelayout().
//args for cursor position changed event
unsigned int mOldPosition;
${toolkit_src_dir}/text/rendering/text-backend-impl.cpp
${toolkit_src_dir}/text/rendering/text-typesetter.cpp
${toolkit_src_dir}/text/rendering/view-model.cpp
- ${toolkit_src_dir}/transition/fade-impl.cpp
+ ${toolkit_src_dir}/transition/fade-transition-impl.cpp
${toolkit_src_dir}/transition/transition-base-impl.cpp
${toolkit_src_dir}/transition/transition-impl.cpp
${toolkit_src_dir}/transition/transition-lifecycle-controller.cpp
ModelPtr& model = impl.mModel;
LogicalModelPtr& logicalModel = model->mLogicalModel;
VisualModelPtr& visualModel = model->mVisualModel;
+ uint32_t oldSelStart = eventData.mLeftSelectionPosition;
+ uint32_t oldSelEnd = eventData.mRightSelectionPosition;
CharacterIndex& primaryCursorPosition = eventData.mPrimaryCursorPosition;
CharacterIndex previousPrimaryCursorPosition = primaryCursorPosition;
// Update selection position after moving the cursor
eventData.mLeftSelectionPosition = primaryCursorPosition;
eventData.mRightSelectionPosition = primaryCursorPosition;
+
+ if(impl.mSelectableControlInterface != nullptr && eventData.mDecorator->IsHighlightVisible())
+ {
+ impl.mSelectableControlInterface->SelectionChanged(oldSelStart, oldSelEnd, eventData.mLeftSelectionPosition, eventData.mRightSelectionPosition);
+ }
}
if(isShiftModifier && impl.IsShowingRealText() && eventData.mShiftSelectionFlag)
int cursorPositionDelta = primaryCursorPosition - previousPrimaryCursorPosition;
if(cursorPositionDelta > 0 || eventData.mRightSelectionPosition > 0u) // Check the boundary
{
- uint32_t oldStart = eventData.mLeftSelectionPosition;
- uint32_t oldEnd = eventData.mRightSelectionPosition;
-
eventData.mRightSelectionPosition += cursorPositionDelta;
if(impl.mSelectableControlInterface != nullptr)
{
- impl.mSelectableControlInterface->SelectionChanged(oldStart, oldEnd, eventData.mLeftSelectionPosition, eventData.mRightSelectionPosition);
+ impl.mSelectableControlInterface->SelectionChanged(oldSelStart, oldSelEnd, eventData.mLeftSelectionPosition, eventData.mRightSelectionPosition);
}
}
selecting = true;
if(impl.IsShowingRealText())
{
// Convert from control's coords to text's coords.
- const float xPosition = event.p2.mFloat - model->mScrollPosition.x;
- const float yPosition = event.p3.mFloat - model->mScrollPosition.y;
+ const float xPosition = event.p2.mFloat - model->mScrollPosition.x;
+ const float yPosition = event.p3.mFloat - model->mScrollPosition.y;
+ uint32_t oldSelStart = eventData.mLeftSelectionPosition;
+ uint32_t oldSelEnd = eventData.mRightSelectionPosition;
// Keep the tap 'x' position. Used to move the cursor.
eventData.mCursorHookPositionX = xPosition;
CharacterHitTest::TAP,
matchedCharacter);
+ if(impl.mSelectableControlInterface != nullptr && eventData.mDecorator->IsHighlightVisible())
+ {
+ impl.mSelectableControlInterface->SelectionChanged(oldSelStart, oldSelEnd, eventData.mPrimaryCursorPosition, eventData.mPrimaryCursorPosition);
+ }
+
// When the cursor position is changing, delay cursor blinking
eventData.mDecorator->DelayCursorBlink();
}
EventData& eventData = *impl.mEventData;
if(eventData.mSelectionEnabled && eventData.mState == EventData::SELECTING)
{
- eventData.mPrimaryCursorPosition = 0u;
uint32_t oldStart = eventData.mLeftSelectionPosition;
uint32_t oldEnd = eventData.mRightSelectionPosition;
eventData.mLeftSelectionPosition = eventData.mRightSelectionPosition = eventData.mPrimaryCursorPosition;
- impl.ChangeState(EventData::INACTIVE);
+ impl.ChangeState(EventData::EDITING);
eventData.mUpdateCursorPosition = true;
eventData.mUpdateInputStyle = true;
eventData.mScrollAfterUpdatePosition = true;
if(EventData::SELECTING == impl.mEventData->mState)
{
std::string removedString;
+ uint32_t oldSelStart = impl.mEventData->mLeftSelectionPosition;
+ uint32_t oldSelEnd = impl.mEventData->mRightSelectionPosition;
+
impl.RetrieveSelection(removedString, true);
if(!removedString.empty())
RemoveTextAnchor(controller, cursorOffset, numberOfCharacters, previousCursorIndex);
}
+
+ if(impl.mSelectableControlInterface != nullptr)
+ {
+ impl.mSelectableControlInterface->SelectionChanged(oldSelStart, oldSelEnd, impl.mEventData->mPrimaryCursorPosition, impl.mEventData->mPrimaryCursorPosition);
+ }
}
}
*/
// CLASS HEADER
-#include <dali-toolkit/internal/transition/fade-impl.h>
+#include <dali-toolkit/internal/transition/fade-transition-impl.h>
// EXTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
{
namespace Internal
{
-namespace
-{
-const Dali::AlphaFunction DEFAULT_ALPHA_FUNCTION(Dali::AlphaFunction::DEFAULT);
-
-} // anonymous namespace
-FadePtr Fade::New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
+FadeTransitionPtr FadeTransition::New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
{
float delaySeconds = timePeriod.delaySeconds;
if(delaySeconds < 0.0f)
durationSeconds = 0.0f;
}
- FadePtr fade = new Fade(control, Dali::Clamp(opacity, 0.0f, 1.0f), TimePeriod(delaySeconds, durationSeconds));
+ FadeTransitionPtr fadeTransition = new FadeTransition(control, Dali::Clamp(opacity, 0.0f, 1.0f), TimePeriod(delaySeconds, durationSeconds));
// Second-phase construction
- fade->Initialize();
+ fadeTransition->Initialize();
- return fade;
+ return fadeTransition;
}
-Fade::Fade(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
+FadeTransition::FadeTransition(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
: TransitionBase(),
mTargetControl(control),
mOpacity(opacity)
SetTimePeriod(timePeriod);
}
-Fade::~Fade()
+FadeTransition::~FadeTransition()
{
}
-void Fade::OnPlay()
+void FadeTransition::OnPlay()
{
Dali::Toolkit::Control targetControl = mTargetControl.GetHandle();
if(!targetControl || !targetControl[Dali::Actor::Property::CONNECTED_TO_SCENE])
return;
}
- Property::Map initialPropertyMap;
Property::Map startPropertyMap;
Property::Map finishPropertyMap;
- float targetOpacity = GetWorldColor(targetControl).a;
- targetControl[Dali::Actor::Property::COLOR_MODE] = Dali::ColorMode::USE_OWN_COLOR;
-
+ float targetOpacity = targetControl[Dali::Actor::Property::OPACITY];
if(IsAppearingTransition())
{
- initialPropertyMap.Insert(Dali::Actor::Property::OPACITY, 0.0f);
startPropertyMap.Insert(Dali::Actor::Property::OPACITY, mOpacity * targetOpacity);
finishPropertyMap.Insert(Dali::Actor::Property::OPACITY, targetOpacity);
}
else
{
- initialPropertyMap.Insert(Dali::Actor::Property::OPACITY, targetOpacity);
startPropertyMap.Insert(Dali::Actor::Property::OPACITY, targetOpacity);
finishPropertyMap.Insert(Dali::Actor::Property::OPACITY, mOpacity * targetOpacity);
}
- SetInitialPropertyMap(initialPropertyMap);
SetStartPropertyMap(startPropertyMap);
SetFinishPropertyMap(finishPropertyMap);
}
-#ifndef DALI_TOOLKIT_INTERNAL_FADE_H
-#define DALI_TOOLKIT_INTERNAL_FADE_H
+#ifndef DALI_TOOLKIT_INTERNAL_FADE_TRANSITION_H
+#define DALI_TOOLKIT_INTERNAL_FADE_TRANSITION_H
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd.
// INTERNAL INCLUDES
#include <dali-toolkit/internal/transition/transition-base-impl.h>
#include <dali-toolkit/public-api/controls/control.h>
-#include <dali-toolkit/public-api/transition/fade.h>
+#include <dali-toolkit/public-api/transition/fade-transition.h>
// EXTERNAL INCLUDES
#include <dali/public-api/object/weak-handle.h>
{
namespace Internal
{
-using FadePtr = IntrusivePtr<Fade>;
+using FadeTransitionPtr = IntrusivePtr<FadeTransition>;
-class Fade : public TransitionBase
+class FadeTransition : public TransitionBase
{
public:
/**
- * @brief Create a new Fade object.
+ * @brief Create a new FadeTransition object.
* @param[in] control A control of this transition.
* @param[in] opacity opacity value the control Opacity property will be changed from/to.
* @param[in] timePeriod The duration of the animation.
- * @return A smart-pointer to the newly allocated Fade.
+ * @return A smart-pointer to the newly allocated FadeTransition.
*/
- static FadePtr New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod);
+ static FadeTransitionPtr New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod);
protected:
/**
- * @copydoc Dali::Toolkit::Fade::OnPlay()
+ * @copydoc Dali::Toolkit::FadeTransition::OnPlay()
*/
void OnPlay() override;
protected:
/**
- * @brief Construct a new Fade.
+ * @brief Construct a new FadeTransition.
*/
- Fade(Dali::Toolkit::Control control,
- float opacity,
- TimePeriod timePeriod);
+ FadeTransition(Dali::Toolkit::Control control,
+ float opacity,
+ TimePeriod timePeriod);
/**
* @brief A reference counted object may only be deleted by calling Unreference()
*/
- ~Fade() override;
+ ~FadeTransition() override;
private:
// Undefined
- Fade(const Fade&);
+ FadeTransition(const FadeTransition&);
// Undefined
- Fade& operator=(const Fade& rhs);
+ FadeTransition& operator=(const FadeTransition& rhs);
private:
WeakHandle<Dali::Toolkit::Control> mTargetControl;
- float mOpacity;
+ float mOpacity;
};
} // namespace Internal
// Helpers for public-api forwarding methods
-inline Internal::Fade& GetImplementation(Dali::Toolkit::Fade& fade)
+inline Internal::FadeTransition& GetImplementation(Dali::Toolkit::FadeTransition& fade)
{
- DALI_ASSERT_ALWAYS(fade && "Fade handle is empty");
+ DALI_ASSERT_ALWAYS(fade && "FadeTransition handle is empty");
BaseObject& handle = fade.GetBaseObject();
- return static_cast<Internal::Fade&>(handle);
+ return static_cast<Internal::FadeTransition&>(handle);
}
-inline const Internal::Fade& GetImplementation(const Dali::Toolkit::Fade& fade)
+inline const Internal::FadeTransition& GetImplementation(const Dali::Toolkit::FadeTransition& fade)
{
- DALI_ASSERT_ALWAYS(fade && "Fade handle is empty");
+ DALI_ASSERT_ALWAYS(fade && "FadeTransition handle is empty");
const BaseObject& handle = fade.GetBaseObject();
- return static_cast<const Internal::Fade&>(handle);
+ return static_cast<const Internal::FadeTransition&>(handle);
}
} // namespace Toolkit
} // namespace Dali
-#endif // DALI_TOOLKIT_INTERNAL_FADE_H
+#endif // DALI_TOOLKIT_INTERNAL_FADE_TRANSITION_H
{
namespace
{
+static constexpr float OPACITY_TRANSPARENT = 0.0f;
+
const Dali::AlphaFunction DEFAULT_ALPHA_FUNCTION(Dali::AlphaFunction::DEFAULT);
+const Property::Map PROPERTY_MAP_INDEPENDENT_CONTROL{
+ {Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER},
+ {Dali::Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER},
+ {Dali::Actor::Property::POSITION_USES_ANCHOR_POINT, true},
+ {Dali::Actor::Property::INHERIT_POSITION, false},
+ {Dali::Actor::Property::INHERIT_ORIENTATION, false},
+ {Dali::Actor::Property::INHERIT_SCALE, false},
+ {Dali::Actor::Property::COLOR_MODE, Dali::ColorMode::USE_OWN_COLOR},
+};
+
Property::Map GetOriginalProperties(Dali::Toolkit::Control control)
{
Property::Map propertyMap;
mTimePeriod(TimePeriod(0.0f)),
mTransitionWithChild(false),
mMoveTargetChildren(false),
- mIsAppearingTransition(true)
+ mIsAppearingTransition(true),
+ mIsPairTransition(false)
{
}
return;
}
+ // Set world transform and color to the target control to make it independent of the parent control and its transition.
+ // The properties will be returned at the TransitionFinished() method.
+ Matrix targetWorldTransform = GetWorldTransform(mTarget);
+ Vector3 targetPosition, targetScale;
+ Quaternion targetOrientation;
+ targetWorldTransform.GetTransformComponents(targetPosition, targetOrientation, targetScale);
+ Vector4 targetColor = GetWorldColor(mTarget);
+
+ mTarget.SetProperties(PROPERTY_MAP_INDEPENDENT_CONTROL);
+ mTarget[Dali::Actor::Property::POSITION] = targetPosition;
+ mTarget[Dali::Actor::Property::SCALE] = targetScale;
+ mTarget[Dali::Actor::Property::ORIENTATION] = targetOrientation;
+ mTarget[Dali::Actor::Property::COLOR] = targetColor;
+
OnPlay();
SetAnimation();
return;
}
+ // If this transition is not a transition from a Control to another Control
+ // and a transition effect to appear with delay,
+ // the mTarget should not be shown until delay seconds.
+ if(!IsPairTransition() && mIsAppearingTransition && mAnimation && mTimePeriod.delaySeconds > Dali::Math::MACHINE_EPSILON_10)
+ {
+ Dali::KeyFrames initialKeyframes = Dali::KeyFrames::New();
+ initialKeyframes.Add(0.0f, OPACITY_TRANSPARENT);
+ initialKeyframes.Add(1.0f, OPACITY_TRANSPARENT);
+ mAnimation.AnimateBetween(Property(mTarget, Dali::Actor::Property::OPACITY), initialKeyframes, TimePeriod(mTimePeriod.delaySeconds));
+ }
+
for(uint32_t i = 0; i < mStartPropertyMap.Count(); ++i)
{
- Property::Value* initialValuePointer = mInitialPropertyMap.Find(mStartPropertyMap.GetKeyAt(i).indexKey);
Property::Value* finishValue = mFinishPropertyMap.Find(mStartPropertyMap.GetKeyAt(i).indexKey);
if(finishValue)
{
- Property::Value initialValue = mStartPropertyMap.GetValue(i);
- if(initialValuePointer)
- {
- initialValue = *initialValuePointer;
- }
- AnimateBetween(mTarget, mStartPropertyMap.GetKeyAt(i).indexKey, initialValue, mStartPropertyMap.GetValue(i), *finishValue);
+ AnimateBetween(mTarget, mStartPropertyMap.GetKeyAt(i).indexKey, mStartPropertyMap.GetValue(i), *finishValue);
}
}
}
-void TransitionBase::AnimateBetween(Dali::Toolkit::Control target, Property::Index index, Property::Value initialValue, Property::Value sourceValue, Property::Value destinationValue)
+void TransitionBase::AnimateBetween(Dali::Toolkit::Control target, Property::Index index, Property::Value sourceValue, Property::Value destinationValue)
{
if(mAnimation)
{
- if(mTimePeriod.delaySeconds>0.0f)
+ // To make each property keep start value during delay time.
+ // When this transition is not Pair transition, it is not required.
+ // (For appearing transition, the mTarget control will not be shown during delay time,
+ // For disapplearing transition, the property of mTarget control keeps current value during delay time)
+ if(IsPairTransition() && mTimePeriod.delaySeconds > Dali::Math::MACHINE_EPSILON_10)
{
Dali::KeyFrames initialKeyframes = Dali::KeyFrames::New();
- initialKeyframes.Add(0.0f, initialValue);
- initialKeyframes.Add(1.0f, initialValue);
+ initialKeyframes.Add(0.0f, sourceValue);
+ initialKeyframes.Add(1.0f, sourceValue);
mAnimation.AnimateBetween(Property(target, index), initialKeyframes, TimePeriod(mTimePeriod.delaySeconds));
}
Dali::KeyFrames keyframes = Dali::KeyFrames::New();
}
protected:
- /**
- * @brief Set property map which will be used as a initial properties.
- * @param[in] propertyMap propertyMap that will be used as a start value of transition.
- */
- void SetInitialPropertyMap(const Property::Map& propertyMap)
- {
- mInitialPropertyMap = propertyMap;
- }
+
/**
* @brief Set property map which will be used as a animation start properties.
* @param[in] propertyMap propertyMap that will be used as a start value of transition.
return mIsAppearingTransition;
}
+ /**
+ * @brief Set whether this transition is a transition from a Control to another Control or effect to appearing or disappearing.
+ * @param[in] pairTransition True if this transition is appearing transition.
+ */
+ void SetPairTransition(bool pairTransition)
+ {
+ mIsPairTransition = pairTransition;
+ }
+
+ /**
+ * @brief Returns whether this transition is a transition from a Control to another Control or effect to appearing or disappearing.
+ */
+ bool IsPairTransition() const
+ {
+ return mIsPairTransition;
+ }
+
protected:
/**
* Construct a new TransitionBase.
* @brief Adds a property on an animation between sourceValue and destimationValue.
* @param[in] target target control to be animated.
* @param[in] index property index for animation.
- * @param[in] initialValue initial value of animation.
* @param[in] sourceValue source value of animation.
* @param[in] destinationValue destination value of animation.
*/
- void AnimateBetween(Dali::Toolkit::Control target, Property::Index index, Property::Value initialValue, Property::Value sourceValue, Property::Value destinationValue);
+ void AnimateBetween(Dali::Toolkit::Control target, Property::Index index, Property::Value sourceValue, Property::Value destinationValue);
/**
* @brief Copy target to make clone for the child Actors
Dali::Actor mCopiedActor; ///< Copied View that will replace mTarget during transition
Dali::Animation mAnimation; ///< Property animations for the transition of mTarget
AlphaFunction mAlphaFunction; ///< Alpha function that will applied for the property animation
- Property::Map mInitialPropertyMap; ///< Initial properties to be animated. (world transform)
Property::Map mStartPropertyMap; ///< Start properties to be animated. (world transform)
Property::Map mFinishPropertyMap; ///< Finish properties to be animated. (world transform)
Property::Map mOriginalPropertyMap; ///< Original properties of mTarget to be used to restore after the transition is finished.
///< If this is false, the child Actors are moved to the child of mCopiedActor that will have original properties of target Actor during Transition.
bool mMoveTargetChildren; ///< Flag, if mTransitionWithChild is false and mTarget has children than True.
bool mIsAppearingTransition; ///< True, if this transition is appearing transition.
+ bool mIsPairTransition; ///< True, if this transition is started from a Control to another Control.
};
} // namespace Internal
{
SetTarget(destination);
SetTimePeriod(timePeriod);
+ SetPairTransition(true);
}
Transition::~Transition()
Quaternion sourceOrientation;
sourceWorldTransform.GetTransformComponents(sourcePosition, sourceOrientation, sourceScale);
- Matrix destinationWorldTransform = GetWorldTransform(destinationControl);
- Vector3 destinationPosition, destinationScale;
- Quaternion destinationOrientation;
- destinationWorldTransform.GetTransformComponents(destinationPosition, destinationOrientation, destinationScale);
+ Vector3 destinationPosition = destinationControl[Dali::Actor::Property::POSITION];
+ Vector3 destinationScale = destinationControl[Dali::Actor::Property::SCALE];
+ Quaternion destinationOrientation = destinationControl[Dali::Actor::Property::ORIENTATION];
+ Vector4 targetColor = destinationControl[Dali::Actor::Property::COLOR];
+ Vector3 targetSize = destinationControl[Dali::Actor::Property::SIZE];
- Vector3 targetSize = destinationControl[Dali::Actor::Property::SIZE];
- Vector4 targetColor = GetWorldColor(destinationControl);
Property::Map startPropertyMap;
Property::Map finishPropertyMap;
- // Use world transform if this transition requires animation of transform.
- destinationControl[Dali::Actor::Property::ANCHOR_POINT] = AnchorPoint::CENTER;
- destinationControl[Dali::Actor::Property::PARENT_ORIGIN] = ParentOrigin::CENTER;
- destinationControl[Dali::Actor::Property::POSITION_USES_ANCHOR_POINT] = true;
- destinationControl[Dali::Actor::Property::INHERIT_POSITION] = false;
- destinationControl[Dali::Actor::Property::INHERIT_ORIENTATION] = false;
- destinationControl[Dali::Actor::Property::INHERIT_SCALE] = false;
- destinationControl[Dali::Actor::Property::COLOR_MODE] = Dali::ColorMode::USE_OWN_COLOR;
-
// Set animation of Transform
startPropertyMap.Insert(Dali::Actor::Property::POSITION, sourcePosition);
finishPropertyMap.Insert(Dali::Actor::Property::POSITION, destinationPosition);
void TransitionSet::TransitionFinished(Dali::Animation& source)
{
- for(auto&& transition : mTransitions)
+ // Call TransitionFinished() in reverse order.
+ // This let the first copied original properties will be return again at the final.
+ std::vector<TransitionBasePtr>::reverse_iterator riter;
+ for(riter = mTransitions.rbegin(); riter != mTransitions.rend(); riter++)
{
- transition->TransitionFinished();
+ (*riter)->TransitionFinished();
}
EmitFinishedSignal();
VectorAnimationTask::TimePoint VectorAnimationTask::CalculateNextFrameTime(bool renderNow)
{
- // std::chrono::time_point template has second parameter duration which defaults to the std::chrono::system_clock supported
+ // std::chrono::time_point template has second parameter duration which defaults to the std::chrono::steady_clock supported
// duration. In some C++11 implementations it is a milliseconds duration, so it fails to compile unless mNextFrameStartTime
// is casted to use the default duration.
mNextFrameStartTime = std::chrono::time_point_cast<TimePoint::duration>(mNextFrameStartTime + std::chrono::microseconds(mFrameDurationMicroSeconds));
- auto current = std::chrono::system_clock::now();
+ auto current = std::chrono::steady_clock::now();
if(renderNow)
{
mNextFrameStartTime = current;
public:
using UploadCompletedSignalType = Dali::VectorAnimationRenderer::UploadCompletedSignalType;
- using TimePoint = std::chrono::time_point<std::chrono::system_clock>;
+ using TimePoint = std::chrono::time_point<std::chrono::steady_clock>;
/**
* Flags for re-sending data to the vector animation thread
{
VectorAnimationTaskPtr nextTask = *it;
- auto currentTime = std::chrono::system_clock::now();
+ auto currentTime = std::chrono::steady_clock::now();
auto nextFrameTime = nextTask->GetNextFrameTime();
#if defined(DEBUG_ENABLED)
Join();
}
-void VectorAnimationThread::SleepThread::SleepUntil(std::chrono::time_point<std::chrono::system_clock> timeToSleepUntil)
+void VectorAnimationThread::SleepThread::SleepUntil(std::chrono::time_point<std::chrono::steady_clock> timeToSleepUntil)
{
ConditionalWait::ScopedLock lock(mConditionalWait);
mSleepTimePoint = timeToSleepUntil;
while(!mDestroyThread)
{
bool needToSleep;
- std::chrono::time_point<std::chrono::system_clock> sleepTimePoint;
+ std::chrono::time_point<std::chrono::steady_clock> sleepTimePoint;
{
ConditionalWait::ScopedLock lock(mConditionalWait);
if(needToSleep)
{
#if defined(DEBUG_ENABLED)
- auto sleepDuration = std::chrono::duration_cast<std::chrono::milliseconds>(mSleepTimePoint - std::chrono::system_clock::now());
+ auto sleepDuration = std::chrono::duration_cast<std::chrono::milliseconds>(mSleepTimePoint - std::chrono::steady_clock::now());
DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "VectorAnimationThread::SleepThread::Run: [sleep duration = %lld]\n", sleepDuration.count());
#endif
/**
* @brief Sleeps untile the specified time point.
*/
- void SleepUntil(std::chrono::time_point<std::chrono::system_clock> timeToSleepUntil);
+ void SleepUntil(std::chrono::time_point<std::chrono::steady_clock> timeToSleepUntil);
protected:
/**
private:
ConditionalWait mConditionalWait;
std::unique_ptr<CallbackBase> mAwakeCallback;
- std::chrono::time_point<std::chrono::system_clock> mSleepTimePoint;
+ std::chrono::time_point<std::chrono::steady_clock> mSleepTimePoint;
const Dali::LogFactoryInterface& mLogFactory;
bool mNeedToSleep;
bool mDestroyThread;
{
const unsigned int TOOLKIT_MAJOR_VERSION = 2;
const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 40;
+const unsigned int TOOLKIT_MICRO_VERSION = 41;
const char* const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
${public_api_src_dir}/image-loader/async-image-loader.cpp
${public_api_src_dir}/image-loader/sync-image-loader.cpp
${public_api_src_dir}/styling/style-manager.cpp
- ${public_api_src_dir}/transition/fade.cpp
+ ${public_api_src_dir}/transition/fade-transition.cpp
${public_api_src_dir}/transition/transition-base.cpp
${public_api_src_dir}/transition/transition-set.cpp
${public_api_src_dir}/transition/transition.cpp
)
SET( public_api_transition_header_files
- ${public_api_src_dir}/transition/fade.h
+ ${public_api_src_dir}/transition/fade-transition.h
${public_api_src_dir}/transition/transition-base.h
${public_api_src_dir}/transition/transition-set.h
${public_api_src_dir}/transition/transition.h
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/transition/fade-transition.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/transition/fade-transition-impl.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+FadeTransition::FadeTransition() = default;
+
+FadeTransition::FadeTransition(Internal::FadeTransition* fadeTransition)
+: TransitionBase(fadeTransition)
+{
+}
+
+FadeTransition FadeTransition::New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
+{
+ Internal::FadeTransitionPtr internal = Dali::Toolkit::Internal::FadeTransition::New(control, opacity, timePeriod);
+
+ return FadeTransition(internal.Get());
+}
+
+FadeTransition FadeTransition::DownCast(BaseHandle handle)
+{
+ return FadeTransition(dynamic_cast<Dali::Toolkit::Internal::FadeTransition*>(handle.GetObjectPtr()));
+}
+
+FadeTransition::~FadeTransition() = default;
+
+FadeTransition::FadeTransition(const FadeTransition& handle) = default;
+
+FadeTransition& FadeTransition::operator=(const FadeTransition& rhs) = default;
+
+FadeTransition::FadeTransition(FadeTransition&& rhs) = default;
+
+FadeTransition& FadeTransition::operator=(FadeTransition&& rhs) = default;
+
+} // namespace Toolkit
+
+} // namespace Dali
-#ifndef DALI_TOOLKIT_FADE_H
-#define DALI_TOOLKIT_FADE_H
+#ifndef DALI_TOOLKIT_FADE_TRANSITION_H
+#define DALI_TOOLKIT_FADE_TRANSITION_H
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd.
{
namespace Internal DALI_INTERNAL
{
-class Fade;
+class FadeTransition;
}
/**
* @brief Fade provides smoothly appearing/disappearing effects for target Control.
*/
-class DALI_TOOLKIT_API Fade : public TransitionBase
+class DALI_TOOLKIT_API FadeTransition : public TransitionBase
{
public:
/**
- * @brief Creates an uninitialized Fade; this can be initialized with Fade::New().
+ * @brief Creates an uninitialized FadeTransition; this can be initialized with FadeTransition::New().
*
- * Calling member functions with an uninitialized Fade handle is not allowed.
+ * Calling member functions with an uninitialized FadeTransition handle is not allowed.
*/
- Fade();
+ FadeTransition();
/**
- * @brief Creates an initialized Fade.
+ * @brief Creates an initialized FadeTransition.
*
* @param[in] control A control of this transition.
* @param[in] opacity opacity value the control Opacity property will be changed from/to. Opacity must be between [0, 1].
* @param[in] timePeriod The duration of the animation.
* @return A handle to a newly allocated Dali resource
*/
- static Fade New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod);
+ static FadeTransition New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod);
/**
- * @brief Downcasts a handle to Fade handle.
+ * @brief Downcasts a handle to FadeTransition handle.
*
- * If handle points to an Fade object, the downcast produces valid handle.
+ * If handle points to an FadeTransition object, the downcast produces valid handle.
* If not, the returned handle is left uninitialized.
*
* @param[in] handle Handle to an object
- * @return Handle to an Fade object or an uninitialized handle
+ * @return Handle to an FadeTransition object or an uninitialized handle
*/
- static Fade DownCast(BaseHandle handle);
+ static FadeTransition DownCast(BaseHandle handle);
/**
* @brief Destructor.
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
*/
- ~Fade();
+ ~FadeTransition();
/**
* @brief This copy constructor is required for (smart) pointer semantics.
*
* @param[in] handle A reference to the copied handle
*/
- Fade(const Fade& handle);
+ FadeTransition(const FadeTransition& handle);
/**
* @brief This assignment operator is required for (smart) pointer semantics.
* @param[in] rhs A reference to the copied handle
* @return A reference to this
*/
- Fade& operator=(const Fade& rhs);
+ FadeTransition& operator=(const FadeTransition& rhs);
/**
* @brief Move constructor.
*
* @param[in] rhs A reference to the moved handle
*/
- Fade(Fade&& rhs);
+ FadeTransition(FadeTransition&& rhs);
/**
* @brief Move assignment operator.
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- Fade& operator=(Fade&& rhs);
+ FadeTransition& operator=(FadeTransition&& rhs);
public: // Not intended for use by Application developers
/// @cond internal
/**
- * @brief This constructor is used by Fade::New() methods.
- * @param[in] fade A pointer to a newly allocated Dali resource
+ * @brief This constructor is used by FadeTransition::New() methods.
+ * @param[in] fadeTransition A pointer to a newly allocated Dali resource
*/
- explicit DALI_INTERNAL Fade(Internal::Fade* fade);
+ explicit DALI_INTERNAL FadeTransition(Internal::FadeTransition* fadeTransition);
/// @endcond
};
} // namespace Dali
-#endif // DALI_TOOLKIT_FADE_H
+#endif // DALI_TOOLKIT_FADE_TRANSITION_H
+++ /dev/null
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/public-api/transition/fade.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/transition/fade-impl.h>
-
-namespace Dali
-{
-namespace Toolkit
-{
-Fade::Fade() = default;
-
-Fade::Fade(Internal::Fade* fade)
-: TransitionBase(fade)
-{
-}
-
-Fade Fade::New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
-{
- Internal::FadePtr internal = Dali::Toolkit::Internal::Fade::New(control, opacity, timePeriod);
-
- return Fade(internal.Get());
-}
-
-Fade Fade::DownCast(BaseHandle handle)
-{
- return Fade(dynamic_cast<Dali::Toolkit::Internal::Fade*>(handle.GetObjectPtr()));
-}
-
-Fade::~Fade() = default;
-
-Fade::Fade(const Fade& handle) = default;
-
-Fade& Fade::operator=(const Fade& rhs) = default;
-
-Fade::Fade(Fade&& rhs) = default;
-
-Fade& Fade::operator=(Fade&& rhs) = default;
-
-} // namespace Toolkit
-
-} // namespace Dali
/**
* @brief
- *
* TransitionSet is used to control lifetime of multiple Transitions.
* Transition could be played with multiple other transitions for a scene change.
* For the case, it is more useful to manage a group of transitions with same lifetime and a finished signal.
* TransitionSet provides a single Play call and Finished callback for the multiple traisitions those added on it.
+ *
+ * @note
+ * Do not add transitions for a View by dividing them into multiple TransitionSets.
*/
class DALI_TOOLKIT_API TransitionSet : public BaseHandle
{
Name: dali2-toolkit
Summary: Dali 3D engine Toolkit
-Version: 2.0.40
+Version: 2.0.41
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT