Inartis
About Inartis  |   Shopping Cart  |  
Kribi 3D
Product
Resources
Download
Purchase
Resources Feature Lab Getting Started Basic Concepts Api’s References
Kribi 3D Player Api's Reference
 
  • API Interface
  • API Syntax
  • API's References
    • Animation
    • Assemblies
      • Assembly overview
      • Child Hook
      • Hot Segment
      • Hot Spot
      • Parent Hook
    • Background
    • Camera
    • Color
    • Instance
    • Light Source
    • Material and Maps
      • Material
      • Material /Maps
    • Model
    • Object
    • Picture
    • Player
    • Player Signals
    • Polygonal Modeling
      • Modeling overview
      • Face
      • Mesh
      • Vertex
    • Realistic Light
    • Realistic Lighting
    • Renderer
    • Script
    • Snapshot
    • Solid Texturing
      • Color Map
      • Color Map Strip
      • Noise Generator
      • Solid Texture
      • Solid Texture Component
    • Interactive Tools
      • Tool
      • Tool /Camera Clip
      • Tool /Camera Move
      • Tool /Camera Orbit
      • Tool /Camera Rotate
      • Tool /Camera Walk
      • Tool /Camera Zoom
      • Tool /Instance Move
      • Tool /Instance Rotate
      • Tool /Instance Size
      • Tool Preferences
    • View
    • Work Light
    • Work Lighting
API Syntax
last update: 26 june 2011
 
The Kribi 3D Player Application Programming Interface (API) supplies all the functions for creating rich internet and desktop applications.

The functions are methods belonging to classes, of which every class implements a set of operations and properties to interact with Player behavior and to manipulate the elements of the Model.
Classes and dependencies
 
Classes and dependencies diagram
 
Extended Notation
   
  For all classes with an element multiplicity, the element can be implied indicating the current element, or indicated specifying it’s index or name:
The class name alone represents the current element.
  Color RGB returns the RGB value of the current color
   
The class name followed by a number N enclosed in [ ] indicates the element index of the sequence.
  Color[3] RGB returns the RGB value of the 3rd color
   
The class name followed by a string enclosed in [‘ ‘] indicates the element name.
   
  Color['red'] RGB returns the RGB value of the color named red
   
 
Operations 
   
  Operations can be performed on elements of the model and on various components of the Kribi 3D Player.
To perform an operation use the notation ClassName OperationName.
   
Extended notation is only available for some operations.
 
Color Copy Creates a new color by copying all the properties of the current color
Color[index] Copy Creates a new color by copying all the properties of the specified index color
 Color['name'] Copy Creates a new color by copying all the properties of the specified name color
   
To perform an operation on a model element, set the element as current or indicate it with an extended notation if available.
   
 
Properties
   
  Model elements and each of the components of the Kribi 3D Player have a number of properties, all the properties are read and write.
 
To set the value of a property, use the notation ClassName PropertyNamevalue
  Color RGB 255,0,0 sets the current color to red
   
  Setting a property returns its previous value.
   
To Get the value of a property, leave out the value, use the notation ClassName PropertyName that returns the value
  Color RGB To get the value of the RGB property of the current  color, returns 255,0,0.
   
The extended notation is available for all properties.
   
 
Color RGB 255,0,0 Sets the RGB value of the current color.
Color[3] RGB 255,0,0 Sets the RGB value of the 3rd color
Color['red'] RGB 255,0,0 Sets the RGB value of the color named red.
   
To get or set the property of a model element, set the element as current or indicate it with an extended notation. If you try to set or get a property with no current element it will return an empty string.
 
 
JavaScript API Syntax
   
 
The use of string value must be enclosed in two single apostrophe ' '.
  For a name like RED, the final string becomes RED

If you are using apostrophe in a string, probably you have come across problems, because it causes the string statement to fail, the solution is to replace every apostrophe in a string with a double apostrophe.

Something like O'Malley, in the final string for an Object Name property looks like:
Object Name O’’Malley. The second ' escapes the third ', thus leaving the whole property statement complete.

In JavaScript, use the replace() method of the string class and use a regular expression to correct the apostrophe within the string.
   
 
var MyObjectName = "O'Malley";
MyObjectName = String(MyObjectName).replace(/'/g, "''")
   
 
Kribi 3D Engine
 
Kribi 3D Player
Get Kribi 3D Player
License
Plug-in test page
Release Notes
Resources
Feature Lab
Basic Concepts
Getting Started
Api's References
  Kribi 3D Designer
  Download 90 day Trial
  Compare and Buy
  License
  Release Notes
  Product Faq
  About Inartis
  Contact Us
  Services
 
 
Copyrights © 2010-2012 Inartis SA. | PRIVACY | TERMS OF USE