Re: TUTORIAL - Creer un thème 3d dynamic avec le SDK
J'ai trouver quelques infos utiles, regarde par toi même :
en gros, ce qu'il faut retenir de tout ça, c'est qu'on peut définir une image ou un RAF en fonction de la date/heure. Par exemple afficher un raf de 2h du matin a 4h du matin puis un autre entre 4h du matin et 6h du matin, etc...
Ensuite une autre choses intéressante a retenir est le anim_debug. Si on se réfère au dossier en question (qui constitue les source du thème), on y vois ceci :
En gros le RAF pointe vers "/app_home/debug.raf", donc a voir ce que ça peut donner...
Hormis cela, j'ai trouver une foule d'infos. Par exemple je vient d'apprendre que la déformation d'objet est possible, mais selon certaine conditions. J'ai aussi appris comment marcher l'horloge interne, comme avec ce code par exemple :
Ce code gère en réalité deux auguilles, qui se trouve bien sûr sur une horloge, et ici l'horloge interne de la console gère le déplacement de ces fameuses aiguilles.
Hormis ça, j'ai vu aussi comment gerer tout un panel d'option que je n'arrivais pas a utiliser avant.
Bref contacte moi sur skype, je t'en dirais plus
.
- Code: Select All Code
The following attributes can be specified for <bgimage>.
hd Background image used when the aspect ratio is 16:9 (1920x1080 JPEG)
sd Background image used when the aspect ratio is 4:3 (640x480 JPEG)
anim Background image with 3D modeling data/textures/animation (RAF)
from Date/time to start displaying the background image,
if "days" or "datetime" is specified to the showtype attribute
until Date/time to stop displaying the background image,
if "days" or "datetime" is specified to the showtype attribute
anim_debug Path to the RAF file directly under app_home
When specifying the anim attribute for a <bgimage> element, do not
specify the hd/sd attributes (and vice versa). The attributes are
mutually exclusive in a single <bgimage> element.
Note : RAF format files can be created by using the RAF compiler.
Please refer to the following file for more information.
cell/samples/util/theme/raf_photo(or raf_mustache)/readme_e.txt
When "days" is specified for the showtype attribute, specify the
applicable time period (from, until) as shown in the following examples.
1) YYYY/MM/DD Format
<bgimage hd="bghd.jpg" sd="bgsd.jpg" from="20090101" until="20090131" />
With this configuration, the specified background image will be
displayed when the date on the PlayStation(R)3 is between
January 1, 2009 and January 31, 2009.
2) MM/DD Format
<bgimage hd="bghd.jpg" sd="bgsd.jpg" from="0101" until="0131" />
With this configuration, the specified background image will be
displayed when the date on the PlayStation(R)3 is between
January 1 and January 31. Unlike the YYYY/MM/DD format, the year
is not relevant.
When "datetime" is specified for the showtype attribute, specify the
applicable time period (from, until) as shown below.
HH Format
<bgimage hd="bghd.jpg" sd="bgsd.jpg" from="00" until="05" />
With this configuration, the specified background image will be
displayed when the time on the PlayStation(R)3 is 0:mm to 5:mm,
with mm indicating minutes. Specify the values for "from" and
"until" in 24-hour notation (00-23).
When "days" and "datetime" are specified, but the date/time on the
PlayStation(R)3 does not fall into either of the specified time
periods, the background image of the first <bgimage> element will be displayed.
en gros, ce qu'il faut retenir de tout ça, c'est qu'on peut définir une image ou un RAF en fonction de la date/heure. Par exemple afficher un raf de 2h du matin a 4h du matin puis un autre entre 4h du matin et 6h du matin, etc...
Ensuite une autre choses intéressante a retenir est le anim_debug. Si on se réfère au dossier en question (qui constitue les source du thème), on y vois ceci :
- Code: Select All Code
<?xml version="1.0" encoding="UTF-8"?>
<theme>
<infotable>
<info
name="sample(raf_debug)"
icon="icon.png"
url="http://www.scei.co.jp/"
author="scei"
authoricon="authoricon.png"
genre="others"
version="version 1.0"
comment="this is a sample theme."
preview="preview.png"
/>
<localizedinfo
locale="en"
name="sample(raf_debug)"
/>
<localizedinfo
locale="jp"
name="サンプル(RAF背景/デバッグ用)"
comment="これはサンプルテーマファイルです。"
/>
</infotable>
<bgimagetable>
<bgimage anim_debug="/app_home/debug.raf" />
</bgimagetable>
</theme>
En gros le RAF pointe vers "/app_home/debug.raf", donc a voir ce que ça peut donner...
Hormis cela, j'ai trouver une foule d'infos. Par exemple je vient d'apprendre que la déformation d'objet est possible, mais selon certaine conditions. J'ai aussi appris comment marcher l'horloge interne, comme avec ce code par exemple :
- Code: Select All Code
var short_hand = new Actor("short_hand");
var long_hand = new Actor("long_hand");
var offset_position = <24.3793, 22.0626, 2.5>;
var offset_rotation_short = <0.0, 0.0, Math.PI/2.0>;
var offset_rotation_long = <0.0, 0.0, Math.PI * 2.0>;
short_hand.position = offset_position;
long_hand.position = offset_position;
short_hand.rotation = offset_rotation_short;
long_hand.rotation = offset_rotation_long;
function updateTime()
{
var now = new Date();
var h = -(now.hours%12) / 12.0 * 2.0 * Math.PI;
var m = -(now.minutes%60) / 60.0 * 2.0 * Math.PI;
var s = -(now.seconds%60) / 60.0 * 2.0 * Math.PI;
if (s == 0)
{
if (m == 0)
{
long_hand.rotation->z += 2.0 * Math.PI;
if (h == 0)
{
short_hand.rotation->z += 2.0 * Math.PI;
}
}
}
m += s / 60.0;
h += m / 12.0;
short_hand.setRotation(<0.0, 0.0, h> + offset_rotation_short, 1.0);
long_hand.setRotation(<0.0, 0.0, m>, 1.0);
writeln(now.hours + ":" + now.minutes + ":" + now.seconds + " short_angle:" + h + " long_angle:" + m);
System.printPerf();
System.printHeap();
}
updateTime();
System.timer[0] = new IntervalTimer(1.0, updateTime);
Ce code gère en réalité deux auguilles, qui se trouve bien sûr sur une horloge, et ici l'horloge interne de la console gère le déplacement de ces fameuses aiguilles.
Hormis ça, j'ai vu aussi comment gerer tout un panel d'option que je n'arrivais pas a utiliser avant.
Bref contacte moi sur skype, je t'en dirais plus
.-
Dragoon1010
Gamer Or
- Messages: 8876
- Inscription: 29 Juil 2010, 09:23
- Localisation: En train de penser...
- Prénom: Jonathan
- Pays: France
- Sexe: Homme


