top

CAPH.WUI.ENGINE.RENDERING.BASEPAGE

BasePage allows you to set up what and where to be rendered by "Caph / Rendering Core." This is where you place objects.


Constructor

BasePage

Description
Create an instance of BasePage
Parameters
position_option (Optional) Object* position_option.x : X position of the BasePage * position_option.y : Y position of the BasePage
size_option (Optional) Object * size_option.width : Width of the BasePage * size_option.height : Height of the BasePage
Emulator SupportY
SDK ConstraintNone
Example
var AccRendering = caph.wui.engine.rendering;

// position_option and size_option are optional.
// When none is given, default position and default size are used.
// The default is to fill the whole screen.
var basePage = new AccRendering.BasePage();

// Create a CssObject
var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var renderer = new AccRendering.CssRenderer();
// Use the basePage that has been created.
renderer.render(basePage);

Methods

BasePage

Description
(Constructor) Create an instance of BasePage
Parameters
■position_option (Optional)
  - Object
   * position_option.x : X position of the BasePage
   * position_option.y : Y position of the BasePage

■size_option (Optional)
  - Object
   * size_option.width : Width of the BasePage
   * size_option.height : Height of the BasePage
Return■BasePage
  - An instance of BasePage
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;

// position_option and size_option are optional.
// When none is given, default position and default size are used.
// The default is to fill the whole screen.
var basePage = new AccRendering.BasePage();

// Create a CssObject
var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var renderer = new AccRendering.CssRenderer();
// Use the basePage that has been created.
renderer.render(basePage);

dispose

Description
dispose scene, camera, renderer on basePage
Parameters
■Void
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.(obj);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

basePage.dispose();
renderer.render(basePage);

add

Description
BasePage 'add' method allows you to set up what to be rendered by Web UI Adaptation Engine. This method takes an object as an argument.
Parameters
■object
  - Object 
  - An object of type Object to be added to the BasePage
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.add(obj);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

remove

Description
BasePage 'remove' method allows you to remove an object from the renderer. This method takes an object and renderer as arguments.
Parameters
■object
  - Object
  - An object of type Object to be added to the BasePage    
■renderer
  - Object
  - The renderer from which the object is to be removed.
Return■Void
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.remove(obj);

var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);

setPreventDefault

Description
prevent touchstart, touchmove, touchend event
Parameters
■Void
Return■Boolean
  - false : Always return false.
Emulator SupportY
SDK Constraintnone
Example
var AccRendering = caph.wui.engine.rendering;
var basePage = new AccRendering.BasePage();

var element = document.createElement('div');
element.style.width = '100px';
element.style.height = '100px';
element.style.background = '#00AAAA';

var obj = new AccRendering.CssObject(element);
basePage.remove(obj);
basePage.setPreventDefault();
var renderer = new AccRendering.CssRenderer();
renderer.render(basePage);