Utilities for converting model files to the Three.js JSON format. It's necessary to install the esm npm package before you can use the converters.
Usage:
node -r esm obj2three.js model.obj
Utilities for converting model files to the Three.js JSON format. It's necessary to install the esm npm package before you can use the converters.
Usage:
node -r esm obj2three.js model.obj
| <template> | |
| <div class="googleyolo"> | |
| <v-btn light v-if="!loggedIn && useLoginButton" @click="login">Login</v-btn> | |
| <v-menu v-if="user" bottom left offset-y> | |
| <v-btn slot="activator" icon large> | |
| <v-avatar size="32px"> | |
| <img | |
| :src="user.picture" | |
| alt="profile_picture" | |
| > |
| const firebase = require('firebase-admin'); | |
| var serviceAccountSource = require("./source.json"); // source DB key | |
| var serviceAccountDestination = require("./destination.json"); // destiny DB key | |
| const sourceAdmin = firebase.initializeApp({ | |
| credential: firebase.credential.cert(serviceAccountSource) | |
| }); | |
| const destinyAdmin = firebase.initializeApp({ |
| //JavaScript implementation of winding number algorithm to determine whether a point is inside a polygon | |
| //Based on C++ implementation of wn_PnPoly() published on http://geomalgorithms.com/a03-_inclusion.html | |
| function pointInPolygon(point, vs) { | |
| const x = point[0], y = point[1]; | |
| let wn = 0; | |
| for (let i = 0, j = vs.length - 1; i < vs.length; j = i++) { | |
| let xi = vs[i][0], yi = vs[i][1]; | |
| let xj = vs[j][0], yj = vs[j][1]; |
| function exportSpreadsheet() { | |
| //All requests must include id in the path and a format parameter | |
| //https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
| //FORMATS WITH NO ADDITIONAL OPTIONS | |
| //format=xlsx //excel | |
| //format=ods //Open Document Spreadsheet | |
| //format=zip //html zipped | |
You don't really need a framework or fancy cutting-edge JavaScript features to do two-way data binding. Let's start basic - first and foremost, you need a way to tell when data changes. Traditionally, this is done via an Observer pattern, but a full-blown implementation of that is a little clunky for nice, lightweight JavaScript. So, if native getters/setters are out, the only mechanism we have are accessors:
var n = 5;
function getN() { return n; }
function setN(newN) { n = newN; }
console.log(getN()); // 5
setN(10);
| function myFunction() { | |
| var option = googleOAuth_(); | |
| option.method = "post"; | |
| option.contentType = 'application/json'; | |
| option.payload = JSON.stringify({ | |
| "query": | |
| { | |
| "kinds": | |
| [ |
| /** | |
| * Function to convert a given Google Spreadsheet [Sheet] into a PDF. | |
| * | |
| * @param {string} key This is the Id of the Sheet to be converted bothe the DocsList.getId() and the SpreadsheetApp.getId() versions work | |
| * @param {string} name [Optional] Intended Filename. If omitted, uses the Sheet filename. | |
| * @param {object} options Settings object for the crafting of the PDF. Defaults to A4, no gridline print etc. <pre> | |
| * { | |
| * format:Enum, | |
| * size:Enum, | |
| * headers: Bool, |
| function uploadXls(file) { | |
| authorize(); | |
| var key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // <-- developer key | |
| var metadata = { title: file.getName() } | |
| var params = {method:"post", | |
| oAuthServiceName: "drive", | |
| oAuthUseToken: "always", | |
| contentType: "application/vnd.ms-excel", | |
| contentLength: file.getBytes().length, | |
| payload: file.getBytes() |