Показано с 1 по 5 из 5

Тема: CoverFlow (Обложки альбомов в 3D)

  1. #1
    Модератор Аватар для MC Web
    Регистрация
    25.04.2012
    Сообщений
    1 157

    CoverFlow (Обложки альбомов в 3D)

    Русифицированный компонент CoverFlow (Обложки альбомов в 3D)
    Имя файла foo_chronflow.dll

    Этот компонент предназначен для отображение обложек альбомов из Вашей библиотеки в 3D-среде.
    Можно выбрать из нескольких готовых конфигураций.
    В настоящее время имеется два варианта компонента, для работы со Стандартным и Columns интерфейсами.





    Код:
    // General Notes:
    // Most of these functions return an array with 3 elements
    // These are the x,y,z coordinates in 3d-space
    // x is left to right
    // y is bottom to top
    // z is front to back
    
    
    /************************* COVER DISPLAY *****************/
    // These functions define the Display of the single Covers
    // The given parameter coverId is a floating point number.
    // It is 0 for the center cover, 1 for the one right
    // beneath it, -1 for the one on the left side and so on.
    // During movement the values float between the integer
    // values.
    function coverPosition(coverId){
    var x, y, z;
    y = 0;
    if (Math.abs(coverId) <= 1){ // The centered cover
    z = 1 + 2.7 * (1 - Math.abs(coverId));
    x = coverId;
    } else { // The covers on the side
    z = 1 - (Math.abs(coverId)-1) * 0.15;
    x = 1 + 0.5 * (Math.abs(coverId)-1);
    if (coverId < 0)
    x *= -1;
    }
    return new Array(x, y, z);
    }
    // return array is (angle, x, ,y, z) - this rotates
    // the cover *angle* degrees around the vector (x,y,z)
    // With (0,0,0,0) the cover is parallel to the y-z-Plane
    function coverRotation(coverId){
    var angle;
    if (Math.abs(coverId) < 1){ // The centered cover
    angle = coverId * -70;
    } else { // The covers on the side
    if (coverId > 0)
    angle = -70;
    else
    angle = 70;
    }
    return new Array(angle, 0, 1, 0);
    }
    
    // Sets which point of the cover coverPosition() defines
    // (-1,-1) means bottom left, (0,0) means center,
    // (1,1) means top right, (0, -1) means bottom center etc.
    // The cover is also rotated around this point.
    function coverAlign(coverId){
    return new Array(0, -1);
    }
    
    // Defines the the size boundaries for the cover.
    // Aspect ratio is preserved.
    // Return Array is (widht, height)
    function coverSizeLimits(coverId){
    if (Math.abs(coverId) < 1){ // The centered cover
    var w, h;
    w = 1;
    h = 1;
    // Shrinks the centered cover to a height of 1
    if (Math.abs(coverId) > 0.5)
    h = 1 + (Math.abs(coverId) - 0.5)*2;
    // Allows the centered cover to have a width of 2.5;
    if (Math.abs(coverId) < 0.5)
    w = 1 + (0.5 - Math.abs(coverId))*3;
    return new Array(w, h);
    } else { // The covers on the side
    return new Array(1, 2);
    }
    }
    
    // Defines the range of covers to draw.
    // Return array is (leftmostCover, rightmostCover)
    // This interval shouldn't be larger than 80
    // The center cover is 0.
    function drawCovers(){
    return new Array(-21, 40);
    }
    
    
    // In which direction should the fov be expanded/shrinked
    // when the panel is resized?
    // If this returns (0,1), the height is fixed.
    // If this returns (1,0), the width is fixed.
    // You can also return stuff like (0.5,0.5) or (7, 3)
    // The values determine how important it is for this
    // dimension to stay fixed.
    function aspectBehaviour(){
    return new Array(0,1);
    }
    
    /************************** CAMMERA SETUP ****************/
    // Position of the viewport
    function eyePos(){
    return new Array(0, 0.76, 5.7);
    }
    // Defines the point for the eye to look at
    function lookAt(){
    return new Array(1.02, -0.5, 0);
    }
    // Used to rotate the view.
    // The returned Vector points upwards in the viewport.
    // This vector must not be parallel to the line of sight from the
    // eyePos point to the lookAt point.
    function upVector(){
    return new Array(0, 1, 0);
    }
    
    /************************** MIRROR SETUP *****************/
    function showMirrorPlane(){
    return true; // return false to hide the mirror
    }
    // Any Point on the Mirror Plane
    function mirrorPoint (){
    return new Array(0, 0, 0);
    }
    // Normal of the Mirror Plane
    function mirrorNormal (){
    return new Array(0, 1, 0);
    }
    Код:
    //----------------------------------------------------//
    // THE CIRCLE
    // by subsonic
    //
    
    var num = 60;
    // NUMBER OF COVERS DISPLAYED IN THE CIRCLE
    // NO NEGATIVE VALUES!! SHOULD BE > 2
    
    var r = 5;
    // RADIUS OF THE CIRCLE
    // ALSO AFFECTS THE CAMERA
    
    var rotation = 90;
    // ANGLE OF THE COVERS IN THE CIRCLE
    // 90 = POINTING TO CENTER
    
    var o = 1;
    //AFFECTS THE SYMMETRY!
    //
    // THIS SHOULD BE 1 OR -1 ONLY!
    // -1 = symmetric circle
    // 1 = asymmetric
    
    
    var width = 1.2;
    //SIZE OF THE OUTER COVERS
    
    var width_center = 5;
    //SIZE OF THE CENTER COVER
    
    
    
    
    //------------- DONT EDIT BELOW
    //----- only if you know what you're doing
    
    
    
    
    
    var p = Math.ceil(num/2);
    if(num/p != 2) { num++; }
    
    function coverPosition(coverId){
    var x, y, z; y = 0;
    x = r*Math.sin(coverId*Math.PI/p);
    z = r*Math.cos(coverId*Math.PI/p);
    if ((Math.abs(coverId) <= 0.5) && (Math.abs(coverId) >= 0)) {
    z = 0.2;
    x = 0;
    y = -Math.abs(coverId)*(width_center+2)*2;
    } else if ((Math.abs(coverId) <= 1) && (Math.abs(coverId) > 0.5)) {
    y = -(width+1.2) + (width+1.2)*Math.abs(coverId)*Math.abs(coverId);
    } else if(Math.abs(coverId) > p) {
    x = 0; y=0; z = -40;
    }
    
    return new Array(x, y, z);
    }
    
    function coverRotation(coverId){
    if (Math.abs(coverId) <= 0.5){
    return new Array(-10, 1, 0, 0);
    } else {
    angle = coverId*(180/p) - rotation;
    if(coverId < 0) {
    angle = coverId*(180/p) - o*rotation;
    }
    return new Array(angle, 0, 1, 0);
    }
    }
    
    function coverSizeLimits(coverId){
    if (Math.abs(coverId) < 0.5) {
    return new Array(width_center, width_center+1);
    }
    else {
    return new Array(width, width+1);
    }
    }
    
    function coverAlign(coverId){
    return new Array(0, -1);
    }
    
    function drawCovers(){
    return new Array(-p, p);
    }
    
    function aspectBehaviour(){
    return new Array(1, 1);
    }
    
    /************************** CAMERA SETUP ****************/
    function eyePos(coverId){
    return new Array(0, r*2.3, r*3.3);
    }
    
    function lookAt(){
    return new Array(0, 0, 0);
    }
    
    // Used to rotate the view.
    // The returned Vector points upwards in the viewport.
    // This vector must not be parallel to the line of sight from the
    // eyePos point to the lookAt point.
    function upVector(){
    return new Array(0, 1, 0);
    }
    
    /************************** MIRROR SETUP *****************/
    function showMirrorPlane(){
    return true; // return false to hide the mirror
    }
    
    // Any Point on the Mirror Plane
    function mirrorPoint(){
    return new Array(0, 0, 0);
    }
    
    // Normal of the Mirror Plane
    function mirrorNormal(){
    return new Array(0, 1, 0);
    }
    Код:
    // Author: mil3s
    
    // General Notes:
    // Most of these functions return an array with 3 elements
    // These are the x,y,z coordinates in 3d-space
    // x is left to right
    // y is bottom to top
    // z is front to back
    
    var coverSpacing = 0.05;
    
    /************************* COVER DISPLAY *****************/
    // These functions define the Display of the single Covers
    // The given parameter coverId is a floating point number.
    // It is 0 for the center cover, 1 for the one right
    // beneath it, -1 for the one on the left side and so on.
    // During movement the values float between the integer
    // values.
    function coverPosition(coverId){
        var x, y, z;
        y = 0;
        if (Math.abs(coverId) <= 1){ // The centered cover
            z = 4 + 0.5 * (1 - Math.abs(coverId));
            x = coverId * 0.875;
        } else { // The covers on the side
            z = 4 - (Math.abs(coverId)-1) * 0.01;
            x = 0.875 + coverSpacing * (Math.abs(coverId)-1);
            if (coverId < 0)
                x *= -1;
        }
        return new Array(x, y, z);
    }
    
    // return array is (angle, x, y, z) - this rotates
    // the cover *angle* degrees around the vector (x,y,z)
    // With (0,0,0,0) the cover is parallel to the x-y-Plane
    function coverRotation(coverId){
        var angle;
        if (Math.abs(coverId) < 1){ // The centered cover
            angle = coverId * -60;
        } else { // The covers on the side
            if (coverId > 0)
                angle = -60;
            else
                angle = 60;
        }
        return new Array(angle, 0, 1, 0);
    }
    
    // Defines the the size boundaries for the cover.
    // Aspect ratio is preserved.
    // Return Array is (widht, height)
    function coverSizeLimits(coverId){
        return new Array(1, 1);
    }
    
    
    // Sets which point of the cover coverPosition() defines
    // (-1,-1) means bottom left, (0,0) means center,
    // (1,1) means top right, (0, -1) means bottom center etc.
    // The cover is also rotated around this point.
    function coverAlign(coverId){
        return new Array(0, -1);
    }
    
    
    // Defines the range of covers to draw.
    // Return array is (leftmostCover, rightmostCover)
    // This interval shouldn't be larger than 80
    // The center cover is 0.
    function drawCovers(){
        return new Array(-30, 30);
    }
    
    
    // In which direction should the fov be expanded/shrinked
    // when the panel is resized?
    // If this returns (0,1), the height is fixed.
    // If this returns (1,0), the width is fixed.
    // You can also return stuff like (0.5,0.5) or (7, 3)
    // The values determine how important it is for this
    // dimension to stay fixed.
    function aspectBehaviour(){
        return new Array(0, 1);
    }
    
    /************************** CAMMERA SETUP ****************/
    // Position of the viewport
    function eyePos(){
        return new Array(0, 1.15, 6.1);
    }
    // Defines the point for the eye to look at
    function lookAt(){
        return new Array(0, -1.15, 0);
    }
    // Used to rotate the view.
    // The returned Vector points upwards in the viewport.
    // This vector must not be parallel to the line of sight from the
    // eyePos point to the lookAt point.
    function upVector(){
        return new Array(0, 1, 0);
    }
    
    /************************** MIRROR SETUP *****************/
    function showMirrorPlane(){
        return true; // return false to hide the mirror
    }
    // Any Point on the Mirror Plane
    function mirrorPoint (){
        return new Array(0, 0, 0);
    }
    // Normal of the Mirror Plane
    function mirrorNormal (){
        return new Array(0, 1, 0);
    }
    Код:
    // General Notes:
    // Most of these functions return an array with 3 elements
    // These are the x,y,z coordinates in 3d-space
    // x is left to right
    // y is bottom to top
    // z is front to back
    
    
    /************************* COVER DISPLAY *****************/
    // These functions define the Display of the single Covers
    // The given parameter coverId is a floating point number.
    // It is 0 for the center cover, 1 for the one right
    // beneath it, -1 for the one on the left side and so on.
    // During movement the values float between the integer
    // values.
    function coverPosition(coverId){
       var x, y, z;
       y = 0;
       if (Math.abs(coverId) <= 1){ // The centered cover
          z = 1 + 3 * (1 - Math.abs(coverId));
          x = coverId;
       } else { // The covers on the side
          z = 1 + (Math.abs(coverId)-1) * 1;
          x = 1 + 0.5 * (Math.abs(coverId)-1);
          if (coverId < 0)
             x *= -1;
       }
       return new Array(x, y, z);
    }
    // return array is (angle, x, ,y, z) - this rotates
    // the cover *angle* degrees around the vector (x,y,z)
    // With (0,0,0,0) the cover is parallel to the y-z-Plane
    function coverRotation(coverId){
       var angle;
       if (Math.abs(coverId) < 1){ // The centered cover
          angle = coverId * -70;
       } else { // The covers on the side
          if (coverId > 0)
             angle = -70;
          else
             angle = 70;
       }
       return new Array(angle, 0, 1, 0);
    }
    
    // Sets which point of the cover coverPosition() defines
    // (-1,-1) means bottom left, (0,0) means center,
    // (1,1) means top right, (0, -1) means bottom center etc.
    // The cover is also rotated around this point.
    function coverAlign(coverId){
       return new Array(0, -1);
    }
    
    // Defines the the size boundaries for the cover.
    // Aspect ratio is preserved.
    // Return Array is (widht, height)
    function coverSizeLimits(coverId){
       if (Math.abs(coverId) < 1){ // The centered cover
          var w, h;
          w = 1;
          h = 1;
          // Shrinks the centered cover to a height of 1
          if (Math.abs(coverId) > 0.5)
             h = 1 + (Math.abs(coverId) - 0.5)*2;
          // Allows the centered cover to have a width of 2.5;
          if (Math.abs(coverId) < 0.5)
             w = 1 + (0.5 - Math.abs(coverId))*3;
          return new Array(1.35, 1.35);
       } else { // The covers on the side
          return new Array(1, 2);
       }
    }
    
    // Defines the range of covers to draw.
    // Return array is (leftmostCover, rightmostCover)
    // This interval shouldn't be larger than 80
    // The center cover is 0.
    function drawCovers(){
       return new Array(-20, 20);
    }
    
    
    // In which direction should the fov be expanded/shrinked
    // when the panel is resized?
    // If this returns (0,1), the height is fixed.
    // If this returns (1,0), the width is fixed.
    // You can also return stuff like (0.5,0.5) or (7, 3)
    // The values determine how important it is for this
    // dimension to stay fixed.
    function aspectBehaviour(){
       return new Array(0,1);
    }
    
    /************************** CAMMERA SETUP ****************/
    // Position of the viewport
    function eyePos(){
        return new Array(0, 0.6, 6);
    }
    // Defines the point for the eye to look at
    function lookAt(){
       return new Array(0, 0.6, 0);
    }
    // Used to rotate the view.
    // The returned Vector points upwards in the viewport.
    // This vector must not be parallel to the line of sight from the
    // eyePos point to the lookAt point.
    function upVector(){
       return new Array(0, 1, 0); 
    }
    
    /************************** MIRROR SETUP *****************/
    function showMirrorPlane(){
       return true; // return false to hide the mirror
    }
    // Any Point on the Mirror Plane
    function mirrorPoint (){
       return new Array(0, 0, 0);
    }
    // Normal of the Mirror Plane
    function mirrorNormal (){
       return new Array(0, 1, 0);
    }
    Код:
    // Original Concept: Martin Gloderer
    // Mod: host505
    
    var viewFromLeftSide = false;
    var coverSpacing = 0.07;
    
    
    function coverPosition(coverId){
    	var z = -coverId * coverSpacing;
    	return new Array(0.2, 0.4, z);
    }
    
    function coverRotation(coverId){
    	var angle;
    	if (coverId < -0.7){
    		angle = 34;
    	} else if (coverId >= -0.7 && coverId <= -0.3) {
    		angle = -32 * (1 + (coverId + 0.3) * 5);
    	} else { // coverId > -0.3
    		angle = -45;
    	}
    	angle += 25;
    	return new Array(angle,1,0,0);
    }
    
    function coverAlign(coverId){	return new Array(-2, -1) }
    function coverSizeLimits(coverId){ return new Array(1, 1) }
    
    function drawCovers(){ return new Array(-7, 17) }
    function aspectBehaviour(){ return new Array(0,1) }
    
    function eyePos(){
    	var x = 1;
    	if (viewFromLeftSide) x *= -1;
    	return new Array(0.5, 1.7, 1.8);
    }
    function lookAt(){ return new Array(1, 1, 0.4) }
    function upVector(){ return new Array(-0.08, 1, 0) }
    
    function showMirrorPlane(){ return false; }

    1. Работает с интерфейсом Columns.

    Скачать Coverflow (CUI)_0.3.0 с Яндекс.Диск (173 кБ)

    2. Работает со Стандартным и интерфейсом Columns.

    Клавиши быстрого вызова (для обложки находящейся по центру):
    • F5 - Обновить
    • CTRL-F5 - Жесткое обновление
    • F6 - Показать воспроизводимый альбом

    Скачать Coverflow (DUI + CUI)_0.4.5 с Яндекс.Диск (334 кБ)
    Последний раз редактировалось MC Web; 10.11.2016 в 14:32.

  2. #2
    Модератор Аватар для MC Web
    Регистрация
    25.04.2012
    Сообщений
    1 157
    Обновление компонента CoverFlow (Обложки альбомов в 3D) до версии 0.4.2.

    • Fixed text-rendering
    • Added drag&drop support – you can now drag albums into your playlist

  3. #3
    Модератор Аватар для MC Web
    Регистрация
    25.04.2012
    Сообщений
    1 157
    Обновление компонента CoverFlow (Обложки альбомов в 3D) до версии 0.4.4.

    • Added support for columns_ui
    • Collection does not wrap around anymore
    • Removed flicking
    • Removed supersampling, made multisampling the default
    • Improved how lack of OpenGL is handled
    • General stability improvements
    • Fixed bug that caused a crash if collection is smaller than 100 albums
    • Added support for embedded album art (now the default)
    • Fixed double click handling
    Последний раз редактировалось MC Web; 27.09.2015 в 22:14.

  4. #4
    Модератор Аватар для MC Web
    Регистрация
    25.04.2012
    Сообщений
    1 157
    Обновление компонента CoverFlow (Обложки альбомов в 3D) до версии 0.4.5.

    • Fixed crash on invalid images
    • Changed config to better defaults

  5. #5
    Модератор Аватар для MC Web
    Регистрация
    25.04.2012
    Сообщений
    1 157
    Добавлены дополнительные конфигурации для расширения возможности отображения компонента (под спойлером в первой теме).

Метки этой темы

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •