projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed resource package install error
[platform/core/uifw/dali-toolkit.git]
/
node-addon
/
examples
/
texture-mesh.js
diff --git
a/node-addon/examples/texture-mesh.js
b/node-addon/examples/texture-mesh.js
index
f37fd67
..
27f7744
100644
(file)
--- a/
node-addon/examples/texture-mesh.js
+++ b/
node-addon/examples/texture-mesh.js
@@
-20,11
+20,14
@@
var imageDir = "./images/";
var imageDir = "./images/";
-// desktop
-//var dali = require('../build/Release/dali')( options );
-
-// target
-var dali = require('dali')( options );
+try {
+ // target
+ var dali = require('dali')( options );
+}
+catch(err) {
+ // desktop
+ var dali = require('../build/Release/dali')( options );
+}
var daliApp = {};
var daliApp = {};
@@
-93,13
+96,11
@@
daliApp.createMeshActor = function() {
var indexDataArray = new Uint32Array(indexData.length);
indexDataArray.set(indexData, 0);
var indexDataArray = new Uint32Array(indexData.length);
indexDataArray.set(indexData, 0);
- var indices = new dali.PropertyBuffer(indexFormat);
- indices.setData(indexDataArray, 6);
// Create geometry
var geometry = new dali.Geometry();
geometry.addVertexBuffer( texturedQuadVertices );
// Create geometry
var geometry = new dali.Geometry();
geometry.addVertexBuffer( texturedQuadVertices );
- geometry.setIndexBuffer( ind
ices
);
+ geometry.setIndexBuffer( ind
exDataArray, 6
);
var renderer = new dali.Renderer(geometry, shader);
renderer.setTextures(textureSet);
var renderer = new dali.Renderer(geometry, shader);
renderer.setTextures(textureSet);