Spring Social manuale indispensabile

Spring Social
Spring Social

Spring Social manuale

Spring Social manuale  è il testo di riferimento per chi vuole farsi strada nell’informatica che conta!

Spring Social manuale - clicca per l'anteprima

Spring Social manuale – clicca per l’anteprima

 

Finalmente la soluzione definitiva per imparare a programmare Spring Social la migliore piattaforma per la creazione di applicazioni web che utilizzano funzionalità social.

Ideale tanto per il neofita che per il professionista che vuole approfondire le proprie conoscenze.

Disponibile in formato cartaceo e e-book.

Clicca per l’anteprima del libro.

Spring Social manuale

 

Impara grazie a questo indispensabile libro a farti strada nel che conta!

Day light script for Unity 3D

day phases script
day phases script

Day light script for Unity 3D is finally here!

In this article is presented a day light script for Unity 3D

This script simulates the light transition among three day phases: Dawn, Noon, Sunset.

Usage:

Add the script to an empty game object or with a preexisting Light component (best results with Directional Light). If the light doesn’t cast shadows, the script enables hard shadows cast. If any shadow type is alreasy set, camera settings will not be changed.

Day light script for Unity 3D

Day Phases parameters

Parameters:

  • DayTime: duration of day/night cycle in seconds
  • Dawn, Noon, Sunset: The colors assigned to light during day phases (interpolated). The RGB channels of colors are used to define light color. The ALPHA channel is used to modulate the light intensity. So, you probably will assign to the Noon color an alpha value around 0.5, and for Dawn and Sunset a value near 0.1.
  • Dawn Angle and Sunset Angle: the angles the light should assume at Dawn and Sunset respectively. The light will interpolate its rotation between these 2 angles along the whole day cycle.
  • Now: a read-only parameter that tracks the current day time. Useful in editor for debugging. (You can hide this parameter by setting it private in code).

HERE you can see an example of the script

 

/********************************************************************
	created:	2015/02/15
	filename: 	DayPhases.cs
	file ext:	cs
	author:		Alexandros

	purpose:	This script simulates the light transition among three day phases: Dawn, Noon, Sunset.
    USAGE:
        Add the script to an empty game object or with a preexisting Light component (best results with Directional Light). If the light doesn't cast shadows, the script enables hard shadows cast. If soft shadows are alreasy set, camera settings are not changed.

    PARAMETERS:
        DayTime: duration of day/night cycle in seconds
        Dawn, Noon, Sunset: The colors assigned to light during day phases (interpolated). The RGB channels of colors are used to define light color. The ALPHA channel is used to modulate the light intensity. So, you probably will assign to the Noon color an alpha value around 0.5, and for Dawn and Sunset a value near 0.1.
        Dawn Angle and Sunset Angle: the angles the light should assume at Dawn and Sunset respectively. The light will interpolate its rotation between these 2 angles along the whole day cycle.
        Now: a read-only parameter that tracks the current day time. Useful in editor for debugging. (You can hide this parameter by setting it private in code).
*********************************************************************/

using UnityEngine;
using System.Collections;

[RequireComponent( typeof( Light ) )]
public class DayPhases : MonoBehaviour
{
    /* day from dawn to sunset will be 100 seconds long */
    public float DayTime = 100;
    /*colors for day phases*/
    public Color Dawn;
    public Color Noon;
    public Color Sunset;
    public Vector3 DawnAngle = Vector3.zero;
    public Vector3 SunsetAngle = new Vector3( 180, 0, 0 );

    /*now-time counter*/
    public float now = 0;

    void Start()
    {
        // if no shadow set for camera, at least use hard ones
        if ( light.shadows == LightShadows.None )
            light.shadows = LightShadows.Hard;
    }

    void Update()
    {
        Color from, to, lightColor;
        float lerpVal = 0;

        if ( now < DayTime * 0.5 )
        {
            /* if we're in the first half of day, we'll interpolate dawn and noon colors */
            from = Dawn;
            to = Noon;
            lerpVal = now / DayTime;
        }
        else
        {
            /* else we'll use noon and sunset ones */
            from = Noon;
            to = Sunset;
            lerpVal = ( now - ( DayTime * 0.5f ) ) / DayTime;
        }

        /* lerp between selected colors */
        lightColor = Color.Lerp( from, to, lerpVal );
        /* lerp between light angles for day phases */
        transform.rotation = Quaternion.Euler( Vector3.Lerp( DawnAngle, SunsetAngle, now / DayTime ) );
        /* optimization: light intensity is packed in alpha channel of day phase colors */
        light.intensity = lightColor.a;
        /* setting alpha channel of light color to 1 */
        lightColor.a = 1;

        light.color = lightColor;

        /* time update */
        now += Time.deltaTime;
        if ( now >= DayTime )
            now -= DayTime;
    }

}

Francesca Wallpapers

Francesca wallpaper Fashion - 1280x1024
Francesca wallpaper Fashion - 1280x1024

Francesca Wallpapers

A set of wallpapers grouped bt themes with name Francesca.

changes

Tremaci quando alcuna anima monda
sentesi, sì che surga o che si mova
per salir sù; e tal grido seconda.

De la mondizia sol voler fa prova,
che, tutto libero a mutar convento,
l’alma sorprende, e di voler le giova.

Prima vuol ben, ma non lascia il talento
che divina giustizia, contra voglia,
come fu al peccar, pone al tormento.

Io ritornai da la santissima onda
rifatto sì come piante novelle
rinnovellate di novella fronda,

puro e disposto a salire alle stelle.