This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = await new VirtualFileSystem({name: "my-project"}).onCreate(); | |
const worldCount = await fs.readCount("worlds"); | |
console.log(`Saved worlds: '${worldCount}'`); | |
const insertId = await fs.insert("worlds", "hello", inputWorld); | |
console.log(`Inserted world at '${insertId}'`); | |
const outputWorld = await fs.readById("worlds", insertId); | |
console.log(`Output world '${insertId}':`, outputWorld); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from "fs"; | |
function findIncludedFile(filePath, includes) { | |
let matches = []; | |
for (let ii = 0; ii < includes.length; ++ii) { | |
let incl = includes[ii]; | |
let stats = fs.lstatSync(incl); | |
if (!stats.isDirectory()) { | |
throw new SyntaxError(`Include path '${incl}' is not a directory`); | |
} |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* MACHINE GENERATED, DO NOT EDIT | |
* GENERATED BY nvk v0.7.8 | |
*/ | |
"use strict"; | |
const {platform} = process; | |
const nvk = require("./build/Release/addon-" + platform + ".node"); | |
let ENABLE_SHARED_MEMORY_HINTS = !!process.env.npm_config_enable_shared_memory_hints; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
import re | |
import subprocess | |
import os | |
class GLShaderError: | |
""" Represents an error """ | |
region = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app info | |
let appInfo = new VkApplicationInfo(); | |
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; | |
appInfo.pApplicationName = "Hello!"; | |
appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0); | |
appInfo.pEngineName = "No Engine"; | |
appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); | |
appInfo.apiVersion = VK_API_VERSION_1_0; | |
// create info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input example: A simple Quad | |
// field `_typelessdata` | |
mesh = `000080bf000080bf0000000000000000000000000000803f00000000000000000000803f000080bf0000000000000000000000000000803f0000803f00000000000080bf0000803f0000000000000000000000000000803f000000000000803f0000803f0000803f0000000000000000000000000000803f0000803f0000803f`; | |
// field `m_IndexBuffer` | |
index = `0000010002000300`; | |
// normalize | |
mesh = normalizeString(mesh); | |
index = normalizeString(index); |