node-webkit

What is the best practice for loading multiple textures in three.js?

浪子不回头ぞ 提交于 2019-12-13 15:49:02
问题 Having recently switched to three.js as my renderer, I am now wanting to set up a system for mapping textures. However, I'm not too sure on what the best practice for this is. Here is my use case I have levels made of a lot of box geometries I need to be able to map a wide variety of textures to each face of each box geometry (grass, water, stone, rock etc.,) I would like to do this in the most efficient, performance conscious way as possible, so offloading this to the GPU would be best if

Enable touch events in node webkit

可紊 提交于 2019-12-13 13:45:50
问题 Im using a custom touchscreen and I want to activate by default the touch event in node-webkit, is that possible? This one tell node-webkit how to open the app and control how the browser behaves. Update: I'm using Ubuntu like OS, all functionality of touch events work like you are using a mouse(For example you need to scroll down with the scroll bar..). The question is how can I tell my OS that I need to use the mobile touch events? Thank you. 回答1: Add "chromium-args": "--touch-events", to

Uncaught Error: Cannot find module 'cheerio' Nodewebkit

爱⌒轻易说出口 提交于 2019-12-13 06:35:19
问题 I am trying to develop a node webkit application and trying to use the cheerio library. I have imported it using var cheerio = require("cheerio"); However when I run the program, I get the following error: Uncaught Error: Cannot find module 'cheerio' module.js:329 My node_modules folder contains the cheerio folder and I have included it in my package.json file as well. I even tried installing cheerio globally and I face this error. 来源: https://stackoverflow.com/questions/31489279/uncaught

Requiring/running JavaScript outside of node-webkit application

久未见 提交于 2019-12-12 22:14:54
问题 Suppose I have the following app structure: outer-folder/ ├── my-app/ └── settings.js where my-app/ is either the unbuilt directory that contains package.json or the packaged application my-app.exe or my-app.app . I cannot package settings.js with the rest of my app, because I want this file to be editable by users, and loaded upon startup to configure my app. Moreover, I plan to allow settings.js to reside anywhere (for example, in the user's home directory) and be loadable from there. This

Detect screen lock in Node WebKit

烂漫一生 提交于 2019-12-12 18:26:01
问题 I'm developing an application for Windows using node WebKit and want to perform some tasks when the user locks the screen like stopping some timers. Is it possible in node WebKit. I looked into screen geometry but it seems to offer only detecting number of screens mainly for multi screen apps. Thanks 回答1: Use the API function OpenInputDesktop from the library user32.dll . The call can be made through the node-ffi module: var FFI = require('node-ffi'); // user32.dll var user32 = new FFI

Debug node modules in nwjs

偶尔善良 提交于 2019-12-12 03:33:19
问题 We're developing an application based on node webkit (nwjs) that is a mix of node modules and angular code. A lot of business logic has been moved to the node modules and I haven't found a way to debug that code in the running application. Debugging with devtools doesn't seem to work, and that's a known limitation or bug (Debugging with devtools). I even tried to require node-monkey from one of the scripts, hoping to be able to open some sort of backdoor ;) - didn't work unfortunately. So is

How to find out if reading dir is completed

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:18:37
问题 everyone I am working on some sort of image view application using node-webkit. I made a function to read dir inside the given location and search for the image files(*.jpg and *.png). Code I used is as follows: app.js var fs = require("fs"); var gui = require('nw.gui'); var win = gui.Window.get(); var directory; var db = require('diskdb'); var path = require('path') db = db.connect("lib/collections", ['temp']); function chooseFile(name) { var chooser = $(name); scr = 0; chooser.change

NodeWebkit - deploy the application

空扰寡人 提交于 2019-12-12 00:42:00
问题 I have one code base for both Web and NodeWebkit (NW) application. I use the following stack: - React - Hapi - Sequelize - Windows environment Web version of the application uses MySQL, while NW uses Sqlite. It all works fine. I have config file that compiles application for what I need (web or NW). The problem that I face now is how to deploy the NW application. Idea is to provide NW applicaiton to a client, where he will open it clicking the icon. Since I use the Node for the NW version,

How to run a function when Ember finished loading for the first time

无人久伴 提交于 2019-12-11 21:22:32
问题 Hi i'm writing a simple ember app that I run within a node-webkit app, now I would like to run: require("nw.gui").Window.get().show(); right after Ember finished loading and had rendered the index view, but just once, not if you've just navigated to / . I've tried this: App.IndexRoute = Ember.Route.extend({ setupController: function(controller) { require("nw.gui").Window.get().show(); } }); But this executes on each navigation to / Thanks! 回答1: Ember.Application has a ready event. That could

Serialport.js in Node-webkit (nw.js) on Win 7

こ雲淡風輕ζ 提交于 2019-12-11 21:09:39
问题 How does one get serialport to work with nw.js on Windows? I have seen a bunch of articles on the web about compiling with node-pre-gyp, but can't get that to work. Also, the targets seem to be conflicting between serialport and nw.js. So I'm pretty confused. Does anyone have step by step instructions on how to do this? I am a node rookie. Windows 7 nw running nodejs v1.2.0 (the latest nw.exe) 来源: https://stackoverflow.com/questions/30085097/serialport-js-in-node-webkit-nw-js-on-win-7