Advanced: JavaScript for billboards?

Hi, I have an interest in implementing billboards in 3-d PDF figures. This allows us to do things like eg. place soft blobby textures at particle positions to produce really nice visualisations of star clusters etc.
I've made some progress, but need help / ideas for going further.
So far, I can import a VRML file with a textured quad at the origin of the coordinate system. By querying the camera view direction on every redraw, I can apply a rotation to the quad so that it always faces the camera. That code looks roughly like this:
// rightObjsArray contains the meshes the quad
// undo the previous rotation/s
for (j = 0; j < rightObjsArray.length; j++) {
rightObjsArray[j].transform.rotateAboutVectorInPlace(-angle, normal);
// fetch camera
var camera = scene.cameras.getByIndex(0);
// calculate and normalise camera view direction
var camdir = camera.position.subtract(camera.targetPosition);
camdir.normalize();
// create a z-aligned vector
var zax = new Vector3(0., 0., 1.);
// my quad is drawn in the XY plane, so the following calculates
// a normal (vector) to rotate about, and the angle of rotation,
// such that our quad's Z axis will become aligned with the camera
// view direction
normal = camdir.cross(zax);
angle = -Math.acos(camdir.dot(zax));
// apply the rotation to objects, eg...
for (j = 0; j < rightObjsArray.length; j++) {
rightObjsArray[j].transform.rotateAboutVectorInPlace(angle, normal);
Now, this works pretty well, but there are two things that I still need to do:
1. rotate the quad in the viewing plane (plane for which the camera view direction is a normal) so that it is "upright" on the screen. I wanted to use the camera.up vector for this but my calculations show that camera.up is not orthogonal to the camera view direction I calculate above.
2. get it working for quads NOT at the origin of the coordinate system. I had hoped I could do this with a transform of the object to the origin, do the rotation, then transform back to the original position, but I can't seem to come up with any properties of the quad accessible from JavaScript that let me do this.
I would be delighted to hear suggestions on the above, either in this forum, or directly by email to
david.g.barnes at google's mail service
thanks -
David Barnes.

Hi Got it
FYI
HTMLDB_ITEM.TEXT(1,field1,8,10,''onchange=javascript:Hi();'')
thanks
-prashant

Similar Messages

  • How can I access Advanced Javascript Settings?

    I'm aware that, in recent versions of Firefox, the ability to disable Javascript has been removed. I don't intend to re-open discussion of that particular decision. But removing that option has also removed access to the Advanced Javascript Settings menu, which was far more useful than simply disabling Javascript itself. For example, although I rarely disabled Javascript entirely (other than when debugging my own site), I routinely disabled the ability of websites to disable context menus or to move and resize pop-up windows.
    Unlike disabling Javascript entirely, these are settings which provide a positive benefit for "ordinary" (non-developer) users. If, say, I want to open a link in a new tab, then the correct way to do that is to right-click on it. Sites which disable right-click degrade the user experience, and allowing a way to override that is a good thing. Whatever the justification for removing the ability to disable Javascript entirely (and I do understand it, even if I don't agree with it), I can't see any justification for removing access to these advanced settings.
    So my question is, how can I re-enable access to the Advaned javascript Settings? I can't see any obvious setting for it in about:config, and simply disabling javascript entirely via that method isn't what I want to do.

    The href value javascript:void(0) is a placeholder to be shown when you hover a link, so you can see that this is not a normal link.<br />
    The actual action is done via an onclick handler that is tied to the button (link), so if this isn't working then this can be caused by a script that didn't run properly to add this onclick action to the button or that JavaScript is blocked on that website possibly by an extension.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Note that there is also security software that can block pop-ups and JavaScript, so check that as well.
    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test to see if that helps.

  • XML Processing with JavaScript for Safari

    Hi
    I've created an application which binds request and response data in XML format. I've written code in JavaScript for parsing the response data and build request based on the response XML. Here, I use functions like appendChild, cloneNode and all. My application runs without any problem on Mozilla FireFox and InternetExplorer. But I don't get it run in Safari 2.0. I get error in appendChild method in most cases. Please help me out in resolving this issue. Thanks in advance.
    Mac   Mac OS X (10.4)  

    Hi and Welcome to Apple Discussions
    This forum addresses issues usually focused on Safari's operation, features and related internet issues from a user perspective. As a web developer you may find an answer to your question at the WebKit Open Source site.
    Good Luck

  • Advance select for source file in Sender File Adapter

    Hi
    I am trying to utilise the parameter 'Advance Selection for source file' on a sender file adapter to pick the file from multiple folders
    My problem is that this parameter that is listed on the SAP help is not getting in File accessing Parameters.
    I am running PI 7.02 (NW702_07_Rel)
    Service pack 07
    Has anyone come across this before?
    any suggestions on how to do this?

    Hi,
    In PI7.0 the property exists. I have used it previously. I think SP was 13.
    Regards,
    Nutan
    Edited by: nutan champia on Nov 24, 2011 10:42 AM

  • BO 4.0 Advanced Analysis for OLAP - The MDAS service encountered an error.

    Hi guru's,
    We are running BO 4.0 SP02 Patch 11 with SAP BW 7 and experiencing the following error with Advanced Analysis for OLAP:
    "Analysis edition for OLAP
    The MDAS service encountered an error."
    After you click show details:
    "com.crystaldecisions.thirdparty.org.omg.CORBA.MARSHAL  minor code: 0x0  completed: No"
    I have researched into this and found forums such as:
    http://forums.sdn.sap.com/thread.jspa?threadID=2053481
    SAP KB 1560100 - BI4.0 Advanced Analysis Web problem: The MDAS Service encountered an error
    SAP KB 1661163 - An error is generated when selecting a query or cube in Analysis for OLAP: Error 15
    However, none of these have helped our situation too much.
    We have rebuilt the windows server 2008 R2 recently, hence the process we followed was a fresh install of BO 4.0 SP02 platform & tools, and then patch 11 on top of these.
    Crystal, WEBI's (using the same BICS connections as the AA's) and Dashboards are all working as per expected.
    The errors are for every AA including ones with only 2 variable selections (light queries) to ones with many more. Hence it is platform wide for Advanced Analysis.
    I have also tried creating new AA using existing BICS, new BICS existing AA, new BICS new AA all with no luck.
    We have also created new Adaptive Processing Servers with only the MDAS as a common service, turned on tracing etc but nothing springs to us as to what is going wrong.
    Any ideas would be greatly appreciated?
    Thanks all,

    Hi All,
    After conversing with SAP support technicians we have found what is causing this issue.
    On the windows servers we have the following installed locally:
    - BO platform 4.0 SP02
    - BO platform 4.0 SP02 patch 11
    - BO client tools 4.0 SP02
    - BO client tools 4.0 SP02 patch 11
    - Crystal reports 2011 SP02
    - Crystal reports 2011 SP02 patch 11
    - Crystal reports for Ent SP02
    - Crystal reports for Ent SP02 patch 11
    It seems that the crystal reports 2011 or cr for Ent was causing an issue in the .WAR files that BOE uses to run Advanced Analysis for OLAP.
    After uninstalling the two crystal products and removing any left over cr files in program files on the server, AA for OLAP works successfully in our environment.
    The other point after this was i stopped the tomcat and SIA, i renamed the BOE folder under <install dir>\SAP BO4.0\Tomcat6\webapps and restarted the tomcat and then the SIA. In 4.0 when the tomcat is started again it will go and recreate the BOE folder from the BO directories effectively recreating the apps .WAR files under the webapps\BOE folder.
    SAP will hopefully document this issue for other clients.
    Cheers,

  • Javascript for multiple date fields

    Hi all-
    I have to write javascript for 15 different date fields in a form.
    The requirement here is that we convert all date fields on Page 100 from date pickers (editable date fields) to display-only date fields with two controls for the users to set the date.
    If the field is empty (no date registered yet), there will be a green checkmark(X). When the user clicks this checkmark, the current date is entered into the field.
    If the field is not empty (there is a date already in the system), there will be a red X. When the user click this red X, the date from the date field is removed.
    The javascript I am using here is
    </script>
    <script type="text/javascript">
         function init(){
              var datePickerVal = $v2('P100_TODAYS_DATE');
              if(datePickerVal){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
              }else{
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
         function toggleDateFunc(pValue){
              var sysDate = $v2('P100_DATE');
              if(pValue == 'R'){
                   $x_Hide('ToggleDateR');
                   $x_Show('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE','');
              }else if(pValue == 'G'){
                   $x_Show('ToggleDateR');
                   $x_Hide('ToggleDateG');
                   $x_Value('P100_TODAYS_DATE',sysDate);
         window.onload = init;
    </script>
    This javascript is working for one date field( 'P100_TODAYS_DATE') but i have 15 different date fields in this page(100) all should have same funtionality. Please help me out how to write a logic to use this function for all the date fields.
    Thanks,(apex 3.2)
    Greenhorn
    Edited by: Greenhorn on Jul 19, 2011 12:30 PM

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • Javascript won't work - JavaScript for Reader Mobile API Reference (Android)

    I have created a Form with the new Adobe Acrobat Pro DC (trial version).
    The Javascript code just won't work on a mobile phone.
    Doc - JavaScript for Reader Mobile API Reference (Android this shows that what I want to do is supported.
    But not even the simplest command will work on my phone. (I am using Adobe Acrobat DC - PDF reader for Android)
    Any suggestions of what I could be doing wrong?
    Best,
    Menno

    A Doc.getField() should work.. Try small steps: Create a document with two fields (e.g. Text1 and Text2), then create a custom calculation script for Text2 that uses the following code:
    event.value = this.getField("Text1").value;
    Does this copy the data you enter in Text1 to Text2?
    Then, add a third field ("Text3") and a button with the following MouseUp JavaScript action:
    this.getField("Text3").value = this.getField("Text1").value;
    Does this work? It actually works for me. To save you some work, here is a link to the test file I've used: http://khkonsulting.com/files/AUC/AndroidTest.pdf

  • 10.8.2 update: can't install "error occurred while evaluating Javascript for the package"

    Greetings All-
    I'm trying to update from 10.8.1 to 10.8.2 on my Macbook Air. When I downloaded the .dmg from Apple and ran it, I got the following error:
    "OS X Update Can't be installed on this disk. An error occurred while evaluating JavaScript for the package."
    So far, I've done the following, all to no avail:
    (1) Updated Java to v7 per Java's website, no change
    (2) Downloaded the 10.8.2 combo update, no change
    (3) Found Apple's OS X Java update (which is still at v6)- get an error at install that "the contents of the disk can't be changed"
    (4) Restarted at each step
    Does anyone have any suggestions or ideas?
    Thanks!

    Permission repair, too?
    Take a look here: https://discussions.apple.com/thread/3811748?start=0&tstart=0
    And possibly here:  https://discussions.apple.com/thread/3889562

  • PDF Form javascript for making readonly field by using button

    Please let me know the PDF Form JavaScript for making selected fields(Text field,Drop down list,..) as read-only by using Button.

    Do you want your button to be made read only?
    One starts with Acrobat JS Reference.
    // make all fields in a form read only;
    var oField; // variable for field being processed;
    // loop through the form fields;
    for (var i = 0; i < this.numFields; i++) {
    // process each field name;
    oField = this.getField(this.getNthFieldName(i)).readonly = true;

  • How do I localize text strings in the javascriptresource section i a Javascript for Photoshop?

    I have made a javascript for photoshop. I am using the <javascriptresource> and <terminology> tags to make the script to work with actions. How do I make the textstrings within the <javascriptresource> section local (translated)? The localize function and other ways to localize text that I described in the documentation do not work.

    I recommend that you post your question in the scripts forum as this forum is meant for beginners. It is not that we won't help, it is that we may not beable to provide the best help. Good luck, I hope you can figure it out.
    http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions
    http://forums.adobe.com/community/photoshop/photoshop_sdk?view=discussions

  • Advanced selection for source file

    Hi,
    Requirement: One source directory, multiple file names. File needs to be picked up from source directory and send to target directory with same name as source file name.
    Source file name pattern sample: AP5_X_yyyyddmm, A35_X_yyyyddmm, AP5_Y_yyyyddmm, AP5_Y_yyyyddmm.
    Target file name should be :AP5_X_yyyyddmm, A35_X_yyyyddmm, AP5_Y_yyyyddmm, AP5_Y_yyyyddmm
    Can we define multiple place holders as :
    Directory    
    File Name Mask
    Exclusion Mask
    \\Source
    AP5_X*.txt, A35_X.txt, AP5_Y*.txt, AP5_Y*.txt
    When I tried for single place holder, the scenario was working but when I tried adding multiple place holders it was not working.
    How can we achieve the above scenario?
    Thanks,
    Vertika

    Hi Amit,
    Thanks for reply.
    Yes you understood it right.
    I am able to achieve this now. The only change that I did is instead of giving all the placeholders in same line I have given it in different lines and this is working now.
    Sender Adapter Configuration: Checked Advanced selection for source file and used Adapter specific message attributes to keep same file name as source file name.
    File Name Mask
    File Name Mask
    Exclusion Mask
    \\Source
    AP5_X*.txt
    \\Source
    A35_X*.txt
    \\Source
    AP5_Y*.txt
    \\Source
    A35_Y*.txt
    I am closing this thread now.
    Thanks,
    Vertika

  • Advanced Selection for Source File + SourceFileSize = invalid file size?

    Hi !
    I have a File Adapter using FTP protocol. I've turn on all Adapter-Specific Message Attributes, including SourceFileSize. I've activated the Advanced Selection for Source File, and entered several patterns.
    When I see my payload via the monitor, I get a "-" in the SourceFileSize value.
    <sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">-</sap:Record>
    If I disable the "Advanced Selection for Source File", the file size is ok.
    Is it just me?
    Thanks

    maybe u need to check for some notes

  • File Adapter: Advanced selection for source file

    Hi Experts,
    I am doing file(Idoc format) to IDoc scenario. In my scenario I am getting files in three different formats (ex: abc.dat, xyz.dat, 123.edi). My communication channel (sender file adapter) should poll for every 30 mins, picks up the files and map them to Idoc without any mapping.
    Need following clarifications:
         1. Should I create 3 communication channels to pick up 3 different type files? Or should I use the Advanced selection for source file to pick up them with only one CC?
         2. If there is no mapping how should I proceed in this case?
    Regards,
    Rams

    >>1. Should I create 3 communication channels to pick up 3 different type files? Or should I use the Advanced selection for source file to pick up them with only one CC?
    Not required.. if all the files are from the same directory then u can specify .  in the file name parameter.. but make sure that only these 3 file types are places in the directory... if this is not the case you can use Advannced Selection... check my Wiki [Single Sender File CC For Multiple Directories|https://wiki.sdn.sap.com/wiki/display/XI/SingleSenderFileCCForMultipleDirectories]
    >>2. If there is no mapping how should I proceed in this case?
    Mappiing is required only if the source and the target structure are different.. if u send the file with the IDocc XML format mapping is not required...
    ~SaNv....

  • Help with embedding Javascript for Lightbox Photo Gallery in Muse!

    Hi all:
    I am fairly new to Muse and I have been having trouble finding relevant information for embedding Javascript in order to get a lightbox to work in Muse. Would anyone be able to walk me through embedding the Javascript for the Lightbox Photogallery for Picasa in Muse?
    This is the code I want to use: Lightbox Photo Gallery and Slideshow for Picasa
    And this is the look I am trying to accomplish within my Muse site: Cycling Around The World / January 2006 / Picasa Template by www.paulvanroekel.nl
    Any help would be appreciate. Thanks much,
    Alexis

    Hi,
    I have tried inserting the script that you have pasted above as HTML on my test site and it worked.
    What happens is whenever you insert something as HTML, Muse by default creates a div tag and places the content within the div tag. What I have done differently is I have inserted the JS with in the <script> tag and it has inserted the Javascript in this manner,
    I beleive that since this a browser re-direct script that you are using, you would like to place this in the head section and not in the body tag, however, that is certainly not possible using Muse as it does not allow access to the code it generates as a muse file.
    You, can still export the pages as HTML and make the appropriate changes there before uploading to the server.
    Hope that helps.
    Regards,

  • "Adobe Photoshop Lightroom 5.4 can't be installed on this disk. An error occurred while evaluating JavaScript for the package."

    Hi there,
    I'm getting this error on trying to install / update LR 5.3 to 5.4:
    "Adobe Photoshop Lightroom 5.2 can't be installed on this disk. An error occurred while evaluating JavaScript for the package."
    I hope there's somebody that can help me out here.
    Cheers

    Hi kglad,
    Sorry for the late response:
    Here's the screenshot you wanted:
    It's in Dutch but it 's exactly the same as posted above by abphoto.biz
    I'm running OS X Maverick on an early iMac (2007). No problems until now.....
    Hope you can help,
    Cheers

Maybe you are looking for

  • Help! Airport Status Off

    Hi all! this weekend my AirPort started having problems. The AirPort icon suddenly showed that the AirPort status was off and, obviously, internet connectivity went down. Following is a list of troubleshooting steps I already took but without any suc

  • EP- CRM- BAB-BSP-Applications problem

    Hi Guys, When we are trying to copy the existing CRM BSP application to new BSP applicaiton using BAB [Bluprint Application Builder], we are encountering the following error " Object R3tr Tabu CRMC_Blueprntc, referred to by the object key, does not e

  • Error 1050 with matlab script

    Hi , i'v built an vi which sampling saving and playing audio files , i've also added matlab script for data analysis. the script tested in matlab and in matlab works great , when im trying to use it in labview i'm getting an error while the matlab sc

  • File Transfer Via ModBus

    I am hoping to transfer data (file size between 70kB~1MB) between two remote locations. I played around with "MB Ethernet Example Master" from ModBus toolkit and was able to successfully send/receive boolean and numeric values. Here are 2 questions:

  • Some Niggling Issues with X6-00 16GB

    Issues with the current software. Most still there after the latest software update to v31.0.004 1. Music player volume control refuses to function sometimes from the remote volume adjustment provided in the headset. >Volume adjustment when other app