Messages écrits par Yan Lauria

謎のスクリプトは、作品情報を表示するためのものでした。

【スクリプト】

 

// :CATEGORY:Viewer 2

// :NAME:SVG_Scalable_Vector_Graphics_in_Sha

// :AUTHOR:Pavcules Superior

// :CREATED:2010-09-02 12:04:07.130

// :EDITED:2013-09-18 15:39:05

// :ID:853

// :NUM:1183

// :REV:1.0

// :WORLD:Second Life

// :DESCRIPTION:Example website: http://tutorials.jenkov.com/svg/index.html// // The demo script below, adapted from the Notecard on a Prim script, reads a notecard with SVG elements and puts it in the URL.  This is limited to 1024 characters.  Remember to create a notecard inside the prim for this to work.// // Unfortunately, SVG is more trickier to handle when trying to embed it into a web page via the same prim. Using the other techniques like Ajax to increase the size is running into problems.  To embed SVG into a page requires the use of the Object / Embed tags.  It has no problems linking to an external website with the SVG file.  But trying to reference a prim via HTTP-In to get the SVG code, is not working at all.  The only way around that I can see would be to have IFrames and embed the "Data:image/svg+xml" Mime type encoding of the SVG in the Iframe source path.

    // :CODE:

    // SVG on a Prim

    // Developed by: Pavcules Superior

    // Developed on: March 2010

 

    string g_strNotecardName;

string g_strNotecardText;

integer g_intNotecardLine = 0;

key g_keyNotecardQueryID;

key g_keyURLRequestID;

 

// Start reading the notecard text.

ReadNotecardText()

{

    llOwnerSay("Reading Notecard...please wait.");

    g_intNotecardLine = 0;

    g_strNotecardText = "";

    g_strNotecardName = llGetInventoryName(INVENTORY_NOTECARD, 0);

    g_keyNotecardQueryID = llGetNotecardLine(g_strNotecardName, g_intNotecardLine);

    // Change the URL

    llSetPrimMediaParams(0,[ PRIM_MEDIA_CURRENT_URL, "data:text/plain,Loading Page...Please Wait..."  + (string)llGetUnixTime()]);

}

 

default

{

    state_entry()

    {

        ReadNotecardText();

        g_keyURLRequestID = llRequestURL();

    }

    changed(integer change)

    {

        // If the inventory is updated, read the notecard data again.

        if(change & CHANGED_INVENTORY)

        {

            ReadNotecardText();

        }

    }

    dataserver(key query_id, string data)

    {

        if (query_id == g_keyNotecardQueryID)

        {

            if (data != EOF)

            {

                // Store the text.

                g_strNotecardText += data;

                // Read next notecard line.

                ++g_intNotecardLine;

                g_keyNotecardQueryID = llGetNotecardLine(g_strNotecardName, g_intNotecardLine);

            }

            else

            {

                // We have reached the end of the notecard.

                llOwnerSay("Size: " + (string)llStringLength(g_strNotecardText));

                llOwnerSay("Rendering Media image...please wait.");

                // Refresh the URL again by setting a random URL parameter value.

                llSetPrimMediaParams(0,

                    [PRIM_MEDIA_AUTO_PLAY,TRUE,

                    PRIM_MEDIA_CURRENT_URL,"data:image/svg+xml," + g_strNotecardText,

                    PRIM_MEDIA_HEIGHT_PIXELS,1024,

                    PRIM_MEDIA_WIDTH_PIXELS,1024]);

            }

        }

    }

}

【データ】

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >

<text x="100" y="300" style="fill: #000000;font-family:Arial;font-weight:bold;font-size: 75px;">

George Maciunas </text>

<text x="100" y="380" style="fill: #000000;font-family:Arial;font-weight:bold;font-size: 75px;">

ジョージ・マチューナス </text>

<text x="100" y="500" style="fill: #000000;font-family:Arial;font-size: 75px;" >

 "Flux Year Box 2"</text>

<text x="120" y="600" style="fill: #000000;font-family:Arial;font-size: 60px;" >

 1967</text>

<text x="400" y="750" style="fill: #000000;font-family:Arial;font-size: 65px;" >

 WikiArt</text>

<text x="400" y="780" style="fill: #000000;font-family:Arial;font-size: 25px;" >

http://www.wikiart.org/</text>

</svg>

 

知世様

すみません、パネルの上に浮かび上がるウェブについてのバーにURLが表示されるし、参照先ページが存在しない場合は、家マークを押せば、パネル面に「ページが存在しない」等のメッセージが出るのですが、家マークを押してもなんか変なのがあります。何が変なのか、いろいろなので、もうちょっと時間をかけて整理して報告するようにします。

Shared Mediaの自動読み込みのチェックを外しておいて、ひとつひとつ確認しようとしているのですが、とにかく数が多すぎるせいなのか、見えたり見えなかったりで、よく分からないです。

 

どうやら、各パネルにはスクリが見当たらないので、単なるWeb on a Primで、それがリンク切れが多いのと、そもそも数が多すぎで読み込みきれないのとが重なっているのかも・・・。

そもそも、誰のどの作品を表示してたのかが分からない。結局、現代アートは、Wikipediaで行われている「代表的作品の低解像度画像」方式で上空の美術館での展示方法にしたのかもしれません。

知世さん、

どうもIMではなく周辺チャットで話したようで、とても探し出せないでいますが、SL内でも使っているので、もしかしたら違うかもしれません。

Web on a Primだと表示させたい内容はすべてWeb上にないといけないのですが、それに説明文を加えることができるスクリプトだった気がします。スクリプトはもらったはずなので、探してみます。

それはそうと、教えていただいた関数は画像表示に便利そうなので、SLではこれも併用しているのかもしれません。どうもありがとうございます。

とりあえずシムのリスタートのたびにフロートテキストの日本語が?????になってしまう点のスクリの修正は終わりました。

また、JOG版近代博物館にはなかった「サモトラケのニケ」と「ミロのビーナス」を上空のもとちゃ美術館の方からコピーして置きました。

あとはWeb on a Prim。量が多すぎるからなのか表示されないパネルが多すぎる。もとちゃさんは普通のWeb on a Primではなく、なんか特殊なことをしてた。その時の会話を見つけ出さないと・・・。